On Mar 6, 2014, at 10:01 AM, Jed Brown <[email protected]> wrote: > Mark Lohry <[email protected]> writes: >> As a PETSc developer, of course, I would recommend keeping your >> local/temporary data also in Vecs and using the >> DMDAVecGetArray() for access to those also and having all code >> written in the “local patch style” with loops i=gxs; i<gxs+gxm >> I think the code is clearer and easier to reason about than >> having each process from 0 to vxm etc. >> >> Yeah, I definitely see the attraction and I may ultimately go that >> route. As a non-PETSc developer however, it seems preferable to >> absolutely minimize the reliance on PETSc data management for code >> re-use in a non-PETSc application going forward.
Sure, but you can still use the global patch model i=xs to xe etc with or without tight coupling to PETSc. PETSc makes the global patch model easy, it might be harder to do without PETSc. Barry >> I'd be eager to hear >> from other devs on how they approach this. > > Note that using a DMDA for this auxiliary data means you can restrict > and interpolate it through a hierarchy, as well as visualize it.
