aboutsummaryrefslogtreecommitdiff
path: root/src/macro/DYYDG_guts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/macro/DYYDG_guts.h')
-rw-r--r--src/macro/DYYDG_guts.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/macro/DYYDG_guts.h b/src/macro/DYYDG_guts.h
new file mode 100644
index 0000000..96870e0
--- /dev/null
+++ b/src/macro/DYYDG_guts.h
@@ -0,0 +1,80 @@
+/*@@
+ @header DYYDG_guts.h
+ @date Jun 98
+ @author Gabrielle Allen
+ @desc
+ Macro to calculate the (first and) second derivatives of the
+ physical metric with respect to y
+
+ The macro is defined in terms of standard variables in
+ @seefile DYYDG_declare.h
+
+ The macro uses @seefile DXDG_guts.h and @seefile DXDG_declare.h
+ @enddesc
+@@*/
+
+#ifndef DYYDG_GUTS
+#define DYYDG_GUTS
+
+#include "../../packages/CactusEinstein/Einstein/src/macro/DYDG_guts.h"
+
+#ifdef FCODE
+
+ DYYDG_OODY2 = 1D0/(dy*dy)
+
+ /* Factor involving 2nd derivative of conformal factor */
+ IF (conformal_state /= CONFORMAL_METRIC) THEN
+ DYYDG_FAC = 0
+ ELSE
+ DYYDG_FAC = DYDG_PSI4*(4*DYYDG_DYYDPSI_O_PSI + 12*DYDG_DYDPSI_O_PSI*DYDG_DYDPSI_O_PSI)
+ ENDIF
+
+ /* Now calculate the second deriatives */
+ DYYDG_DYYDGXX = 2*DYDCG_DYDCGXX*DYDG_FAC+DYYDG_FAC*DYDG_GXX+DYDG_PSI4
+ &*DYYDG_OODY2*(DYDCG_GXX_JP-2*DYDG_GXX+DYDCG_GXX_JM)
+
+ DYYDG_DYYDGXY = 2*DYDCG_DYDCGXY*DYDG_FAC+DYYDG_FAC*DYDG_GXY+DYDG_PSI4
+ &*DYYDG_OODY2*(DYDCG_GXY_JP-2*DYDG_GXY+DYDCG_GXY_JM)
+
+ DYYDG_DYYDGXZ = 2*DYDCG_DYDCGXZ*DYDG_FAC+DYYDG_FAC*DYDG_GXZ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