From 2d031812d302379fe809b35d4c834451b0dde2cb Mon Sep 17 00:00:00 2001 From: goodale Date: Thu, 25 Apr 2002 22:03:52 +0000 Subject: 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/StaticConformal/trunk@2 0cbbb82d-14ec-4423-a1fb-2ab18257ecaa --- README | 18 +++++++++++++ doc/documentation.tex | 57 +++++++++++++++++++++++++++++++++++++++++ interface.ccl | 35 ++++++++++++++++++++++++++ param.ccl | 18 +++++++++++++ schedule.ccl | 28 +++++++++++++++++++++ src/Initialise.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/make.code.defn | 9 +++++++ 7 files changed, 235 insertions(+) create mode 100644 README create mode 100644 doc/documentation.tex create mode 100644 interface.ccl create mode 100644 param.ccl create mode 100644 schedule.ccl create mode 100644 src/Initialise.c create mode 100644 src/make.code.defn diff --git a/README b/README new file mode 100644 index 0000000..1adb703 --- /dev/null +++ b/README @@ -0,0 +1,18 @@ +Cactus Code Thorn StaticConformal +Authors : Tom Goodale +CVS info : $Header$ +-------------------------------------------------------------------------- + +Purpose of the thorn: + +This thorn provides the variables defining a static conformal factor +which is used to transform the physical metric. If this thorn is +active and the ADMBase::metric_type parameter is set to +`static conformal' then the ADMBase::g... variables are the +conformal values as opposed to the physical values. + +The transformation is + +$$ g_{ij}^{\mbox{physical}} = \psi^4 g_{ij}^{\mbox{conformal}} $$ + +The extrinsic curvature is not transformed. diff --git a/doc/documentation.tex b/doc/documentation.tex new file mode 100644 index 0000000..519a092 --- /dev/null +++ b/doc/documentation.tex @@ -0,0 +1,57 @@ +\documentclass{article} +\begin{document} + +\title{StaticConformal} +\author{Tom Goodale et al} +\date{April 2002} +\maketitle + +\abstract{Base thorn to provide the variables for the static conformal factor} + +\section{Purpose} + +This thorn provides the variables defining a static conformal factor +which is used to transform the physical metric. If this thorn is +active and the {\bf ADMBase::metric\_type} parameter is set to +`static conformal' then the {\bf ADMBase::g...} variables are the +conformal values as opposed to the physical values. + +The transformation is + +$$ g_{ij}^{\mbox{physical}} = \psi^4 g_{ij}^{\mbox{conformal}} $$ + +The extrinsic curvature is not transformed. + +Memory is provided for the conformal factor {\bf psi}, its first +derivatives {\bf psix}, {\bf psiy}, {\bf psiz}, and its second +derivatives {\bf psixx}, {\bf psixy}, {\bf psixz}, {\bf psiyy}, {\bf +psiyz}, and {\bf psizz} depending on the setting of the {\bf +conformal\_storage} parameter. + +Thorns need to check the value of the grid scalar +{\bf conformal\_state} to determine how many levels of these variables have +actually been calculated. + +\begin{itemize} +\item[0] +No conformal factor has been calculated -- thorns may +assume the conformal factor is 1 at all points. (I.e. the metric is physical.) +\item[1] +The conformal factor has been calulated, but no derivatives. +\item[2] +The conformal factor and its first derivatives have been calculated. +\item[3] +The conformal factor and its first and second derivatives have been calculated. +\end{itemize} + +\section{Comments} + +The {\bf StaticConformal} thorn itself does not calculate any conformal +factor, but does initialise the {\bf conformal\_state} variable to 0. + +% 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..7454ed4 --- /dev/null +++ b/interface.ccl @@ -0,0 +1,35 @@ +# Interface definition for thorn StaticConformal +# $Header$ + +implements: StaticConformal + +public: + +INT conformal_state type = SCALAR + +REAL confac TYPE = GF +{ + psi +} "Conformal factor" + +REAL confac_1derivs TYPE = GF +{ + psix, psiy, psiz +} "First spatial derivatives of conformal factor divided by psi" + +# Will be changed to. +#REAL confac_1derivs TYPE = GF +#{ +# psi_1, psi_2, psi_3 +#} "First spatial derivatives of conformal factor divided by psi" + +REAL confac_2derivs TYPE = GF +{ + psixx, psixy, psixz, psiyy, psiyz, psizz +} "Second spatial derivatives of conformal factor divided by psi" + +# Will be changed to. +#REAL confac_2derivs TYPE = GF +#{ +# psi_11, psi_12, psi_13, psi_22, psi_23, psi_33 +#} "Second spatial derivatives of conformal factor divided by psi" diff --git a/param.ccl b/param.ccl new file mode 100644 index 0000000..01d1e96 --- /dev/null +++ b/param.ccl @@ -0,0 +1,18 @@ +# Parameter definitions for thorn StaticConformal +# $Header$ + +shares: ADMBase + +EXTENDS KEYWORD metric_type +{ + "static conformal" :: "Metric is conformal with static conformal factor, extrinsic curvature is physical" +} + +private: + +KEYWORD conformal_storage "How much conformal storage do we have ?" +{ + "factor" :: "Just the conformal factor" + "factor+derivs" :: "Conformal factor plus first derivatives" + "factor+derivs+2nd derivs" :: "Conformal factor plus first and second derivatives" +} "factor+derivs+2nd derivs" diff --git a/schedule.ccl b/schedule.ccl new file mode 100644 index 0000000..f9335d6 --- /dev/null +++ b/schedule.ccl @@ -0,0 +1,28 @@ +# Schedule definitions for thorn StaticConformal +# $Header$ + +if(CCTK_Equals(metric_type,"static conformal")) +{ + STORAGE: conformal_state + + SCHEDULE StaticConformal_InitialiseState at CCTK_BASEGRID + { + LANG: C + } "Set the conformal_state variable to 0" + + + if(CCTK_Equals(conformal_storage, "factor")) + { + STORAGE: staticconformal::confac + } + + if(CCTK_Equals(conformal_storage, "factor+derivs")) + { + STORAGE: staticconformal::confac, staticconformal::confac_1derivs + } + + if(CCTK_Equals(conformal_storage, "factor+derivs+2nd derivs")) + { + STORAGE: staticconformal::confac, staticconformal::confac_1derivs, staticconformal::confac_1derivs + } +} diff --git a/src/Initialise.c b/src/Initialise.c new file mode 100644 index 0000000..45b9433 --- /dev/null +++ b/src/Initialise.c @@ -0,0 +1,70 @@ + /*@@ + @file Initialise.c + @date Thu Apr 25 19:53:02 2002 + @author Tom Goodale + @desc + Code to initialise stuff for StaticConfomal + @enddesc + @version $Header$ + @@*/ + +#include "cctk.h" + +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +static const char *rcsid = "$Header$"; + +CCTK_FILEVERSION(CactusEinstein_StaticConformal_Initialise_c) + +/******************************************************************** + ********************* Local Data Types *********************** + ********************************************************************/ + +/******************************************************************** + ********************* Local Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ***************** Scheduled Routine Prototypes ********************* + ********************************************************************/ + +void StaticConformal_InitialiseState(CCTK_ARGUMENTS); + +/******************************************************************** + ********************* Other Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ********************* Local Data ***************************** + ********************************************************************/ + +/******************************************************************** + ********************* External Routines ********************** + ********************************************************************/ + +/*@@ + @routine StaticConformal_InitialiseState + @date Thu Apr 25 19:11:32 2002 + @author Tom Goodale + @desc + Scheduled routine to set the conformal_state variable to 0 + @enddesc + @calls + @calledby + @history + + @endhistory + +@@*/ +void StaticConformal_InitialiseState(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + *conformal_state = 0; +} + +/******************************************************************** + ********************* Local Routines ************************* + ********************************************************************/ diff --git a/src/make.code.defn b/src/make.code.defn new file mode 100644 index 0000000..176a3a0 --- /dev/null +++ b/src/make.code.defn @@ -0,0 +1,9 @@ +# Main make.code.defn file for thorn StaticConformal +# $Header$ + +# Source files in this directory +SRCS = Initialise.c + +# Subdirectories containing source files +SUBDIRS = + -- cgit v1.2.3