diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-21 15:37:09 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-21 15:37:09 +0000 |
commit | 5b12400d8bc4717b3bf50dae8a5d0fe1252615a5 (patch) | |
tree | 9f15b4bcb37f4cfe894a5b0820dea59ac102d99f /src | |
parent | bac753cd888fe01972e5b6d422f020a04833d031 (diff) |
add functions to give low-level access to gridfn data arrays
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@546 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src')
-rw-r--r-- | src/patch/grid.hh | 16 | ||||
-rw-r--r-- | src/patch/patch_system.hh | 14 |
2 files changed, 27 insertions, 3 deletions
diff --git a/src/patch/grid.hh b/src/patch/grid.hh index a5cf316..8e553db 100644 --- a/src/patch/grid.hh +++ b/src/patch/grid.hh @@ -332,9 +332,9 @@ public: // // ***** gridfns ***** // - // ... all these functions (even the rvalue ones) must return - // references, to allow using gridfn(...) as the operand - // of a unary & (address-of) operator + // n.b. access to rvalue gridfn data must be via references + // in order to allow using gridfn(...) as the operand + // of a unary & (address-of) operator // public: // access to nominal-grid gridfn data @@ -404,6 +404,16 @@ public: : ghosted_isigma_stride(); } + // low-level access to data arrays (!!dangerous!!) + const fp* gridfn_data_array(int gfn) const + { return gridfn_data_->data_array(gfn); } + fp* gridfn_data_array(int gfn) + { return gridfn_data_->data_array(gfn); } + const fp* ghosted_gridfn_data_array(int ghosted_gfn) const + { return ghosted_gridfn_data_->data_array(ghosted_gfn); } + fp* ghosted_gridfn_data_array(int ghosted_gfn) + { return ghosted_gridfn_data_->data_array(ghosted_gfn); } + // // ***** argument structures for constructor et al ***** diff --git a/src/patch/patch_system.hh b/src/patch/patch_system.hh index 92da310..56ad76e 100644 --- a/src/patch/patch_system.hh +++ b/src/patch/patch_system.hh @@ -118,6 +118,20 @@ public: // + // ***** access to gridfns as 1-D arrays ***** + // +public: + const fp* gridfn_data(int gfn) const + { return ith_patch(0).gridfn_data_array(gfn); } + fp* gridfn_data(int gfn) + { return ith_patch(0).gridfn_data_array(gfn); } + const fp* ghosted_gridfn_data(int ghosted_gfn) const + { return ith_patch(0).ghosted_gridfn_data_array(ghosted_gfn); } + fp* ghosted_gridfn_data(int ghosted_gfn) + { return ith_patch(0).ghosted_gridfn_data_array(ghosted_gfn); } + + + // // ***** I/O ***** // public: |