diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-02-13 18:37:32 -0600 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 16:45:27 +0000 |
commit | 90957740d78d290157f3866c798628bca387f577 (patch) | |
tree | 51bb110ec0141a26d76b0eda5dd211dcec16d8ca /Carpet | |
parent | 9fdfb2dfb4690d0867d36f77a2864443e11e3d4f (diff) |
CarpetLib: Introduce new virtual function new_typed_data
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.cc | 2 | ||||
-rw-r--r-- | Carpet/CarpetIOHDF5/src/OutputSlice.cc | 2 | ||||
-rw-r--r-- | Carpet/CarpetLib/src/gf.hh | 7 | ||||
-rw-r--r-- | Carpet/CarpetLib/src/ggf.hh | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index f120ddd2a..349c18e9b 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -619,7 +619,7 @@ namespace CarpetIOASCII { for (size_t n = 0; n < datas.size(); ++ n) { const ggf* const ff = arrdata.at(group).at(m).data.at(n + n_min); - tmpdatas.at(n) = ff->typed_data (tl, rl, c, ml); + tmpdatas.at(n) = ff->new_typed_data (); size_t const memsize = tmpdatas.at(n)->allocsize (data_ext, ioproc); void * const memptr = pool.alloc (memsize); diff --git a/Carpet/CarpetIOHDF5/src/OutputSlice.cc b/Carpet/CarpetIOHDF5/src/OutputSlice.cc index 09005e9a7..49e75d7c7 100644 --- a/Carpet/CarpetIOHDF5/src/OutputSlice.cc +++ b/Carpet/CarpetIOHDF5/src/OutputSlice.cc @@ -605,7 +605,7 @@ namespace CarpetIOHDF5 { for (size_t n = 0; n < datas.size(); ++ n) { const ggf* const ff = arrdata.at(group).at(m).data.at(n + n_min); - tmpdatas.at(n) = ff->typed_data (tl, rl, c, ml); + tmpdatas.at(n) = ff->new_typed_data (); size_t const memsize = tmpdatas.at(n)->allocsize (data_ext, ioproc); void * const memptr = pool.alloc (memsize); diff --git a/Carpet/CarpetLib/src/gf.hh b/Carpet/CarpetLib/src/gf.hh index be0a1bb94..5685f228f 100644 --- a/Carpet/CarpetLib/src/gf.hh +++ b/Carpet/CarpetLib/src/gf.hh @@ -58,6 +58,13 @@ public: vl); } + virtual gdata* new_typed_data () const + { + return new data<T>(this->varindex, + h.refcent, this->transport_operator, + 1, 0, NULL); + } + // Access to the data diff --git a/Carpet/CarpetLib/src/ggf.hh b/Carpet/CarpetLib/src/ggf.hh index f89a73ee0..43c5c2e93 100644 --- a/Carpet/CarpetLib/src/ggf.hh +++ b/Carpet/CarpetLib/src/ggf.hh @@ -147,6 +147,8 @@ public: virtual gdata* typed_data (int tl, int rl, int lc, int ml) const = 0; + virtual gdata* new_typed_data () const = 0; + protected: |