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 | |
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
-rw-r--r-- | README | 9 | ||||
-rw-r--r-- | doc/documentation.tex | 57 | ||||
-rw-r--r-- | interface.ccl | 50 | ||||
-rw-r--r-- | param.ccl | 40 | ||||
-rw-r--r-- | schedule.ccl | 52 | ||||
-rw-r--r-- | src/Initialisation.c | 198 | ||||
-rw-r--r-- | src/make.code.defn | 8 |
7 files changed, 414 insertions, 0 deletions
@@ -0,0 +1,9 @@ +Cactus Code Thorn ADMBase +Authors : Tom Goodale +CVS info : $Header$ +-------------------------------------------------------------------------- + +Purpose of the thorn: + +This thorn provides the basic variables used to communicate between +thorns doing General Relativity in the $3+1$ formalism. diff --git a/doc/documentation.tex b/doc/documentation.tex new file mode 100644 index 0000000..47b088e --- /dev/null +++ b/doc/documentation.tex @@ -0,0 +1,57 @@ +\documentclass{article} +\begin{document} + +\title{ADMBase} +\author{Tom Goodale} +\date{April 2002} +\maketitle + +\abstract{Provides the basic ADM variables used in the $3+1$ formalism} + +\section{Purpose} + +This thorn provides the basic variables used to communicate between +thorns doing General Relativity in the $3+1$ formalism. + +The variables are: +\begin{itemize} +\item +The metric tensor -- {\bf gxx}, {\bf gxy}, {\bf gxz},{\bf gyy},{\bf gyz},{\bf gzz} +\item +The extrinsic curvature tensor -- {\bf kxx}, {\bf kxy}, {\bf kxz},{\bf kyy},{\bf kyz},{\bf kzz} +\item +The lapse -- {\bf alp} +\item +The shift -- {\bf betax},{\bf betay},{\bf betaz} +\end{itemize} + +By default the metric and extrinsic curvature tensors are assumed to +be the physical ones, however these semantics can be changed by use of +the {\bf metric\_type} parameter. ADMBase provides the default value +of `physical', however another thorn could extend this with a value +stating that the metric or curvature have some conformal factor or +whatever. This means that all thorns which inherit from ADMBase +should check the value of {\bf metric\_type} in a routine scheduled at +{\bf CCTK\_PARAMCHECK} and signal an error if the thorn does not +recognise the value. + +ADMBase allocates one timelevel of memory for all variables, except the +shift, which is only allocated if the {\bf initial\_shift} parameter is +set to a value other than `none'. The state of the shift storage is +indicated by the {\bf shift\_state} grid scalar. This is 1 if there +is storage for the shift, and 0 otherwise. + +The thorn provides, on request, initial data to set the metric and +extrinsic curvature to flat space in cartesian coordinates, to set the +initial lapse to one and the initial shift to zero. + +\section{Comments} + + + +% Automatically created from the ccl files by using gmake thorndoc +\include{interface} +\include{param} +\include{schedule} + +\end{document} diff --git a/interface.ccl b/interface.ccl new file mode 100644 index 0000000..3c85866 --- /dev/null +++ b/interface.ccl @@ -0,0 +1,50 @@ +# Interface definition for thorn ADMBase +# $Header$ + +implements: ADMBase + +public: + +INT shift_state TYPE = SCALAR + +REAL metric TYPE = GF timelevels = 3 +{ + gxx,gxy,gxz,gyy,gyz,gzz +} "ADM 3-metric" + +REAL curv TYPE = GF timelevels = 3 +{ + kxx,kxy,kxz,kyy,kyz,kzz +} "ADM extrinsic curvature" + +REAL lapse TYPE = GF timelevels = 3 +{ + alp +} "ADM lapse function" + +REAL shift TYPE = GF timelevels = 3 +{ + betax,betay,betaz +} "ADM shift function" + +# Will become +# +#REAL metric TYPE = GF timelevels = 3 +#{ +# g11,g12,g13,g22,g23,g33 +#} "ADM 3-metric" +# +#REAL curv TYPE = GF timelevels = 3 +#{ +# K11,K12,K13,K22,K23,K33 +#} "ADM extrinsic curvature" +# +#REAL lapse TYPE = GF timelevels = 3 +#{ +# lapse +#} "ADM lapse function" +# +#REAL shift TYPE = GF timelevels = 3 +#{ +# shift1,shift2,shift3 +#} "ADM shift function" diff --git a/param.ccl b/param.ccl new file mode 100644 index 0000000..e72c602 --- /dev/null +++ b/param.ccl @@ -0,0 +1,40 @@ +# Parameter definitions for thorn ADMBase +# $Header$ + +restricted: + +KEYWORD initial_lapse "Initial lapse value" +{ + "one" :: "Uniform lapse" +} "one" + +KEYWORD initial_shift "Initial shift value" +{ + "none" :: "Shift is inactive" + "zero" :: "Shift is zero" +} "none" + +KEYWORD initial_data "Initial metric and extrinsic curvature datasets" +{ + "Cartesian Minkowski" :: "Minkowski values in cartesian coordinates" +} "Cartesian Minkowski" + +KEYWORD evolution_method "The metric an extrinsic curvature evolution method" +{ + "none" :: "The metric and extrinsic curvature are not evolved" +} "none" + +KEYWORD lapse_evolution_method "The lapse evolution method" +{ + "static" :: "lapse is not evolved" +} "static" + +KEYWORD shift_evolution_method "The shift evolution method" +{ + "static" :: "Shift is not evolved" +} "static" + +KEYWORD metric_type "The semantics of the metric variables (physical, static-conformal, etc)" +{ + "physical" :: "metric and extrinsic curvature are the physical ones" +} "physical" diff --git a/schedule.ccl b/schedule.ccl new file mode 100644 index 0000000..09adf9c --- /dev/null +++ b/schedule.ccl @@ -0,0 +1,52 @@ +# Schedule definitions for thorn ADMBase +# $Header$ + +STORAGE: metric[1], curv[1], lapse[1] + +# Initial data for the spatial slices + +if(CCTK_Equals(initial_data, "Cartesian Minkowski")) +{ + SCHEDULE ADMBase_CartesianMinkowsi at CCTK_INITIAL + { + LANG: C + } "Set the metric and extrinsic curvature to cartesian minkowski values" +} + +# Initial data for the lapse + +if(CCTK_Equals(initial_lapse, "one")) +{ + SCHEDULE ADMBase_LapseOne at CCTK_INITIAL + { + LANG: C + } "Set the lapse to 1 at all points" +} + +# Do we have storage for the shift ? +if (!CCTK_Equals(initial_shift,"none")) +{ + STORAGE: shift[1] + + SCHEDULE ADMBase_SetShiftStateOn at CCTK_BASEGRID + { + LANG: C + } "Set the shift_state variable to 1" +} +else +{ + SCHEDULE ADMBase_SetShiftStateOff at CCTK_BASEGRID + { + LANG: C + } "Set the shift_state variable to 0" +} + +# Initial data for the shift + +if(CCTK_Equals(initial_shift, "zero")) +{ + SCHEDULE ADMBase_ShiftZero at CCTK_INITIAL + { + LANG: C + } "Set the shift to 0 at all points" +} 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 ************************* + ********************************************************************/ + diff --git a/src/make.code.defn b/src/make.code.defn new file mode 100644 index 0000000..ef42295 --- /dev/null +++ b/src/make.code.defn @@ -0,0 +1,8 @@ +# Main make.code.defn file for thorn ADMBase +# $Header$ + +# Source files in this directory +SRCS = Initialisation.c + +# Subdirectories containing source files +SUBDIRS = |