Start page of documentationDownload the codeDocumentation:
PDF, PS

Previous: Embedding into a rectangular domain Next: Correction terms

Discretisation in a rectangle

Over $ \Omega^*$ a regular grid with mesh widthes $ h_x$ and $ h_y$ in $ x$ and $ y$ directions respectively is imposed. In code they are denoted by hx and hy. $ n_x$ and $ n_y$, in code nx and ny (ASSEMBLE/problem_setup.m) are the number of grid points in $ x$ and $ y$ directions. Important is to note that number of grid points should be counted in Matlab convention, it is, starting from 1 and not from 0.

Due to the simplified geometry pre-processor which is used in the online version of the code, the parameters $ n_x$ and $ n_y$ have to be selected such that $ h_x$ and $ h_y$ are equal. This restriction can be removed without any further changes if the geometry pre-processor is replaced.

The $ \Delta$ operator of (1) is discretised in $ \Omega^*$ by standard central finite differences:

$\displaystyle \Delta u\approx \frac{1}{h_x^2}\left( u_{i+1,j}-2u_{i,j}+u_{i-1,j}\right) +\frac{1}{h_y^2}\left( u_{i,j+1}-2u_{i,j}+u_{i,j-1}\right)  .$ (2)

The resulting standard finite difference matrix is denoted by $ \mathbf{A}$, is stored in variable A and computed by function DIFFOP/sysmatrix_poisson.m.


Previous: Embedding into a rectangular domain Next: Correction terms

V. Rutka, A. Wiegmann, 2005