diff options
Diffstat (limited to 'src/RegisterSym.c')
-rw-r--r-- | src/RegisterSym.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/RegisterSym.c b/src/RegisterSym.c new file mode 100644 index 0000000..0574672 --- /dev/null +++ b/src/RegisterSym.c @@ -0,0 +1,51 @@ +/*@@ + @file RegisterSym.c + @date February 2004 + @author Erik Schnetter + @desc + Register the symmetry boundary faces. + @enddesc + @@*/ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +static const char * const rcsid = "$Header$"; + +CCTK_FILEVERSION(BetaThorns_Cartoon2D_SetSym_c); + + + +void Cartoon2D_RegisterSymmetries (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + + int f; + CCTK_INT handle; + CCTK_INT faces[6]; + CCTK_INT width[6]; + CCTK_INT ierr; + + faces[0] = 1; + faces[1] = 0; + faces[2] = 1; + faces[3] = 1; + faces[4] = 0; + faces[5] = 0; + + for (f=0; f<6; ++f) { + width[f] = cctk_nghostzones[f/2]; + } + + handle = SymmetryRegister ("cartoon"); + if (handle < 0) { + CCTK_WARN (0, "Could not register Cartoon boundary condition"); + } + + ierr = SymmetryRegisterGrid (cctkGH, handle, faces, width); + if (ierr < 0) { + CCTK_WARN (0, "Could not register the Cartoon boundaries -- probably some other thorn has already registered the same boundary faces for a different symmetry"); + } + +} |