#include #include #include "cctk.h" #include "cctk_Parameters.h" #include "Carpet/CarpetLib/src/ggf.hh" #include "Carpet/CarpetLib/src/gh.hh" #include "carpet.hh" 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 $"; namespace Carpet { using namespace std; int SyncGroup (const cGH* cgh, const char* groupname) { DECLARE_CCTK_PARAMETERS; if (hh->components(reflevel) > 1) assert (component == -1); Checkpoint ("%*sSyncGroup %s", 2*reflevel, "", groupname); const int group = CCTK_GroupIndex(groupname); assert (group>=0 && group=0); const int num_tl = CCTK_NumTimeLevelsFromVarI(n0); assert (num_tl>0); const int tl = 0; assert (group<(int)arrdata.size()); for (int var=0; var<(int)arrdata[group].data.size(); ++var) { if (num_tl>1 && reflevel>0) { for (int c=0; ccomponents(reflevel); ++c) { arrdata[group].data[var]->ref_bnd_prolongate (tl, reflevel, c, mglevel, prolongation_order_space, prolongation_order_time); } } for (int c=0; ccomponents(reflevel); ++c) { arrdata[group].data[var]->sync (tl, reflevel, c, mglevel); } } return 0; } int EnableGroupComm (const cGH* cgh, const char* groupname) { // Communication is always enabled return 0; } int DisableGroupComm (const cGH* cgh, const char* groupname) { // Communication is always enabled return -1; } } // namespace Carpet