sandbox/bugs/mgbc.c
Box-boundary values are not set consistently
Here the quadtree version is demonstrated. The bottom-left ghost cell
has a value of s = 5
, However, on a multigrid (or Cartesian
grid) it becomes s = 1
. I wish it was 3?
set xr [-0.3:0.6]
set yr [-0.3:0.6]
set size square
set key off
plot 'log' w l lw 2, 'out' u 1:2:3 w labels
//#include "grid/multigrid.h" // <- uncomment for MG
scalar s[];
[left] = dirichlet (2.);
s[bottom] = dirichlet (2.);
s
int main() {
(4);
init_grid foreach()
[] = 1.;
soutput_cells (stderr);
foreach()
foreach_neighbor(1)
printf ("%g %g %g\n", x, y, s[]);
}