aboutsummaryrefslogtreecommitdiff
path: root/src/patch/grid.hh
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-07-13 16:09:17 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-07-13 16:09:17 +0000
commit163329911a42bfadd4c68c86130238b36c753037 (patch)
tree973cdcf25d1ee5dd320a40254f7735fd8806fe9b /src/patch/grid.hh
parentcae1d07373546b8e49f20a5e40f1540065133c12 (diff)
allow gfn to be non-0-origin
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@137 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/grid.hh')
-rw-r--r--src/patch/grid.hh13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/patch/grid.hh b/src/patch/grid.hh
index 8fbeca7..b697b41 100644
--- a/src/patch/grid.hh
+++ b/src/patch/grid.hh
@@ -96,7 +96,10 @@ public:
// ***** gfn-checking and gridfn access functions *****
//
- int N_gridfns() const { return N_gridfns_; }
+ int min_gfn() const { return min_gfn_; }
+ int max_gfn() const { return max_gfn_; }
+ int N_gridfns() const
+ { return jtutil::how_many_in_range(min_gfn(), max_gfn()); }
// access to gridfn data
// ... rvalue (may be slightly faster since it's a const function
@@ -265,7 +268,7 @@ public:
// ***** constructor, destructor *****
//
grid_arrays(const grid_array_pars& grid_array_pars_in,
- int N_gridfns_in);
+ int min_gfn_in, int max_gfn_in);
// compiler-generated default destructor is ok
private:
@@ -283,8 +286,8 @@ private:
// ==> possibly slightly faster access (0 offset from pointer)
array3d<fp> gridfn_data_; // indices are (gfn, irho, isigma)
- // number of gridfns
- const int N_gridfns_;
+ // gfn bounds
+ const int min_gfn_, max_gfn_;
// nominal grid min/max bounds
const int min_irho_, max_irho_;
@@ -463,7 +466,7 @@ public:
//
grid(const grid_array_pars& grid_array_pars_in,
const grid_pars& grid_pars_in,
- int N_gridfns_in);
+ int min_gfn_in, int max_gfn_in);
// compiler-generated default destructor is ok
private: