summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/comm/Reduction.c118
-rw-r--r--src/include/cctk_Coord.h26
-rw-r--r--src/include/cctk_Groups.h9
-rw-r--r--src/include/cctk_ParameterFunctions.h14
-rw-r--r--src/include/cctk_Reduction.h25
-rw-r--r--src/include/cctki_ScheduleBindings.h4
-rw-r--r--src/include/cctki_Stagger.h11
-rw-r--r--src/main/Coord.c52
-rw-r--r--src/main/GHExtensions.c2
-rw-r--r--src/main/Groups.c12
-rw-r--r--src/main/GroupsOnGH.c2
-rw-r--r--src/main/Parameters.c78
-rw-r--r--src/main/ScheduleInterface.c114
-rw-r--r--src/main/SetParams.c2
-rw-r--r--src/main/Stagger.c22
-rw-r--r--src/main/WarnLevel.c46
-rw-r--r--src/util/Misc.c4
17 files changed, 280 insertions, 261 deletions
diff --git a/src/comm/Reduction.c b/src/comm/Reduction.c
index ddbb411a..5bfda670 100644
--- a/src/comm/Reduction.c
+++ b/src/comm/Reduction.c
@@ -55,8 +55,8 @@ static int num_reductions_array = 0;
int CCTK_RegisterReductionOperator(
- void (*function)(REDUCTION_OPERATOR_REGISTER_ARGLIST),
- const char *name)
+ void (*function)(REDUCTION_OPERATOR_REGISTER_ARGLIST),
+ const char *name)
{
int handle;
@@ -188,14 +188,14 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReductionHandle)(int *handle, ONE_FORTSTRING_AR
@endvar
@@*/
-int CCTK_Reduce( cGH *GH,
- int proc,
- int operation_handle,
- int num_out_vals,
- int type_out_vals,
- void *out_vals,
- int num_in_fields,
- ... )
+int CCTK_Reduce(cGH *GH,
+ int proc,
+ int operation_handle,
+ int num_out_vals,
+ int type_out_vals,
+ void *out_vals,
+ int num_in_fields,
+ ... )
{
va_list indices;
int i;
@@ -456,16 +456,16 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReductionArrayHandle)
@endvar
@@*/
-int CCTK_ReduceArray( cGH *GH,
- int proc,
- int operation_handle,
- int num_out_vals,
- int type_out_vals,
- void *out_vals,
- int num_dims,
- int num_in_arrays,
- int type_in_arrays,
- ... )
+int CCTK_ReduceArray(cGH *GH,
+ int proc,
+ int operation_handle,
+ int num_out_vals,
+ int type_out_vals,
+ void *out_vals,
+ int num_dims,
+ int num_in_arrays,
+ int type_in_arrays,
+ ... )
{
va_list indices;
@@ -658,12 +658,12 @@ int CCTK_ReduceLocScalar (cGH *GH, int proc, int operation_handle,
}
void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocScalar)(int *fortran_return,
- cGH *GH,
- int *proc,
- int *operation_handle,
- void *in_scalar,
- void *out_scalar,
- int *data_type)
+ cGH *GH,
+ int *proc,
+ int *operation_handle,
+ void *in_scalar,
+ void *out_scalar,
+ int *data_type)
{
*fortran_return = CCTK_ReduceArray (GH, *proc, *operation_handle,
1, *data_type, out_scalar,
@@ -677,8 +677,8 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocScalar)(int *fortran_return,
@author Gerd Lanfermann
@desc
Interface to the migthy CCTK_Reduce for
- reduction of local 1D arrays to local arrays
- (element by element).
+ reduction of local 1D arrays to local arrays
+ (element by element).
@enddesc
@calls
@calledby
@@ -690,19 +690,19 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocScalar)(int *fortran_return,
/*** FIXME: OLD INTERFACE gerd ***/
int CCTK_ReduceLocalArray1D (cGH *GH, int proc, int operation_handle,
- void *in_array1d, void *out_array1d,
- int num_in_array1d,
- int data_type)
+ void *in_array1d, void *out_array1d,
+ int num_in_array1d,
+ int data_type)
{
return (CCTK_ReduceArray (GH, proc, operation_handle,
- num_in_array1d, data_type, out_array1d,
- 1, 1, data_type, num_in_array1d, in_array1d));
+ num_in_array1d, data_type, out_array1d,
+ 1, 1, data_type, num_in_array1d, in_array1d));
}
int CCTK_ReduceLocArrayToArray1D(cGH *GH, int proc, int operation_handle,
- void *in_array1d, void *out_array1d,
- int num_in_array1d,
- int data_type)
+ void *in_array1d, void *out_array1d,
+ int num_in_array1d,
+ int data_type)
{
return (CCTK_ReduceArray (GH, proc, operation_handle,
num_in_array1d, data_type, out_array1d,
@@ -749,12 +749,12 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocArrayToArray1D)(int *fortran_return,
int *operation_handle,
void *in_array1d,
void *out_array1d,
- int *num_in_array1d,
+ int *num_in_array1d,
int *data_type)
{
*fortran_return = CCTK_ReduceArray (GH, *proc, *operation_handle,
*num_in_array1d, *data_type, out_array1d,
- 1, 1, *data_type, *num_in_array1d,
+ 1, 1, *data_type, *num_in_array1d,
in_array1d);
}
@@ -777,16 +777,16 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocArrayToArray1D)(int *fortran_return,
int CCTK_ReduceLocArrayToArray2D(cGH *GH, int proc, int operation_handle,
- void *in_array2d, void *out_array2d,
- int xsize, int ysize,
- int data_type)
+ void *in_array2d, void *out_array2d,
+ int xsize, int ysize,
+ int data_type)
{
int lin_size= xsize*ysize;
return (CCTK_ReduceArray (GH, proc, operation_handle,
lin_size,
- data_type, out_array2d,
+ data_type, out_array2d,
2, 1, data_type,
- xsize,ysize, in_array2d));
+ xsize,ysize, in_array2d));
}
void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocArrayToArray2D)
@@ -800,11 +800,11 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocArrayToArray2D)
{
int lin_size = (*xsize)*(*ysize);
*fortran_return = CCTK_ReduceArray (GH, *proc, *operation_handle,
- lin_size,
- *data_type, out_array2d,
- 2, 1, *data_type,
- *xsize, *ysize,
- in_array2d);
+ lin_size,
+ *data_type, out_array2d,
+ 2, 1, *data_type,
+ *xsize, *ysize,
+ in_array2d);
}
/*@@
@@ -824,18 +824,18 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocArrayToArray2D)
@@*/
int CCTK_ReduceLocArrayToArray3D(cGH *GH, int proc, int operation_handle,
- void *in_array3d, void *out_array3d,
- int xsize, int ysize, int zsize,
- int data_type)
+ void *in_array3d, void *out_array3d,
+ int xsize, int ysize, int zsize,
+ int data_type)
{
int lin_size = xsize*ysize*zsize;
return (CCTK_ReduceArray (GH, proc, operation_handle,
lin_size,
- data_type, out_array3d,
+ data_type, out_array3d,
3, 1, data_type,
- xsize,ysize,zsize,
- in_array3d));
+ xsize,ysize,zsize,
+ in_array3d));
}
void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocArrayToArray3D)
@@ -849,9 +849,9 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocArrayToArray3D)
{
int lin_size = (*xsize)*(*ysize)*(*zsize);
*fortran_return = CCTK_ReduceArray (GH, *proc, *operation_handle,
- lin_size,
- *data_type, out_array3d,
- 3, 1, *data_type,
- *xsize,*ysize,*zsize,
- in_array3d);
+ lin_size,
+ *data_type, out_array3d,
+ 3, 1, *data_type,
+ *xsize,*ysize,*zsize,
+ in_array3d);
}
diff --git a/src/include/cctk_Coord.h b/src/include/cctk_Coord.h
index c64eb82b..fbc9642b 100644
--- a/src/include/cctk_Coord.h
+++ b/src/include/cctk_Coord.h
@@ -21,27 +21,27 @@ int CCTK_CoordIndex(const char *name);
int CCTK_CoordDir(const char *name);
int CCTK_CoordRange(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- const char *name);
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ const char *name);
int CCTK_CoordLocalRange(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- const char *name);
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ const char *name);
int CCTK_CoordRegister(int dir,
- const char *gfname,
- const char *coordname);
+ const char *gfname,
+ const char *coordname);
int CCTK_CoordRegisterI(int dir,
- int index,
- const char *name);
+ int index,
+ const char *name);
int CCTK_CoordRegisterRange(cGH *GH,
- CCTK_REAL min,
- CCTK_REAL max,
- const char *coordname);
+ CCTK_REAL min,
+ CCTK_REAL max,
+ const char *coordname);
/* BEGIN DEPRECATED 4.0b5 */
diff --git a/src/include/cctk_Groups.h b/src/include/cctk_Groups.h
index 35642065..fe4c0bf5 100644
--- a/src/include/cctk_Groups.h
+++ b/src/include/cctk_Groups.h
@@ -24,14 +24,15 @@ typedef struct
/* Prototypes */
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
#include "cctk_Types.h"
int CCTK_DecomposeName(const char *fullname,
- char **implementation,
- char **name);
+ char **implementation,
+ char **name);
int CCTK_FirstVarIndex(const char *group);
int CCTK_FirstVarIndexI(int group);
@@ -89,4 +90,4 @@ char *CCTK_VarTypeName(int vartype);
#define CCTK_PROTECTED 2
#define CCTK_PUBLIC 3
-#endif
+#endif /* _CCTK_GROUPS_H_ */
diff --git a/src/include/cctk_ParameterFunctions.h b/src/include/cctk_ParameterFunctions.h
index 4d54b57b..2ecbfbb0 100644
--- a/src/include/cctk_ParameterFunctions.h
+++ b/src/include/cctk_ParameterFunctions.h
@@ -98,25 +98,25 @@ extern "C" {
/* set the value of a parameter */
int CCTK_ParameterSet (
- const char *name, /* The name of the parameter */
- const char *thorn, /* The originating thorn */
- const char *value); /* The value of the parameter */
+ const char *name, /* The name of the parameter */
+ const char *thorn, /* The originating thorn */
+ const char *value); /* The value of the parameter */
/* get the data pointer to and type of a parameter's value */
void *ParameterGet (
- const char *name, /* The name of the parameter */
+ const char *name, /* The name of the parameter */
const char *thorn, /* The originating thorn */
int *type); /* Holds type of parameter */
/* get the string representation of a parameter's value
(string should be freed afterwards) */
char *ParameterValString (const char *name, /* The name of the parameter */
- const char *thorn); /* The originating thorn */
+ const char *thorn); /* The originating thorn */
/* walk through list of parameters */
const char *CCTK_ParameterWalk(
- int first, /* Get first parameter or not */
- const char *origin); /* The origin of this walk */
+ int first, /* Get first parameter or not */
+ const char *origin); /* The origin of this walk */
/* get list of parameter names for given thorn */
int CCTK_ParameterList (const char* thorn, char ***paramlist, int *n_param);
diff --git a/src/include/cctk_Reduction.h b/src/include/cctk_Reduction.h
index 2fb17dbc..0b877650 100644
--- a/src/include/cctk_Reduction.h
+++ b/src/include/cctk_Reduction.h
@@ -12,7 +12,8 @@
#define _CCTK_REDUCTION_H_
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
#define REDUCTION_OPERATOR_REGISTER_ARGLIST \
@@ -67,22 +68,22 @@ int CCTK_ReduceLocalArray1D (cGH *GH, int proc, int operation_handle,
int num_in_array1d, int data_type);
int CCTK_ReduceLocScalar(cGH *GH, int proc, int operation_handle,
- void *in_scalar, void *out_scalar, int data_type);
+ void *in_scalar, void *out_scalar, int data_type);
int CCTK_ReduceLocArrayToArray1D(cGH *GH, int proc, int operation_handle,
- void *in_array1d, void *out_array1d,
- int num_in_array1d,
- int data_type);
+ void *in_array1d, void *out_array1d,
+ int num_in_array1d,
+ int data_type);
int CCTK_ReduceLocArrayToArray2D(cGH *GH, int proc, int operation_handle,
- void *in_array2d, void *out_array2d,
- int xsize, int ysize,
- int data_type);
+ void *in_array2d, void *out_array2d,
+ int xsize, int ysize,
+ int data_type);
int CCTK_ReduceLocArrayToArray3D(cGH *GH, int proc, int operation_handle,
- void *in_array3d, void *out_array3d,
- int xsize, int ysize, int zsize,
- int data_type);
+ void *in_array3d, void *out_array3d,
+ int xsize, int ysize, int zsize,
+ int data_type);
int CCTK_ReduceArray(cGH *GH,
@@ -100,4 +101,4 @@ int CCTK_ReduceArray(cGH *GH,
}
#endif
-#endif
+#endif /* _CCTK_REDUCTION_H_ */
diff --git a/src/include/cctki_ScheduleBindings.h b/src/include/cctki_ScheduleBindings.h
index 2e1d32a8..b5edc892 100644
--- a/src/include/cctki_ScheduleBindings.h
+++ b/src/include/cctki_ScheduleBindings.h
@@ -51,8 +51,8 @@ int CCTKi_ScheduleGroupStorage(const char *group);
int CCTKi_ScheduleGroupComm(const char *group);
int CCTKi_ScheduleTraverse(const char *where,
- void *GH,
- int (*CallFunction)(void *, cFunctionData *, void *));
+ void *GH,
+ int (*CallFunction)(void *, cFunctionData *, void *));
int CCTKi_ScheduleGHInit(void *GH);
diff --git a/src/include/cctki_Stagger.h b/src/include/cctki_Stagger.h
index 1018232d..77151ec3 100644
--- a/src/include/cctki_Stagger.h
+++ b/src/include/cctki_Stagger.h
@@ -12,16 +12,17 @@
#define _CCTKI_STAGGER_H_
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
int CCTKi_ParseStaggerString(int dim,
- const char *imp,
- const char *gname,
- const char *stype);
+ const char *imp,
+ const char *gname,
+ const char *stype);
#ifdef __cplusplus
}
#endif
-#endif
+#endif /* _CCTKI_STAGGER_H_ */
diff --git a/src/main/Coord.c b/src/main/Coord.c
index 0d7f9d12..81c6cf9f 100644
--- a/src/main/Coord.c
+++ b/src/main/Coord.c
@@ -203,7 +203,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordRegisterI)(int *handle, int *dir, int *ind
@@*/
int CCTK_CoordRegister(int dir,
- const char *gfname,
+ const char *gfname,
const char *coordname)
{
@@ -227,8 +227,8 @@ int CCTK_CoordRegister(int dir,
}
void FMODIFIER FORTRAN_NAME(CCTK_CoordRegister)(int *handle,
- int *dir,
- TWO_FORTSTRINGS_ARGS)
+ int *dir,
+ TWO_FORTSTRINGS_ARGS)
{
TWO_FORTSTRINGS_CREATE(gf,name)
*handle = CCTK_CoordRegister(*dir, gf, name);
@@ -240,8 +240,8 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordRegister)(int *handle,
int CCTK_CoordRegisterRange(cGH *GH,
- CCTK_REAL min,
- CCTK_REAL max,
+ CCTK_REAL min,
+ CCTK_REAL max,
const char *coordname)
{
coord_range *newguy;
@@ -279,9 +279,9 @@ int CCTK_CoordRegisterRange(cGH *GH,
}
void FMODIFIER FORTRAN_NAME(CCTK_CoordRegisterRange)(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- ONE_FORTSTRING_ARG)
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(name)
CCTK_CoordRegisterRange (GH,*lower,*upper,name);
@@ -389,9 +389,9 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordDir)(int *dir, ONE_FORTSTRING_ARG)
@@*/
int CCTK_CoordRange(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- const char *name)
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ const char *name)
{
coord_range *curr;
@@ -409,7 +409,7 @@ int CCTK_CoordRange(cGH *GH,
#ifdef DEBUG_COORD
printf("Returning range (%f,%f) for %s (from %x)\n",
- *lower,*upper,name,curr);
+ *lower,*upper,name,curr);
#endif
return 0;
@@ -441,7 +441,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordRange)(int *ierr,
@author Gabrielle Allen
@desc
Returns the range of the coordinate on this processor
- For now this is done in a straightforward manner, assuming
+ For now this is done in a straightforward manner, assuming
that a regular grid is used and that the coordinate is a
Grid function.
@enddesc
@@ -461,9 +461,9 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordRange)(int *ierr,
@@*/
int CCTK_CoordLocalRange(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- const char *name)
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ const char *name)
{
CCTK_REAL global_lower;
@@ -480,10 +480,10 @@ int CCTK_CoordLocalRange(cGH *GH,
}
void FMODIFIER FORTRAN_NAME(CCTK_CoordLocalRange)(int *ierr,
- cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- ONE_FORTSTRING_ARG)
+ cGH *GH,
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(name)
*ierr = CCTK_CoordLocalRange (GH,lower,upper,name);
@@ -570,17 +570,17 @@ void FMODIFIER FORTRAN_NAME(CCTK_RegisterCoord)(int *handle, int *dir, TWO_FORTS
}
int CCTK_RegisterCoordRange(cGH *GH,
- CCTK_REAL min,
- CCTK_REAL max,
+ CCTK_REAL min,
+ CCTK_REAL max,
const char *coordname)
{
return CCTK_CoordRegisterRange(GH,min,max,coordname);
}
void FMODIFIER FORTRAN_NAME(CCTK_RegisterCoordRange)(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- ONE_FORTSTRING_ARG)
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(name)
CCTK_RegisterCoordRange (GH,*lower,*upper,name);
@@ -588,7 +588,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_RegisterCoordRange)(cGH *GH,
}
int CCTK_RegisterCoord(int dir,
- const char *gfname,
+ const char *gfname,
const char *coordname)
{
return CCTK_CoordRegister(dir,gfname,coordname);
diff --git a/src/main/GHExtensions.c b/src/main/GHExtensions.c
index f0e51f8d..f66b2fa4 100644
--- a/src/main/GHExtensions.c
+++ b/src/main/GHExtensions.c
@@ -280,7 +280,7 @@ int CCTKi_SetupGHExtensions(tFleshConfig *config,
convergence_level,
GH);
#ifdef DEBUG
- printf("CCTKi_SetupGHExtensions: Set up extension for handle %d\n",handle);
+ printf("CCTKi_SetupGHExtensions: Set up extension for handle %d\n",handle);
#endif
}
return_code = 0;
diff --git a/src/main/Groups.c b/src/main/Groups.c
index 60a9de96..ae93f22f 100644
--- a/src/main/Groups.c
+++ b/src/main/Groups.c
@@ -89,7 +89,7 @@ int _cctk_one = 1;
static cGroupDefinition *CCTKi_SetupGroup(const char *implementation,
const char *name,
- int staggercode,
+ int staggercode,
int n_variables);
static CCTK_INT **CCTKi_ExtractSize(int dimension, const char *thorn, const char *sizestring);
@@ -196,9 +196,9 @@ void CCTKi_PrintGroupInfo(void) {
for(group_num = 0; group_num < n_groups; group_num++) {
printf("GROUP INFO: GrpNo./imp_name/name/stag %d >%s< >%s< %d\n",
group_num,
- groups[group_num].implementation,
- groups[group_num].name,
- groups[group_num].staggertype);
+ groups[group_num].implementation,
+ groups[group_num].name,
+ groups[group_num].staggertype);
}
}
@@ -369,7 +369,7 @@ int CCTKi_CreateGroup
@@*/
static cGroupDefinition *CCTKi_SetupGroup(const char *implementation,
const char *name,
- int staggercode,
+ int staggercode,
int n_variables)
{
int *temp_int;
@@ -1058,7 +1058,7 @@ int CCTK_GroupScopeNumber(const char *type)
}
void FMODIFIER FORTRAN_NAME(CCTK_GroupScopeNumber)(int *number,
- ONE_FORTSTRING_ARG)
+ ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(type)
*number = CCTK_GroupScopeNumber(type);
diff --git a/src/main/GroupsOnGH.c b/src/main/GroupsOnGH.c
index b4177a68..d638f6cd 100644
--- a/src/main/GroupsOnGH.c
+++ b/src/main/GroupsOnGH.c
@@ -134,7 +134,7 @@ void *CCTK_VarDataPtrI(cGH *GH, int timelevel, int vari)
{
if (vari < 0)
CCTK_Warn(1,__LINE__,__FILE__,"Cactus",
- "WARNING: calling CCTK_VarDataPtrI with negative index");
+ "WARNING: calling CCTK_VarDataPtrI with negative index");
return GH->data[vari][timelevel];
}
diff --git a/src/main/Parameters.c b/src/main/Parameters.c
index 00e1ac46..9980d8de 100644
--- a/src/main/Parameters.c
+++ b/src/main/Parameters.c
@@ -81,26 +81,26 @@ typedef struct PARAMTREENODE
} t_paramtreenode;
static t_param *ParameterFind(const char *name,
- const char *thorn,
- int scope);
+ const char *thorn,
+ int scope);
static t_param *ParameterNew(const char *thorn,
- const char *name,
- const char *type,
- const char *scope,
- int steerable,
- const char *description,
- const char *defval,
- void *data);
+ const char *name,
+ const char *type,
+ const char *scope,
+ int steerable,
+ const char *description,
+ const char *defval,
+ void *data);
static int ParameterCheck(const char *thorn,
- const char *name,
- const char *type,
- const char *scope,
- int steerable,
- const char *description,
- const char *defval,
- void *data);
+ const char *name,
+ const char *type,
+ const char *scope,
+ int steerable,
+ const char *description,
+ const char *defval,
+ void *data);
static void *ParameterGetSimple (t_param *param,
int *type);
@@ -214,15 +214,15 @@ static t_sktree *paramtree=NULL;
@@*/
int CCTKi_ParameterCreate(const char *name,
- const char *thorn,
- const char *type,
- const char *scope,
- int steerable,
- const char *description,
- const char *defval,
- void *data,
- int n_ranges,
- ...)
+ const char *thorn,
+ const char *type,
+ const char *scope,
+ int steerable,
+ const char *description,
+ const char *defval,
+ void *data,
+ int n_ranges,
+ ...)
{
int retval;
int iscope;
@@ -324,10 +324,10 @@ int CCTKi_ParameterCreate(const char *name,
@@*/
int CCTKi_ParameterAddRange(const char *implementation,
- const char *name,
- const char *range_origin,
- const char *range,
- const char *range_description)
+ const char *name,
+ const char *range_origin,
+ const char *range,
+ const char *range_description)
{
int retval;
t_param *param;
@@ -414,8 +414,8 @@ int CCTKi_ParameterAddRange(const char *implementation,
@@*/
int CCTK_ParameterSet(const char *name,
- const char *thorn,
- const char *value)
+ const char *thorn,
+ const char *value)
{
int retval;
t_param *param;
@@ -1489,7 +1489,7 @@ static int ParameterSetKeyword(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set keyword %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1532,7 +1532,7 @@ static int ParameterSetString(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set string %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1578,7 +1578,7 @@ static int ParameterSetSentence(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set sentance %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1627,7 +1627,7 @@ static int ParameterSetInteger(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set integer %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1686,7 +1686,7 @@ static int ParameterSetReal(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set real %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1709,7 +1709,7 @@ static int ParameterSetBoolean(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set boolean %s::%s - %s not recognised",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1732,10 +1732,10 @@ struct
int main(void)
{
CCTKi_ParameterCreate("a", "thorn1", "imp1", "int", "global", 0,
- "The a param", "2", &(params.a));
+ "The a param", "2", &(params.a));
CCTKi_ParameterCreate("foo", "thorn2", "imp2", "keyword", "private", 0,
- "The foo param", "bingo", &(params.foo));
+ "The foo param", "bingo", &(params.foo));
printf("Testing thorn,null\n");
diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c
index ba16e87d..2c6f9e69 100644
--- a/src/main/ScheduleInterface.c
+++ b/src/main/ScheduleInterface.c
@@ -1,4 +1,4 @@
- /*@@
+/*@@
@file ScheduleInterface.c
@date Thu Sep 16 14:06:21 1999
@author Tom Goodale
@@ -213,7 +213,7 @@ int CCTK_CallFunction(void *function,
return 0;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleFunction
@date Thu Sep 16 18:19:01 1999
@author Tom Goodale
@@ -228,20 +228,20 @@ int CCTK_CallFunction(void *function,
@@*/
int CCTKi_ScheduleFunction(void *function,
- const char *name,
- const char *thorn,
- const char *implementation,
- const char *description,
- const char *where,
- const char *language,
- int n_mem_groups,
- int n_comm_groups,
- int n_trigger_groups,
- int n_before,
- int n_after,
- int n_while,
- ...
- )
+ const char *name,
+ const char *thorn,
+ const char *implementation,
+ const char *description,
+ const char *where,
+ const char *language,
+ int n_mem_groups,
+ int n_comm_groups,
+ int n_trigger_groups,
+ int n_before,
+ int n_after,
+ int n_while,
+ ...
+ )
{
int retcode;
t_attribute *attribute;
@@ -276,7 +276,7 @@ int CCTKi_ScheduleFunction(void *function,
return retcode;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleGroup
@date Thu Sep 16 18:19:18 1999
@author Tom Goodale
@@ -291,18 +291,18 @@ int CCTKi_ScheduleFunction(void *function,
@@*/
int CCTKi_ScheduleGroup(const char *name,
- const char *thorn,
- const char *implementation,
- const char *description,
- const char *where,
- int n_mem_groups,
- int n_comm_groups,
- int n_trigger_groups,
- int n_before,
- int n_after,
- int n_while,
- ...
- )
+ const char *thorn,
+ const char *implementation,
+ const char *description,
+ const char *where,
+ int n_mem_groups,
+ int n_comm_groups,
+ int n_trigger_groups,
+ int n_before,
+ int n_after,
+ int n_while,
+ ...
+ )
{
int retcode;
t_attribute *attribute;
@@ -337,7 +337,7 @@ int CCTKi_ScheduleGroup(const char *name,
}
- /*@@
+/*@@
@routine CCTKi_ScheduleGroupStorage
@date Fri Sep 17 18:55:59 1999
@author Tom Goodale
@@ -378,7 +378,7 @@ int CCTKi_ScheduleGroupStorage(const char *group)
}
- /*@@
+/*@@
@routine CCTKi_ScheduleGroupComm
@date Fri Sep 17 18:55:59 1999
@author Tom Goodale
@@ -419,7 +419,7 @@ int CCTKi_ScheduleGroupComm(const char *group)
}
- /*@@
+/*@@
@routine CCTKi_ScheduleTraverse
@date Fri Sep 17 21:52:44 1999
@author Tom Goodale
@@ -435,8 +435,8 @@ int CCTKi_ScheduleGroupComm(const char *group)
@@*/
int CCTKi_ScheduleTraverse(const char *where,
- void *GH,
- int (*CallFunction)(void *, cFunctionData *, void *))
+ void *GH,
+ int (*CallFunction)(void *, cFunctionData *, void *))
{
t_sched_data data;
@@ -479,12 +479,12 @@ int CCTKi_ScheduleTraverse(const char *where,
(int (*)(int, char **, void *, void *))CCTKi_ScheduleCallWhile,
(int (*)(void *, void *, void *)) calling_function,
(void *)&data
- );
+ );
return 0;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleGHInit
@date Fri Sep 17 21:25:13 1999
@author Tom Goodale
@@ -515,7 +515,7 @@ int CCTKi_ScheduleGHInit(void *GH)
return 0;
}
- /*@@
+/*@@
@routine CCTK_SchedulePrint
@date Fri Sep 17 21:52:44 1999
@author Tom Goodale
@@ -605,7 +605,7 @@ int CCTK_SchedulePrintTimes(const char *where)
return 0;
}
- /*@@
+/*@@
@routine CCTK_TranslateLanguage
@date Thu Sep 16 18:18:31 1999
@author Tom Goodale
@@ -730,7 +730,7 @@ static t_attribute *CreateAttribute(const char *description,
return this;
}
- /*@@
+/*@@
@routine CreateModifier
@date Thu Sep 16 18:23:13 1999
@author Tom Goodale
@@ -758,7 +758,7 @@ static t_sched_modifier *CreateModifiers(int n_before,
return modifier;
}
- /*@@
+/*@@
@routine CreateGroupIndexList
@date Fri Sep 17 21:51:51 1999
@author Tom Goodale
@@ -788,7 +788,7 @@ static int CreateGroupIndexList(int n_items, int *array, va_list *ap)
return 0;
}
- /*@@
+/*@@
@routine CreateTypedModifier
@date Fri Sep 17 21:50:59 1999
@author Tom Goodale
@@ -821,7 +821,7 @@ static t_sched_modifier *CreateTypedModifier(t_sched_modifier *modifier,
return modifier;
}
- /*@@
+/*@@
@routine TranslateFunctionType
@date Mon Jan 24 16:52:06 2000
@author Tom Goodale
@@ -855,7 +855,7 @@ static cFunctionType TranslateFunctionType(const char *where)
return retcode;
}
- /*@@
+/*@@
@routine SchedulePrint
@date Sun Sep 19 13:31:23 1999
@author Tom Goodale
@@ -889,7 +889,7 @@ static int SchedulePrint(const char *where)
(int (*)(int, char **, void *, void *))CCTKi_SchedulePrintWhile,
(int (*)(void *, void *, void *)) CCTKi_SchedulePrintFunction,
(void *)&data
- );
+ );
}
else
{
@@ -899,7 +899,7 @@ static int SchedulePrint(const char *where)
return retcode;
}
- /*@@
+/*@@
@routine SchedulePrintTimes
@date Fri Oct 22 12:35:06 1999
@author Tom Goodale
@@ -927,7 +927,7 @@ static int SchedulePrintTimes(const char *where, t_sched_data *data)
(int (*)(int, char **, void *, void *))CCTKi_SchedulePrintTimesWhile,
(int (*)(void *, void *, void *)) CCTKi_SchedulePrintTimesFunction,
(void *)data
- );
+ );
}
else
{
@@ -963,7 +963,7 @@ static int CCTKi_SchedulePrintEntry(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintExit
@date Sun Sep 19 13:31:23 1999
@author Tom Goodale
@@ -984,7 +984,7 @@ static int CCTKi_SchedulePrintExit(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintWhile
@date Sun Sep 19 13:31:23 1999
@author Tom Goodale
@@ -1035,7 +1035,7 @@ static int CCTKi_SchedulePrintWhile(int n_whiles,
return data->whiling;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintFunction
@date Sun Sep 19 13:36:25 1999
@author Tom Goodale
@@ -1137,7 +1137,7 @@ static int CCTKi_ScheduleCallEntry(t_attribute *attribute,
return go;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleCallExit
@date Sun Sep 19 13:25:24 1999
@author Tom Goodale
@@ -1192,7 +1192,7 @@ static int CCTKi_ScheduleCallExit(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleCallWhile
@date Sun Sep 19 13:27:53 1999
@author Tom Goodale
@@ -1225,7 +1225,7 @@ static int CCTKi_ScheduleCallWhile(int n_whiles,
return retcode;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleCallFunction
@date Sun Sep 19 13:29:14 1999
@author Tom Goodale
@@ -1335,7 +1335,7 @@ static int CCTKi_SchedulePrintTimesEntry(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintTimesExit
@date Fri Oct 22 12:26:26 1999
@author Tom Goodale
@@ -1356,7 +1356,7 @@ static int CCTKi_SchedulePrintTimesExit(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintTimesWhile
@date Fri Oct 22 12:26:26 1999
@author Tom Goodale
@@ -1409,7 +1409,7 @@ static int CCTKi_SchedulePrintTimesWhile(int n_whiles,
return data->whiling;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintTimesFunction
@date Fri Oct 22 12:26:26 1999
@author Tom Goodale
@@ -1472,8 +1472,8 @@ static void CCTKi_SchedulePrintTimerInfo(t_TimerInfo *info)
printf("\t%ld", info->vals[i].val.l); break;
case val_double:
printf("\t%g", info->vals[i].val.d); break;
- default:
- printf("Unknown value type at line %d of %s\n", __LINE__, __FILE__);
+ default:
+ printf("Unknown value type at line %d of %s\n", __LINE__, __FILE__);
}
}
diff --git a/src/main/SetParams.c b/src/main/SetParams.c
index 29276ce2..a0c92eda 100644
--- a/src/main/SetParams.c
+++ b/src/main/SetParams.c
@@ -84,7 +84,7 @@ int CCTKi_SetParameter(const char *parameter, const char *value)
if(n_errors)
{
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",
- "Errors while activating thorns\n");
+ "Errors while activating thorns\n");
}
}
else
diff --git a/src/main/Stagger.c b/src/main/Stagger.c
index 68286e3f..01bc5dc0 100644
--- a/src/main/Stagger.c
+++ b/src/main/Stagger.c
@@ -226,17 +226,17 @@ int CCTK_DirStaggerCodeName(int dir, const char *stype) {
}
switch (hs[dir])
- {
+ {
case 'M': scode = 0; break;
case 'C': scode = 1; break;
case 'P': scode = 2; break;
default:
- info = (char*)malloc (256*sizeof(char));
- sprintf(info,"Unknown stagger type: >%s< \n", hs);
- CCTK_Warn(1,__LINE__,__FILE__,"Cactus",info);
- free(info);
- return(-1);
- }
+ info = (char*)malloc (256*sizeof(char));
+ sprintf(info,"Unknown stagger type: >%s< \n", hs);
+ CCTK_Warn(1,__LINE__,__FILE__,"Cactus",info);
+ free(info);
+ return(-1);
+ }
return(scode);
}
@@ -244,8 +244,10 @@ void FMODIFIER FORTRAN_NAME(CCTK_DirStaggerCodeName)
(int *ierr, int *dsc, int *dir, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(sname);
+
*ierr= 0;
*dsc = CCTK_DirStaggerCodeName((*dir)-1,sname);
+
if ((*dsc)>=0)
{
(*dsc)++;
@@ -269,9 +271,9 @@ void FMODIFIER FORTRAN_NAME(CCTK_DirStaggerCodeName)
@@*/
int CCTKi_ParseStaggerString(int dim,
- const char *imp,
- const char *gname,
- const char *stype)
+ const char *imp,
+ const char *gname,
+ const char *stype)
{
int i,m;
int base = 1;
diff --git a/src/main/WarnLevel.c b/src/main/WarnLevel.c
index 7b21df46..1160963f 100644
--- a/src/main/WarnLevel.c
+++ b/src/main/WarnLevel.c
@@ -1,4 +1,4 @@
- /*@@
+/*@@
@file WarnLevel.c
@date Wed Feb 17 00:30:09 1999
@author Tom Goodale
@@ -101,7 +101,7 @@ int CCTKi_SetWarnLevel(int level)
return retval;
}
- /*@@
+/*@@
@routine CCTK_Warn
@date Wed Feb 17 00:45:07 1999
@author Tom Goodale
@@ -125,9 +125,9 @@ int CCTK_Warn(int level, int line, const char *file, const char *thorn, const ch
if (cctk_full_warnings)
{
fprintf(stderr, "WARNING level %d in thorn %s \n (line %d of %s): \n",
- level, thorn, line, file);
+ level, thorn, line, file);
fprintf(stderr, " -> %s\n",message);
- fflush(stderr);
+ fflush(stderr);
}
else
{
@@ -150,6 +150,7 @@ int CCTK_Warn(int level, int line, const char *file, const char *thorn, const ch
void FMODIFIER FORTRAN_NAME(CCTK_Warn)(int *level, int *line, THREE_FORTSTRINGS_ARGS)
{
THREE_FORTSTRINGS_CREATE(file,thorn,message)
+
CCTK_Warn(*level,*line,file,thorn,message);
free(thorn);
free(message);
@@ -175,8 +176,8 @@ void FMODIFIER FORTRAN_NAME(CCTK_Warn)(int *level, int *line, THREE_FORTSTRINGS_
@@*/
void CCTKi_ExpectError(int in, int err, int warnonerr, int line,
- const char *file, const char *thorn,
- const char *message)
+ const char *file, const char *thorn,
+ const char *message)
{
if (in==err) CCTK_Warn(warnonerr, line, file, thorn, message);
}
@@ -186,12 +187,15 @@ void FMODIFIER FORTRAN_NAME(CCTKi_ExpectError)
(int *in, int *err, int *warnonerr, int *line, THREE_FORTSTRINGS_ARGS)
{
THREE_FORTSTRINGS_CREATE(file,thorn,message)
+
CCTKi_ExpectError(*in, *err, *warnonerr, *line,
- file,thorn,message);
+ file,thorn,message);
free(file);
free(thorn);
free(message);
}
+
+
/*@@
@routine CCTKi_ExpectOK
@date Thanksgiving 99
@@ -210,8 +214,8 @@ void FMODIFIER FORTRAN_NAME(CCTKi_ExpectError)
@@*/
void CCTKi_ExpectOK(int in, int ok, int warnonerr, int line,
- const char *file, const char *thorn,
- const char *message)
+ const char *file, const char *thorn,
+ const char *message)
{
if (in!=ok) CCTK_Warn(warnonerr, line, file, thorn, message);
}
@@ -220,8 +224,10 @@ void FMODIFIER FORTRAN_NAME(CCTKi_ExpectOK)
(int *in, int *ok, int *warnonerr, int *line, THREE_FORTSTRINGS_ARGS)
{
THREE_FORTSTRINGS_CREATE(file,thorn,message)
+
CCTKi_ExpectOK(*in, *ok, *warnonerr, *line,
- file,thorn,message);
+ file,thorn,message);
+
free(file);
free(thorn);
free(message);
@@ -257,7 +263,7 @@ int CCTK_VWarn(int level, int line, const char *file, const char *thorn, const c
if (cctk_full_warnings)
{
fprintf(stderr, "WARNING level %d in thorn %s \n (line %d of %s): \n",
- level, thorn, line, file);
+ level, thorn, line, file);
fprintf(stderr, " -> ");
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
@@ -324,6 +330,7 @@ int CCTK_ParamWarn(const char *thorn, const char *message)
void FMODIFIER FORTRAN_NAME(CCTK_ParamWarn)(TWO_FORTSTRINGS_ARGS)
{
TWO_FORTSTRINGS_CREATE(thorn,message)
+
CCTK_ParamWarn(thorn,message);
free(thorn);
free(message);
@@ -331,7 +338,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_ParamWarn)(TWO_FORTSTRINGS_ARGS)
- /*@@
+/*@@
@routine CCTK_Info
@date Tue Mar 30 1999
@author Gabrielle Allen
@@ -355,13 +362,15 @@ int CCTK_Info(const char *thorn, const char *message)
void FMODIFIER FORTRAN_NAME(CCTK_Info)(TWO_FORTSTRINGS_ARGS)
{
TWO_FORTSTRINGS_CREATE(thorn,message)
+
+
CCTK_Info(thorn,message);
free(thorn);
free(message);
}
- /*@@
+/*@@
@routine CCTKi_SetErrorLevel
@date Wed Feb 17 00:48:02 1999
@author Tom Goodale
@@ -416,7 +425,7 @@ int CCTKi_SetErrorLevel(int level)
return retval;
}
- /*@@
+/*@@
@routine CCTKi_FinaliseParamWarn
@date June 1999
@author Gabrielle Allen
@@ -447,9 +456,13 @@ void CCTKi_FinaliseParamWarn(void)
else
{
if (param_errors==1)
+ {
fprintf(stderr, "\nThere was 1 parameter warning\n\n");
+ }
else
+ {
fprintf(stderr, "\nThere were %d parameter warnings\n\n",param_errors);
+ }
fflush(stderr);
}
@@ -459,7 +472,7 @@ void CCTKi_FinaliseParamWarn(void)
}
- /*@@
+/*@@
@routine CCTK_MessageFormat
@date Mon Jul 26 19:51:26 1999
@author Tom Goodale
@@ -523,7 +536,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_VInfo)(int format_number, ...)
}
- /*@@
+/*@@
@routine CCTK_NotYetImplemented
@routine CCTKi_NotYetImplemented
@date July 1999
@@ -552,6 +565,7 @@ void CCTKi_NotYetImplemented(const char *message)
void FMODIFIER FORTRAN_NAME(CCTKi_NotYetImplemented)(ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(message)
+
CCTKi_NotYetImplemented(message);
free(message);
}
diff --git a/src/util/Misc.c b/src/util/Misc.c
index a7c1ae04..8d6aa016 100644
--- a/src/util/Misc.c
+++ b/src/util/Misc.c
@@ -975,8 +975,8 @@ int CCTK_RegexMatch(const char *string,
void FORTRAN_NAME(CCTK_FortranString)(CCTK_INT *nchar,
- char **cstring,
- ONE_FORTSTRING_ARG)
+ char **cstring,
+ ONE_FORTSTRING_ARG)
{
int i;
ONE_FORTSTRING_CREATE(fstring)