Solving heat equation with PETSc *)
Initialization of matrix A
Initialization of the boundary condition b
- Data: Vector u := predefined exact solution Vector b := boundary condition (RHS) Vector x := approximate solution computed
- Initialization of b, u: b, u – see previous slides [ heat, u(x,y)=x ]or with –random_exact_sol: u = random values, b := Au
Checking the solution error_norm = || x – u ||2
*) based on petsc/src/sles/examples/tutorials/ex2.c