diff options
author | rideout <rideout@80bd93c7-81bc-453a-9e3f-619c0b4f6fe4> | 2002-07-31 08:26:31 +0000 |
---|---|---|
committer | rideout <rideout@80bd93c7-81bc-453a-9e3f-619c0b4f6fe4> | 2002-07-31 08:26:31 +0000 |
commit | 24e70272e83e7c2d0f7d482a7303974a15ae39b5 (patch) | |
tree | 305ad8cd268a4983c47f9afd844f74821f6cf9b0 /src | |
parent | de3c11bf0308f78efc8c89ab33df96b3cfe44efc (diff) |
Register symmetries of Ricci.
Apply symmetry and flat boundary conditions to Ricci.
Added testsuite for Ricci output.
Fixes CactusEinstein/1165.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMAnalysis/trunk@14 80bd93c7-81bc-453a-9e3f-619c0b4f6fe4
Diffstat (limited to 'src')
-rw-r--r-- | src/Ricci.c | 45 | ||||
-rw-r--r-- | src/Symmetry.c | 81 | ||||
-rw-r--r-- | src/make.code.defn | 3 |
3 files changed, 104 insertions, 25 deletions
diff --git a/src/Ricci.c b/src/Ricci.c index e311ce5..74b11a9 100644 --- a/src/Ricci.c +++ b/src/Ricci.c @@ -10,9 +10,7 @@ @@*/ #include "cctk.h" - #include "cctk_Arguments.h" -#include "cctk_Parameters.h" #include "ADMAnalysis.h" @@ -68,17 +66,16 @@ void ADMAnalysis_Ricci(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; - DECLARE_CCTK_PARAMETERS; - CCTK_INT i,j,k, ijk, di, dj, dk; + CCTK_INT i,j,k, ijk, di, dj, dk, err, sw[3]; #include "CactusEinstein/ADMMacros/src/macro/RICCI_declare.h" - for (k = 0; k < cctk_lsh[2]; k++) + for (k = 1; k < cctk_lsh[2]-1; k++) { - for (j = 0; j < cctk_lsh[1]; j++) + for (j = 1; j < cctk_lsh[1]-1; j++) { - for (i = 0; i < cctk_lsh[0]; i++) + for (i = 1; i < cctk_lsh[0]-1; i++) { ijk = CCTK_GFINDEX3D(cctkGH,i,j,k); @@ -101,6 +98,24 @@ void ADMAnalysis_Ricci(CCTK_ARGUMENTS) #include "CactusEinstein/ADMMacros/src/macro/RICCI_undefine.h" + /* Execute Symmetry Conditions */ + CartSymGN(cctkGH,"ADMAnalysis::ricci_scalar"); + CartSymGN(cctkGH,"ADMAnalysis::ricci_tensor"); + + /* Apply Flat Boundary Condition */ + sw[0] = 1; sw[1] = 1; sw[2] = 1; + err = BndFlatGN(cctkGH,sw,"ADMAnalysis::ricci_scalar"); + err = BndFlatGN(cctkGH,sw,"ADMAnalysis::ricci_tensor"); + if (err < 0) + { + CCTK_WARN(2,"Error in applying flat boundary condition to Ricci tensor"); + } + + /* WARNING: Only flat boundary conditions are used here. If the + * value of the Ricci tensor is going to be used for something other + * than output, then the boundaries should be handled more properly. + */ + ADMAnalysis_Trace(cctk_lsh, gxx, gxy, gxz, gyy, gyz, gzz, Ricci11, Ricci12, Ricci13, Ricci22, Ricci23, Ricci33, Ricci, detg); @@ -112,19 +127,3 @@ void ADMAnalysis_Ricci(CCTK_ARGUMENTS) /******************************************************************** ********************* Local Routines ************************* ********************************************************************/ - - - - - - - - - - - - - - - - diff --git a/src/Symmetry.c b/src/Symmetry.c new file mode 100644 index 0000000..96fa1ad --- /dev/null +++ b/src/Symmetry.c @@ -0,0 +1,81 @@ + /*@@ + @file Symmetry.c + @date Tue Jul 30 11:15:23 CEST 2002 + @author David Rideout + @desc + Symmetry registration stuff for ADMAnalysis + @enddesc + @version $Header$ + @@*/ + +#include "cctk.h" + +#include "cctk_Arguments.h" +#include "Symmetry.h" + +static const char *rcsid = "$Header$"; + +CCTK_FILEVERSION(CactusEinstein_ADMAnalysis_Symmetry_c) + +/******************************************************************** + ********************* Local Data Types *********************** + ********************************************************************/ + +/******************************************************************** + ********************* Local Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ***************** Scheduled Routine Prototypes ********************* + ********************************************************************/ + + +/******************************************************************** + ********************* Other Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ********************* Local Data ***************************** + ********************************************************************/ + +/******************************************************************** + ********************* External Routines ********************** + + ********************************************************************/ + + /*@@ + @routine ADMAnalysis_RegisterSymmetry + @date Tue Jul 30 11:31:50 CEST 2002 + @author David Rideout + @desc + Scheduled routine to register symmetry of Ricci. + @enddesc + @calls + @calledby + @history + + @endhistory + + @@*/ +void ADMAnalysis_RegisterSymmetry(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + int sym[3]; + + /*CCTK_INFO("Registering symmetries for ricci_scalar and ricci_tensor");*/ + sym[0] = 1; sym[1] = 1; sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ADMAnalysis::Ricci"); + SetCartSymVN(cctkGH, sym, "ADMAnalysis::Ricci11"); + SetCartSymVN(cctkGH, sym, "ADMAnalysis::Ricci22"); + SetCartSymVN(cctkGH, sym, "ADMAnalysis::Ricci33"); + sym[0] = -1; sym[1] = -1; sym[2] = 1; + SetCartSymVN(cctkGH, sym, "ADMAnalysis::Ricci12"); + sym[0] = -1; sym[1] = 1; sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ADMAnalysis::Ricci13"); + sym[0] = 1; sym[1] = -1; sym[2] = -1; + SetCartSymVN(cctkGH, sym, "ADMAnalysis::Ricci23"); +} + +/******************************************************************** + ********************* Local Routines ************************* + ********************************************************************/ diff --git a/src/make.code.defn b/src/make.code.defn index ec1603b..c3ae6cc 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -2,8 +2,7 @@ # $Header$ # Source files in this directory -SRCS = ParamCheck.c Analysis.c CartToSphere.c Ricci.c Trace.c +SRCS = ParamCheck.c Symmetry.c Analysis.c CartToSphere.c Ricci.c Trace.c # Subdirectories containing source files SUBDIRS = - |