diff options
author | rideout <rideout@c78560ca-4b45-4335-b268-5f3340f3cb52> | 2002-07-03 16:03:10 +0000 |
---|---|---|
committer | rideout <rideout@c78560ca-4b45-4335-b268-5f3340f3cb52> | 2002-07-03 16:03:10 +0000 |
commit | e8f2677f55b090c781e773476fc3fe25aa41cf60 (patch) | |
tree | d58b8cbb718476037a364be8fdab0f3e4cda91ec | |
parent | 3d0c7553c4b7dd78d3d24f6eb413ac2caf5f61cf (diff) |
Obselete version of code which implements the reflection symmetries.
The current code is in Symmetry.c.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/CartGrid3D/trunk@165 c78560ca-4b45-4335-b268-5f3340f3cb52
-rw-r--r-- | src/SymmetryCondition.c | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/src/SymmetryCondition.c b/src/SymmetryCondition.c deleted file mode 100644 index c6c8ce6..0000000 --- a/src/SymmetryCondition.c +++ /dev/null @@ -1,103 +0,0 @@ - /*@@ - @file SymmetryCondition.c - @date Thu Oct 7 16:45:19 1999 - @author Tom Goodale - @desc - C version of Gerd's symmetry stuff. - @enddesc - @@*/ - -#include "cctk.h" - -static const char *rcsid = "$Header$"; - -CCTK_FILEVERSION(CactusBase_CartGrid3D_SymmetryCondition_c) - - -/*@@ - @routine SymmetryCondition - @date Mon Mar 15 15:51:57 1999 - @author Gerd Lanfermann - @desc - Routine performs the symmetry boundary operations. - @enddesc - @calls - @calledby - @history - @hdate Thu Oct 7 16:47:35 1999 @hauthor Tom Goodale - @hdesc Converted to C - @endhistory -@@*/ - - -#define GFINDEX3D(sh,i,j,k) ((i) + sh[0]*((j)+sh[1]*(k))) - -void SymmetryCondition(int nxyz[],CCTK_REAL var[], int nghostzones,int sym[], int doSym[]) -{ - int i,j,k; - - int sw; - - /* - * Apply symmetry if - * * the grid chunk has a physical boundary (bbox) - * * its size in a direction is bigger than one (sh) - * * we actually want a symmetry (sx.ne.ESYM_UNSET) - */ - if (doSym[1] == 1 || doSym[3] == 1 || doSym[5] == 1) - { - CCTKi_NotYetImplemented("Right hand side boundary conditions"); - } - - if (doSym[0] == 1) - { - for(k=0; k < nxyz[2]; k++) - { - for(j=0; j < nxyz[1]; j++) - { - for(sw=0; sw < nghostzones; sw++) - { - var[GFINDEX3D(nxyz,sw,j,k)] = - sym[0]*var[GFINDEX3D(nxyz,2*nghostzones-1-sw,j,k)]; - } - } - } - } - - if (doSym[2] == 1) - { - for(k=0; k < nxyz[2]; k++) - { - for(sw=0; sw < nghostzones; sw++) - { - for(i=0; i < nxyz[0]; i++) - { - var[GFINDEX3D(nxyz,i,sw,k)] = - sym[2]*var[GFINDEX3D(nxyz,i,2*nghostzones-1-sw,k)]; - } - } - } - } - - if (doSym[4] == 1) - { - for(sw=0; sw < nghostzones; sw++) - { - for(j=0; j < nxyz[1]; j++) - { - for(i=0; i < nxyz[0]; i++) - { - var[GFINDEX3D(nxyz,i,j,sw)] = - sym[4]*var[GFINDEX3D(nxyz,i,j,2*nghostzones-1-sw)]; - } - } - } - } - - return; -} - -void CCTK_FNAME(SymmetryCondition)(int nxyz[],CCTK_REAL var[], int *nghostzones,int sym[], int doSym[]) -{ - SymmetryCondition(nxyz, var, *nghostzones, sym, doSym); -} |