From 4c3e87be47e4131b42a2a6dccf43f233694257d1 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 13 Mar 2015 16:18:32 +0100 Subject: Split off registration of methods/variables. --- src/make.code.defn | 2 +- src/maximal_slicing_axi.c | 16 ---------------- src/register.c | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 src/register.c 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")); +} -- cgit v1.2.3