diff options
author | Erik Schnetter <schnetter@aei.mpg.de> | 2005-01-01 18:22:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@aei.mpg.de> | 2005-01-01 18:22:00 +0000 |
commit | 2a38d7eb6a6db8b150a9f6fd5f1c844b8d0ef74a (patch) | |
tree | 1c5e763b0ffee9744ee708d6016bdbd36b8f8312 /Carpet/CarpetRegrid/src/automatic.cc | |
parent | 049cec8e042a508511fdb0f0948de63f84f9b8be (diff) |
global: Turn CarpetLib templates into classes
Turn most of the templates in CarpetLib, which used to have the form
template<int D> class XXX
into classes, i.e., into something like
class XXX
by setting D to the new global integer constant dim, which in turn is set to 3.
The templates gf and data, which used to be of the form
template<typename T, int D> class XXX
are now of the form
template<typename T> class XXX
The templates vect, bbox, and bboxset remain templates.
This change simplifies the code somewhat.
darcs-hash:20050101182234-891bb-c3063528841f0d078b12cc506309ea27d8ce730d.gz
Diffstat (limited to 'Carpet/CarpetRegrid/src/automatic.cc')
-rw-r--r-- | Carpet/CarpetRegrid/src/automatic.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Carpet/CarpetRegrid/src/automatic.cc b/Carpet/CarpetRegrid/src/automatic.cc index 2ccdc0b3d..2e29195e5 100644 --- a/Carpet/CarpetRegrid/src/automatic.cc +++ b/Carpet/CarpetRegrid/src/automatic.cc @@ -25,10 +25,10 @@ namespace CarpetRegrid { int Automatic (cGH const * const cctkGH, - gh<dim> const & hh, - gh<dim>::rexts & bbsss, - gh<dim>::rbnds & obss, - gh<dim>::rprocs & pss) + gh const & hh, + gh::rexts & bbsss, + gh::rbnds & obss, + gh::rprocs & pss) { DECLARE_CCTK_PARAMETERS; @@ -50,14 +50,14 @@ namespace CarpetRegrid { assert (CCTK_GroupDimI(gi) == dim); assert (arrdata.at(gi).at(Carpet::map).data.at(vi-v1)); - const gf<CCTK_REAL,dim>& errorgf - = (*dynamic_cast<const gf<CCTK_REAL,dim>*> + const gf<CCTK_REAL>& errorgf + = (*dynamic_cast<const gf<CCTK_REAL>*> (arrdata.at(gi).at(Carpet::map).data.at(vi-v1))); assert (! smart_outer_boundaries); vector<ibbox> bbs; - gh<dim>::cbnds obs; + gh::cbnds obs; Automatic_OneLevel (cctkGH, hh, reflevel, min(reflevels+1, maxreflevels), @@ -65,7 +65,7 @@ namespace CarpetRegrid { bbs, obs); // make multiprocessor aware - gh<dim>::cprocs ps; + gh::cprocs ps; SplitRegions (cctkGH, bbs, obs, ps); // make multigrid aware @@ -100,13 +100,13 @@ namespace CarpetRegrid { void Automatic_OneLevel (const cGH * const cctkGH, - const gh<dim> & hh, + const gh & hh, const int rl, const int numrl, const int minwidth, const CCTK_REAL minfraction, const CCTK_REAL maxerror, - const gf<CCTK_REAL,dim> & errorgf, + const gf<CCTK_REAL> & errorgf, vector<ibbox> & bbs, vector<bbvect> & obs) { @@ -123,7 +123,7 @@ namespace CarpetRegrid { const ibbox region = hh.extents().at(rl).at(c).at(ml); assert (! region.empty()); - const data<CCTK_REAL,dim>& errordata = *errorgf(tl,rl,c,ml); + const data<CCTK_REAL>& errordata = *errorgf(tl,rl,c,ml); Automatic_Recursive (cctkGH, hh, minwidth, minfraction, maxerror, errordata, bbl, region); @@ -168,11 +168,11 @@ namespace CarpetRegrid { void Automatic_Recursive (const cGH * const cctkGH, - const gh<dim> & hh, + const gh & hh, const int minwidth, const CCTK_REAL minfraction, const CCTK_REAL maxerror, - const data<CCTK_REAL,dim> & errordata, + const data<CCTK_REAL> & errordata, list<ibbox> & bbl, const ibbox & region) { |