Polska wersja

Scientific Computing 2017/18

Tuesday lecture 1015am in room 5870, lab 1215pm room 2041(lab)

Konsultacje:

Patrz: Plan. (room 5010 - IV floor). - during classes only, otherwise please contact me by e-mail

Attention Lab and lecture on May 15,2018 is called off due to the illness of the instructor. Please try to do the problems on your own!

Exam

ROOM 5010
Project (25%) and lab short problems (solved in the lab) 50% - oral questions 25%. During the exam one should show a short report (2-3 pages details in project section) and the code in action and answer a few questions concerning the material presented in the lectures.
The exam in September - please contact me by e-mail to make an appointment.
    Questions/problems for the oral exam.
  1. Sparse matrices formats in octave and in general.
  2. Octave: how to solve in octave the basic computational problems of numerical linear algebra such as solving linear systems, LLSP, eigenvalue problems, SVD etc
  3. Octave: how to compute in octave integrals, double or triple integrals?
  4. Octave: how to solve nonlinear systems of equations? How to compute the inverse of an univariate function? How to compute a value of an implicitely defined function?
  5. Octave: how to solve in octave ODEs?
  6. Numerical solvers for ODEs : simple examples, what is stiffness, adaptive step refinement, multistep schems, Runge's schemes etc (no theory - just ideas as it was presented in the lectures)
  7. Numerical libraries: how to call a fortran function in C? Matrices in fortran: how are they stored in the memory.
  8. Numerical libraries: BLAS what type of functions are in this lib?
  9. Numerical libraries: LAPACK : what does this lib contain? i.e. what computational tasks can we solve using LAPACK?
  10. Numerical libraries: other numerical libs - which library one can use for solving/computing: integrals, nonlinear equations, ODEs. Examples of general numerical libs (contaning solvers almost all problems)
  11. Finite Difference Method - the main idea described on the example of BVP: -u''=f on [a,b] u(a)=al;u(b)=beta
  12. Finite Element Method (the linear element - the simplest one) - the idea described on the example of BVP: -u''=f on [a,b] u(a)=al;u(b)=beta (optional)
  13. Numerical Codes Optimization Techniques: memory hierarchy, Amdahl's law, basic techniques like loop unrolling etc, optimization compiler options.
  14. make, makefile - what is this? What are the basic rules? etc How to write a simple makefile?
  15. How to measure time of the execution of a part of a code in C/C++? (optional)
Optional means that one can refuse to reply to this question/problem - then I ask another.
Next lab

Octave scripts or source C files

Projects

References

  1. P. Krzyżanowski, Obliczenia inżynierskie i naukowe. Skuteczne, szybkie, efektowne, Wydawnictwo Naukowe PWN, 2011
  2. P. Krzyżanowski, Obliczenia naukowe. Html lecture notes (in Polish). Pdf version is also available there. University of Warsaw. 2010.

Lab


A few octave scripts, m-files, source C files, LAPACK functions

Link to Octave

Octave scripts, m-files,simple C files with e.g. examples of an use of BLAS/LAPACK

matbasic.m - a script with basic octave commands we can edit it : gedit matbasic.m
lab2.m - a few solutions of LLSP and linear systems (interpolation)
lab3.m - some simple examples of solving nonlinear equations (fsolve and fzero); computing a graph of an implicit function
lab4.m - some simple examples of integral computing and creating sparse matrices
invfun18.m - a script with solutions to the problem of plotting a graph of the inverse function - see Chpt 3 of lecture notes.
rozd5data.txt - a file with data of example 5.1 (SC lect. notes -chap. 5)
lab5.m - a script with solutions of two problems - solved on Apr 17, 2018.
lab6.m - a script with solutions of two problems - solved on Apr 24, 2018.
earthquake18.m - a script with function finding frequencies and periods of the building and discrete solution on [0,T]
testmacro.c - a simple program using a macro for accesing (i,j) element of a matrix stored in 1D array columnwise - there is a function printing the matrix to the display
cosxy.c - a simple program wit ha function cosxy() computing the cos between two vectors x and y using two BLAS level 1 functions dnrm2() and ddot()
tblas.c - a simple C code using BLAS dnrm2() function - and dynamically allocating memory (using malloc(); free() functions
testlap.c - a simple C code using LAPACK dgesv() function - solving a simple linear system and computing the inverse of A
contrprob18.m - a script with the solution of 1d control problem -u''=f u(0)=s u'(L)=beta we want to find s0 such that u(x;s0) minimizes : \int_(L/2)^L |H(x)-u(x;s)|^2 dx 1/ test for f=0 (then u(x;s)=s) and H(x)=15 then naturally s0=15

Project

Project There is one project, i.e. optimal control of a heated room, described in details (there 2 versions: stationary and unstationary with many possible space discretizations method - I would describe 2 in details during lectures). I have other projects - ask for details).
In the optimal control project I simplified necessary tests (it is enough to test the linear case - cf. describtion for details)

Return to my homepage


Last update : May 28th, 2018