sandbox/bugs/foreach_bnd.c

This simple code shows a problem with the usage of foreach_boundary with curvature.h and tree meshes. Once this code runs, you will see “Segmentation fault” error. This problem doesn’t happen when the multigrid mesh is used.

#include "grid/quadtree.h"
#include "run.h"
#include "fractions.h"
#include "curvature.h"

int main(){
  init_grid(16);
  L0 = 1.0;
  origin(0.,0.,0.);
  run();
}

event init(i=0){
  foreach_boundary(left)
    printf("Hello.\n");
}