Hello Stephane
I realized that when passing a Point to a function in a foreach_face loop the code is not doing what I was expecting (but maybe is doing what it is supposed to do:).
Here is an example. You will see first that the x,y coordinate is shifted to the cell centered value within the function fun. What bothers me more is that d0[0,1] is not returning the same value at the top boundary.
Is this what the code is supposed to do or it is a bug?
thanks for your help,
Daniel
scalar d0[];
void fun (Point point, scalar d0) {
printf("inside %g %g %g \n", x, y, d0[0,1]);
}
int main () {
init_grid(16);
foreach ()
d0[] = sqrt( sq(x) + sq(y) );
foreach_face () {
printf("%g %g %g \n", x, y, d0[0,1]);
fun(point, d0);
printf("\n");
}
}