// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/gh.cc,v 1.29 2004/08/07 19:47:11 schnetter Exp $ #include #include #include #include "cctk.h" #include "cctk_Parameters.h" #include "defs.hh" #include "dh.hh" #include "th.hh" #include "gh.hh" using namespace std; // Constructors template gh::gh (const int reffact, const centering refcent, const int mgfact, const centering mgcent, const ibbox baseextent) : reffact(reffact), refcent(refcent), mgfact(mgfact), mgcent(mgcent), baseextent(baseextent) { } // Destructors template gh::~gh () { } // Modifiers template void gh::recompose (const rexts& exts, const rbnds& outer_bounds, const rprocs& procs, const bool do_prolongate) { DECLARE_CCTK_PARAMETERS; extents = exts; outer_boundaries = outer_bounds; processors = procs; // Consistency checks // nota bene: there might be 0 refinement levels. // Check processor number consistency for (int rl=0; rl0); for (int ml=1; ml0); for (int c=0; c0) { for (int c=0; c all; for (int c=0; c:" << "reffactor=" << reffact << ",refcentering=" << refcent << "," << "mgfactor=" << mgfact << ",mgcentering=" << mgcent << "," << "extents=" << extents << "," << "outer_boundaries=" << outer_boundaries << "," << "processors=" << processors << "," << "dhs={"; int cnt=0; for (typename list*>::const_iterator d = dhs.begin(); d != dhs.end(); ++d) { if (cnt++) os << ","; (*d)->output(os); } os << "}"; return os; } template class gh<3>;