aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/gh.hh
diff options
context:
space:
mode:
authorswhite <schnetter@cct.lsu.edu>2004-12-10 13:14:00 +0000
committerswhite <schnetter@cct.lsu.edu>2004-12-10 13:14:00 +0000
commit12fcc775ea386198b9d0f1c55f8e8b2be520dfac (patch)
treed8653c002cd40f07adf68a6623e10e230333072b /Carpet/CarpetLib/src/gh.hh
parent676fe3f15cb5f4c3c03467308504530beb876da3 (diff)
CarpetLib:gh exposed data clamp-down
Made all variables in CarpetLib:gh to be const or non-public, to avoid confusion and insanity. Toward this end, created four member accessors for gh: const rexts & extents() const const rbnds & outer_boundaries() const const rprocs & processors() const const vector<vector<ibbox> > & bases() const This involved a few changes in several files throughout the repository: M ./Carpet/Carpet/src/Initialise.cc -2 +2 M ./Carpet/Carpet/src/Recompose.cc -8 +8 M ./Carpet/Carpet/src/SetupGH.cc -2 +2 M ./Carpet/Carpet/src/modes.cc -3 +3 M ./Carpet/CarpetIOHDF5/src/Recover.cc -4 +4 M ./Carpet/CarpetInterp/src/interp.cc -5 +5 M ./Carpet/CarpetLib/src/dh.cc -3 +3 M ./Carpet/CarpetLib/src/gh.cc -33 +33 M ./Carpet/CarpetLib/src/gh.hh -10 +28 M ./Carpet/CarpetReduce/src/mask_carpet.cc -4 +4 M ./Carpet/CarpetRegrid/src/automatic.cc -2 +2 darcs-hash:20041210131459-32473-ff0835ff0e57f6693fbe1ec23b350d1b1d18e3bc.gz
Diffstat (limited to 'Carpet/CarpetLib/src/gh.hh')
-rw-r--r--Carpet/CarpetLib/src/gh.hh38
1 files changed, 28 insertions, 10 deletions
diff --git a/Carpet/CarpetLib/src/gh.hh b/Carpet/CarpetLib/src/gh.hh
index 0bad3540a..462564f5c 100644
--- a/Carpet/CarpetLib/src/gh.hh
+++ b/Carpet/CarpetLib/src/gh.hh
@@ -62,14 +62,15 @@ public: // should be readonly
const centering mgcent; // default (vertex or cell centered)
const ibbox baseextent;
- vector<vector<ibbox> > bases; // [rl][ml]
- // TODO: invent structure for this
- rexts extents; // extents of all grids
- rbnds outer_boundaries; // boundary descriptions of all grids
- rprocs processors; // processor numbers of all grids
private:
+ vector<vector<ibbox> > _bases; // [rl][ml]
+ // TODO: invent structure for this
+ rexts _extents; // extents of all grids
+ rbnds _outer_boundaries; // boundary descriptions of all grids
+ rprocs _processors; // processor numbers of all grids
+
list<th<D>*> ths; // list of all time hierarchies
list<dh<D>*> dhs; // list of all data hierarchies
@@ -87,26 +88,42 @@ public:
void recompose (const rexts& exts, const rbnds& outer_bounds,
const rprocs& procs,
const bool do_prolongate);
+
+ const rexts & extents() const {
+ return _extents;
+ }
+
+ const rbnds & outer_boundaries() const {
+ return _outer_boundaries;
+ }
+
+ const rprocs & processors() const {
+ return _processors;
+ }
+
+ const vector<vector<ibbox> > & bases() const {
+ return _bases;
+ }
// Accessors
int reflevels () const {
- return (int)extents.size();
+ return (int)_extents.size();
}
int components (const int rl) const {
- return (int)extents.at(rl).size();
+ return (int)_extents.at(rl).size();
}
int mglevels (const int rl, const int c) const {
- return (int)extents.at(rl).at(c).size();
+ return (int)_extents.at(rl).at(c).size();
}
bvect outer_boundary (const int rl, const int c) const {
- return outer_boundaries.at(rl).at(c);
+ return _outer_boundaries.at(rl).at(c);
}
int proc (const int rl, const int c) const {
- return processors.at(rl).at(c);
+ return _processors.at(rl).at(c);
}
bool is_local (const int rl, const int c) const {
@@ -137,6 +154,7 @@ private:
void calculate_base_extents_of_all_levels ();
void do_output_bboxes (ostream& os) const;
void do_output_bases (ostream& os) const;
+
};