Re: [petsc-dev] DACreate3d should work for 1 node in Z
Ok, here's a patch that does the very very special case of: p=P=1, s > p, DMDA_BOUNDARY_PERIODIC in the z-direction. Note this is really only possible in the z-direction... when in the z-direction, we can just check if the global index < 0 or > x*y*z and adjust appropriately. So this can't generalize to x- or y- directions (though it could do the y-direction in the 2D case, allowing one to do 1D problems in a 2D algorithm?) Compared to the rest of the cruft in da3.c and how non-general the global index generation is overall, it's not actually that ugly... I've tested with s=2 and 3, BOX and STAR, and the indices look right (i.e. they are identical in the z-dimension). But it's ugly, so please test with your stuff too Jed. Ethan On Tue, 2011-04-19 at 23:28 +0200, Jed Brown wrote:
On Tue, Apr 19, 2011 at 23:21, Ethan Coon <[email protected]> wrote: The attached patch fixes the errors to error in the correct cases.
Pushed, thanks.
-- ------------------------------------ Ethan Coon Post-Doctoral Researcher Applied Mathematics - T-5 Los Alamos National Laboratory 505-665-8289 http://www.ldeo.columbia.edu/~ecoon/ ------------------------------------
participants (1)
-
Ethan Coon