[Users] Problem with CarpetRegrid2/AMR

Eloisa Bentivegna bentivegna at cct.lsu.edu
Thu Dec 8 15:38:16 CST 2011


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]]
>        }
> };

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


More information about the Users mailing list