aboutsummaryrefslogtreecommitdiff
path: root/src/PughUtils.c
diff options
context:
space:
mode:
authorgoodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-02-02 12:46:07 +0000
committergoodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-02-02 12:46:07 +0000
commit89aecf06c6c5f4576d987727c11ee9923ced5221 (patch)
treeaf95cca7a85e3b4f9cb34a911aa9e875205093e5 /src/PughUtils.c
parent3aa37af3c2186fae78174580edf400b778cf0ebf (diff)
Added a function
pGH *pugh_pGH(cGH *GH) which takes a cGH and returns the associated pGH. Added identity_string to the pGH. These changes are for future multi-patch or multi-block changes to PUGH. When that happens the PUGH GHExtension will no longer be a pGH, but instead a structure containing a list or array of pGHs and status stuff so PUGH knows which pGH is active when its routines are called. If your thorn uses a pGH directly from the GH Extension, please change it to use the new function. Of course in principle no-one should be using the pGH anyway, alas currently a fair number of things need it 8-( Ho hum. Also removed obsolete rfrTraverse stuff completely from PUGH. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@156 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/PughUtils.c')
-rw-r--r--src/PughUtils.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/PughUtils.c b/src/PughUtils.c
index 695c24c..018a398 100644
--- a/src/PughUtils.c
+++ b/src/PughUtils.c
@@ -4,9 +4,10 @@
@author Gabrielle Allen
@desc
@enddesc
+ @version $Header$
@@*/
-#include <malloc.h>
+#include <stdlib.h>
#include "cctk.h"
#include "cctk_Arguments.h"
@@ -14,6 +15,7 @@
#include "pugh.h"
+static char *rcsid = "$Header$";
/*@@
@routine pugh_Report
@@ -107,3 +109,28 @@ void pugh_Report(CCTK_CARGUMENTS)
free(message);
}
+
+ /*@@
+ @routine pugh_pGH
+ @date Wed Feb 2 13:27:41 2000
+ @author Tom Goodale
+ @desc
+ This takes a cGH and returns the active pGH.
+ Needed once the pugh GH Extension changes from being
+ a pGH to a structure containing pGHs for multi-patch stuff.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+pGH *pugh_pGH(cGH *GH)
+{
+ pGH *pughGH;
+
+ pughGH = (pGH *) GH->extensions [CCTK_GHExtensionHandle ("PUGH")];
+
+ return pughGH;
+}