Description of the course and exam
can be found in
Lectures.pdf
The book edition 1 is available in electronic form
here
Dependencies of the include files can be checked
here
The lectures will take place in the computer college room at NIKHEF, H2.39.
A useful link is Wolfram:
Wolfram
the C-code of the sine/cos example from lecture 1 is given here:
myfunc.c
speed.c
and the include file
myfunc.h
the profile output can be seen
here.txt
LECTURE NOTES:
Lecture 1, 1 nov 2011:
Lecture1.pdf
Lecture 2, 4 nov 2011:
Lecture2.pdf
Lecture 3, 8 nov 2011:
Lecture3.pdf
Lecture 4, 11 nov 2011:
Lecture4.pdf
Lecture 5, 15 nov 2011:
Lecture5.pdf
Lecture 6, 18 nov 2011:
Lecture6.pdf
Lecture 7, 22 nov 2011:
Lecture7.pdf
Lecture 8, 25 nov 2011:
Lecture8.pdf
Lecture 9, 29 nov 2011:
Lecture9.pdf
Lecture 10, 2 dec 2011:
Lecture10.pdf
Lecture 11, 6 dec 2011:
Lecture11.pdf
Lecture 12, 9 dec 2011:
Lecture12.pdf
Lecture 13, 13 dec 2011:
Lecture13.pdf
Lecture 14, 16 dec 2011:
Lecture14.pdf
EXERCISES and examples:
Exercise 1 from Lecture 1 can be found
here.
example code is
here
Exercise 2 from Lecture 2 can be found
here.
Example code from exercise 2 can be be found
here.
Example code from exercise 2 (with root plot) can be be found
here.
The root file created in exercise 2 can be found
here.
Example code from lecture 3, integral can be found
here.
Exercise 3 is located in lecture4.pdf.
Source code for Exercise 3 is given
here
, where one should note that in romberg.h I changed JMAX from 20 to 25.
The output from the source code is
here
Exercise 4 from lecture 6 can be found
here
The text file containing the cities and coordinates for exercise 4 is located
here.
The formatted text file containing the cities and coordinates for exercise 4 is located
here ;
the cityname is 26 characters long, followed by a comma. Then the theta angle
between the z-axis from the center of the earth through the northpole is given
in degrees, followed by a comma. Then the phi angle is given. The x-axis runs
through the Greenwich meridian, eastern longitude is positive.
In order to manipulate a container of cities (with names, coordinates, and
maybe methods) one can create an array of C-structs or a vector of C++ objects
in the following manner :
Example to read in cities.txt and manipulate a list of cities
My code - testing 4 strategies is given
here,
with output
here and
here.
Examples from Lecture 8, creating digital images, are given
here for NR version 2 , include also
fourn.cpp, and
here for NR version 3.
Exercise 5 is given in lecture 8 and in the document
here :
The data file for this exercise is located
here :
An implementation of the code is
here :
Exercise 6 (calculating planetar orbits) is given
here
Example code, to calculate the pendulum/spring combination, is given
here
Code, for calculating the orbits, is
here
Code for the base wave functions of exercise 7 is
harmonic.cpp
harmonic.h
well.cpp
well.h