diff options
author | Erik Schnetter <schnetter@gmail.com> | 2012-02-25 11:01:40 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:23:06 +0100 |
commit | 487280c1b638d05f4bbc2bc41c81d1fdb424cd4d (patch) | |
tree | d4ea7557f7cd42f74ce6f7a92b906e6401c69c97 /Carpet/CarpetIOASCII | |
parent | ae44c5e6d86a65cce382e313e2a10b214e9645da (diff) |
CarpetLib: Change API to obtain pointer to grid function data
Change the API to obtain a pointer to grid function data:
- Use a function "typed_data_pointer" instead of overloading the ()
operator (because this looks nicer)
- Don't use a virtual function (because this isn't needed)
- Update all uses
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index fcd217d9a..cb29249df 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -605,7 +605,7 @@ namespace CarpetIOASCII { if (dist::rank() == proc) { const ggf* const ff = arrdata.at(group).at(m).data.at(n + n_min); - datas.at(n) = (*ff) (tl, rl, lc, ml); + datas.at(n) = ff->data_pointer (tl, rl, lc, ml); } else { datas.at(n) = NULL; } @@ -1375,7 +1375,7 @@ namespace CarpetIOASCII { const vect<int,outdim> str = gfext.stride()[dirs]; const bbox<int,outdim> ext(lo,up,str); - // Check whether the output origin is contained in the extent of + // check whether the output origin is contained in the extent of // the data that should be output ivect org1(org); for (int d=0; d<outdim; ++d) org1[dirs[d]] = ext.lower()[d]; @@ -1428,10 +1428,10 @@ namespace CarpetIOASCII { const gdata* gfdata = gfdatas.at(n); os << (n==0 ? "\t" : " "); switch (specific_cactus_type(vartype)) { -#define TYPECASE(N,T) \ - case N: \ - os << (*(const data<T>*)gfdata)[index]; \ - break; +#define TYPECASE(N,T) \ + case N: \ + os << (*(const data<T>*)gfdata)[index]; \ + break; #include "typecase.hh" #undef TYPECASE default: |