From: Wolfgang Bangerth Date: Thu, 18 Aug 2016 20:50:49 +0000 (-0600) Subject: Rename a member variable. X-Git-Tag: v8.5.0-rc1~752^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d37afade8048f6f71796d1d6e78071be5f969d7;p=dealii.git Rename a member variable. --- diff --git a/include/deal.II/grid/cell_id.h b/include/deal.II/grid/cell_id.h index 8b88ee563a..11e092454a 100644 --- a/include/deal.II/grid/cell_id.h +++ b/include/deal.II/grid/cell_id.h @@ -108,7 +108,7 @@ private: * refinement level to the next, starting with the coarse cell, * until we get to the cell represented by the current object. */ - std::vector id; + std::vector child_indices; friend std::istream &operator>> (std::istream &is, CellId &cid); friend std::ostream &operator<< (std::ostream &os, const CellId &cid); @@ -124,9 +124,9 @@ inline std::ostream &operator<< (std::ostream &os, const CellId &cid) { - os << cid.coarse_cell_id << '_' << cid.id.size() << ':'; - for (unsigned int i=0; i(cid.id[i]); + os << cid.coarse_cell_id << '_' << cid.child_indices.size() << ':'; + for (unsigned int i=0; i(cid.child_indices[i]); return os; } @@ -154,11 +154,11 @@ std::istream &operator>> (std::istream &is, Assert(dummy==':', ExcMessage("invalid CellId")); char value; - cid.id.clear(); + cid.child_indices.clear(); for (unsigned int i=0; i> value; - cid.id.push_back(value-'0'); + cid.child_indices.push_back(value-'0'); } return is; } @@ -169,7 +169,7 @@ CellId::CellId(const unsigned int coarse_cell_id, const std::vector &id) : coarse_cell_id(coarse_cell_id), - id(id) + child_indices(id) {} @@ -186,7 +186,7 @@ CellId::operator== (const CellId &other) const { if (this->coarse_cell_id != other.coarse_cell_id) return false; - return id == other.id; + return child_indices == other.child_indices; } @@ -206,18 +206,18 @@ bool CellId::operator<(const CellId &other) const return this->coarse_cell_id < other.coarse_cell_id; unsigned int idx = 0; - while (idx < id.size()) + while (idx < child_indices.size()) { - if (idx>=other.id.size()) + if (idx>=other.child_indices.size()) return false; - if (id[idx] != other.id[idx]) - return id[idx] < other.id[idx]; + if (child_indices[idx] != other.child_indices[idx]) + return child_indices[idx] < other.child_indices[idx]; ++idx; } - if (id.size() == other.id.size()) + if (child_indices.size() == other.child_indices.size()) return false; return true; // other.id is longer } diff --git a/source/grid/cell_id.cc b/source/grid/cell_id.cc index 880be816ed..b50878c0b3 100644 --- a/source/grid/cell_id.cc +++ b/source/grid/cell_id.cc @@ -35,8 +35,8 @@ CellId::to_cell(const Triangulation &tria) const { typename Triangulation::cell_iterator cell (&tria,0,coarse_cell_id); - for (unsigned int i = 0; i < id.size(); ++i) - cell = cell->child(static_cast (id[i])); + for (unsigned int i = 0; i < child_indices.size(); ++i) + cell = cell->child(static_cast (child_indices[i])); return cell; }