<div dir="ltr">Matt,<div><br></div><div>Thanks.</div><div><br></div><div>I want to solve neutron diffusion equations using finite difference method and PETSc.</div><div>This rotation boundary condition is very common in my cases.<br></div><div>Though the mesh consists of  ~ 10 Miliion structured hexahedron cells, the mesh is simple and could be discribed by three vectors about x, y and z axis.</div><div>It is appropriate for DMDA except boundary condition. </div><div><br></div><div>I wanted to make mesh partition like DMDA by hand. Then I need to create matrix and vector and assemble matrix, and et al. I thought it was an easy work.</div><div>As you say, it's not.</div><div><br></div><div>As a newer, I can use DACreate2d to begin. It's OK.</div><div>But finally, it does need this optimization.</div><div><br></div><div>Though I read the manual about the vector and matrix, I am not clear about the basic idea behind the code.</div><div>How can I create a matrix and vector as my mesh partition and create the map between the nature ordering and the PETSc ordering in global vector?</div><div>How does vector communicate in the operation of matrix multi vector? Does it achieved automatically?</div><div><br></div><div>BETS,</div><div><br></div><div>Wenbo</div><div><br></div><div><br></div><div><br></div><div><br><div><br></div></div></div>