Barry Smith bsmith at mcs.anl.gov
Wed Jun 20 17:41:08 CDT 2012

     What is the intended difference between DMDA_BOUNDARY_GHOSTED and DMDA_BOUNDARY_MIRROR?

     My understanding is that both cause ghost points around the physical boundary that can be indexed in the usual way (for example on the left side just indexing with -1 to get the first of the ghost points? Looking at the code but not testing it I assume that the correctly sized local vectors are created and the appropriate scatters are created that put things in the correct place despite these extra locations with calls to DMGlobalToLocal()? 

     My guess is that whoever decided to have both of these was thinking that with DMDA_BOUNDARY_GHOSTED the user would fill up the ghost points themselves however they liked with whatever values they want whenever they want?  Meanwhile with mirror PETSc would fill up the ghost points by copying the mirrored values from inside the real physical domain?  Thus ghosted is more general.

   But when was it intended that the mirrored values be copied over? During the DMGlobalToLocal call or in a new call?  (Note that this copying requires no parallel communication)

    Is there an example of using DMDA_BOUNDARY_GHOSTED where the ghosted values are set via mirroring? Should there be a utility to do that?  

    We have someone who needs this mirroring (due to Jed's advice) but appear not to have any code to make that trivial. How shall we fix this?



More information about the petsc-dev mailing list