Hello, I am solving Cahn-Hillard equation where I have Laplacian in my equation. In order to discretize the Laplacian, I can discretize with 5-point or 9-point stencil.
5 point stencile: laplacian=(aY[j][i+1].p+aY[j][i-1].p-2.0*aY[j][i].p)/(hx2))+((aY[j+1][i].p+aY[j-1][i].p-2.0*aY[j][i].p)/hy2) 9-point stencil:(4.0*(aY[j][i+1].p+aY[j][i-1].p+aY[j+1][i].p+aY[j-1][i].p)+1.0*(aY[j+1][i+1].p+aY[j+1][i-1].p+aY[j-1][i+1].p+aY[j-1][i-1].p)-20.0*aY[j][i].p)/(6.0*hx2); I use DMDATSSetIFunctionLocal. In the function definition, if I use 5 point stencil, everything works fine, if I use a 9-point stencil, at the points which are in common between processors the answers behave strange and wrong. while for 9-point stencil, I use single processor everything works fine. Assume I have 4 processors and the domain that belongs to each processor is: (0:nx , 0:ny) process one (nx+1:2nx , 0:ny) process two (0:nx , ny+1:2*ny) process three (nx+1:2nx , ny+1:2*n) process four I guess the problem is when processor one tries to access point (nx+1,ny+1). I did not find any data if the definition of local vector includes the point (nx+1,ny+1) for this processor or not. I would like to see how should I solve this issue. Regards, Sepideh
