summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-03-13 16:18:32 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-13 16:18:32 +0100
commit4c3e87be47e4131b42a2a6dccf43f233694257d1 (patch)
tree62b5e46388e69c35b973cbc19b382f1e6bc74c69
parent11272e93ce2e5a39e7cd197e111fa3aa86f7f15e (diff)
Split off registration of methods/variables.
-rw-r--r--src/make.code.defn2
-rw-r--r--src/maximal_slicing_axi.c16
-rw-r--r--src/register.c19
3 files changed, 20 insertions, 17 deletions
diff --git a/src/make.code.defn b/src/make.code.defn
index a5091a4..629817b 100644
--- a/src/make.code.defn
+++ b/src/make.code.defn
@@ -1,7 +1,7 @@
# Main make.code.defn file for thorn MaximalSlicingAxi
# Source files in this directory
-SRCS = basis.c maximal_slicing_axi.c
+SRCS = basis.c maximal_slicing_axi.c register.c
# Subdirectories containing source files
SUBDIRS =
diff --git a/src/maximal_slicing_axi.c b/src/maximal_slicing_axi.c
index ee39b3f..10661f6 100644
--- a/src/maximal_slicing_axi.c
+++ b/src/maximal_slicing_axi.c
@@ -19,7 +19,6 @@
#include "cctk_Parameters.h"
#include "cctk_Timers.h"
#include "util_Table.h"
-#include "Slicing.h"
#include "maximal_slicing_axi.h"
@@ -1282,18 +1281,3 @@ void maximal_slicing_axi(CCTK_ARGUMENTS)
if (!(count & 15))
fprintf(stderr, "avg %g total %g\n", total / count, total);
}
-
-int maximal_slicing_axi_register(void)
-{
- Einstein_RegisterSlicing("maximal_axi");
- return 0;
-}
-
-void maximal_slicing_axi_register_mol(CCTK_ARGUMENTS)
-{
- MoLRegisterConstrained(CCTK_VarIndex("ADMBase::alp"));
- MoLRegisterConstrained(CCTK_VarIndex("MaximalSlicingAxi::alpha_coeffs"));
-
- MoLRegisterSaveAndRestoreGroup(CCTK_GroupIndex("ADMBase::metric"));
- MoLRegisterSaveAndRestoreGroup(CCTK_GroupIndex("ADMBase::curv"));
-}
diff --git a/src/register.c b/src/register.c
new file mode 100644
index 0000000..1b76eee
--- /dev/null
+++ b/src/register.c
@@ -0,0 +1,19 @@
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "Slicing.h"
+
+int maximal_slicing_axi_register(void)
+{
+ Einstein_RegisterSlicing("maximal_axi");
+ return 0;
+}
+
+void maximal_slicing_axi_register_mol(CCTK_ARGUMENTS)
+{
+ MoLRegisterConstrained(CCTK_VarIndex("ADMBase::alp"));
+ MoLRegisterConstrained(CCTK_VarIndex("MaximalSlicingAxi::alpha_coeffs"));
+
+ MoLRegisterSaveAndRestoreGroup(CCTK_GroupIndex("ADMBase::metric"));
+ MoLRegisterSaveAndRestoreGroup(CCTK_GroupIndex("ADMBase::curv"));
+}