summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/comm/CactusDefaultComm.c36
-rw-r--r--src/comm/OverloadComm.c16
-rw-r--r--src/include/CommOverloadables.h4
-rw-r--r--src/include/cctk_Coord.h4
-rw-r--r--src/include/cctk_GroupsOnGH.h8
-rw-r--r--src/main/Coord.c20
-rw-r--r--src/main/GroupsOnGH.c8
7 files changed, 50 insertions, 46 deletions
diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c
index 47ff530b..b959961c 100644
--- a/src/comm/CactusDefaultComm.c
+++ b/src/comm/CactusDefaultComm.c
@@ -76,12 +76,14 @@ int CactusDefaultExit(cGH *GH, int retval);
int CactusDefaultAbort(cGH *GH, int retval);
int CactusDefaultBarrier(const cGH *GH);
-int CactusDefaultEnableGroupStorage(cGH *GH, const char *group);
-int CactusDefaultDisableGroupStorage(cGH *GH, const char *group);
-int CactusDefaultGroupStorageIncrease(cGH *GH, int n_groups, const int *groups,
- const int *timelevels, int *status);
-int CactusDefaultGroupStorageDecrease(cGH *GH, int n_groups, const int *groups,
- const int *timelevels, int *status);
+int CactusDefaultEnableGroupStorage(const cGH *GH, const char *group);
+int CactusDefaultDisableGroupStorage(const cGH *GH, const char *group);
+int CactusDefaultGroupStorageIncrease(const cGH *GH, int n_groups,
+ const int *groups, const int *timelevels,
+ int *status);
+int CactusDefaultGroupStorageDecrease(const cGH *GH, int n_groups,
+ const int *groups, const int *timelevels,
+ int *status);
int CactusDefaultInterpGridArrays (const cGH *GH, int N_dims,
int local_interp_handle,
int param_table_handle,
@@ -466,7 +468,7 @@ int CactusDefaultBarrier (const cGH *GH)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio inout
@vcomment
A driver should replace the appropriate GV pointers on this
@@ -484,7 +486,7 @@ int CactusDefaultBarrier (const cGH *GH)
-1 if group increase storage routine wasn't overloaded
@endreturndesc
@@*/
-int CactusDefaultEnableGroupStorage(cGH *GH, const char *groupname)
+int CactusDefaultEnableGroupStorage(const cGH *GH, const char *groupname)
{
int group, timelevel, retval;
@@ -525,7 +527,7 @@ int CactusDefaultEnableGroupStorage(cGH *GH, const char *groupname)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio inout
@vcomment
A driver should replace the appropriate GV pointers on this
@@ -543,7 +545,7 @@ int CactusDefaultEnableGroupStorage(cGH *GH, const char *groupname)
-1 if group decrease storage routine wasn't overloaded
@endreturndesc
@@*/
-int CactusDefaultDisableGroupStorage(cGH *GH, const char *groupname)
+int CactusDefaultDisableGroupStorage(const cGH *GH, const char *groupname)
{
int group, timelevel, retval;
@@ -588,7 +590,7 @@ int CactusDefaultDisableGroupStorage(cGH *GH, const char *groupname)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio inout
@vcomment
A driver should replace the appropriate GV pointers on this
@@ -623,8 +625,9 @@ int CactusDefaultDisableGroupStorage(cGH *GH, const char *groupname)
groups queried or modified.
@endreturndesc
@@*/
-int CactusDefaultGroupStorageIncrease (cGH *GH, int n_groups, const int *groups,
- const int *timelevels, int *status)
+int CactusDefaultGroupStorageIncrease (const cGH *GH, int n_groups,
+ const int *groups, const int *timelevels,
+ int *status)
{
int i, value, retval;
char *gname;
@@ -687,7 +690,7 @@ int CactusDefaultGroupStorageIncrease (cGH *GH, int n_groups, const int *groups,
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio inout
@endvar
@var n_groups
@@ -719,8 +722,9 @@ int CactusDefaultGroupStorageIncrease (cGH *GH, int n_groups, const int *groups,
for all groups queried or modified.
@endreturndesc
@@*/
-int CactusDefaultGroupStorageDecrease (cGH *GH, int n_groups, const int *groups,
- const int *timelevels, int *status)
+int CactusDefaultGroupStorageDecrease (const cGH *GH, int n_groups,
+ const int *groups, const int *timelevels,
+ int *status)
{
int i, value, retval;
diff --git a/src/comm/OverloadComm.c b/src/comm/OverloadComm.c
index 67b709f3..1b4aa34d 100644
--- a/src/comm/OverloadComm.c
+++ b/src/comm/OverloadComm.c
@@ -151,10 +151,10 @@ void CCTK_FCALL CCTK_FNAME (CCTK_Barrier) (int *ierror, const cGH *GH);
void CCTK_FCALL CCTK_FNAME (CCTK_Exit) (int *ierror, cGH *GH, const int *retval);
void CCTK_FCALL CCTK_FNAME (CCTK_Abort) (int *ierror, cGH *GH, const int *retval);
void CCTK_FCALL CCTK_FNAME (CCTK_SyncGroup) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
void CCTK_FCALL CCTK_FNAME (CCTK_QueryGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
@@ -191,28 +191,28 @@ void CCTK_FCALL CCTK_FNAME (CCTK_SyncGroup) (int *ierror, cGH *GH, ONE_FORTSTRIN
free (group_name);
}
-void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG)
+void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (group_name)
*ierror = CCTK_EnableGroupComm (GH, group_name);
free (group_name);
}
-void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG)
+void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (group_name)
*ierror = CCTK_DisableGroupComm (GH, group_name);
free (group_name);
}
-void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG)
+void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (group_name)
*ierror = CCTK_EnableGroupStorage (GH, group_name);
free (group_name);
}
-void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG)
+void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (group_name)
*ierror = CCTK_DisableGroupStorage (GH, group_name);
diff --git a/src/include/CommOverloadables.h b/src/include/CommOverloadables.h
index 517fe054..38f5b596 100644
--- a/src/include/CommOverloadables.h
+++ b/src/include/CommOverloadables.h
@@ -41,7 +41,7 @@
#endif
#define RETURN_TYPE int
-#define ARGUMENTS cGH *GH, const char *group
+#define ARGUMENTS const cGH *GH, const char *group
#define USE_ARGUMENTS GH = GH; group = group;
OVERLOADABLE(SyncGroup)
@@ -111,7 +111,7 @@ OVERLOADABLE(GroupDynamicData)
#undef RETURN_TYPE
#define RETURN_TYPE int
-#define ARGUMENTS cGH *GH, int n_groups,const int *groups,const int *timelevels, int *status
+#define ARGUMENTS const cGH *GH, int n_groups,const int *groups,const int *timelevels, int *status
#define USE_ARGUMENTS GH = GH; n_groups=n_groups; groups = groups; timelevels = timelevels; status = status;
OVERLOADABLE(GroupStorageIncrease)
OVERLOADABLE(GroupStorageDecrease)
diff --git a/src/include/cctk_Coord.h b/src/include/cctk_Coord.h
index 745c59bf..12e4ca0a 100644
--- a/src/include/cctk_Coord.h
+++ b/src/include/cctk_Coord.h
@@ -63,14 +63,14 @@ int CCTK_CoordLocalRange(const cGH *GH,
const char *coord_name,
const char *system_name);
-int CCTK_CoordRegisterRange(cGH *GH,
+int CCTK_CoordRegisterRange(const cGH *GH,
CCTK_REAL coord_min,
CCTK_REAL coord_max,
int coord_dir,
const char *coord_name,
const char *system_name);
-int CCTK_CoordRegisterRangePhysIndex(cGH *GH,
+int CCTK_CoordRegisterRangePhysIndex(const cGH *GH,
int coord_min,
int coord_max,
int coord_dir,
diff --git a/src/include/cctk_GroupsOnGH.h b/src/include/cctk_GroupsOnGH.h
index f7e464b7..fb4f3ce8 100644
--- a/src/include/cctk_GroupsOnGH.h
+++ b/src/include/cctk_GroupsOnGH.h
@@ -32,10 +32,10 @@ void *CCTK_VarDataPtr(const cGH *GH, int timelevel, const char *fullvarname);
void *CCTK_VarDataPtrI(const cGH *GH, int timelevel, int varindex);
void *CCTK_VarDataPtrB(const cGH *GH, int timelevel, int varindex, char *fullvarname);
-int CCTK_DisableGroupStorageI(cGH *GH, int group);
-int CCTK_DisableGroupCommI(cGH *GH, int group);
-int CCTK_EnableGroupStorageI(cGH *GH, int group);
-int CCTK_EnableGroupCommI(cGH *GH, int group);
+int CCTK_DisableGroupStorageI(const cGH *GH, int group);
+int CCTK_DisableGroupCommI(const cGH *GH, int group);
+int CCTK_EnableGroupStorageI(const cGH *GH, int group);
+int CCTK_EnableGroupCommI(const cGH *GH, int group);
int CCTK_GrouplbndGN(const cGH *GH, int dim, int *lbnd, const char *groupname);
int CCTK_GrouplbndVN(const cGH *GH, int dim, int *lbnd, const char *varname);
diff --git a/src/main/Coord.c b/src/main/Coord.c
index daedaa44..1e9cc6f8 100644
--- a/src/main/Coord.c
+++ b/src/main/Coord.c
@@ -51,7 +51,7 @@ struct Coordprops
struct Coordpropslistcomp
{
- cGH *GH;
+ const cGH *GH;
CCTK_REAL lower; /* Coord of lower range (computational) */
CCTK_REAL upper; /* Coord of upper range (computational) */
@@ -62,7 +62,7 @@ struct Coordpropslistcomp
struct Coordpropslistphysi
{
- cGH *GH;
+ const cGH *GH;
int lower; /* Index of lower range (physical) */
int upper; /* Index of upper range (physical) */
@@ -87,14 +87,14 @@ void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterData)
(int *handle,const int *dir,THREE_FORTSTRING_ARG);
void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterRange)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const CCTK_REAL *lower,
const CCTK_REAL *upper,
const int *dir,
TWO_FORTSTRING_ARG);
void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterRangePhysIndex)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *lower,
const int *upper,
const int *dir,
@@ -345,7 +345,7 @@ void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterData)
@var GH
@vdesc GH data
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var min
@@ -387,7 +387,7 @@ void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterData)
@@*/
-int CCTK_CoordRegisterRange (cGH *GH,
+int CCTK_CoordRegisterRange (const cGH *GH,
CCTK_REAL min,
CCTK_REAL max,
int dir,
@@ -494,7 +494,7 @@ int CCTK_CoordRegisterRange (cGH *GH,
void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterRange)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const CCTK_REAL *lower,
const CCTK_REAL *upper,
const int *dir,
@@ -519,7 +519,7 @@ void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterRange)
@var GH
@vdesc GH data
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var min
@@ -559,7 +559,7 @@ void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterRange)
-5 = memory allocation failed
@endreturndesc
@@*/
-int CCTK_CoordRegisterRangePhysIndex (cGH *GH,
+int CCTK_CoordRegisterRangePhysIndex (const cGH *GH,
int min,
int max,
int dir,
@@ -667,7 +667,7 @@ int CCTK_CoordRegisterRangePhysIndex (cGH *GH,
void CCTK_FCALL CCTK_FNAME (CCTK_CoordRegisterRangePhysIndex)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *lower,
const int *upper,
const int *dir,
diff --git a/src/main/GroupsOnGH.c b/src/main/GroupsOnGH.c
index 1524ba2d..54bd1e5e 100644
--- a/src/main/GroupsOnGH.c
+++ b/src/main/GroupsOnGH.c
@@ -359,7 +359,7 @@ void *CCTK_VarDataPtrB(const cGH *GH, int timelevel, int vindex, char *varname)
Enables communication for a group based upon its name.
@enddesc
@@*/
-int CCTK_EnableGroupCommI(cGH *GH, int group)
+int CCTK_EnableGroupCommI(const cGH *GH, int group)
{
int retcode;
char *group_name;
@@ -387,7 +387,7 @@ int CCTK_EnableGroupCommI(cGH *GH, int group)
Enables storage for a group based upon its name.
@enddesc
@@*/
-int CCTK_EnableGroupStorageI(cGH *GH, int group)
+int CCTK_EnableGroupStorageI(const cGH *GH, int group)
{
int retcode;
char *group_name;
@@ -418,7 +418,7 @@ int CCTK_EnableGroupStorageI(cGH *GH, int group)
Routine to switch communication off for a group based upon its index
@enddesc
@@*/
-int CCTK_DisableGroupCommI(cGH *GH, int group)
+int CCTK_DisableGroupCommI(const cGH *GH, int group)
{
int retcode;
char *group_name;
@@ -449,7 +449,7 @@ int CCTK_DisableGroupCommI(cGH *GH, int group)
Routine to switch storage off for a group based upon its index
@enddesc
@@*/
-int CCTK_DisableGroupStorageI(cGH *GH, int group)
+int CCTK_DisableGroupStorageI(const cGH *GH, int group)
{
int retcode;
char *group_name;