Hal<div><br></div><div>This may mean that level_mask does not have storage at all times. CarpetRegrid2 does not allocate storage for this variable -- maybe it should, when CarpetRegrid2::adaptive_refinement is set to yes?</div>
<div><br></div><div>-erik<br><br><div class="gmail_quote">On Wed, Dec 14, 2011 at 4:07 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, 2011-12-08 at 22:38 +0100, Eloisa Bentivegna wrote:<br>
> Hello,<br>
><br>
> I'd like to revive a discussion that went over the list a few months ago, regarding Carpet's AMR capability.<br>
><br>
> I understand that the refinement has to be triggered through the level_mask grid function. The example that Hal gave is below.<br>
><br>
> On Aug 30, 2011, at 9:37 PM, Hal Finkel wrote:<br>
><br>
> > lvlmskSet =<br>
> > {<br>
> > Name -> "SFBubble_SetLevelMask",<br>
> > Schedule -> {"AT preregrid"},<br>
> > Where -> Interior,<br>
> > Shorthands -> { adchix, adchiy, adchiz },<br>
> > Equations -><br>
> > {<br>
> > adchix -> fabs[dx PD[chi,1]],<br>
> > adchiy -> fabs[dy PD[chi,2]],<br>
> > adchiz -> fabs[dz PD[chi,3]],<br>
> ><br>
> > "level_mask" -> (<br>
> > Max[<br>
> > adchix, adchiy, adchiz<br>
> > ]/dchimax<br>
> > ) /. Max[a_, b_, c_] -> fmax[a, fmax[b, c]]<br>
> > }<br>
> > };<br>
<br>
</div>FWIW, it looks like some time over the last few months this stopped<br>
working: setting level_mask in this way does not lead to regridding<br>
(even if it is > n in some places), and outputting the result using<br>
CarpetIOScalar has an odd result:<br>
<br>
carpetregrid2::level_mask.maximum.asc starts with:<br>
0 0 -1.79769313486232e+308<br>
1 1 1.30685299729774<br>
2 2 1.31094960089828<br>
...<br>
<br>
carpetregrid2::level_mask.minimum.asc starts with:<br>
0 0 1.79769313486232e+308<br>
1 1 0<br>
2 2 0<br>
...<br>
<br>
carpetregrid2::level_mask.average.asc has:<br>
0 0 -nan<br>
1 1 -nan<br>
2 2 -nan<br>
...<br>
<br>
What is going on here?<br>
<br>
It might also be worth noting, that to get level_mask to work with Kranc<br>
in the above example, I added the following after the call to<br>
CreateKrancThornTT:<br>
<br>
Module[{fp = OpenAppend[dirname <> "/schedule.ccl"]},<br>
WriteString[fp, "\[NewLine]" <> "STORAGE:<br>
CarpetRegrid2::level_mask"];<br>
Close[fp]<br>
];<br>
<br>
-Hal<br>
<div class="im HOEnZb"><br>
><br>
> My questions are:<br>
><br>
> 1) Is preregrid the right location to set this function?<br>
> 2) Does this suffice? I assume that once regridding is triggered, the new levels will have to be populated (via interpolation?). Is level_mask treated like all other grid functions?<br>
> 3) In the case above, the loop only goes over interior points, since the mask is set to be the derivative of a grid function. This implies that a sync is necessary before the mask can be used for regridding. Is the user thorn a good place to request this?<br>
><br>
> Thanks,<br>
> Eloisa<br>
<br>
</div><div class="im HOEnZb">--<br>
Hal Finkel<br>
Postdoctoral Appointee<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@einsteintoolkit.org">Users@einsteintoolkit.org</a><br>
<a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" target="_blank">http://lists.einsteintoolkit.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>> <a href="http://www.cct.lsu.edu/~eschnett/" target="_blank">http://www.cct.lsu.edu/~eschnett/</a><br>
<br>
</div>