aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/gdata.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-01-12 20:58:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-01-12 20:58:00 +0000
commitc23315efb5b4fea80c92f747173e47a7d29d644d (patch)
treed56de98cca60845ae083fe3d397843dda6102160 /Carpet/CarpetLib/src/gdata.cc
parent3c4993dd3e36426d62cbf8e574cba9ec6cf2ec89 (diff)
CarpetLib: Reorganise prolongation and restriction operators
Reorganise prolongation and restriction operators. This is a major implementation change. Most operators are now written as C++ templates instead of as Fortran 77 code. This simplifies the code, since C++ routines can be called more easily, and they also have access to CarpetLib's high-level data structures. Previously, the operators combined temporal and spatial interpolation. Now, time interpolation and space interpolation are handled separately. This may be less efficient, but simplifies the code significantly, since there are now N+M instead of N*M routines, for N time interpolation and M space interpolation methods. Remove the minmod prolongation operator, which was previously disabled. Add support for cell centering, using a method described by Simon Hern, and suggested for Carpet by Ian Hawke. darcs-hash:20070112205812-dae7b-5329795aa698e7bbc3671b1504134885dd830238.gz
Diffstat (limited to 'Carpet/CarpetLib/src/gdata.cc')
-rw-r--r--Carpet/CarpetLib/src/gdata.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc
index f275ef02a..207cc2624 100644
--- a/Carpet/CarpetLib/src/gdata.cc
+++ b/Carpet/CarpetLib/src/gdata.cc
@@ -38,9 +38,11 @@ static int nexttag ()
// Constructors
gdata::gdata (const int varindex_,
+ const centering cent_,
const operator_type transport_operator_,
const int tag_)
: varindex(varindex_),
+ cent(cent_),
transport_operator(transport_operator_),
_has_storage(false),
comm_active(false),
@@ -483,7 +485,7 @@ void gdata
int typesize;
MPI_Type_size (b->datatype(), & typesize);
- gdata * tmp = src->make_typed (varindex, transport_operator, tag);
+ gdata * tmp = src->make_typed (varindex, cent, transport_operator, tag);
tmp->allocate (box, src->proc(), b->pointer());
tmp->interpolate_from_innerloop (srcs, times, box, time,
order_space, order_time);
@@ -531,7 +533,7 @@ void gdata
assert (fillstate <= (int)procbuf.sendbufsize * datatypesize);
// interpolate this processor's data into the send buffer
- gdata* tmp = src->make_typed (varindex, transport_operator, tag);
+ gdata* tmp = src->make_typed (varindex, cent, transport_operator, tag);
tmp->allocate (box, src->proc(), procbuf.sendbuf);
tmp->interpolate_from_innerloop (srcs, times, box, time,
order_space, order_time);