diff options
author | hawke <hawke@80bd93c7-81bc-453a-9e3f-619c0b4f6fe4> | 2002-05-14 17:58:34 +0000 |
---|---|---|
committer | hawke <hawke@80bd93c7-81bc-453a-9e3f-619c0b4f6fe4> | 2002-05-14 17:58:34 +0000 |
commit | 18485e65a45e3dc05a7f158a6702481dc6fc4c94 (patch) | |
tree | d975bfefa38fd58765a7cc39f5a19f6bebc870bf | |
parent | ae7cd18ee7320e3163d4936e3f9c7db547348ee9 (diff) |
Calculation of the Ricci tensor and scalar for analysis.
This uses the macros, so adds a dependence (WARNING: hard coded path) to ADMMacros.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMAnalysis/trunk@6 80bd93c7-81bc-453a-9e3f-619c0b4f6fe4
-rw-r--r-- | doc/documentation.tex | 10 | ||||
-rw-r--r-- | src/Ricci.c | 130 | ||||
-rw-r--r-- | src/make.code.defn | 2 |
3 files changed, 141 insertions, 1 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex index 4ac63f5..5b35b07 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -45,6 +45,9 @@ The components of the 3-metric in spherical coordinates \\ \item The components of the extrinsic curvature in spherical coordinates \\ ($K_{rr},K_{r\theta},K_{r\phi},K_{\theta\theta},K_{\theta\phi},K_{\phi\phi}$). +\item The components of the 3-Ricci tensor in cartesian coordinates \\ +(${\cal R}_{ij}$) for $i,j \in \{1,2,3\}. +\item The Ricci scalar (${\cal R}). \end{itemize} \section{Trace of Extrinsic Curvature} @@ -153,6 +156,13 @@ A_{r\phi} & \rightarrow & A_{r\phi}/(r\sin\theta) A_{\theta\phi} & \rightarrow & A_{\theta\phi}/r^2\sin\theta) \end{eqnarray*} +\section{Computing the Ricci tensor and scalar} +\label{sec:ricci} + +The computation of the Ricci tensor uses the ADMMacros thorn. The +calculation of the Ricci scalar uses the generic trace routine in this +thorn. + % Automatically created from the ccl files by using gmake thorndoc \include{interface} \include{param} diff --git a/src/Ricci.c b/src/Ricci.c new file mode 100644 index 0000000..7bd7238 --- /dev/null +++ b/src/Ricci.c @@ -0,0 +1,130 @@ + /*@@ + @file Ricci.c + @date Tue May 14 04:38:49 2002 + @author Ian Hawke + @desc + Routine to calculate the Ricci tensor and scalar. These are taken + straight from ADMMacros. + @enddesc + @version $Header$ + @@*/ + +#include "cctk.h" + +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +#include "ADMAnalysis.h" + +static const char *rcsid = "$Header$"; + +CCTK_FILEVERSION(CactusEinstein_ADMAnalysis_Ricci_c) + +/******************************************************************** + ********************* Local Data Types *********************** + ********************************************************************/ + +/******************************************************************** + ********************* Local Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ***************** Scheduled Routine Prototypes ********************* + ********************************************************************/ + +void ADMAnalysis_Ricci(CCTK_ARGUMENTS); + +/******************************************************************** + ********************* Other Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ********************* Local Data ***************************** + ********************************************************************/ + +/******************************************************************** + ********************* External Routines ********************** + ********************************************************************/ + + /*@@ + @routine ADMAnalysis_Ricci + @date Tue May 14 21:17:26 2002 + @author Ian Hawke + @desc + Uses the macros to calculate the Ricci tensor and scalar. + Unfortunately at the moment it calculates the scalar even + when you don't want it to. + @enddesc + @calls ADMAnalysis_Trace + ADMMacros/src/macro/RICCI_*.h + @calledby + @history + + @endhistory + +@@*/ + +void ADMAnalysis_Ricci(CCTK_ARGUMENTS) +{ + + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + CCTK_INT i,j,k, ijk, di, dj, dk; + +#include "CactusEinstein2/ADMMacros/src/macro/RICCI_declare.h" + + for (k = 0; k < cctk_lsh[2]; k++) + { + for (j = 0; j < cctk_lsh[1]; j++) + { + for (i = 0; i < cctk_lsh[0]; i++) + { + + ijk = CCTK_GFINDEX3D(cctkGH,i,j,k); + di = ijk - CCTK_GFINDEX3D(cctkGH,i-1,j,k); + dj = ijk - CCTK_GFINDEX3D(cctkGH,i,j-1,k); + dk = ijk - CCTK_GFINDEX3D(cctkGH,i,j,k-1); + +#include "CactusEinstein2/ADMMacros/src/macro/RICCI_guts.h" + + Ricci11[ijk] = RICCI_RXX; + Ricci12[ijk] = RICCI_RXY; + Ricci13[ijk] = RICCI_RXZ; + Ricci22[ijk] = RICCI_RYY; + Ricci23[ijk] = RICCI_RYZ; + Ricci33[ijk] = RICCI_RZZ; + + } + } + } + +#include "CactusEinstein2/ADMMacros/src/macro/RICCI_undefine.h" + + ADMAnalysis_Trace(cctk_lsh, gxx, gxy, gxz, gyy, gyz, gzz, + Ricci11, Ricci12, Ricci13, Ricci22, Ricci23, Ricci33, + Ricci, detg); + + return; + +} + +/******************************************************************** + ********************* Local Routines ************************* + ********************************************************************/ + + + + + + + + + + + + + + + + diff --git a/src/make.code.defn b/src/make.code.defn index 6b92303..ec1603b 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -2,7 +2,7 @@ # $Header$ # Source files in this directory -SRCS = ParamCheck.c Analysis.c CartToSphere.c Trace.c +SRCS = ParamCheck.c Analysis.c CartToSphere.c Ricci.c Trace.c # Subdirectories containing source files SUBDIRS = |