<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hello, <br>
</p>
<p style="margin-top:0;margin-bottom:0">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.
<br>
</p>
<p style="margin-top:0;margin-bottom:0">5 point stencile: laplacian=<span>(aY[j][i+1].p+aY[j][i-1].p-2.0*aY[j][i].p)/(hx2))+<span>((aY[j+1][i].p+aY[j-1][i].p-2.0*aY[j][i].p)/hy2)</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span><br>
</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>9-point stencil:<span>(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);</span></span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span></span></span><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I use <span>DMDATSSetIFunctionLocal</span>. In the function definition, if I use
<span>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.
<br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>Assume I have 4 processors and the domain that belongs to each processor is:</span></p>
<p style="margin-top:0;margin-bottom:0"><span>(0:nx , 0:ny)   process one</span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>(nx+1:2nx , 0:ny)   process two</span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span></p>
<p style="margin-top:0;margin-bottom:0"><span>(0:nx , ny+1:2*ny)   process three</span></p>
<span><span>(nx+1:2nx ,<span><span> ny+1:2*n</span></span>)   process four</span></span><br>
</span>
<p></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>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.</span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>Regards,</span></p>
<p style="margin-top:0;margin-bottom:0"><span>Sepideh<br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
</div>
</body>
</html>