I am trying to implement Adaptive Mesh Refinement. I am not a Mathematics/Computational Science person so I will try to write the algorithm in a simpler way. I will be grateful if experts can comment on the correctness of steps:
Aim: To solve Laplace Equation with Dirichlet boundary conditions i.e. $\nabla^{2} u = 0 $ and $u = 1$ on $\partial \Omega$. Assume 3 levels of static refinement (say for 2-D mesh on $[0,1]$ I refine cells with $x^{2}+y^{2}>0.7$ and $x^{2}+y^{2}<0.9$, where $x, y$ are coordinates).
- Initialize $u = 0$ on all levels.
- Solve on coarsest level (level 1) using 5-pt stencil Jacobi iterations. The initial value of $u$ at level 2 is used as Coarse-Fine interface value.
- Exchange ghost cells for parallel implementation at coarsest level.
- Interpolate coarse grid cells at level 1 to fill ghost cells at level 2.
- Solve on level 2. The initial value of $u$ at level 3 is used as Coarse-Fine interface value (and also the interpolated values in ghost cells).
- Exchange ghost cells for parallel implementation at level 2.
- Repeat same at level 3.
- Now restrict from level 3 to 2 and level 2 to 1 (so that coarser grids see some part of the solution at finer grids).
Repeat these steps.
Are these steps correct ?
(In 3-D my mesh looks like the following)
