[Users] 2D configuration with Carpet

Erik Schnetter schnetter at cct.lsu.edu
Mon Feb 12 21:54:13 CST 2018


Miguel

Yes, this is possible. The trick is to set up a domain that is still 3D,
but which is only 1 grid point wide in the z direction.

Clearly, this is not possible with cell-centred refinement, as refinement
always splits cells into two. However, as vertex-centred refinement is the
default, this might not be relevant here.

I also assume that you have a true 2+1 code that doesn't require any ghost
zones in the z direction. You would then explicitly set the number of ghost
zones and boundary zones to be 0 in the z direction.

The "usual" problem I encounter when setting up such a domain is that it's
slightly inconvenient to specify the coordinates and grid spacings in the z
direction. I prefer to define the domain extent via CoordBase, so I assume
you're doing the same.

Usually, you would specify zmin, zmax, and ncells_z to define the domain.
However, if you specify zmin=0, zmax=0, and then set ncells_z=0 (0 cells
correspond to 1 point), then Carpet calculates dz = (zmax - zmin) /
ncells_z, which is undefined since you divide zero by zero. So instead of
specifying zmin, zmax, ncells_z, you have to specify zmin, zmax, and dz.
Carpet then calculates ncells_k = (zmax - zmin) / dz, which is fine. In
short, setting CoordBase::spacing = "numcells" will fail, and you have to
use CoordBase::spacing = "gridspacing" instead.

That's about it. Of course, it's easy to make off-by-one errors in the
parameter file, so looking at 1D ASCII output to see whether the
coordinates and domain sizes you specified are correct is important.

Unfortunately I do not have a sample parameter file.

-erik


On Mon, Feb 12, 2018 at 8:14 PM, Miguel Zilhão <
miguel.zilhao.nogueira at tecnico.ulisboa.pt> wrote:

> hi all,
>
> i have a 2+1 simulation that i would like to run with the ET, and i would
> like to use Carpet for the
> mesh refinement in the spatial (x and y) directions. is this possible? is
> there an example parameter
> file that i could have a look at?
>
> many thanks,
> Miguel
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>



-- 
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20180212/8c4fc672/attachment.html 


More information about the Users mailing list