Computational Physics
Course instructor
Zohaib Akram Khan
Lecturer
Computational physics is the study of scientific
problems using computational methods; it
combines computer science, physics and applied
mathematics to develop scientific solutions to
complex problems.
What is computational Physics?
•Performs calculations
A billion of calculations per second!
•Remembers results
100s of Giga bytes of storage!
What does a computer do?
•Built in to the language.
Addition-subtraction-division etc
•Ones that you define as the
Programmer.
“Computers only know what you tell
them”
What kinds of Calculations?
INTRODUCTION TO
C++
• C++ is one of the fastest, popular and
most efficient computer language.
APPLICATIONS OF C++
• High performance applications
• Video games
• Device drivers
• Web browsers
• Servers
• OS (operating systems)
C++ IS USED BY:
Adobe
Google
Microsoft
Netflix
NASA
National Aeronautics and Space Administration
(NASA)
POTENTIAL IN C++
• C++ is one of the popular programming
language to develop various types of
applications.
• In US an average annual salary of C++
programmer is 117695 USD
source: indeed.com
POPULAR IDEs
Integrated Development Environment
Editor + Build and Debugging tools
Debugging
The process of finding and fixing errors
and bugs in the source code of any
software.
POPULAR IDEs
M S Visual
Studio
C Lion
Dev-C++
Turbo C++
Code
Blocks
Note: we shall use Dev-C++
INSTALLING DEV C++
go to filehippo.com and search DEV C++ in search
section
INSTALLING DEV C++
for own convince we will go for older version listed
downward.
INSTALLING DEV C++
download by clicking on Download (50.43 MB)
INSTALLING DEV C++
After installation this will be the user interface.
INSTALLING DEV C++
Click on file and then source file to get started.
• A program is set of instructions for a computer to follow
• Whenever we give a computer both a program to follow
and some data for the program, we are said to be
running the program on the data, and the computer is
said to execute the program on the data.
What is a program?
Programs that translate a high-level language like
C++ to a machine-language that the computer can
directly understand and execute.
Compilers
C++ program
Source Code
Compiler
Object code for C++
program Linker
Object code for
other routines
Preparing a C++ program for Running
• Types of program errors:
• Syntax errors
• Violations of the rules of the programming language
• Run-time errors
• Detected by computers when the program is run (numeric
calcualtions)
• Logic errors
• Mistakes in the underlying algorithm or translating the
algorithm into C++ language
Testing and Debugging
Thank You

Lecture Computational Physics.pptxPhysics Bsc

  • 1.
  • 2.
    Computational physics isthe study of scientific problems using computational methods; it combines computer science, physics and applied mathematics to develop scientific solutions to complex problems. What is computational Physics?
  • 3.
    •Performs calculations A billionof calculations per second! •Remembers results 100s of Giga bytes of storage! What does a computer do?
  • 4.
    •Built in tothe language. Addition-subtraction-division etc •Ones that you define as the Programmer. “Computers only know what you tell them” What kinds of Calculations?
  • 5.
    INTRODUCTION TO C++ • C++is one of the fastest, popular and most efficient computer language.
  • 6.
    APPLICATIONS OF C++ •High performance applications • Video games • Device drivers • Web browsers • Servers • OS (operating systems)
  • 7.
    C++ IS USEDBY: Adobe Google Microsoft Netflix NASA National Aeronautics and Space Administration (NASA)
  • 8.
    POTENTIAL IN C++ •C++ is one of the popular programming language to develop various types of applications. • In US an average annual salary of C++ programmer is 117695 USD source: indeed.com
  • 9.
    POPULAR IDEs Integrated DevelopmentEnvironment Editor + Build and Debugging tools Debugging The process of finding and fixing errors and bugs in the source code of any software.
  • 10.
    POPULAR IDEs M SVisual Studio C Lion Dev-C++ Turbo C++ Code Blocks Note: we shall use Dev-C++
  • 11.
    INSTALLING DEV C++ goto filehippo.com and search DEV C++ in search section
  • 12.
    INSTALLING DEV C++ forown convince we will go for older version listed downward.
  • 13.
    INSTALLING DEV C++ downloadby clicking on Download (50.43 MB)
  • 14.
    INSTALLING DEV C++ Afterinstallation this will be the user interface.
  • 15.
    INSTALLING DEV C++ Clickon file and then source file to get started.
  • 16.
    • A programis set of instructions for a computer to follow • Whenever we give a computer both a program to follow and some data for the program, we are said to be running the program on the data, and the computer is said to execute the program on the data. What is a program?
  • 17.
    Programs that translatea high-level language like C++ to a machine-language that the computer can directly understand and execute. Compilers
  • 18.
    C++ program Source Code Compiler Objectcode for C++ program Linker Object code for other routines Preparing a C++ program for Running
  • 19.
    • Types ofprogram errors: • Syntax errors • Violations of the rules of the programming language • Run-time errors • Detected by computers when the program is run (numeric calcualtions) • Logic errors • Mistakes in the underlying algorithm or translating the algorithm into C++ language Testing and Debugging
  • 20.