aboutsummaryrefslogtreecommitdiff
path: root/src/Registration.c
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 /src/Registration.c
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
Diffstat (limited to 'src/Registration.c')
-rw-r--r--src/Registration.c40
1 files changed, 40 insertions, 0 deletions
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.