[Users] Problem with CarpetRegrid2/AMR

Erik Schnetter schnetter at cct.lsu.edu
Wed Dec 14 17:27:16 CST 2011


You are not setting any values on the boundary. Is that intentional?

Can you look at the mask everywhere, to ensure that no value is a nan? The
max and min intrinsics may not pick up nans.

To get things working for initial data, you may need to set the mask in the
preregridinitial bin as well, or you need to ensure that carpet doesn't use
the AMR mechanism at this time, or that another refinement mechanism sets
up a sufficiently refined grid structure. (Once the grid structure is too
coarse, things go wrong, and calculating derivative may lead to nans, so
that level_mask cannot be calculated any more...)

Maybe you need a secondary mechanism while setting level_mask, to ensure
there is a minimum amount of refinement present around certain features? I
can't tell, this depends on your physical system.

-erik

On Wed, Dec 14, 2011 at 4:07 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> On Thu, 2011-12-08 at 22:38 +0100, Eloisa Bentivegna wrote:
> > Hello,
> >
> > I'd like to revive a discussion that went over the list a few months
> ago, regarding Carpet's AMR capability.
> >
> > I understand that the refinement has to be triggered through the
> level_mask grid function. The example that Hal gave is below.
> >
> > On Aug 30, 2011, at 9:37 PM, Hal Finkel wrote:
> >
> > > lvlmskSet =
> > > {
> > >        Name -> "SFBubble_SetLevelMask",
> > >        Schedule -> {"AT preregrid"},
> > >        Where -> Interior,
> > >        Shorthands -> { adchix, adchiy, adchiz },
> > >        Equations ->
> > >        {
> > >                adchix -> fabs[dx PD[chi,1]],
> > >                adchiy -> fabs[dy PD[chi,2]],
> > >                adchiz -> fabs[dz PD[chi,3]],
> > >
> > >                "level_mask" -> (
> > >                        Max[
> > >                                adchix, adchiy, adchiz
> > >                        ]/dchimax
> > >                ) /. Max[a_, b_, c_] -> fmax[a, fmax[b, c]]
> > >        }
> > > };
>
> FWIW, it looks like some time over the last few months this stopped
> working: setting level_mask in this way does not lead to regridding
> (even if it is > n in some places), and outputting the result using
> CarpetIOScalar has an odd result:
>
> carpetregrid2::level_mask.maximum.asc starts with:
> 0 0 -1.79769313486232e+308
> 1 1 1.30685299729774
> 2 2 1.31094960089828
> ...
>
> carpetregrid2::level_mask.minimum.asc starts with:
> 0 0 1.79769313486232e+308
> 1 1 0
> 2 2 0
> ...
>
> carpetregrid2::level_mask.average.asc has:
> 0 0 -nan
> 1 1 -nan
> 2 2 -nan
> ...
>
> What is going on here?
>
> It might also be worth noting, that to get level_mask to work with Kranc
> in the above example, I added the following after the call to
> CreateKrancThornTT:
>
> Module[{fp = OpenAppend[dirname <> "/schedule.ccl"]},
>        WriteString[fp, "\[NewLine]" <> "STORAGE:
> CarpetRegrid2::level_mask"];
>        Close[fp]
> ];
>
>  -Hal
>
> >
> > My questions are:
> >
> > 1) Is preregrid the right location to set this function?
> > 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?
> > 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?
> >
> > Thanks,
> > Eloisa
>
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>



-- 
Erik Schnetter <schnetter at cct.lsu.edu>   http://www.cct.lsu.edu/~eschnett/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20111214/b21eb06d/attachment.html 


More information about the Users mailing list