![]() ![]() ![]() ![]() Next: Calling Symmetry Boundary Conditions Up: Symmetries for Grid Functions Previous: Symmetries for Grid Functions Contents Registering Symmetry BehaviourEach grid function can register how it behaves under a coordinate change using function calls in CartGrid3D. These symmetry properties can then be used by other thorns, for example CactusBase/Boundary uses them to enforce symmetry boundary conditions across coordinate axes. Symmetries should obviously be registered before they are used, but since they can be different for different grids, they must be registered after the CCTK_STARTUP timebin. The usual place to register symmetries is in the CCTK_BASEGRID timebin. For example, to register the symmetries of the xy component of the metric tensor from C, you first need to get access to the include file by putting the line uses include: Symmetry.hin your interface.ccl file. Then in your thorn you can write (C)
#include "Symmetry.h" static int one=1; int sym[3]; sym[0] = -one; sym[1] = -one; sym[2] = one; SetCartSymVN(cctkGH, sym,"ADMBase::gxy");
|