[Developers] Convergence levels
Erik Schnetter
schnetter at uni-tuebingen.de
Sun Jan 11 13:13:53 CST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As you all know, it is a bit involved to perform a convergence test with
Cactus. There are quite a few parameters that have to be adapted when
the resolution changes, and the calculations to ensure that the
boundaries stay in the same place (and that the grid spacing indeed
varies by a factor of two) require "time to get used to". This does
not become easier when mesh refinement is introduced.
I have started to introduce a new parameter "convergence_level" to
Carpet that automates these calculations. This convergence level has
to be taken into account mostly in two places, namely the driver (to
calculate gsh) and the coordinate thorn (to calculate the grid spacing
and the outer boundary locations).
There are two kinds of information that the user needs to provide so
that the convergence level calculations can be automated:
(1) A description of the domain. This is essentially what is currently
described to CartGrid3D, i.e. the domain extent and grid spacing. By
giving the driver access to this information, it is not necessary any
more to calculate the number of grid points by hand. It is then
sufficient to specify the domain extent and desired resolution.
(2) A description of the boundaries. This is something new; this
information enables calculations like "to double the resolution for a
domain with 35^3 points you need 67^3 points". This information is per
face, it includes the number of boundary points, whether the boundary
should extend inwards (into the interior) or outwards, whether the grid
points are staggered about the boundary, and whether the boundary is
open or closed (which is necessary to describe e.g. periodic
boundaries).
I think that a good place to put this information is CoordBase. The
information that is given by the user to CoordBase via parameters is
available to other thorns through aliased functions. (There is no
other way, because this information has to be available very early
during startup.) While the user has freedom in setting parameters,
e.g. specifying min/max or extent, CoordBase provides this information
through the aliased functions to other thorns in a uniform way.
The new parameters in CoordBase are:
(1) Parameters to describe the domain:
KEYWORD domainsize: specifies how the size of the domain is specified;
whether it is through min and max coordinate values, extent, or grid
spacing.
KEYWORD spacing: how the grid spacing is chosen; whether as coordinate
spacing or as the number of grid cells.
For each dimension there are the following parameters:
BOOLEAN zero_origin_x "Is the lower boundary located at x=0?"
CCTK_REAL xmin "Location of lower x boundary"
CCTK_REAL xmax "Location of upper x boundary"
CCTK_REAL xextent "Domain extent in x direction"
CCTK_REAL dx "Grid spacing in x direction"
CCTK_INT ncells_x "Number of grid cells in x direction"
Which of these are used depends on "domainsize" and "spacing".
(2) Parameters to describe the boundaries:
For each face there are the following parameters:
CCTK_INT boundary_size_x_lower "Boundary zones at the lower x face"
BOOLEAN boundary_internal_x_lower "Do the boundary points extend inwards
at the lower x face?"
BOOLEAN boundary_staggered_x_lower "Is the boundary is staggered about
the grid points at the lower x face?"
CCTK_INT boundary_shiftout_x_lower "Offset between the boundary location
and the first boundary point at the lower x face"
A mechanism like that and parameters like these are in my opinion
necessary for automated convergence testing. (It will also be
necessary for a multigrid solver.) This particular setup works nicely
for Carpet. Please comment.
- -erik
- --
Erik Schnetter <schnetter at aei.mpg.de> http://www.aei.mpg.de/~eschnett/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAAaBxm3uiSwno3f0RAiVPAJ0d/NpdRT7eSBo01x3KogJlj/eqLwCfXGYW
R0zqj9Y2wdwVbE/k/uCmD6k=
=+8pb
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: domain-CactusBase.diff
Type: text/x-diff
Size: 16861 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/developers/attachments/20040111/3d6aa00f/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Domain.c
Type: text/x-csrc
Size: 9005 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/developers/attachments/20040111/3d6aa00f/attachment-0003.bin
More information about the Developers
mailing list