diff options
author | goodale <goodale@d576a68a-b34a-40ae-82fc-004fa1a9d16f> | 2002-04-25 22:03:52 +0000 |
---|---|---|
committer | goodale <goodale@d576a68a-b34a-40ae-82fc-004fa1a9d16f> | 2002-04-25 22:03:52 +0000 |
commit | 31b531681a0598bdf998c6b58af8bcf3b4e8be20 (patch) | |
tree | 84ebafe9e025e38130aa9f34b6428ab5648647d3 /src/Initialisation.c | |
parent | 3decf19fb8e12ad5924cb36ab1c7ee6f815c62bc (diff) |
Initial import of new Einstein stuff. This has the new thorns, but not all
are fully functional yet.
When I have completed this stage I'll send an updated spec out with some
questions which have arisen during this process.
Please don't import anything new without checking with me first, as I want
to play games on the server copying cvs files around to preserve histories
on files which are only minimally touched.
Tom
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/ADMBase/trunk@2 d576a68a-b34a-40ae-82fc-004fa1a9d16f
Diffstat (limited to 'src/Initialisation.c')
-rw-r--r-- | src/Initialisation.c | 198 |
1 files changed, 198 insertions, 0 deletions
diff --git a/src/Initialisation.c b/src/Initialisation.c new file mode 100644 index 0000000..d4c4efd --- /dev/null +++ b/src/Initialisation.c @@ -0,0 +1,198 @@ + /*@@ + @header Initialisation.c + @date Thu Apr 25 22:58:03 2002 + @author Tom Goodale + @desc + + @enddesc + @version $Header$ + @@*/ + +#include "cctk.h" + +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +static const char *rcsid = "$Header$"; + +CCTK_FILEVERSION(CactusEinstein_ADMBase_Initialisation_c) + +/******************************************************************** + ********************* Local Data Types *********************** + ********************************************************************/ + +/******************************************************************** + ********************* Local Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ***************** Scheduled Routine Prototypes ********************* + ********************************************************************/ + +void ADMBase_CartesianMinkowsi(CCTK_ARGUMENTS); +void ADMBase_LapseOne(CCTK_ARGUMENTS); +void ADMBase_ShiftZero(CCTK_ARGUMENTS); + +void ADMBase_SetShiftStateOn(CCTK_ARGUMENTS); +void ADMBase_SetShiftStateOff(CCTK_ARGUMENTS); + +/******************************************************************** + ********************* Other Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ********************* Local Data ***************************** + ********************************************************************/ + +/******************************************************************** + ********************* External Routines ********************** + ********************************************************************/ + +/*@@ + @routine ADMAnalysis_MetricCartToSphere + @date Thu Apr 25 23:12:18 2002 + @author Tom Goodale + @desc + Scheduled routine to initialise the metric and extrinsic curvature to + Minkowski space in cartesian coordinate values. + @enddesc + @calls + @calledby + @history + + @endhistory + + @@*/ +void ADMBase_CartesianMinkowsi(CCTK_ARGUMENTS) +{ + int i; + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++) + { + gxx[i] = 1.0; + gyy[i] = 1.0; + gzz[i] = 1.0; + + gxy[i] = 0.0; + gxz[i] = 0.0; + gyz[i] = 0.0; + + kxx[i] = 0.0; + kyy[i] = 0.0; + kzz[i] = 0.0; + + kxy[i] = 0.0; + kxz[i] = 0.0; + kyz[i] = 0.0; + } + +} + + +/*@@ + @routine ADMAnalysis_LapseOne + @date Thu Apr 25 23:12:18 2002 + @author Tom Goodale + @desc + Scheduled routine to initialise the lapse to one. + @enddesc + @calls + @calledby + @history + + @endhistory + + @@*/ +void ADMBase_LapseOne(CCTK_ARGUMENTS) +{ + int i; + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++) + { + alp[i] = 1.0; + } +} + +/*@@ + @routine ADMAnalysis_ShiftZero + @date Thu Apr 25 23:12:18 2002 + @author Tom Goodale + @desc + Scheduled routine to initialise the shift to zero. + @enddesc + @calls + @calledby + @history + + @endhistory + + @@*/ +void ADMBase_ShiftZero(CCTK_ARGUMENTS) +{ + int i; + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++) + { + betax[i] = 1.0; + betay[i] = 1.0; + betaz[i] = 1.0; + } + +} + +/*@@ + @routine ADMAnalysis_SetShiftStateOn + @date Thu Apr 25 23:12:18 2002 + @author Tom Goodale + @desc + Scheduled routine to set the value of the shift state to on. + @enddesc + @calls + @calledby + @history + + @endhistory + + @@*/ +void ADMBase_SetShiftStateOn(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + *shift_state = 1; +} + +/*@@ + @routine ADMAnalysis_SetShiftStateOff + @date Thu Apr 25 23:12:18 2002 + @author Tom Goodale + @desc + Scheduled routine to set the value of the shift state to off. + @enddesc + @calls + @calledby + @history + + @endhistory + + @@*/ +void ADMBase_SetShiftStateOff(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + *shift_state = 0; +} + + + +/******************************************************************** + ********************* Local Routines ************************* + ********************************************************************/ + |