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/CarpetInterp | |
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/CarpetInterp')
-rw-r--r-- | Carpet/CarpetInterp/src/interp.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc index 2a7a62fdb..864dd85d7 100644 --- a/Carpet/CarpetInterp/src/interp.cc +++ b/Carpet/CarpetInterp/src/interp.cc @@ -1706,9 +1706,10 @@ namespace CarpetInterp { int const gi = CCTK_GroupIndexFromVarI (vi); int const vi0 = CCTK_FirstVarIndexI (gi); - input_arrays[n] = - (*arrdata.AT(gi).AT(m).data.AT(vi-vi0))(my_tl, rl, lc, mglevel)-> - storage(); + ggf const *const ff = arrdata.AT(gi).AT(m).data.AT(vi-vi0); + void const *const ptr = + ff->data_pointer(my_tl, rl, lc, mglevel)->storage(); + input_arrays[n] = ptr; } } // for input arrays |