/*@@ @header Initialisation.c @date Thu Apr 25 22:58:03 2002 @author Tom Goodale @desc Do all the lapse, shift, metric and curvature initialisation known about by ADMBase. @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_CartesianMinkowski(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 ADMBase_CartesianMinkowski @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_CartesianMinkowski(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 ADMBase_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 ADMBase_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] = 0.0; betay[i] = 0.0; betaz[i] = 0.0; } } /*@@ @routine ADMBase_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 ADMBase_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 ************************* ********************************************************************/