aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetInterp
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@aei.mpg.de>2005-01-01 18:22:00 +0000
committerErik Schnetter <schnetter@aei.mpg.de>2005-01-01 18:22:00 +0000
commit2a38d7eb6a6db8b150a9f6fd5f1c844b8d0ef74a (patch)
tree1c5e763b0ffee9744ee708d6016bdbd36b8f8312 /Carpet/CarpetInterp
parent049cec8e042a508511fdb0f0948de63f84f9b8be (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/CarpetInterp')
-rw-r--r--Carpet/CarpetInterp/src/interp.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc
index a35807272..0d8b14705 100644
--- a/Carpet/CarpetInterp/src/interp.cc
+++ b/Carpet/CarpetInterp/src/interp.cc
@@ -40,7 +40,7 @@ namespace CarpetInterp {
static inline int ind_rc_(int const m,
int const rl, int const minrl, int const maxrl,
int const c, int const maxncomps,
- vector<gh<dim> *> const hh)
+ vector<gh*> const hh)
{
assert (m>=0 && m<maps);
assert (rl>=minrl && rl<maxrl);
@@ -59,7 +59,7 @@ namespace CarpetInterp {
int const rl, int const minrl, int const maxrl,
int const c, int const maxncomps,
cGH const * const cgh,
- vector<gh<dim> *> const hh)
+ vector<gh*> const hh)
{
assert (p>=0 && p<nprocs);
assert (nprocs==CCTK_nProcs(cgh));
@@ -307,8 +307,7 @@ namespace CarpetInterp {
// Create coordinate patches
- vector<data<CCTK_REAL,dim> > allcoords
- (nprocs * (maxrl-minrl) * maxncomps);
+ vector<data<CCTK_REAL> > allcoords (nprocs * (maxrl-minrl) * maxncomps);
for (int p=0; p<nprocs; ++p) {
for (int rl=minrl; rl<maxrl; ++rl) {
for (int c=0; c<vhh.at(m)->components(rl); ++c) {
@@ -348,7 +347,7 @@ namespace CarpetInterp {
}
// Transfer coordinate patches
- for (comm_state<dim> state; !state.done(); state.step()) {
+ for (comm_state state; !state.done(); state.step()) {
for (int p=0; p<nprocs; ++p) {
for (int rl=minrl; rl<maxrl; ++rl) {
for (int c=0; c<vhh.at(m)->components(rl); ++c) {
@@ -362,9 +361,9 @@ namespace CarpetInterp {
// Create output patches
- vector<data<CCTK_REAL,dim> > alloutputs
+ vector<data<CCTK_REAL> > alloutputs
(nprocs * (maxrl-minrl) * maxncomps, -1);
- vector<data<CCTK_INT,dim> > allstatuses
+ vector<data<CCTK_INT> > allstatuses
(nprocs * (maxrl-minrl) * maxncomps, -1);
for (int p=0; p<nprocs; ++p) {
for (int rl=minrl; rl<maxrl; ++rl) {
@@ -756,7 +755,7 @@ namespace CarpetInterp {
// Transfer output patches back
- for (comm_state<dim> state; !state.done(); state.step()) {
+ for (comm_state state; !state.done(); state.step()) {
for (int p=0; p<nprocs; ++p) {
for (int rl=minrl; rl<maxrl; ++rl) {
for (int c=0; c<vhh.at(m)->components(rl); ++c) {