[petsc-dev] DMDA_*PERIODIC and DMDA_XYZGHOSTED

Ethan Coon ecoon at lanl.gov
Tue Dec 7 13:21:08 CST 2010


Hi all,

Is there a reason that DMDA_*PERIODIC and DMDA_XYZGHOSTED (where * in
{X, Y, Z, XY, YZ, XZ} but not XYZ) are mutually exclusive?

I'd like a DA where there are ghost cells on every boundary, and some of
those ghost cells (but not all) are filled in with periodic values.  At
the moment, I'm just using DMDA_XYZPERIODIC and overwriting the local
ghost cells with the values I would put in the supposedly
empty/undefined ghost cells provided by DMDA_XYZGHOSTED that should not
be periodic (and eating the extra communication).  This works fine until
I want to use DMDASetUniformCoordinates, which assumes, for a periodic
DA, that the last XE/YE/ZE are nonexistent (and maybe has other
unintended consequences?).  

I can't come up with a reason that these options couldn't either:

1. be split into two options, one for periodicity and one for wrap
2. have n_dimensions options in DMDACreate{n_dimensions}D, each one of
DMDA_PERIODIC/DMDA_GHOSTED/DMDA_NONPERIODIC
3. have many many more values in the enum, representing all combinations
of PERIODIC and GHOSTED.

Ethan



-- 
-------------------------------------
Ethan Coon
Post-Doctoral Researcher
Mathematical Modeling and Analysis
Los Alamos National Laboratory
505-665-8289

http://www.ldeo.columbia.edu/~ecoon/
-------------------------------------




More information about the petsc-dev mailing list