summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-26 11:59:49 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-26 11:59:49 +0000
commitf55d83fdd1a810971008e384676d7413fa873955 (patch)
tree90d3a0076ee3dc447bdf41c37ddeaa6558b0bbbf
parentc31c2cd3f5a162d92c55d864e38d698da3e41e56 (diff)
CCTK function name changes
git-svn-id: http://svn.cactuscode.org/flesh/trunk@787 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--src/comm/CactusComm.c8
-rw-r--r--src/include/Comm.h2
-rw-r--r--src/include/CommOverloadables.h2
-rw-r--r--src/include/Misc.h2
-rw-r--r--src/include/cctk.h11
-rw-r--r--src/include/flesh.h2
-rw-r--r--src/main/ProcessParameterDatabase.c2
-rw-r--r--src/main/SetParams.c4
-rw-r--r--src/util/Misc.c20
9 files changed, 27 insertions, 26 deletions
diff --git a/src/comm/CactusComm.c b/src/comm/CactusComm.c
index d498bdd7..0febdad9 100644
--- a/src/comm/CactusComm.c
+++ b/src/comm/CactusComm.c
@@ -7,14 +7,14 @@
#include "Comm.h"
#include "GHExtensions.h"
-int *CCTK_ArrayGroupSizeI(cGH *GH, int index, int dir)
+int *CCTK_ArrayGroupSizeI(cGH *GH, int dir, int index)
{
- return CCTK_ArrayGroupSizeB(GH,index,NULL,dir);
+ return CCTK_ArrayGroupSizeB(GH,dir,index,NULL);
}
-int *CCTK_ArrayGroupSize(cGH *GH, const char *groupname, int dir)
+int *CCTK_ArrayGroupSize(cGH *GH, int dir, const char *groupname)
{
- return CCTK_ArrayGroupSizeB(GH,-1,groupname,dir);
+ return CCTK_ArrayGroupSizeB(GH,dir,-1,groupname);
}
int CCTK_QueryGroupStorageI(cGH *GH, int index)
diff --git a/src/include/Comm.h b/src/include/Comm.h
index b459b606..824138ad 100644
--- a/src/include/Comm.h
+++ b/src/include/Comm.h
@@ -32,7 +32,7 @@ extern "C" {
int CCTK_QueryGroupStorage(cGH *,const char *);
int CCTK_QueryGroupStorageI(cGH *,int);
-int *CCTK_ArrayGroupSize(cGH *,const char *,int);
+int *CCTK_ArrayGroupSize(cGH *,int, const char *);
int *CCTK_ArrayGroupSizeI(cGH *,int,int);
#ifdef __cplusplus
diff --git a/src/include/CommOverloadables.h b/src/include/CommOverloadables.h
index 25910e44..8a34d6dc 100644
--- a/src/include/CommOverloadables.h
+++ b/src/include/CommOverloadables.h
@@ -46,7 +46,7 @@ OVERLOADABLE(Abort)
OVERLOADABLE(SetupGH)
#undef ARGUMENTS
-#define ARGUMENTS cGH *GH, int group, const char *groupname, int dir
+#define ARGUMENTS cGH *GH, int dir, int group, const char *groupname
#undef RETURN_TYPE
#define RETURN_TYPE int *
OVERLOADABLE(ArrayGroupSizeB)
diff --git a/src/include/Misc.h b/src/include/Misc.h
index c02bf86b..1f2d8d7b 100644
--- a/src/include/Misc.h
+++ b/src/include/Misc.h
@@ -21,7 +21,7 @@ int CCTK_Equals(const char *string1, const char *string2);
char *Util_NullTerminateString(const char *, unsigned int);
-int CCTK_InList(const char *string1, int n_elements, ...);
+int Util_InList(const char *string1, int n_elements, ...);
int Util_IntInRange(int inval, const char *range);
int Util_DoubleInRange(double inval, const char *range);
diff --git a/src/include/cctk.h b/src/include/cctk.h
index 77053b56..73f86b5d 100644
--- a/src/include/cctk.h
+++ b/src/include/cctk.h
@@ -31,7 +31,6 @@
#define CCTK_PRINTSEPARATOR\
print *,"----------------------------------------------------------------"
-
#define _CCTK_FARGUMENTS cctk_dim, cctk_gsh, cctk_lsh, cctk_lbnd, cctk_ubnd, cctk_from, cctk_to, cctk_bbox, cctk_delta_time, cctk_time, cctk_delta_space, cctk_origin_space, cctk_levfac, cctk_convlevel, cctk_nghostzones, cctk_iteration, cctkGH
#define _DECLARE_CCTK_FARGUMENTS INTEGER cctk_dim&&\
INTEGER cctk_gsh(cctk_dim),cctk_lsh(cctk_dim)&&\
@@ -48,7 +47,7 @@
CCTK_POINTER cctkGH&&\
#define CCTK_WARN(a,b) CCTK_Warn(a,__LINE__,__FORTRANFILE__,CCTK_THORNSTRING,b)
-
+#define CCTK_EQUALS(a,b) (CCTK_Equals(a,b).eq.1)
#endif /*FCODE*/
@@ -56,6 +55,9 @@
#include "cGH.h"
+#define CCTK_GFINDEX3D(GH,i,j,k) ((i) + GH->cctk_lsh[0]*((j)+GH->cctk_lsh[1]*(k)))
+
+
#define CCTK_PRINTSEPARATOR \
printf("----------------------------------------------------------------\n");
@@ -104,14 +106,15 @@
int *,\
cGH *
-#define CCTK_STORAGESIZE(xGH, group, cctk_dim) \
+#define CCTK_STORAGESIZE(xGH, cctk_dim, group) \
(CCTK_QueryGroupStorage(xGH,group) ?\
- (CCTK_ArrayGroupSize(xGH, group, cctk_dim)) : &(_cctk_one))
+ (CCTK_ArrayGroupSize(xGH, cctk_dim, group)) : &(_cctk_one))
extern int _cctk_one;
#define CCTK_WARN(a,b) CCTK_Warn(a,__LINE__,__FILE__,CCTK_THORNSTRING,b)
+#define CCTK_EQUALS(a,b) (CCTK_Equals(a,b)==1)
#endif /*CCODE*/
diff --git a/src/include/flesh.h b/src/include/flesh.h
index 107b71f5..dc36e3b3 100644
--- a/src/include/flesh.h
+++ b/src/include/flesh.h
@@ -80,7 +80,7 @@ extern "C" {
int InitialiseCactus(int *, char ***, tFleshConfig *);
-int CCTK_SetParameter(const char *parameter, const char *value);
+int CCTKi_SetParameter(const char *parameter, const char *value);
int ShutdownCactus(tFleshConfig *);
diff --git a/src/main/ProcessParameterDatabase.c b/src/main/ProcessParameterDatabase.c
index d4ace7b4..b914d99f 100644
--- a/src/main/ProcessParameterDatabase.c
+++ b/src/main/ProcessParameterDatabase.c
@@ -40,7 +40,7 @@ int ProcessParameterDatabase(tFleshConfig *ConfigData)
if((parameter_file = fopen(ConfigData->parameter_file_name, "r")))
{
- ParseFile(parameter_file, CCTK_SetParameter);
+ ParseFile(parameter_file, CCTKi_SetParameter);
fclose(parameter_file);
retval = 0;
}
diff --git a/src/main/SetParams.c b/src/main/SetParams.c
index 5632b3c2..ba947d4f 100644
--- a/src/main/SetParams.c
+++ b/src/main/SetParams.c
@@ -16,7 +16,7 @@
static char *rcsid = "$Id$";
/*@@
- @routine CCTK_SetParameter
+ @routine CCTKi_SetParameter
@date Tue Jan 12 19:25:37 1999
@author Tom Goodale
@desc
@@ -29,7 +29,7 @@ static char *rcsid = "$Id$";
@endhistory
@@*/
-int CCTK_SetParameter(const char *parameter, const char *value)
+int CCTKi_SetParameter(const char *parameter, const char *value)
{
int retval;
char thornname[101];
diff --git a/src/util/Misc.c b/src/util/Misc.c
index e2f47c5c..8fcec522 100644
--- a/src/util/Misc.c
+++ b/src/util/Misc.c
@@ -9,8 +9,6 @@
/*#define DEBUG_MISC*/
-#include "cctk.h"
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -20,7 +18,7 @@
#include "gnu_regex.h"
-
+#include "config.h"
#include "Misc.h"
#include "FortranString.h"
#include "WarnLevel.h"
@@ -117,17 +115,17 @@ int CCTK_Equals(const char *string1, const char *string2)
{
message = (char *)malloc((100+sizeof(string2))*sizeof(char));
sprintf(message,"First string null in CCTK_Equals (2nd is %s)",string2);
- CCTK_WARN(0,message);
+ CCTK_Warn(0,__LINE__,__FILE__,"Cactus",message);
}
else if (string1 && !string2)
{
message = (char *)malloc((100+sizeof(string1))*sizeof(char));
sprintf(message,"Second string null in CCTK_Equals (1st is %s)",string1);
- CCTK_WARN(0,message);
+ CCTK_Warn(0,__LINE__,__FILE__,"Cactus",message);
}
else
{
- CCTK_WARN(0,"Both strings null in CCTK_Equals");
+ CCTK_Warn(0,__LINE__,__FILE__,"Cactus","Both strings null in CCTK_Equals");
}
}
@@ -192,7 +190,7 @@ char *Util_NullTerminateString(const char *instring, unsigned int len)
/*@@
- @routine CCTK_InList
+ @routine Util_InList
@date Wed Jan 20 10:31:25 1999
@author Tom Goodale
@desc
@@ -205,7 +203,7 @@ char *Util_NullTerminateString(const char *instring, unsigned int len)
@endhistory
@@*/
-int CCTK_InList(const char *string1, int n_elements, ...)
+int Util_InList(const char *string1, int n_elements, ...)
{
int retval;
int arg;
@@ -670,19 +668,19 @@ int CCTK_SetLogical(CCTK_INT *data, const char *value)
{
int retval = 1;
- if(CCTK_InList(value, 5, "true", "t", "yes", "y", "1"))
+ if(Util_InList(value, 5, "true", "t", "yes", "y", "1"))
{
*data = 1;
retval = 0;
}
- else if(CCTK_InList(value, 5, "false", "f", "no", "n", "0"))
+ else if(Util_InList(value, 5, "false", "f", "no", "n", "0"))
{
*data = 0;
retval = 0;
}
else
{
- CCTK_WARN(1,"Logical not set in CCTK_SetLogical");
+ CCTK_Warn(1,__LINE__,__FILE__,"Cactus","Logical not set in CCTK_SetLogical");
retval = -1;
}