aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Carpet/Carpet/param.ccl16
-rw-r--r--Carpet/Carpet/schedule.ccl4
-rw-r--r--Carpet/Carpet/src/carpet.cc191
-rw-r--r--Carpet/CarpetLib/param.ccl12
-rw-r--r--Carpet/CarpetSlab/src/carpetslab.cc295
-rw-r--r--Carpet/CarpetSlab/src/carpetslab.h28
-rw-r--r--Carpet/CarpetSlab/src/carpetslab.hh6
-rw-r--r--CarpetExtra/IDScalarWave/src/InitialData.F772
-rw-r--r--CarpetExtra/WaveToyF77/interface.ccl4
-rw-r--r--CarpetExtra/WaveToyF77/par/wavetoyf77.par13
-rw-r--r--CarpetExtra/WaveToyF77/par/wavetoyf77_flat.par19
-rw-r--r--CarpetExtra/WaveToyF77/par/wavetoyf77_none.par60
-rw-r--r--CarpetExtra/WaveToyF77/par/wavetoyf77_rad.par60
-rw-r--r--CarpetExtra/WaveToyF77/schedule.ccl6
-rw-r--r--CarpetExtra/WaveToyF77/src/WaveToy.F776
15 files changed, 393 insertions, 329 deletions
diff --git a/Carpet/Carpet/param.ccl b/Carpet/Carpet/param.ccl
index 87e4ef7db..95ce595f1 100644
--- a/Carpet/Carpet/param.ccl
+++ b/Carpet/Carpet/param.ccl
@@ -1,5 +1,5 @@
# Parameter definitions for thorn Carpet
-# $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/param.ccl,v 1.1 2001/03/01 13:40:10 eschnett Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/param.ccl,v 1.2 2001/03/07 12:59:40 eschnett Exp $
shares: Cactus
@@ -60,3 +60,17 @@ CCTK_INT multigrid_factor "Multigrid factor"
{
1:* :: "must be positive"
} 2
+
+
+
+BOOLEAN verbose "Display info on the screen"
+{
+} "no"
+
+BOOLEAN vverbose "Display a lot of info on the screen"
+{
+} "no"
+
+BOOLEAN barriers "Insert barriers at strategic places for debugging purposes (slows down execution)"
+{
+} "no"
diff --git a/Carpet/Carpet/schedule.ccl b/Carpet/Carpet/schedule.ccl
index f82d685dc..660ea38fa 100644
--- a/Carpet/Carpet/schedule.ccl
+++ b/Carpet/Carpet/schedule.ccl
@@ -1,7 +1,7 @@
# Schedule definitions for thorn Carpet
-# $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/schedule.ccl,v 1.1 2001/03/01 13:40:10 eschnett Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/schedule.ccl,v 1.2 2001/03/07 12:59:40 eschnett Exp $
-schedule CarpetStartup at STARTUP
+schedule CarpetStartup at STARTUP as Driver_Startup
{
LANG: C
} "Startup routine"
diff --git a/Carpet/Carpet/src/carpet.cc b/Carpet/Carpet/src/carpet.cc
index a4ff704df..7edb60644 100644
--- a/Carpet/Carpet/src/carpet.cc
+++ b/Carpet/Carpet/src/carpet.cc
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Attic/carpet.cc,v 1.3 2001/03/05 21:48:28 eschnett Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Attic/carpet.cc,v 1.4 2001/03/07 12:59:53 eschnett 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
@@ -8,6 +8,7 @@
#include <cassert>
#include <cmath>
#include <complex>
+#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
@@ -33,10 +34,6 @@
-#define DEBUG_DIST DIST_NODEBUG
-
-
-
namespace Carpet {
static void RecursiveInitialise (cGH* cgh);
@@ -47,6 +44,9 @@ namespace Carpet {
static void CycleTimeLevels (cGH* cgh);
static void Restrict (cGH* cgh);
+ // Debugging output
+ static void Checkpoint (const char* fmt, ...);
+
// handle from CCTK_RegisterGHExtension
@@ -91,7 +91,6 @@ namespace Carpet {
CCTK_OverloadEnableGroupComm (EnableGroupComm);
CCTK_OverloadDisableGroupComm (DisableGroupComm);
CCTK_OverloadBarrier (Barrier);
-// CCTK_OverloadParallelInit (ParallelInit);
CCTK_OverloadExit (Exit);
CCTK_OverloadAbort (Abort);
CCTK_OverloadMyProc (myProc);
@@ -112,7 +111,7 @@ namespace Carpet {
assert (convLevel==0);
dist::pseudoinit();
- DEBUG_DIST;
+ Checkpoint ("starting SetupGH...");
// ghost zones
const vect<int,dim> lghosts(ghost_size_x, ghost_size_y, ghost_size_z);
@@ -222,6 +221,8 @@ namespace Carpet {
// Recompose grid hierarchy
Recompose (cgh);
+ Checkpoint ("done with SetupGH.");
+
// We register only once, ergo we get only one handle, ergo there
// is only one grid hierarchy for us. We store that statically,
// so there is no need to pass it to Cactus.
@@ -234,14 +235,13 @@ namespace Carpet {
{
DECLARE_CCTK_PARAMETERS;
- CCTK_INFO ("starting Initialise...");
-
// Initialise stuff
const int convlev = 0;
cGH* const cgh = CCTK_SetupGH (fc, convlev);
CCTKi_AddGH (fc, convlev, cgh);
- DEBUG_DIST;
+ // Delay checkpoint until MPI has been initialised
+ Checkpoint ("starting Initialise...");
// Initialise stuff
cgh->cctk_iteration = 0;
@@ -263,7 +263,7 @@ namespace Carpet {
// Output
CCTK_OutputGH (cgh);
- CCTK_INFO ("done with Initialise.");
+ Checkpoint ("done with Initialise.");
return 0;
}
@@ -272,16 +272,8 @@ namespace Carpet {
{
DECLARE_CCTK_PARAMETERS;
- {
- char msg[1000];
- strcpy (msg, "");
- for (int i=0; i<reflevel; ++i) strcat (msg, " ");
- sprintf (msg, "%s starting RecursiveInitialise on level %d...",
- msg, reflevel);
- CCTK_INFO (msg);
- }
-
- DEBUG_DIST;
+ Checkpoint ("%*sstarting RecursiveInitialise on level %d...",
+ 2*reflevel, "", reflevel);
// Set up the grid
CCTK_ScheduleTraverse ("CCTK_BASEGRID", cgh, CallFunction);
@@ -307,14 +299,8 @@ namespace Carpet {
// Analysis
CCTK_ScheduleTraverse ("CCTK_ANALYSIS", cgh, CallFunction);
- {
- char msg[1000];
- strcpy (msg, "");
- for (int i=0; i<reflevel; ++i) strcat (msg, " ");
- sprintf (msg, "%s done with RecursiveInitialise on level %d.",
- msg, reflevel);
- CCTK_INFO (msg);
- }
+ Checkpoint ("%*sdone with RecursiveInitialise on level %d...",
+ 2*reflevel, "", reflevel);
}
@@ -323,9 +309,7 @@ namespace Carpet {
{
DECLARE_CCTK_PARAMETERS;
- CCTK_INFO ("starting Evolve...");
-
- DEBUG_DIST;
+ Checkpoint ("starting Evolve...");
const int convlev = 0;
cGH* cgh = fc->GH[convlev];
@@ -338,11 +322,7 @@ namespace Carpet {
// Next iteration
++cgh->cctk_iteration;
- {
- char msg[1000];
- sprintf (msg, "Evolving iteration %d...", cgh->cctk_iteration);
- CCTK_INFO (msg);
- }
+ Checkpoint ("Evolving iteration %d...", cgh->cctk_iteration);
RecursiveEvolve (cgh);
@@ -350,7 +330,7 @@ namespace Carpet {
CCTK_OutputGH (cgh);
}
- CCTK_INFO ("done with Evolve.");
+ Checkpoint ("done with Evolve.");
return 0;
}
@@ -359,16 +339,8 @@ namespace Carpet {
{
DECLARE_CCTK_PARAMETERS;
- {
- char msg[1000];
- strcpy (msg, "");
- for (int i=0; i<reflevel; ++i) strcat (msg, " ");
- sprintf (msg, "%s starting RecursiveEvolve on level %d...",
- msg, reflevel);
- CCTK_INFO (msg);
- }
-
- DEBUG_DIST;
+ Checkpoint ("%*sstarting RecursiveEvolve on level %d...",
+ 2*reflevel, "", reflevel);
// Prestep
CCTK_ScheduleTraverse ("CCTK_PRESTEP", cgh, CallFunction);
@@ -402,14 +374,8 @@ namespace Carpet {
// Analysis
CCTK_ScheduleTraverse ("CCTK_ANALYSIS", cgh, CallFunction);
- {
- char msg[1000];
- strcpy (msg, "");
- for (int i=0; i<reflevel; ++i) strcat (msg, " ");
- sprintf (msg, "%s done with RecursiveEvolve on level %d.",
- msg, reflevel);
- CCTK_INFO (msg);
- }
+ Checkpoint ("%*sdone with RecursiveEvolve on level %d...",
+ 2*reflevel, "", reflevel);
}
@@ -418,21 +384,18 @@ namespace Carpet {
{
DECLARE_CCTK_PARAMETERS;
- CCTK_INFO ("starting Shutdown...");
-
- DEBUG_DIST;
+ Checkpoint ("starting Shutdown...");
const int convlev = 0;
cGH* cgh = fc->GH[convlev];
RecursiveShutdown (cgh);
- CCTK_Barrier (cgh);
-
fprintf (stdout, "--------------------------------------------------------------------------------\n"
"Done.\n");
- CCTK_INFO ("done with Shutdown.");
+ // earlier checkpoint before calling finalising MPI
+ Checkpoint ("done with Shutdown.");
dist::finalize();
@@ -443,16 +406,8 @@ namespace Carpet {
{
DECLARE_CCTK_PARAMETERS;
- {
- char msg[1000];
- strcpy (msg, "");
- for (int i=0; i<reflevel; ++i) strcat (msg, " ");
- sprintf (msg, "%s starting RecursiveShutdown on level %d...",
- msg, reflevel);
- CCTK_INFO (msg);
- }
-
- DEBUG_DIST;
+ Checkpoint ("%*sstarting RecursiveShutdown on level %d...",
+ 2*reflevel, "", reflevel);
// Recurse
if (reflevel < hh->reflevels()-1) {
@@ -467,14 +422,8 @@ namespace Carpet {
// Shutdown
CCTK_ScheduleTraverse ("CCTK_SHUTDOWN", cgh, CallFunction);
- {
- char msg[1000];
- strcpy (msg, "");
- for (int i=0; i<reflevel; ++i) strcat (msg, " ");
- sprintf (msg, "%s done with RecursiveShutdown on level %d.",
- msg, reflevel);
- CCTK_INFO (msg);
- }
+ Checkpoint ("%*sdone with RecursiveShutdown on level %d...",
+ 2*reflevel, "", reflevel);
}
@@ -509,7 +458,7 @@ namespace Carpet {
assert (mglevel>=0);
assert (reflevel>=0);
- DEBUG_DIST;
+// Checkpoint ("%*sstarting CallFunction...", 2*reflevel, "");
cGH* cgh = (cGH*)data;
@@ -588,7 +537,6 @@ namespace Carpet {
default:
abort();
}
- assert (cgh->data[n][tl]);
} else {
@@ -613,6 +561,9 @@ namespace Carpet {
// maybe: traverse only if the component is local to the processor
// maybe not, because arrays might have different distribution
// than grid functions
+
+ // this requires that all processors have the same number of
+ // local components
if (hh->is_local(reflevel, component)) {
// set Cactus parameters to pseudo values
@@ -718,8 +669,6 @@ namespace Carpet {
default:
abort();
}
-// cerr << CCTK_MyProc(cgh) << " trcm " << tl << " " << reflevel << " " << component << " " << mglevel << endl;
-// cerr << CCTK_MyProc(cgh) << " gvn " << group << " " << var << " " << n << endl;
assert (cgh->data[n][tl]);
} else {
@@ -742,8 +691,20 @@ namespace Carpet {
} // if local operation
- // let the flesh do the synchronisation, if necessary
+// Checkpoint ("%*sdone with CallFunction.", 2*reflevel, "");
+
+#if 0
+ // return 0: let the flesh do the synchronisation, if necessary
return 0;
+#endif
+
+ // synchronise, because our bbox information was wrong
+ for (int group=0; group<CCTK_NumGroups(); ++group) {
+ SyncGroup (cgh, CCTK_GroupName(group));
+ }
+
+ // return 1: we did synchronise
+ return 1;
}
@@ -776,8 +737,7 @@ namespace Carpet {
{
assert (component == -1);
- CCTK_VInfo (CCTK_THORNSTRING, "SyncGroup %s", groupname);
- DEBUG_DIST;
+ Checkpoint ("SyncGroup %s", groupname);
const int group = CCTK_GroupIndex(groupname);
assert (group>=0 && group<CCTK_NumGroups());
@@ -838,8 +798,7 @@ namespace Carpet {
int EnableGroupStorage (cGH* cgh, const char* groupname)
{
- CCTK_VInfo (CCTK_THORNSTRING, "EnableGroupStorage %s", groupname);
- DEBUG_DIST;
+ Checkpoint ("EnableGroupStorage %s", groupname);
const int group = CCTK_GroupIndex(groupname);
assert (group>=0 && group<CCTK_NumGroups());
@@ -925,15 +884,14 @@ namespace Carpet {
// The return value seems to be 1 (success) no matter whether
// storage has actually been disabled.
- return 1;
+ return retval;
}
int DisableGroupStorage (cGH* cgh, const char* groupname)
{
- CCTK_VInfo (CCTK_THORNSTRING, "DisableGroupStorage %s", groupname);
- DEBUG_DIST;
+ Checkpoint ("DisableGroupStorage %s", groupname);
const int group = CCTK_GroupIndex(groupname);
assert (group>=0 && group<CCTK_NumGroups());
@@ -1011,7 +969,9 @@ namespace Carpet {
abort();
}
- return 0;
+ // The return value seems to be 1 (success) no matter whether
+ // storage has actually been disabled.
+ return 1;
}
@@ -1035,8 +995,7 @@ namespace Carpet {
DECLARE_CCTK_PARAMETERS;
assert (component == -1);
-
- DEBUG_DIST;
+ Checkpoint ("%*sRecompose", 2*reflevel, "");
const int nprocs = CCTK_nProcs(cgh);
const int reflevels = max_refinement_levels; // arbitrary value
@@ -1073,6 +1032,8 @@ namespace Carpet {
vector<vector<int> > pss(bbss.size());
for (int rl=0; rl<reflevels; ++rl) {
pss[rl] = vector<int>(bbss[rl].size());
+ // make sure all processors have the same number of components
+ assert (bbss[rl].size() % nprocs == 0);
for (int c=0; c<(int)bbss[rl].size(); ++c) {
pss[rl][c] = c % nprocs; // distribute among processors
}
@@ -1084,7 +1045,7 @@ namespace Carpet {
static void CycleTimeLevels (cGH* cgh)
{
- DEBUG_DIST;
+ Checkpoint ("%*sCycleTimeLevels", 2*reflevel, "");
for (int group=0; group<CCTK_NumGroups(); ++group) {
if (CCTK_QueryGroupStorageI(cgh, group)) {
@@ -1134,7 +1095,7 @@ namespace Carpet {
{
assert (component == -1);
- DEBUG_DIST;
+ Checkpoint ("%*sRestrict", 2*reflevel, "");
if (reflevel == hh->reflevels()-1) return;
@@ -1181,13 +1142,6 @@ namespace Carpet {
-// int ParallelInit (cGH* cgh)
-// {
-// return 0;
-// }
-
-
-
int Exit (cGH* cgh, int retval)
{
CCTK_Barrier (cgh);
@@ -1224,7 +1178,10 @@ namespace Carpet {
{
static const int zero = 0, one = 1;
- assert (component!=-1);
+ if (component == -1) {
+ // global routine
+ return &zero;
+ }
if (groupname) {
group = CCTK_GroupIndex(groupname);
@@ -1233,7 +1190,6 @@ namespace Carpet {
assert (dir>=0 && dir<dim);
-// cout << "ArrayGroupSizeB group=" << CCTK_GroupName(group) << " dir=" << dir << endl;
if (CCTK_QueryGroupStorageI(cgh, group)) {
const int var = CCTK_FirstVarIndexI(group);
@@ -1243,17 +1199,14 @@ namespace Carpet {
case CCTK_SCALAR:
assert (group<(int)scdata.size());
-// cout << " SCALAR" << endl;
return &one;
case CCTK_ARRAY:
assert (group<(int)arrdata.size());
-// cout << " ARRAY " << arrdata[group].size[dir] << endl;
return &arrdata[group].size[dir];
case CCTK_GF:
assert (group<(int)gfdata.size());
-// cout << " GF " << gfsize[dir] << endl;
return &gfsize[dir];
default:
@@ -1277,8 +1230,6 @@ namespace Carpet {
}
assert (group>=0 && group<CCTK_NumGroups());
-// cout << "QueryGroupStorageB " << CCTK_GroupName(group) << endl;
-
const int n = CCTK_FirstVarIndexI(group);
assert (n>=0 && n<CCTK_NumVars());
const int var = 0;
@@ -1312,6 +1263,24 @@ namespace Carpet {
+ void Checkpoint (const char* fmt, ...)
+ {
+ DECLARE_CCTK_PARAMETERS;
+ if (verbose) {
+ va_list args;
+ char msg[1000];
+ va_start (args, fmt);
+ vsnprintf (msg, sizeof(msg), fmt, args);
+ va_end (args);
+ CCTK_INFO (msg);
+ }
+ if (barriers) {
+ MPI_Barrier (dist::comm);
+ }
+ }
+
+
+
MPI_Comm CarpetMPICommunicator ()
{
return dist::comm;
diff --git a/Carpet/CarpetLib/param.ccl b/Carpet/CarpetLib/param.ccl
index 3f7d08893..d89b15413 100644
--- a/Carpet/CarpetLib/param.ccl
+++ b/Carpet/CarpetLib/param.ccl
@@ -1,2 +1,12 @@
# Parameter definitions for thorn CarpetLib
-# $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/param.ccl,v 1.1 2001/03/01 13:40:10 eschnett Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/param.ccl,v 1.2 2001/03/07 13:00:05 eschnett Exp $
+
+private:
+
+BOOLEAN verbose "Print info to the screen"
+{
+} "no"
+
+BOOLEAN barriers "Insert barriers at strategic places for debugging purposes (slows down execution)"
+{
+} "no"
diff --git a/Carpet/CarpetSlab/src/carpetslab.cc b/Carpet/CarpetSlab/src/carpetslab.cc
index 94dd33a22..15cb8a874 100644
--- a/Carpet/CarpetSlab/src/carpetslab.cc
+++ b/Carpet/CarpetSlab/src/carpetslab.cc
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetSlab/src/Attic/carpetslab.cc,v 1.2 2001/03/05 21:48:56 eschnett Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetSlab/src/Attic/carpetslab.cc,v 1.3 2001/03/07 13:01:11 eschnett Exp $
#include <cassert>
#include <cstdlib>
@@ -11,6 +11,7 @@
#include "Carpet/CarpetLib/src/bbox.hh"
#include "Carpet/CarpetLib/src/gdata.hh"
#include "Carpet/CarpetLib/src/dh.hh"
+#include "Carpet/CarpetLib/src/dist.hh"
#include "Carpet/CarpetLib/src/ggf.hh"
#include "Carpet/CarpetLib/src/gh.hh"
#include "Carpet/CarpetLib/src/vect.hh"
@@ -19,7 +20,13 @@
#include "carpetslab.hh"
-namespace Carpet {
+
+
+namespace CarpetSlab {
+
+ using namespace Carpet;
+
+
int Hyperslab_GetLocalHyperslab (cGH* cgh,
const int n,
@@ -29,7 +36,7 @@ namespace Carpet {
const int dir [/*vdim*/],
const int len [/*hdim*/],
const int downsample [/*hdim*/],
- void** hdata,
+ void** const hdata,
int hsize [/*hdim*/],
int ghsize [/*hdim*/],
int hoffset [/*hdim*/])
@@ -50,30 +57,28 @@ namespace Carpet {
switch (CCTK_GroupTypeFromVarI(n)) {
case CCTK_SCALAR:
abort();
- case CCTK_ARRAY:
- {
- assert (group<(int)arrdata.size());
- assert (arrdata[group].hh->is_local(reflevel, component));
- const bbox<int,dim> ext =
- arrdata[group].dd->boxes[reflevel][component][mglevel].exterior;
- for (int d=0; d<dim; ++d) {
- assert (origin[d] >= ext.lower()[d] / ext.stride()[d]
- && origin[d] <= ext.upper()[d] / ext.stride()[d]);
- }
- }
+ case CCTK_ARRAY: {
+ assert (group<(int)arrdata.size());
+// assert (arrdata[group].hh->is_local(reflevel, component));
+// const bbox<int,dim> ext =
+// arrdata[group].dd->boxes[reflevel][component][mglevel].exterior;
+// for (int d=0; d<dim; ++d) {
+// assert (origin[d] >= ext.lower()[d] / ext.stride()[d]
+// && origin[d] <= ext.upper()[d] / ext.stride()[d]);
+// }
break;
- case CCTK_GF:
- {
- assert (group<(int)gfdata.size());
- assert (hh->is_local(reflevel, component));
- const bbox<int,dim> ext =
- dd->boxes[reflevel][component][mglevel].exterior;
- for (int d=0; d<dim; ++d) {
- assert (origin[d] >= ext.lower()[d] / ext.stride()[d]
- && origin[d] <= ext.upper()[d] / ext.stride()[d]);
- }
- }
+ }
+ case CCTK_GF: {
+ assert (group<(int)gfdata.size());
+// assert (hh->is_local(reflevel, component));
+// const bbox<int,dim> ext =
+// dd->boxes[reflevel][component][mglevel].exterior;
+// for (int d=0; d<dim; ++d) {
+// assert (origin[d] >= ext.lower()[d] / ext.stride()[d]
+// && origin[d] <= ext.upper()[d] / ext.stride()[d]);
+// }
break;
+ }
default:
abort();
}
@@ -122,19 +127,14 @@ namespace Carpet {
const generic_data<dim>* mydata
= (*myff)(tl, reflevel, component, mglevel);
- // get local bounding box
+ // get local and global bounding boxes
assert (reflevel < (int)mydd->boxes.size());
assert (component < (int)mydd->boxes[reflevel].size());
assert (mglevel < (int)mydd->boxes[reflevel][component].size());
- const bbox<int,dim> intbox
- = mydd->boxes[reflevel][component][mglevel].interior;
-
- // get global bounding box
- assert (reflevel < (int)myhh->extents.size());
- assert (component < (int)myhh->extents[reflevel].size());
- assert (mglevel < (int)myhh->extents[reflevel][component].size());
- const bbox<int,dim> extbox = myhh->extents[reflevel][component][mglevel];
- assert (extbox.aligned_with(intbox));
+ const bbox<int,dim> locbox
+ = mydd->boxes[reflevel][component][mglevel].exterior;
+ const bbox<int,dim> globox
+ = mydd->bases[reflevel][mglevel].exterior;
// calculate more convenient representation of the direction
vect<int,dim> stride[hdim];
@@ -167,44 +167,44 @@ namespace Carpet {
} else {
abort();
}
- for (int dd=0; dd<hdim; ++dd) stride[dd] *= intbox.stride();
+ for (int dd=0; dd<hdim; ++dd) stride[dd] *= locbox.stride();
// local lower bound
vect<int,dim> lbound;
for (int d=0; d<dim; ++d) lbound[d] = origin[d];
- lbound *= intbox.stride();
- lbound = max(lbound, intbox.lower());
+ lbound *= locbox.stride();
// local upper bound
vect<int,dim> ubound = lbound;
for (int dd=0; dd<hdim; ++dd) {
if (len[dd]<0) {
assert (any(stride[dd]>0));
- while (all(ubound < intbox.upper())) ubound += stride[dd];
+ while (all(ubound + stride[dd] <= locbox.upper())) {
+ ubound += stride[dd];
+ }
} else {
- ubound += stride[dd] * len[dd];
+ ubound += stride[dd] * (len[dd]-1);
}
- ubound = min(ubound, intbox.upper());
}
-// // local bounding box
-// const bbox<int,dim> box(lbound, ubound, intbox.stride());
+ lbound = max(lbound, locbox.lower());
+ ubound = min(ubound, locbox.upper());
// local size
int total_hsize = 1;
for (int dd=0; dd<hdim; ++dd) {
hsize[dd] = 0;
assert (any(stride[dd]>0));
-// while (all(lbound + stride[dd] * hsize[dd] <= ubound)) ++hsize[dd];
- while (all(lbound + stride[dd] * hsize[dd] < ubound)) ++hsize[dd];
+ while (all(lbound + stride[dd] * hsize[dd] <= ubound)) ++hsize[dd];
total_hsize *= hsize[dd];
}
+ assert (total_hsize>=0);
// sanity check
- {
+ if (total_hsize>0) {
vect<int,dim> tmp = lbound;
for (int dd=0; dd<hdim; ++dd) {
- tmp += stride[dd] * hsize[dd];
+ tmp += stride[dd] * (hsize[dd]-1);
}
assert (all(tmp == ubound));
}
@@ -212,33 +212,41 @@ namespace Carpet {
// global lower bound
vect<int,dim> glbound;
for (int d=0; d<dim; ++d) glbound[d] = origin[d];
- glbound *= extbox.stride();
- glbound = max(glbound, extbox.lower());
+ glbound *= globox.stride();
// global upper bound
vect<int,dim> gubound = glbound;
for (int dd=0; dd<hdim; ++dd) {
if (len[dd]<0) {
assert (any(stride[dd]>0));
- while (all(gubound < extbox.upper())) gubound += stride[dd];
+ while (all(gubound + stride[dd] <= globox.upper())) {
+ gubound += stride[dd];
+ }
} else {
- gubound += stride[dd] * len[dd];
+ gubound += stride[dd] * (len[dd]-1);
}
- gubound = min(gubound, extbox.upper());
}
+ glbound = max(glbound, globox.lower());
+ gubound = min(gubound, globox.upper());
+
// global size
+ int total_ghsize = 1;
for (int dd=0; dd<hdim; ++dd) {
ghsize[dd] = 0;
assert (any(stride[dd]>0));
- while (all(glbound + stride[dd] * ghsize[dd] < gubound)) ++ghsize[dd];
+ while (all(glbound + stride[dd] * ghsize[dd] <= gubound)) {
+ ++ghsize[dd];
+ }
+ total_ghsize *= ghsize[dd];
}
+ assert (total_ghsize>=0);
// sanity check
- {
+ if (total_ghsize>0) {
vect<int,dim> tmp = glbound;
for (int dd=0; dd<hdim; ++dd) {
- tmp += stride[dd] * ghsize[dd];
+ tmp += stride[dd] * (ghsize[dd]-1);
}
assert (all(tmp == gubound));
}
@@ -247,7 +255,9 @@ namespace Carpet {
for (int dd=0; dd<hdim; ++dd) {
hoffset[dd] = 0;
assert (any(stride[dd]>0));
- while (all(glbound + stride[dd] * hoffset[dd] < lbound)) ++hoffset[dd];
+ while (all(glbound + stride[dd] * (hoffset[dd]+1) <= lbound)) {
+ ++hoffset[dd];
+ }
}
// sanity check
@@ -260,12 +270,10 @@ namespace Carpet {
}
// bail out if this component is on another processor
-// if (mydata->proc() != CCTK_MyProc(cgh)) {
if (! myhh->is_local(reflevel, component)) {
*hdata = 0;
for (int dd=0; dd<hdim; ++dd) {
hsize[dd] = 0;
-// ghsize[dd] = 0;
hoffset[dd] = 0;
}
return -1;
@@ -275,33 +283,37 @@ namespace Carpet {
*hdata = malloc(total_hsize * CCTK_VarTypeSize(CCTK_VarTypeI(n)));
assert (*hdata);
- // copy the data to user memory
- char* const dest = (char*)*hdata;
- const char* const src = (const char*)mydata->storage();
- const int sz = CCTK_VarTypeSize(CCTK_VarTypeI(n));
-
- int dest_index[hdim];
- for (int dd=0; dd<hdim; ++dd) dest_index[dd] = 0;
- for (;;) {
-
- vect<int,dim> src_index = lbound;
- for (int dd=0; dd<hdim; ++dd) src_index += stride[dd] * dest_index[dd];
+ if (total_hsize>0) {
- int di = 0;
- for (int dd=0; dd<hdim; ++dd) di = di * hsize[dd] + dest_index[dd];
+ // copy the data to user memory
+ char* const dest = (char*)*hdata;
+ const char* const src = (const char*)mydata->storage();
+ const int sz = CCTK_VarTypeSize(CCTK_VarTypeI(n));
- const int si = mydata->offset(src_index);
-
- memcpy(dest + sz*di, src + sz*si, sz);
-
- for (int dd=0; dd<hdim; ++dd) {
- ++dest_index[dd];
- if (dest_index[dd]<hsize[dd]) break;
- dest_index[dd]=0;
- if (dd==hdim-1) goto done;
+ int dest_index[hdim];
+ for (int dd=0; dd<hdim; ++dd) dest_index[dd] = 0;
+ for (;;) {
+
+ vect<int,dim> src_index = lbound;
+ for (int dd=0; dd<hdim; ++dd) src_index += stride[dd] * dest_index[dd];
+
+ int di = 0;
+ for (int dd=hdim-1; dd>=0; --dd) di = di * hsize[dd] + dest_index[dd];
+
+ const int si = mydata->offset(src_index);
+
+ memcpy(dest + sz*di, src + sz*si, sz);
+
+ for (int dd=0; dd<hdim; ++dd) {
+ ++dest_index[dd];
+ if (dest_index[dd]<hsize[dd]) break;
+ dest_index[dd]=0;
+ if (dd==hdim-1) goto done;
+ }
}
- }
- done:
+ done: ;
+
+ } // if total_hsize>0
return 0;
}
@@ -309,21 +321,23 @@ namespace Carpet {
int Hyperslab_GetHyperslab (cGH* cgh,
- int target_proc,
- int n,
- int tl,
- int hdim,
+ const int target_proc,
+ const int n,
+ const int tl,
+ const int hdim,
const int origin [/*vdim*/],
const int dir [/*vdim*/],
const int len [/*hdim*/],
const int downsample [/*hdim*/],
- void** hdata,
+ void** const hdata,
int hsize [/*hdim*/])
{
// check current status
assert (mglevel>=0);
assert (reflevel>=0);
+ // in order to work, this requires that all processors have the
+ // same number of components
const int saved_component = component;
component = -1;
@@ -336,6 +350,7 @@ namespace Carpet {
// TODO: make sure that origin is within the extent of this
// refinement / multigrid level
// (but no such extent is stored in dh)
+ // (it is now; use it!)
const int group = CCTK_GroupIndexFromVarI(n);
assert (group>=0);
switch (CCTK_GroupTypeFromVarI(n)) {
@@ -368,6 +383,24 @@ namespace Carpet {
const int sz = CCTK_VarTypeSize(CCTK_VarTypeI(n));
+ MPI_Datatype type;
+ switch (CCTK_VarTypeI(n)) {
+#define TYPECASE(N,T) \
+ case N: { \
+ assert (sz == sizeof(T)); \
+ T dummy; \
+ type = dist::datatype(dummy); \
+ break; \
+ }
+#include "Carpet/Carpet/src/typecase"
+#undef TYPECASE
+ default:
+ abort();
+ }
+
+ int rank;
+ MPI_Comm_rank (dist::comm, &rank);
+
// loop over all components
for (component=0; component<hh->components(reflevel); ++component) {
@@ -378,69 +411,87 @@ namespace Carpet {
(cgh, n, tl, hdim, origin, dir, len, downsample,
&myhdata, myhsize, ghsize, hoffset);
+ if (hh->is_local(reflevel,component)) {
+ assert (retval == 0);
+ } else {
+ assert (retval == -1);
+ }
+
int mytotalsize = 1;
for (int dd=0; dd<hdim; ++dd) mytotalsize *= myhsize[dd];
if (component==0) {
- if (target_proc<0 || target_proc == CCTK_MyProc(cgh)) {
+ if (target_proc<0 || rank == target_proc) {
+
+ for (int dd=0; dd<hdim; ++dd) hsize[dd] = ghsize[dd];
totalhsize = 1;
for (int dd=0; dd<hdim; ++dd) totalhsize *= hsize[dd];
- if (collect_proc == CCTK_MyProc(cgh)) {
+ if (rank == collect_proc) {
*hdata = malloc(totalhsize * sz);
assert (*hdata);
} else {
*hdata = 0;
}
-
- for (int dd=0; dd<hdim; ++dd) hsize[dd] = ghsize[dd];
}
}
- if (!myhdata && collect_proc == CCTK_MyProc(cgh)) {
+ if (!myhdata && rank == collect_proc) {
+ MPI_Status status;
+ assert (mytotalsize==0);
+ const int src = hh->proc(reflevel, component);
+ MPI_Recv (&mytotalsize, 1, MPI_INT, src, 2001,
+ dist::comm, &status);
myhdata = malloc(mytotalsize * sz);
assert (myhdata);
- MPI_Status status;
- MPI_Recv (myhdata, mytotalsize*sz, MPI_BYTE,
- MPI_ANY_SOURCE, 2001, CarpetMPICommunicator(), &status);
- } else if (myhdata && collect_proc != CCTK_MyProc(cgh)) {
- MPI_Send (myhdata, mytotalsize*sz, MPI_BYTE,
- collect_proc, 2001, CarpetMPICommunicator());
+ MPI_Recv (myhdata, mytotalsize, type, src, 2001,
+ dist::comm, &status);
+ } else if (myhdata && rank != collect_proc) {
+ MPI_Send (&mytotalsize, 1, MPI_INT, collect_proc, 2001, dist::comm);
+ MPI_Send (myhdata, mytotalsize, type, collect_proc, 2001, dist::comm);
free (myhdata);
myhdata = 0;
+ mytotalsize = 0;
}
- if (myhdata) {
- assert (collect_proc == CCTK_MyProc(cgh));
+ if (myhdata>0) {
+ assert (rank == collect_proc);
- int dest_index[hdim], src_index[hdim];
- for (int dd=0; dd<hdim; ++dd) dest_index[dd] = hoffset[dd];
- for (int dd=0; dd<hdim; ++dd) src_index[dd] = 0;
- for (;;) {
- int di=0;
- for (int dd=0; dd<hdim; ++dd) di = di * hsize[dd] + dest_index[dd];
- int si=0;
- for (int dd=0; dd<hdim; ++dd) si = si * myhsize[dd] + src_index[dd];
-
- memcpy ((char*)*hdata + sz*di, (char*)myhdata + sz*si, sz);
-
- for (int dd=0; dd<hdim; ++dd) {
- ++dest_index[dd];
- ++src_index[dd];
- if (src_index[dd] < myhsize[dd]) break;
- dest_index[dd] = hoffset[dd];
- src_index[dd] = 0;
- if (dd==hdim-1) goto done;
+ if (mytotalsize>0) {
+ int dest_index[hdim], src_index[hdim];
+ for (int dd=0; dd<hdim; ++dd) dest_index[dd] = hoffset[dd];
+ for (int dd=0; dd<hdim; ++dd) src_index[dd] = 0;
+ for (;;) {
+ int di=0;
+ for (int dd=hdim-1; dd>=0; --dd) {
+ di = di * hsize[dd] + dest_index[dd];
+ }
+ int si=0;
+ for (int dd=hdim-1; dd>=0; --dd) {
+ si = si * myhsize[dd] + src_index[dd];
+ }
+
+ memcpy ((char*)*hdata + sz*di, (char*)myhdata + sz*si, sz);
+
+ for (int dd=0; dd<hdim; ++dd) {
+ ++dest_index[dd];
+ ++src_index[dd];
+ if (src_index[dd] < myhsize[dd]) break;
+ dest_index[dd] = hoffset[dd];
+ src_index[dd] = 0;
+ if (dd==hdim-1) goto done;
+ }
}
- }
- done:
+ done: ;
+
+ } // if mytotalsize>0
free (myhdata);
myhdata = 0;
} else {
- assert (collect_proc != CCTK_MyProc(cgh));
+ assert (rank != collect_proc);
}
}
@@ -455,4 +506,4 @@ namespace Carpet {
return 0;
}
-} // namespace Carpet
+} // namespace CarpetSlab
diff --git a/Carpet/CarpetSlab/src/carpetslab.h b/Carpet/CarpetSlab/src/carpetslab.h
new file mode 100644
index 000000000..dd3f86136
--- /dev/null
+++ b/Carpet/CarpetSlab/src/carpetslab.h
@@ -0,0 +1,28 @@
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetSlab/src/Attic/carpetslab.h,v 1.1 2001/03/07 13:01:11 eschnett Exp $
+
+#include "cctk.h"
+
+int Hyperslab_GetLocalHyperslab (cGH* GH,
+ int vindex,
+ int vtimelvl,
+ int hdim,
+ const int global_startpoint [/*vdim*/],
+ const int directions [/*vdim*/],
+ const int lengths [/*hdim*/],
+ const int downsample [/*hdim*/],
+ void** hdata,
+ int hsize [/*hdim*/],
+ int ghsize [/*hdim*/],
+ int hoffset [/*hdim*/]);
+
+int Hyperslab_GetHyperslab (cGH* GH,
+ int target_proc,
+ int vindex,
+ int vtimelvl,
+ int hdim,
+ const int global_startpoint [/*vdim*/],
+ const int directions [/*vdim*/],
+ const int lengths [/*hdim*/],
+ const int downsample [/*hdim*/],
+ void** hdata,
+ int hsize [/*hdim*/]);
diff --git a/Carpet/CarpetSlab/src/carpetslab.hh b/Carpet/CarpetSlab/src/carpetslab.hh
index 04c6bfda3..444d14cf1 100644
--- a/Carpet/CarpetSlab/src/carpetslab.hh
+++ b/Carpet/CarpetSlab/src/carpetslab.hh
@@ -1,8 +1,8 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetSlab/src/Attic/carpetslab.hh,v 1.1 2001/03/01 13:40:11 eschnett Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetSlab/src/Attic/carpetslab.hh,v 1.2 2001/03/07 13:01:11 eschnett Exp $
#include "cctk.h"
-namespace Carpet {
+namespace CarpetSlab {
extern "C" {
@@ -33,4 +33,4 @@ namespace Carpet {
} // extern "C"
-} // namespace Carpet
+} // namespace CarpetSlab
diff --git a/CarpetExtra/IDScalarWave/src/InitialData.F77 b/CarpetExtra/IDScalarWave/src/InitialData.F77
index a6d74ae59..ac277ce8f 100644
--- a/CarpetExtra/IDScalarWave/src/InitialData.F77
+++ b/CarpetExtra/IDScalarWave/src/InitialData.F77
@@ -40,7 +40,7 @@ c -*-Fortran-*-
INTEGER i,j,k
CCTK_REAL dt,omega, pi
- print '("IDScalarWave_InitialData")'
+c print '("IDScalarWave_InitialData")'
pi = 4.d0*atan(1.d0)
diff --git a/CarpetExtra/WaveToyF77/interface.ccl b/CarpetExtra/WaveToyF77/interface.ccl
index cf66ccea4..68be9a991 100644
--- a/CarpetExtra/WaveToyF77/interface.ccl
+++ b/CarpetExtra/WaveToyF77/interface.ccl
@@ -1,8 +1,8 @@
# Interface definition for thorn WaveToyF77
-# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/interface.ccl,v 1.1 2001/03/01 13:40:11 eschnett Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/interface.ccl,v 1.2 2001/03/07 13:01:47 eschnett Exp $
implements: wavetoy
-inherits: boundary grid
+inherits: grid
public:
diff --git a/CarpetExtra/WaveToyF77/par/wavetoyf77.par b/CarpetExtra/WaveToyF77/par/wavetoyf77.par
index 89c6d341c..b2e616756 100644
--- a/CarpetExtra/WaveToyF77/par/wavetoyf77.par
+++ b/CarpetExtra/WaveToyF77/par/wavetoyf77.par
@@ -1,6 +1,3 @@
-# wavetoyf77.par - minimal wavetoy evolution
-# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/par/wavetoyf77.par,v 1.3 2001/03/05 21:49:11 eschnett Exp $
-#
# /*@@
# @file wavetoyf77.par
# @date 2001-01-07
@@ -8,7 +5,9 @@
# @desc
# Wavetoy parameter file demonstrating minimal evolution
# @enddesc
-# @@*/
+# @@*/
+#
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/par/wavetoyf77.par,v 1.4 2001/03/07 13:02:00 eschnett Exp $
ActiveThorns = "Boundary IOBasic IOUtil Time Cart3d Carpet CarpetIOASCII CarpetLib IDScalarWave WaveToyF77"
@@ -27,13 +26,15 @@ grid::mode = none
WaveToy::bound = zero
IO::outdir = "wavetoyf77"
-IO::out_every = 1
-#IOBasic::outInfo_every = 1
+IOBasic::outInfo_every = 1
#IOBasic::outInfo_vars = "wavetoy::phi"
#IOBasic::outScalar_every = 1
#IOBasic::outScalar_vars = "wavetoy::phi"
#IOBasic::outScalar_style = gnuplot
+IOASCII::out1D_every = 1
IOASCII::out1D_vars = "wavetoy::phi"
+
+Carpet::verbose = no
diff --git a/CarpetExtra/WaveToyF77/par/wavetoyf77_flat.par b/CarpetExtra/WaveToyF77/par/wavetoyf77_flat.par
index 45fc4818c..e8b41a300 100644
--- a/CarpetExtra/WaveToyF77/par/wavetoyf77_flat.par
+++ b/CarpetExtra/WaveToyF77/par/wavetoyf77_flat.par
@@ -1,16 +1,15 @@
-# wavetoy_flat.par - wavetoy evolution with flat boundaries
-# $Id: wavetoyf77_flat.par,v 1.2 2001/03/05 21:49:12 eschnett Exp $
-#
# /*@@
-# @file wavetoy_rad.par
-# @date Sunday 24th July
-# @author Gabrielle Allen
+# @file wavetoy_flat.par
+# @date 2001-03-06
+# @author Erik Schnetter
# @desc
-# Wavetoy parameter file demonstrating flat boundaries in Octant
+# Wavetoy parameter file demonstrating flat boundaries in octant mode
# @enddesc
-# @@*/
+# @@*/
+#
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/par/wavetoyf77_flat.par,v 1.3 2001/03/07 13:02:01 eschnett Exp $
-ActiveThorns = "Boundary IOBasic IOUtil Time Cart3d Carpet CarpetIOASCII CarpetLib IDScalarWave WaveToyF77"
+ActiveThorns = "Boundary IOBasic IOUtil Time Cart3d Carpet CarpetIOASCII CarpetLib CarpetSlab IDScalarWave WaveToyF77"
Cactus::cctk_itlast = 500
@@ -26,7 +25,7 @@ grid::dxyz = 0.3
IO::outdir = "wavetoyf77_flat"
-#IOBasic::outInfo_every = 50
+IOBasic::outInfo_every = 50
#IOBasic::outInfo_vars = "wavetoy::phi"
#IOBasic::outScalar_every = 10
diff --git a/CarpetExtra/WaveToyF77/par/wavetoyf77_none.par b/CarpetExtra/WaveToyF77/par/wavetoyf77_none.par
index 89a74bffb..f29dbd56c 100644
--- a/CarpetExtra/WaveToyF77/par/wavetoyf77_none.par
+++ b/CarpetExtra/WaveToyF77/par/wavetoyf77_none.par
@@ -1,45 +1,41 @@
-# wavetoy_none.par - wavetoy evolution with no boundaries
-# $Id: wavetoyf77_none.par,v 1.1 2001/03/01 13:40:11 eschnett Exp $
-#
# /*@@
-# @file wavetoy_rad.par
-# @date Sunday 24th July
-# @author Gabrielle Allen
+# @file wavetoy_none.par
+# @date 2001-03-06
+# @author Erik Schnetter
# @desc
-# Wavetoy parameter file demonstrating no boundaries in Octant
+# Wavetoy parameter file demonstrating no boundaries in octant mode
# @enddesc
-# @@*/
+# @@*/
+#
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/par/wavetoyf77_none.par,v 1.2 2001/03/07 13:02:01 eschnett Exp $
+
+ActiveThorns = "Boundary IOBasic IOUtil Time Cart3d Carpet CarpetIOASCII CarpetLib CarpetSlab IDScalarWave WaveToyF77"
-ActiveThorns = "idscalarwave time wavetoyf77 pugh pughreduce pughslab cartgrid3d ioutil ioascii iobasic"
-
-time::dtfac = 0.5
+Cactus::cctk_itlast = 500
-idscalarwave::initial_data = "gaussian"
-idscalarwave::sigma = 2.8
-idscalarwave::radius = 0
+Time::dtfac = 0.5
-wavetoyf77::bound = "none"
+driver::global_nx = 30
+driver::global_ny = 30
+driver::global_nz = 30
-grid::type = "BySpacing"
-grid::domain = "octant"
-grid::dxyz = 0.3
+grid::type = byspacing
+grid::mode = octant
+grid::dxyz = 0.3
-driver::global_nx = 30
-driver::global_ny = 30
-driver::global_nz = 30
+IO::outdir = "wavetoyf77_none"
-cactus::cctk_itlast = 500
+IOBasic::outInfo_every = 50
+#IOBasic::outInfo_vars = "wavetoy::phi"
-IOBasic::outScalar_every = 10
-IOBasic::outScalar_vars = "wavetoy::phi"
+#IOBasic::outScalar_every = 10
+#IOBasic::outScalar_vars = "wavetoy::phi"
-IOASCII::out1D_every = 10
-IOASCII::out1D_z = "no"
-IOASCII::out1D_y = "no"
-IOASCII::out1D_vars = "wavetoy::phi "
+IOASCII::out1D_every = 10
+IOASCII::out1D_vars = "wavetoy::phi "
-IOBasic::outInfo_every = 50
-IOBasic::outInfo_vars = "wavetoy::phi"
-
-IO::outdir = "wavetoyf77_none"
+WaveToyF77::bound = none
+IDScalarWave::initial_data = gaussian
+IDScalarWave::sigma = 2.8
+IDScalarWave::radius = 0
diff --git a/CarpetExtra/WaveToyF77/par/wavetoyf77_rad.par b/CarpetExtra/WaveToyF77/par/wavetoyf77_rad.par
index f1b510329..4a208e11e 100644
--- a/CarpetExtra/WaveToyF77/par/wavetoyf77_rad.par
+++ b/CarpetExtra/WaveToyF77/par/wavetoyf77_rad.par
@@ -1,45 +1,41 @@
-# wavetoyf77_rad.par - wavetoy evolution with radiation boundaries
-# $Id: wavetoyf77_rad.par,v 1.1 2001/03/01 13:40:11 eschnett Exp $
-#
# /*@@
# @file wavetoyf77_rad.par
-# @date Sunday 24th July
-# @author Gabrielle Allen
+# @date 2001-03-06
+# @author Erik Schnetter
# @desc
-# Wavetoy parameter file demonstrating radiation boundaries in Octant
+# Wavetoy parameter file demonstrating radiation boundaries in octant mode
# @enddesc
-# @@*/
-
-ActiveThorns = "iobasic idscalarwave time wavetoyf77 pugh pughslab pughreduce cartgrid3d ioutil ioascii"
-
-time::dtfac = 0.5
+# @@*/
+#
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/par/wavetoyf77_rad.par,v 1.2 2001/03/07 13:02:01 eschnett Exp $
-idscalarwave::initial_data = "gaussian"
-idscalarwave::sigma = 2.8
-idscalarwave::radius = 0
+ActiveThorns = "Boundary IOBasic IOUtil Time Cart3d Carpet CarpetIOASCII CarpetLib CarpetSlab IDScalarWave WaveToyF77"
-wavetoyf77::bound = "radiation"
+Cactus::cctk_itlast = 120
+
+Time::dtfac = 0.5
-grid::type = "BySpacing"
-grid::domain = "octant"
-grid::dxyz = 0.3
+driver::global_nx = 30
+driver::global_ny = 30
+driver::global_nz = 30
-driver::global_nx = 30
-driver::global_ny = 30
-driver::global_nz = 30
+grid::type = byspacing
+grid::mode = octant
+grid::dxyz = 0.3
+
+IO::outdir = "wavetoyf77_rad"
-cactus::cctk_itlast = 120
+IOBasic::outinfo_every = 10
+#IOBasic::outinfo_vars = "wavetoy::phi"
-IOBasic::outScalar_every = 2
-IOBasic::outScalar_vars = "wavetoy::phi"
+#IOBasic::outScalar_every = 2
+#IOBasic::outScalar_vars = "wavetoy::phi"
-IOASCII::out1D_every = 2
-IOASCII::out1D_z = "no"
-IOASCII::out1D_y = "no"
-IOASCII::out1D_vars = "wavetoy::phi "
+IOASCII::out1D_every = 2
+IOASCII::out1D_vars = "wavetoy::phi "
-IOBasic::outinfo_every = 10
-IOBasic::outinfo_vars = "wavetoy::phi"
-
-IO::outdir = "wavetoyf77_rad"
+WaveToyF77::bound = radiation
+IDScalarWave::initial_data = gaussian
+IDScalarWave::sigma = 2.8
+IDScalarWave::radius = 0
diff --git a/CarpetExtra/WaveToyF77/schedule.ccl b/CarpetExtra/WaveToyF77/schedule.ccl
index f247f2eac..70a324fb7 100644
--- a/CarpetExtra/WaveToyF77/schedule.ccl
+++ b/CarpetExtra/WaveToyF77/schedule.ccl
@@ -1,5 +1,5 @@
# Schedule definitions for thorn WaveToy77
-# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/schedule.ccl,v 1.1 2001/03/01 13:40:11 eschnett Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/WaveToyF77/schedule.ccl,v 1.2 2001/03/07 13:01:47 eschnett Exp $
STORAGE: scalarevolve
@@ -11,6 +11,7 @@ schedule WaveToyF77_Startup at STARTUP
schedule WaveToyF77_InitSymBound at BASEGRID
{
LANG: Fortran
+ OPTIONS: GLOBAL
} "Schedule symmetries"
schedule WaveToyF77_Evolution as WaveToy_Evolution at EVOL
@@ -19,8 +20,7 @@ schedule WaveToyF77_Evolution as WaveToy_Evolution at EVOL
SYNC: scalarevolve
} "Evolution of 3D wave equation"
-schedule WaveToyF77_Boundaries as WaveToy_Boundaries at EVOL AFTER WaveToy_Evolution
+schedule WaveToyF77_Boundaries as WaveToy_Boundaries at EVOL after WaveToy_Evolution
{
LANG: Fortran
} "Boundaries of 3D wave equation"
-
diff --git a/CarpetExtra/WaveToyF77/src/WaveToy.F77 b/CarpetExtra/WaveToyF77/src/WaveToy.F77
index fe40fc5e6..ec10a310c 100644
--- a/CarpetExtra/WaveToyF77/src/WaveToy.F77
+++ b/CarpetExtra/WaveToyF77/src/WaveToy.F77
@@ -39,7 +39,7 @@ c Declare variables in argument list
DECLARE_CCTK_FUNCTIONS
DECLARE_CCTK_PARAMETERS
- INTEGER i,j,k,ierr
+ INTEGER i,j,k
INTEGER istart, jstart, kstart, iend, jend, kend
CCTK_REAL dx,dy,dz,dt
CCTK_REAL dx2,dy2,dz2,dt2
@@ -47,7 +47,7 @@ c Declare variables in argument list
CCTK_REAL factor
- print '("WaveToyF77_Evolution")'
+c call CCTK_INFO ("WaveToyF77_Evolution")
c Set up shorthands
c -----------------
@@ -125,7 +125,7 @@ c Local declarations
integer ierr
integer sw(3)
- print '("WaveToyF77_Boundaries")'
+c call CCTK_INFO ("WaveToyF77_Boundaries")
npow = 1
finf = 1