diff options
author | Erik Schnetter <schnetter@gmail.com> | 2012-02-25 11:01:40 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2012-02-25 11:01:40 -0500 |
commit | 71cbf4ac70c0805b9a23a45859f9469de94320e4 (patch) | |
tree | 9729460efda00c0e309c942dc9afb4a87e785c4d /Carpet/CarpetInterp2 | |
parent | 72747499026cf8e15b0fd2d8e6e0e6aebf6fe73f (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/CarpetInterp2')
-rw-r--r-- | Carpet/CarpetInterp2/src/fasterp.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Carpet/CarpetInterp2/src/fasterp.cc b/Carpet/CarpetInterp2/src/fasterp.cc index 9b8fd956b..ba46eec69 100644 --- a/Carpet/CarpetInterp2/src/fasterp.cc +++ b/Carpet/CarpetInterp2/src/fasterp.cc @@ -508,7 +508,7 @@ namespace CarpetInterp2 { fasterp_llocs_t local_locations (npoints); if (CCTK_IsFunctionAliased ("MultiPatch_GlobalToLocal")) { - // This is a muulti-patch simulation: convert global to local + // This is a multi-patch simulation: convert global to local // coordinates CCTK_REAL const * coords[dim]; @@ -1176,10 +1176,10 @@ namespace CarpetInterp2 { assert (gi >= 0); int const vi = varinds.AT(v) - CCTK_FirstVarIndexI (gi); assert (vi >= 0); - varptrs.AT(v) = - (CCTK_REAL const *) - (* Carpet::arrdata.AT(gi).AT(m).data.AT(vi)) - (tl, rl, lc, Carpet::mglevel)->storage(); + ggf const *const ff = Carpet::arrdata.AT(gi).AT(m).data.AT(vi); + void const *const ptr = + ff->data_pointer(tl, rl, lc, Carpet::mglevel)->storage(); + varptrs.AT(v) = (CCTK_REAL const *)ptr; assert (varptrs.AT(v)); } |