<p>I think that is fine, though having mirrored ghost points in the local-to-global map would be more convenient for matrix assembly.</p>
<div class="gmail_quote">On Jun 20, 2012 2:51 PM, "Barry Smith" <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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?<br>
<br>
Barry<br>
<br>
On Jun 20, 2012, at 5:41 PM, Barry Smith wrote:<br>
<br>
><br>
> What is the intended difference between DMDA_BOUNDARY_GHOSTED and DMDA_BOUNDARY_MIRROR?<br>
><br>
> 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()?<br>
><br>
> 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.<br>
><br>
> 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)<br>
><br>
> 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?<br>
><br>
> 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?<br>
><br>
> Thanks<br>
><br>
> Barry<br>
><br>
<br>
</blockquote></div>