diff options
Diffstat (limited to 'CarpetExtra/ReductionTest2/src')
-rw-r--r-- | CarpetExtra/ReductionTest2/src/CoM.c | 28 | ||||
-rw-r--r-- | CarpetExtra/ReductionTest2/src/make.code.defn | 8 |
2 files changed, 36 insertions, 0 deletions
diff --git a/CarpetExtra/ReductionTest2/src/CoM.c b/CarpetExtra/ReductionTest2/src/CoM.c new file mode 100644 index 000000000..f87a01519 --- /dev/null +++ b/CarpetExtra/ReductionTest2/src/CoM.c @@ -0,0 +1,28 @@ +#include "cctk.h" +#include "cctk_Parameters.h" +#include "cctk_Arguments.h" +#include "util_Table.h" +#include <assert.h> +#include <math.h> + +void CoM2_Local(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + int i,j,k,index; + + int nx = cctk_lsh[0]; + int ny = cctk_lsh[1]; + int nz = cctk_lsh[2]; + + for (k=0;k<nz;k++) + for (j=0;j<ny;j++) + for (i=0;i<nx;i++) { + + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + + redvar[index] = 0.45e0; + + } +} diff --git a/CarpetExtra/ReductionTest2/src/make.code.defn b/CarpetExtra/ReductionTest2/src/make.code.defn new file mode 100644 index 000000000..6f1f90aa2 --- /dev/null +++ b/CarpetExtra/ReductionTest2/src/make.code.defn @@ -0,0 +1,8 @@ +# Main make.code.defn file for thorn ReductionTest +# $Header:$ + +# Source files in this directory +SRCS = CoM.c + +# Subdirectories containing source files +SUBDIRS = |