aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2004-01-12 17:27:21 +0000
committerhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2004-01-12 17:27:21 +0000
commit6ac7c345925b48175a4646d7dea37a977d64f085 (patch)
treea101273c931f9eb15df3e3b4c5c7e9671108ae65
parenta7e3da8be27600459d23d8400028d36189b4483f (diff)
Erik's changes to do general dissipation adding.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@45 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
-rw-r--r--interface.ccl2
-rw-r--r--param.ccl2
-rw-r--r--src/Registration.c40
3 files changed, 43 insertions, 1 deletions
diff --git a/interface.ccl b/interface.ccl
index c2bcd1c..58e5ea6 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -29,6 +29,7 @@ CCTK_INT FUNCTION MoLChangeToEvolved(CCTK_INT IN EvolvedIndex, \
CCTK_INT FUNCTION MoLChangeToConstrained(CCTK_INT IN ConstrainedIndex)
CCTK_INT FUNCTION MoLChangeToSaveAndRestore(CCTK_INT IN SandRIndex)
CCTK_INT FUNCTION MoLChangeToNone(CCTK_INT IN RemoveIndex)
+CCTK_INT FUNCTION MoLQueryEvolvedRHS(CCTK_INT IN EvolvedIndex)
PROVIDES FUNCTION MoLRegisterEvolved WITH MoL_RegisterEvolved LANGUAGE C
PROVIDES FUNCTION MoLRegisterConstrained WITH MoL_RegisterConstrained \
@@ -47,6 +48,7 @@ PROVIDES FUNCTION MoLChangeToConstrained WITH MoL_ChangeToConstrained \
PROVIDES FUNCTION MoLChangeToSaveAndRestore WITH MoL_ChangeToSaveAndRestore \
LANGUAGE C
PROVIDES FUNCTION MoLChangeToNone WITH MoL_ChangeToNone LANGUAGE C
+PROVIDES FUNCTION MoLQueryEvolvedRHS WITH MoL_QueryEvolvedRHS LANGUAGE C
################################################################
### Aliased registration and type changing functions for the ###
diff --git a/param.ccl b/param.ccl
index 8f4672a..aaa568e 100644
--- a/param.ccl
+++ b/param.ccl
@@ -124,4 +124,4 @@ STRING Generic_Method_Descriptor "A string used to create a table containing the
BOOLEAN MoL_NaN_Check "Should the RHS GFs be checked for NaNs?"
{
-} "no" \ No newline at end of file
+} "no"
diff --git a/src/Registration.c b/src/Registration.c
index 8ba9e78..5693156 100644
--- a/src/Registration.c
+++ b/src/Registration.c
@@ -105,6 +105,8 @@ CCTK_INT MoL_RegisterEvolvedComplexArrayGroup(CCTK_INT EvolvedGroupIndex,
CCTK_INT MoL_RegisterConstrainedComplexArrayGroup(CCTK_INT ConstrainedGroupIndex);
CCTK_INT MoL_RegisterSaveAndRestoreComplexArrayGroup(CCTK_INT SandRGroupIndex);
+
+CCTK_INT MoL_QueryEvolvedRHS(CCTK_INT EvolvedIndex);
/********************************************************************
********************* Local Data *****************************
@@ -2581,6 +2583,44 @@ CCTK_INT MoL_RegisterSaveAndRestoreComplexArrayGroup(CCTK_INT SandRGroupIndex)
}
+ /*@@
+ @routine MoL_QueryEvolvedRHS
+ @date Thu Dec 25 2004
+ @author Erik Schnetter
+ @desc
+ Given the index of a registered evolved GF,
+ returns the corresponding RHS GF.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+
+CCTK_INT MoL_QueryEvolvedRHS(CCTK_INT EvolvedIndex)
+{
+ CCTK_INT index;
+
+ if (EvolvedIndex < 0)
+ {
+ CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Evolved variables index %i is not a real variable index.",
+ EvolvedIndex);
+ }
+
+ for (index = 0; index < MoLNumEvolvedVariables; index++)
+ {
+ if (EvolvedVariableIndex[index] == EvolvedIndex)
+ {
+ return RHSVariableIndex[index];
+ }
+ }
+
+ return -1;
+
+}
/*
Old function names. Just calls the new version.