Tutorials for Numerical Methods for Partial Differential Equations
Lecturer: Dr. Clemens PechsteinThis tutorial will be given in english.
Time and Room: Monday 10.15 – 11.45, T 212
Tutorial | Date | Assignment |
---|---|---|
01 | 12 Oct. 2009 | |
02 | 19 Oct. 2009 | |
03 | 9 Nov. 2009 | |
04 | 16 Nov. 2009 | |
05 | 23 Nov. 2009 | |
06 | 30 Nov. 2009 | pdf richardson.hh |
07 | 7 Dec. 2009 | pdf cg.hh |
08 | 14 Dec. 2009 | |
Christmas break | ||
09 | 11 Jan. 2010 | |
10 | 18 Jan. 2010 | |
11 | 25 Jan. 2010 |
In the tutorials we study the material in the lecture in homework assignments (for the Austrian students: "Kreuzerlübung"). Half of them are convential math style. In the remaining 50% we will work on a finite element code in C++ (basic knowledge of C should be enough to attend the tutorial). This will be guided and split into small parts. In the tutorial the solutions of the math style problems are discussed on the blackboard, as well as the solution of the programming examples.
C++ Examples
- class for a complex number: ex_complex1.cc (simple), ex_complex2.cc (advanced)
- vector class: ex_vector1.cc (using pointer array), ex_vector2.cc (using std::valarray)
Gnuplot
For visualization, you can use gnuplot which is available on most Linux systems. There is also WGnuplot for Windows. Also matlab might be a good alternative.
Example for gnuplot:
File data.gpd:
#x y
0 1.5
1 2
2 3.5
3 1.2
4 1
Now call gnuplot and type
plot 'data.gpd' using 1:2 w lp
This means call column 1 of 'data.gpd' against column 2 with lines and points
The result should look like this:
C++ Links / Literature
- online C++ tutorial
- online C++ reference
-
For advanced readers:
Scott Meyers: "Effective C++" (or "More Effective C++"), a collection of really good hints and advices
Bjarne Stroustrop: "The C++ Programming Language", a fat book by the inventor of C++ himself, where you should find almost everything.
top