aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <>2001-11-02 09:58:00 +0000
committerschnetter <>2001-11-02 09:58:00 +0000
commitb916b52db69826e44a516a452f2c6792275c73d8 (patch)
tree2aee818b4c8db08e698a971aac0d79c5ce9f50bc
parenta1e2faf58c8ea0160696a73540015b9677bcf7f1 (diff)
Added a lot of const modifiers for the cGH structure.
darcs-hash:20011102095857-07bb3-fa5851f740861e08b8780059f76c87121cea308e.gz
-rw-r--r--Carpet/Carpet/src/Checksum.cc10
-rw-r--r--Carpet/Carpet/src/Comm.cc10
-rw-r--r--Carpet/Carpet/src/Cycle.cc6
-rw-r--r--Carpet/Carpet/src/Evolve.cc6
-rw-r--r--Carpet/Carpet/src/Poison.cc12
-rw-r--r--Carpet/Carpet/src/Recompose.cc10
-rw-r--r--Carpet/Carpet/src/Restrict.cc6
-rw-r--r--Carpet/Carpet/src/SetupGH.cc4
-rw-r--r--Carpet/Carpet/src/Shutdown.cc4
-rw-r--r--Carpet/Carpet/src/Storage.cc14
-rw-r--r--Carpet/Carpet/src/carpet.hh8
-rw-r--r--Carpet/Carpet/src/carpet_public.hh32
-rw-r--r--Carpet/Carpet/src/helpers.cc16
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.cc33
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.hh10
-rw-r--r--Carpet/CarpetTest/src/carpettest_check_arguments.F7730
16 files changed, 107 insertions, 104 deletions
diff --git a/Carpet/Carpet/src/Checksum.cc b/Carpet/Carpet/src/Checksum.cc
index 030e699e6..1d7e72a90 100644
--- a/Carpet/Carpet/src/Checksum.cc
+++ b/Carpet/Carpet/src/Checksum.cc
@@ -8,7 +8,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Checksum.cc,v 1.2 2001/07/09 09:00:05 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Checksum.cc,v 1.3 2001/11/02 10:58:57 schnetter Exp $";
@@ -48,7 +48,7 @@ namespace Carpet {
}
for (int group=0; group<CCTK_NumGroups(); ++group) {
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
for (int var=0; var<CCTK_NumVarsInGroupI(group); ++var) {
const int n = CCTK_FirstVarIndexI(group) + var;
@@ -65,7 +65,7 @@ namespace Carpet {
const int gpdim = arrdata[group].info.dim;
int np = 1;
for (int d=0; d<gpdim; ++d) {
- np *= *CCTK_ArrayGroupSizeI(cgh, d, group);
+ np *= *CCTK_ArrayGroupSizeI((cGH*)cgh, d, group);
}
const void* data = cgh->data[n][tl];
int chk = 0;
@@ -94,7 +94,7 @@ namespace Carpet {
assert ((int)checksums.size()==CCTK_NumVars());
for (int group=0; group<CCTK_NumGroups(); ++group) {
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
for (int var=0; var<CCTK_NumVarsInGroupI(group); ++var) {
const int n = CCTK_FirstVarIndexI(group) + var;
@@ -120,7 +120,7 @@ namespace Carpet {
const int gpdim = arrdata[group].info.dim;
int np = 1;
for (int d=0; d<gpdim; ++d) {
- np *= *CCTK_ArrayGroupSizeI(cgh, d, group);
+ np *= *CCTK_ArrayGroupSizeI((cGH*)cgh, d, group);
}
const void* data = cgh->data[n][tl];
int chk = 0;
diff --git a/Carpet/Carpet/src/Comm.cc b/Carpet/Carpet/src/Comm.cc
index 12484068e..bb5658d6b 100644
--- a/Carpet/Carpet/src/Comm.cc
+++ b/Carpet/Carpet/src/Comm.cc
@@ -9,7 +9,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Comm.cc,v 1.2 2001/07/09 09:00:07 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Comm.cc,v 1.3 2001/11/02 10:58:57 schnetter Exp $";
@@ -19,7 +19,7 @@ namespace Carpet {
- int SyncGroup (cGH* cgh, const char* groupname)
+ int SyncGroup (const cGH* cgh, const char* groupname)
{
DECLARE_CCTK_PARAMETERS;
@@ -30,7 +30,7 @@ namespace Carpet {
const int group = CCTK_GroupIndex(groupname);
assert (group>=0 && group<CCTK_NumGroups());
- if (! CCTK_QueryGroupStorageI(cgh, group)) {
+ if (! CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"Cannot synchronise group \"%s\" because it has no storage",
groupname);
@@ -62,13 +62,13 @@ namespace Carpet {
- int EnableGroupComm (cGH* cgh, const char* groupname)
+ int EnableGroupComm (const cGH* cgh, const char* groupname)
{
// Communication is always enabled
return 0;
}
- int DisableGroupComm (cGH* cgh, const char* groupname)
+ int DisableGroupComm (const cGH* cgh, const char* groupname)
{
// Communication is always enabled
return -1;
diff --git a/Carpet/Carpet/src/Cycle.cc b/Carpet/Carpet/src/Cycle.cc
index 3bf771939..2fb502961 100644
--- a/Carpet/Carpet/src/Cycle.cc
+++ b/Carpet/Carpet/src/Cycle.cc
@@ -8,7 +8,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Cycle.cc,v 1.2 2001/07/09 09:00:08 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Cycle.cc,v 1.3 2001/11/02 10:58:58 schnetter Exp $";
@@ -18,12 +18,12 @@ namespace Carpet {
- void CycleTimeLevels (cGH* cgh)
+ void CycleTimeLevels (const cGH* cgh)
{
Checkpoint ("%*sCycleTimeLevels", 2*reflevel, "");
for (int group=0; group<CCTK_NumGroups(); ++group) {
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
for (int var=0; var<CCTK_NumVarsInGroupI(group); ++var) {
assert (group<(int)arrdata.size());
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc
index f80f94c34..21867c757 100644
--- a/Carpet/Carpet/src/Evolve.cc
+++ b/Carpet/Carpet/src/Evolve.cc
@@ -9,7 +9,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Evolve.cc,v 1.3 2001/07/11 17:41:13 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Evolve.cc,v 1.4 2001/11/02 10:58:58 schnetter Exp $";
@@ -19,7 +19,7 @@ namespace Carpet {
- static bool do_terminate (cGH *cgh, CCTK_REAL time, int iteration)
+ static bool do_terminate (const cGH *cgh, CCTK_REAL time, int iteration)
{
DECLARE_CCTK_PARAMETERS;
@@ -48,7 +48,7 @@ namespace Carpet {
- int Evolve (tFleshConfig* fc)
+ int Evolve (const tFleshConfig* fc)
{
DECLARE_CCTK_PARAMETERS;
diff --git a/Carpet/Carpet/src/Poison.cc b/Carpet/Carpet/src/Poison.cc
index d57cbf2de..4d1ffe34a 100644
--- a/Carpet/Carpet/src/Poison.cc
+++ b/Carpet/Carpet/src/Poison.cc
@@ -7,7 +7,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Poison.cc,v 1.2 2001/07/09 09:00:09 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Poison.cc,v 1.3 2001/11/02 10:58:58 schnetter Exp $";
@@ -24,7 +24,7 @@ namespace Carpet {
if (! poison_new_timelevels) return;
for (int group=0; group<CCTK_NumGroups(); ++group) {
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
PoisonGroup (cgh, group, where);
} // if has storage
} // for group
@@ -42,7 +42,7 @@ namespace Carpet {
Checkpoint ("%*sPoisonGroup %s", 2*reflevel, "", CCTK_GroupName(group));
- if (! CCTK_QueryGroupStorageI(cgh, group)) {
+ if (! CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"Cannot poison group \"%s\" because it has no storage",
CCTK_GroupName(group));
@@ -67,7 +67,7 @@ namespace Carpet {
int np = 1;
const int gpdim = arrdata[group].info.dim;
for (int d=0; d<gpdim; ++d) {
- np *= *CCTK_ArrayGroupSizeI(cgh, d, group);
+ np *= *CCTK_ArrayGroupSizeI((cGH*)cgh, d, group);
}
memset (cgh->data[n][tl], poison_value, np*sz);
}
@@ -89,7 +89,7 @@ namespace Carpet {
Checkpoint ("%*sPoisonCheck", 2*reflevel, "");
for (int group=0; group<CCTK_NumGroups(); ++group) {
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
for (int var=0; var<CCTK_NumVarsInGroupI(group); ++var) {
const int n = CCTK_FirstVarIndexI(group) + var;
@@ -106,7 +106,7 @@ namespace Carpet {
vect<int,dim> size(1);
const int gpdim = arrdata[group].info.dim;
for (int d=0; d<gpdim; ++d) {
- size[d] = *CCTK_ArrayGroupSizeI(cgh, d, group);
+ size[d] = *CCTK_ArrayGroupSizeI((cGH*)cgh, d, group);
}
const int tp = CCTK_VarTypeI(n);
const void* const data = cgh->data[n][tl];
diff --git a/Carpet/Carpet/src/Recompose.cc b/Carpet/Carpet/src/Recompose.cc
index 064c8d671..b70e9657d 100644
--- a/Carpet/Carpet/src/Recompose.cc
+++ b/Carpet/Carpet/src/Recompose.cc
@@ -12,7 +12,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Recompose.cc,v 1.6 2001/10/29 08:36:45 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Recompose.cc,v 1.7 2001/11/02 10:58:59 schnetter Exp $";
@@ -28,7 +28,7 @@ namespace Carpet {
- static void Adapt (cGH* cgh, int reflevels, gh<dim>* hh);
+ static void Adapt (const cGH* cgh, int reflevels, gh<dim>* hh);
@@ -43,7 +43,7 @@ namespace Carpet {
- void Recompose (cGH* cgh)
+ void Recompose (const cGH* cgh)
{
DECLARE_CCTK_PARAMETERS;
@@ -101,7 +101,7 @@ namespace Carpet {
- static void Adapt (cGH* cgh, const int reflevels, gh<dim>* hh)
+ static void Adapt (const cGH* cgh, const int reflevels, gh<dim>* hh)
{
DECLARE_CCTK_PARAMETERS;
@@ -163,7 +163,7 @@ namespace Carpet {
- void MakeRegions_RefineCentre (cGH* cgh, const int reflevels,
+ void MakeRegions_RefineCentre (const cGH* cgh, const int reflevels,
gh<dim>::rexts& bbsss, gh<dim>::rprocs& pss)
{
DECLARE_CCTK_PARAMETERS;
diff --git a/Carpet/Carpet/src/Restrict.cc b/Carpet/Carpet/src/Restrict.cc
index 7c4ef7467..f79d57386 100644
--- a/Carpet/Carpet/src/Restrict.cc
+++ b/Carpet/Carpet/src/Restrict.cc
@@ -8,7 +8,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Restrict.cc,v 1.2 2001/07/09 09:00:10 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Restrict.cc,v 1.3 2001/11/02 10:58:59 schnetter Exp $";
@@ -18,7 +18,7 @@ namespace Carpet {
- void Restrict (cGH* cgh)
+ void Restrict (const cGH* cgh)
{
assert (component == -1);
@@ -29,7 +29,7 @@ namespace Carpet {
for (int group=0; group<CCTK_NumGroups(); ++group) {
// Restrict only groups with storage
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
const int tl = 0;
diff --git a/Carpet/Carpet/src/SetupGH.cc b/Carpet/Carpet/src/SetupGH.cc
index eaecf1902..432638062 100644
--- a/Carpet/Carpet/src/SetupGH.cc
+++ b/Carpet/Carpet/src/SetupGH.cc
@@ -10,7 +10,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/SetupGH.cc,v 1.7 2001/08/26 14:43:25 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/SetupGH.cc,v 1.8 2001/11/02 10:58:59 schnetter Exp $";
@@ -20,7 +20,7 @@ namespace Carpet {
- void* SetupGH (tFleshConfig* fc, int convLevel, cGH* cgh)
+ void* SetupGH (const tFleshConfig* fc, int convLevel, cGH* cgh)
{
DECLARE_CCTK_PARAMETERS;
diff --git a/Carpet/Carpet/src/Shutdown.cc b/Carpet/Carpet/src/Shutdown.cc
index c5cb61fee..f5db7e2b5 100644
--- a/Carpet/Carpet/src/Shutdown.cc
+++ b/Carpet/Carpet/src/Shutdown.cc
@@ -9,7 +9,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Shutdown.cc,v 1.1 2001/07/04 12:29:47 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Shutdown.cc,v 1.2 2001/11/02 10:58:59 schnetter Exp $";
@@ -19,7 +19,7 @@ namespace Carpet {
- int Shutdown (tFleshConfig* fc)
+ int Shutdown (const tFleshConfig* fc)
{
DECLARE_CCTK_PARAMETERS;
diff --git a/Carpet/Carpet/src/Storage.cc b/Carpet/Carpet/src/Storage.cc
index ae54bf0b0..6558f9067 100644
--- a/Carpet/Carpet/src/Storage.cc
+++ b/Carpet/Carpet/src/Storage.cc
@@ -8,7 +8,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Storage.cc,v 1.2 2001/07/09 09:00:11 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Storage.cc,v 1.3 2001/11/02 10:59:00 schnetter Exp $";
@@ -33,7 +33,7 @@ namespace Carpet {
const int group = CCTK_GroupIndex(groupname);
assert (group>=0 && group<CCTK_NumGroups());
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
// storage was enabled previously
return 1;
}
@@ -85,7 +85,7 @@ namespace Carpet {
const int group = CCTK_GroupIndex(groupname);
assert (group>=0 && group<CCTK_NumGroups());
- if (! CCTK_QueryGroupStorageI(cgh, group)) {
+ if (! CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
// storage was disabled previously
return 0;
}
@@ -122,7 +122,7 @@ namespace Carpet {
- int QueryGroupStorageB (cGH* cgh, int group, const char* groupname)
+ int QueryGroupStorageB (const cGH* cgh, int group, const char* groupname)
{
if (groupname) {
group = CCTK_GroupIndex(groupname);
@@ -140,7 +140,7 @@ namespace Carpet {
- const int* ArrayGroupSizeB (cGH* cgh, int dir, int group,
+ const int* ArrayGroupSizeB (const cGH* cgh, int dir, int group,
const char* groupname)
{
static const int zero = 0;
@@ -159,7 +159,7 @@ namespace Carpet {
assert (dir>=0 && dir<gpdim);
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
const int var = CCTK_FirstVarIndexI(group);
assert (var>=0 && var<CCTK_NumVars());
@@ -177,7 +177,7 @@ namespace Carpet {
- int GroupDynamicData (cGH* cgh, int group, cGroupDynamicData* data)
+ int GroupDynamicData (const cGH* cgh, int group, cGroupDynamicData* data)
{
assert (group>=0 && group<CCTK_NumGroups());
*data = arrdata[group].info;
diff --git a/Carpet/Carpet/src/carpet.hh b/Carpet/Carpet/src/carpet.hh
index c8a55c201..711091bc8 100644
--- a/Carpet/Carpet/src/carpet.hh
+++ b/Carpet/Carpet/src/carpet.hh
@@ -1,12 +1,12 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/carpet.hh,v 1.12 2001/07/09 09:00:13 schnetter Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/carpet.hh,v 1.13 2001/11/02 10:59:00 schnetter Exp $
#include "carpet_public.hh"
namespace Carpet {
- void Recompose (cGH* cgh);
- void CycleTimeLevels (cGH* cgh);
- void Restrict (cGH* cgh);
+ void Recompose (const cGH* cgh);
+ void CycleTimeLevels (const cGH* cgh);
+ void Restrict (const cGH* cgh);
enum checktimes { currenttime,
currenttimebutnotifonly,
diff --git a/Carpet/Carpet/src/carpet_public.hh b/Carpet/Carpet/src/carpet_public.hh
index 7b75869e1..aafcef1e7 100644
--- a/Carpet/Carpet/src/carpet_public.hh
+++ b/Carpet/Carpet/src/carpet_public.hh
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/carpet_public.hh,v 1.2 2001/08/26 13:59:08 schnetter Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/carpet_public.hh,v 1.3 2001/11/02 10:59:00 schnetter Exp $
// It is assumed that the number of components of all arrays is equal
// to the number of components of the grid functions, and that their
@@ -91,27 +91,27 @@ namespace Carpet {
// Registered functions
- void* SetupGH (tFleshConfig* fc, int convLevel, cGH* cgh);
+ void* SetupGH (const tFleshConfig* fc, int convLevel, cGH* cgh);
int Initialise (tFleshConfig* config);
- int Evolve (tFleshConfig* config);
- int Shutdown (tFleshConfig* config);
+ int Evolve (const tFleshConfig* config);
+ int Shutdown (const tFleshConfig* config);
int CallFunction (void* function, cFunctionData* attribute, void* data);
- int SyncGroup (cGH* cgh, const char* groupname);
+ int SyncGroup (const cGH* cgh, const char* groupname);
int EnableGroupStorage (cGH* cgh, const char* groupname);
int DisableGroupStorage (cGH* cgh, const char* groupname);
- int EnableGroupComm (cGH* cgh, const char* groupname);
- int DisableGroupComm (cGH* cgh, const char* groupname);
- int Barrier (cGH* cgh);
- int Exit (cGH* cgh, int retval);
- int Abort (cGH* cgh, int retval);
- int MyProc (cGH* cgh);
- int nProcs (cGH* cgh);
- const int* ArrayGroupSizeB (cGH* cgh, int dir, int group,
+ int EnableGroupComm (const cGH* cgh, const char* groupname);
+ int DisableGroupComm (const cGH* cgh, const char* groupname);
+ int Barrier (const cGH* cgh);
+ int Exit (const cGH* cgh, int retval);
+ int Abort (const cGH* cgh, int retval);
+ int MyProc (const cGH* cgh);
+ int nProcs (const cGH* cgh);
+ const int* ArrayGroupSizeB (const cGH* cgh, int dir, int group,
const char* groupname);
- int QueryGroupStorageB (cGH* cgh, int group, const char* groupname);
- int GroupDynamicData (cGH* cgh, int group, cGroupDynamicData* data);
+ int QueryGroupStorageB (const cGH* cgh, int group, const char* groupname);
+ int GroupDynamicData (const cGH* cgh, int group, cGroupDynamicData* data);
@@ -119,7 +119,7 @@ namespace Carpet {
void RegisterRecomposeRegions (const gh<dim>::rexts& bbsss,
const gh<dim>::rprocs& pss);
- void MakeRegions_RefineCentre (cGH* cgh, int reflevels,
+ void MakeRegions_RefineCentre (const cGH* cgh, int reflevels,
gh<dim>::rexts& bbsss, gh<dim>::rprocs& pss);
diff --git a/Carpet/Carpet/src/helpers.cc b/Carpet/Carpet/src/helpers.cc
index 5207ebd62..97443f183 100644
--- a/Carpet/Carpet/src/helpers.cc
+++ b/Carpet/Carpet/src/helpers.cc
@@ -11,7 +11,7 @@
#include "carpet.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/helpers.cc,v 1.5 2001/08/26 13:59:15 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/helpers.cc,v 1.6 2001/11/02 10:59:00 schnetter Exp $";
@@ -21,7 +21,7 @@ namespace Carpet {
- int Barrier (cGH* cgh)
+ int Barrier (const cGH* cgh)
{
MPI_Barrier (dist::comm);
return 0;
@@ -29,14 +29,14 @@ namespace Carpet {
- int Exit (cGH* cgh, int retval)
+ int Exit (const cGH* cgh, int retval)
{
CCTK_Barrier (cgh);
dist::finalize();
exit (retval);
}
- int Abort (cGH* cgh, int retval)
+ int Abort (const cGH* cgh, int retval)
{
MPI_Abort (dist::comm, retval);
abort ();
@@ -44,14 +44,14 @@ namespace Carpet {
- int MyProc (cGH* cgh)
+ int MyProc (const cGH* cgh)
{
int rank;
MPI_Comm_rank (dist::comm, &rank);
return rank;
}
- int nProcs (cGH* cgh)
+ int nProcs (const cGH* cgh)
{
int size;
MPI_Comm_size (dist::comm, &size);
@@ -229,7 +229,7 @@ namespace Carpet {
} else {
// Scalars can be accessed
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
// Group has storage
assert (group<(int)arrdata.size());
@@ -329,7 +329,7 @@ namespace Carpet {
for (int tl=0; tl<num_tl; ++tl) {
- if (CCTK_QueryGroupStorageI(cgh, group)) {
+ if (CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
// Group has storage
assert (group<(int)arrdata.size());
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc
index 4f8df4840..8d1b8d18f 100644
--- a/Carpet/CarpetIOASCII/src/ioascii.cc
+++ b/Carpet/CarpetIOASCII/src/ioascii.cc
@@ -24,7 +24,7 @@
#include "ioascii.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.cc,v 1.16 2001/07/09 09:00:19 schnetter Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.cc,v 1.17 2001/11/02 10:59:01 schnetter Exp $";
@@ -33,7 +33,7 @@ using namespace Carpet;
-static bool CheckForVariable (cGH* const cgh,
+static bool CheckForVariable (const cGH* const cgh,
const char* const varlist, const int vindex);
static void SetFlag (int index, const char* optstring, void* arg);
@@ -85,7 +85,8 @@ int CarpetIOASCII<outdim>::Startup()
template<int outdim>
void* CarpetIOASCII<outdim>
-::SetupGH (tFleshConfig* const fc, const int convLevel, cGH* const cgh)
+::SetupGH (const tFleshConfig* const fc, const int convLevel,
+ const cGH* const cgh)
{
DECLARE_CCTK_PARAMETERS;
@@ -137,7 +138,7 @@ int CarpetIOASCII<outdim>
const int tl = 0;
// Check for storage
- if (! CCTK_QueryGroupStorageI(cgh, group)) {
+ if (! CCTK_QueryGroupStorageI((cGH*)cgh, group)) {
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
"Cannot output variable \"%s\" because it has no storage",
varname);
@@ -367,7 +368,7 @@ int CarpetIOASCII<outdim>
template<int outdim>
int CarpetIOASCII<outdim>
-::TimeToOutput (cGH* const cgh, const int vindex)
+::TimeToOutput (const cGH* const cgh, const int vindex)
{
DECLARE_CCTK_PARAMETERS;
@@ -429,7 +430,7 @@ int CarpetIOASCII<outdim>
template<int outdim>
int CarpetIOASCII<outdim>
-::GetGridOffset (cGH* cgh, int dir,
+::GetGridOffset (const cGH* cgh, int dir,
const char* itempl, const char* iglobal,
const char* ctempl, const char* cglobal,
const CCTK_REAL cfallback)
@@ -440,7 +441,7 @@ int CarpetIOASCII<outdim>
if (CCTK_ParameterQueryTimesSet (cparam, CCTK_THORNSTRING) > 0) {
int ptype;
const CCTK_REAL* const pcoord
- = (CCTK_REAL*)CCTK_ParameterGet (cparam, CCTK_THORNSTRING, &ptype);
+ = (const CCTK_REAL*)CCTK_ParameterGet (cparam, CCTK_THORNSTRING, &ptype);
assert (pcoord);
const CCTK_REAL coord = *pcoord;
assert (ptype == PARAMETER_REAL);
@@ -453,7 +454,7 @@ int CarpetIOASCII<outdim>
if (CCTK_ParameterQueryTimesSet (iparam, CCTK_THORNSTRING) > 0) {
int ptype;
const int* const pindex
- = (int*)CCTK_ParameterGet (iparam, CCTK_THORNSTRING, &ptype);
+ = (const int*)CCTK_ParameterGet (iparam, CCTK_THORNSTRING, &ptype);
assert (pindex);
const int index = *pindex;
assert (ptype == PARAMETER_INT);
@@ -464,7 +465,7 @@ int CarpetIOASCII<outdim>
if (CCTK_ParameterQueryTimesSet (cglobal, "IO") > 0) {
int ptype;
const CCTK_REAL* const pcoord
- = (CCTK_REAL*)CCTK_ParameterGet (cglobal, "IO", &ptype);
+ = (const CCTK_REAL*)CCTK_ParameterGet (cglobal, "IO", &ptype);
assert (pcoord);
const CCTK_REAL coord = *pcoord;
assert (ptype == PARAMETER_REAL);
@@ -475,7 +476,7 @@ int CarpetIOASCII<outdim>
if (CCTK_ParameterQueryTimesSet (iglobal, "IO") > 0) {
int ptype;
const int* const pindex
- = (int*)CCTK_ParameterGet (iglobal, "IO", &ptype);
+ = (const int*)CCTK_ParameterGet (iglobal, "IO", &ptype);
assert (pindex);
const int index = *pindex;
assert (ptype == PARAMETER_INT);
@@ -490,7 +491,7 @@ int CarpetIOASCII<outdim>
template<int outdim>
int CarpetIOASCII<outdim>
-::CoordToOffset (cGH* cgh, int dir, CCTK_REAL coord)
+::CoordToOffset (const cGH* cgh, int dir, CCTK_REAL coord)
{
CCTK_REAL lower, upper;
CCTK_CoordRange (cgh, &lower, &upper, dir, 0, "cart3d");
@@ -515,8 +516,9 @@ const char* CarpetIOASCII<outdim>
sprintf (parametername, parametertemplate, outdim);
if (CCTK_ParameterQueryTimesSet (parametername, CCTK_THORNSTRING) > 0) {
int ptype;
- const char** const ppval = (const char**)CCTK_ParameterGet
- (parametername, CCTK_THORNSTRING, &ptype);
+ const char* const* const ppval
+ = (const char* const*)CCTK_ParameterGet (parametername, CCTK_THORNSTRING,
+ &ptype);
assert (ppval);
const char* const pval = *ppval;
assert (ptype == PARAMETER_STRING);
@@ -537,7 +539,8 @@ int CarpetIOASCII<outdim>
if (CCTK_ParameterQueryTimesSet (parametername, CCTK_THORNSTRING) > 0) {
int ptype;
const int* const ppval
- = (int*)CCTK_ParameterGet (parametername, CCTK_THORNSTRING, &ptype);
+ = (const int*)CCTK_ParameterGet (parametername, CCTK_THORNSTRING,
+ &ptype);
assert (ppval);
const int pval = *ppval;
assert (ptype == PARAMETER_INT);
@@ -549,7 +552,7 @@ int CarpetIOASCII<outdim>
-bool CheckForVariable (cGH* const cgh,
+bool CheckForVariable (const cGH* const cgh,
const char* const varlist, const int vindex)
{
const int numvars = CCTK_NumVars();
diff --git a/Carpet/CarpetIOASCII/src/ioascii.hh b/Carpet/CarpetIOASCII/src/ioascii.hh
index a0a311c41..2be5195e2 100644
--- a/Carpet/CarpetIOASCII/src/ioascii.hh
+++ b/Carpet/CarpetIOASCII/src/ioascii.hh
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.hh,v 1.5 2001/03/22 18:42:05 eschnett Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.hh,v 1.6 2001/11/02 10:59:02 schnetter Exp $
#include <vector>
@@ -45,18 +45,18 @@ struct CarpetIOASCII {
// registered functions
- static void* SetupGH (tFleshConfig* fc, int convLevel, cGH* cgh);
+ static void* SetupGH (const tFleshConfig* fc, int convLevel, const cGH* cgh);
static int OutputGH (cGH* cgh);
static int OutputVarAs (cGH* cgh, const char* varname, const char* alias);
- static int TimeToOutput (cGH* cgh, int vindex);
+ static int TimeToOutput (const cGH* cgh, int vindex);
static int TriggerOutput (cGH* cgh, int vindex);
- static int GetGridOffset (cGH* cgh, int dir,
+ static int GetGridOffset (const cGH* cgh, int dir,
const char* itempl, const char* iglobal,
const char* ctempl, const char* cglobal,
CCTK_REAL cfallback);
- static int CoordToOffset (cGH* cgh, int dir, CCTK_REAL coord);
+ static int CoordToOffset (const cGH* cgh, int dir, CCTK_REAL coord);
static const char* GetStringParameter
(const char* parametertemplate, const char* fallback);
diff --git a/Carpet/CarpetTest/src/carpettest_check_arguments.F77 b/Carpet/CarpetTest/src/carpettest_check_arguments.F77
index 9a3a08351..e4b0379fa 100644
--- a/Carpet/CarpetTest/src/carpettest_check_arguments.F77
+++ b/Carpet/CarpetTest/src/carpettest_check_arguments.F77
@@ -1,5 +1,5 @@
c -*-Fortran-*-
-c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetTest/src/carpettest_check_arguments.F77,v 1.3 2001/07/09 09:00:27 schnetter Exp $
+c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetTest/src/carpettest_check_arguments.F77,v 1.4 2001/11/02 10:59:02 schnetter Exp $
#include "cctk.h"
#include "cctk_Arguments.h"
@@ -10,32 +10,32 @@ c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetTest/src/carpettest_c
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
integer i,j,k
- print *, "gfg ", gfg0, gfg1, gfg2
- print *, "arrg3 ", arrg30, arrg31, arrg32
- print *, "arrg2 ", arrg20, arrg21
- print *, "arrg1 ", arrg10
- print *, "scg"
+ print *, "Xgfg ", Xgfg0, Xgfg1, Xgfg2
+ print *, "Xarrg3 ", Xarrg30, Xarrg31, Xarrg32
+ print *, "Xarrg2 ", Xarrg20, Xarrg21
+ print *, "Xarrg1 ", Xarrg10
+ print *, "Xscg"
print *
- do k=1,gfg2
- do j=1,gfg1
- do i=1,gfg0
+ do k=1,XGfg2
+ do j=1,XGfg1
+ do i=1,XGfg0
gf(i,j,k) = i*10000 + j*100 + k
end do
end do
end do
- do k=1,arrg32
- do j=1,arrg31
- do i=1,arrg30
+ do k=1,XArrg32
+ do j=1,XArrg31
+ do i=1,XArrg30
arr3(i,j,k) = i*10000 + j*100 + k
end do
end do
end do
- do j=1,arrg21
- do i=1,arrg20
+ do j=1,Xarrg21
+ do i=1,Xarrg20
arr2(i,j) = i*100 + j
end do
end do
- do i=1,arrg10
+ do i=1,Xarrg10
arr1(i) = i
end do
sc = 42