On Jun 21, 2012, at 6:09 PM, Jed Brown wrote:

> I think that is fine, though having mirrored ghost points in the 
> local-to-global map would be more convenient for matrix assembly.

   Hmm, what do you mean by this? What should we do?

   Barry

> 
> On Jun 20, 2012 2:51 PM, "Barry Smith" <bsmith at mcs.anl.gov> wrote:
> 
>  My inclination is to remove the mirror enum and simply provide a utility 
> function that updates the ghost points by mirroring in the local vector form 
> that the user can call if they want mirroring?
> 
>   Barry
> 
> On Jun 20, 2012, at 5:41 PM, Barry Smith wrote:
> 
> >
> >     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?
> >
> >   Thanks
> >
> >   Barry
> >
> 

Reply via email to