Data structure

After the discretization of the Poisson equation in curvilinear co-ordinates, one has to solve the following matrix vector system:


  $\displaystyle A x = f,
$ (5.25)



where $A$ is the discrete Poisson operator, $x$ is an approximation of the setup (of the water level), and the right hand side vector $f$ contains the effects of the boundary conditions and the forces due to the surface waves. In the solver it is very efficient to calculate with direct addressing, so dry points are included in the vector $x$. This implies that the dimension of $x$ and $f$ are fixed and equal to $MXC
\times MYC$. In the discretization a 9-point stencil is used. That implies that only 9 matrix elements per row are non-zero. These elements are stored in a diagonal-wise way. So for this part $NWKARR = 9$. The rows corresponding to dry points are filled with zeroes except on the main diagonal where the value 1 is substituted. The value of $x$ and $f$ are taken equal to 0 at these points.

The SWAN team 2024-09-09