<div dir="ltr"><div><div>Hi there,<br><br></div>I am trying to use NASM to solve a nonlinear problem. In my FormFunctionLocal, I need to call DMDAVecGetArray(da, myvec, z). For the "-da_overlap 0" case, the code works fine. <br><br>For the "-da_overlap 1" case, when I use the vector "myvec" created by DMCreateLocalVector, it works fine. But if I use the vector "myvec" created by DMCreateGlobalVector, I got the error messages:<br>-----------------------<br>[6]Arguments are incompatible<br>[6]PETSC ERROR: Vector local size 597870 is not compatible with DMDA local sizes 619528 664392<br>----------------------<br><br></div>And when I switch to "-da_overlap 2", both of the global and local version of "mrvec" got error messages: <br><div>----------------------------------<br>[10]PETSC ERROR: Arguments are incompatible<br>[10]PETSC ERROR: Vector local size 589680 is not compatible with DMDA local sizes 633144 678680<br><br>[3]PETSC ERROR: Arguments are incompatible<br>[3]PETSC ERROR: Vector local size 619528 is not compatible with DMDA local sizes 650256 696540<br>-----------------------------------<br><br></div><div>Can any one tell me how to use DMDAVecGetArray in FormFunctionLocal for NASM? Thanks.<br><br></div><div>Best regards,<br></div><div>Rongliang<br></div><div><br></div></div>