From 48ee763e51fc37cac4c145cfc653cb7698f685c8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 18 Aug 2016 15:07:07 -0600 Subject: [PATCH] Better document what happens when in/outputting CellId objects. --- include/deal.II/grid/cell_id.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/deal.II/grid/cell_id.h b/include/deal.II/grid/cell_id.h index 11e092454a..a4bce635b7 100644 --- a/include/deal.II/grid/cell_id.h +++ b/include/deal.II/grid/cell_id.h @@ -126,7 +126,11 @@ std::ostream &operator<< (std::ostream &os, { os << cid.coarse_cell_id << '_' << cid.child_indices.size() << ':'; for (unsigned int i=0; i(cid.child_indices[i]); + // write the child indices. because they are between 0 and 2^dim-1, they all + // just have one digit, so we could write them as integers. it's + // probably clearer to write them as one-digit characters starting + // at '0' + os << static_cast(cid.child_indices[i] + '0'); return os; } @@ -157,6 +161,8 @@ std::istream &operator>> (std::istream &is, cid.child_indices.clear(); for (unsigned int i=0; i> value; cid.child_indices.push_back(value-'0'); } -- 2.39.5