From: Wolfgang Bangerth Date: Thu, 18 Aug 2016 21:07:07 +0000 (-0600) Subject: Better document what happens when in/outputting CellId objects. X-Git-Tag: v8.5.0-rc1~752^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48ee763e51fc37cac4c145cfc653cb7698f685c8;p=dealii.git Better document what happens when in/outputting CellId objects. --- 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'); }