aboutsummaryrefslogtreecommitdiff
path: root/src/IDFileADM_Init.c
diff options
context:
space:
mode:
authorschnetter <schnetter@0b95e693-0e4f-0410-b80e-c7e9d0d71539>2004-07-28 11:21:09 +0000
committerschnetter <schnetter@0b95e693-0e4f-0410-b80e-c7e9d0d71539>2004-07-28 11:21:09 +0000
commitb01644541021f4e7fdbfc9d0323a2bc007111785 (patch)
treeff1f0f3870088a33885bf80792b78548e0453148 /src/IDFileADM_Init.c
parenta4ed801041fecbd4b89aaad943c5059297e4b5ab (diff)
Correct error when checking the initial data.HEADsvnmaster
Also ensure that the extrinsic curvature is read in. Also ensure that the conformal factor is read in when it is to be used. Set the conformal_state when the conformal factor is used. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDFileADM/trunk@5 0b95e693-0e4f-0410-b80e-c7e9d0d71539
Diffstat (limited to 'src/IDFileADM_Init.c')
-rw-r--r--src/IDFileADM_Init.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/IDFileADM_Init.c b/src/IDFileADM_Init.c
new file mode 100644
index 0000000..0dbd38d
--- /dev/null
+++ b/src/IDFileADM_Init.c
@@ -0,0 +1,33 @@
+/* $Header$ */
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+
+/** Initialise the conformal_state. */
+void IDFileADM_Init (CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ if (CCTK_EQUALS(initial_data, "read from file")) {
+ if (CCTK_EQUALS (metric_type, "physical")) {
+ *conformal_state = 0;
+ } else if (CCTK_EQUALS (metric_type, "static conformal")) {
+ if (CCTK_EQUALS (conformal_storage, "factor")) {
+ *conformal_state = 1;
+ } else if (CCTK_EQUALS (conformal_storage, "factor+derivs")) {
+ *conformal_state = 2;
+ } else if (CCTK_EQUALS (conformal_storage, "factor+derivs+2nd derivs")) {
+ *conformal_state = 3;
+ } else {
+ CCTK_WARN (0, "Unknown conformal_storage type");
+ }
+ } else {
+ CCTK_WARN (0, "Unknown metric type");
+ }
+ }
+}