From: Guido Kanschat Date: Mon, 24 Jun 2013 10:40:24 +0000 (+0000) Subject: avoid calling subdomain_id() for inactive cells X-Git-Tag: v8.0.0~249 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f84693639553e7e58c9cc07619eb62d72248167;p=dealii.git avoid calling subdomain_id() for inactive cells git-svn-id: https://svn.dealii.org/trunk@29869 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/grid/grid_out.cc b/deal.II/source/grid/grid_out.cc index 57169eaae2..c5f23b65bd 100644 --- a/deal.II/source/grid/grid_out.cc +++ b/deal.II/source/grid/grid_out.cc @@ -1847,7 +1847,10 @@ void GridOut::write_svg(const Triangulation<2,2> &tria, std::ostream &out) const out << (unsigned int)cell->level(); break; case GridOutFlags::Svg::subdomain_id: - out << cell->subdomain_id() + 2; + if (cell->active()) + out << cell->subdomain_id() + 2; + else + out << 'X'; break; case GridOutFlags::Svg::level_subdomain_id: out << cell->level_subdomain_id() + 2; @@ -1959,8 +1962,14 @@ void GridOut::write_svg(const Triangulation<2,2> &tria, std::ostream &out) const if (svg_flags.label_subdomain_id) { - if (svg_flags.label_level_number || svg_flags.label_cell_index || svg_flags.label_material_id) out << ','; - out << static_cast(cell->subdomain_id()); + if (svg_flags.label_level_number + || svg_flags.label_cell_index + || svg_flags.label_material_id) + out << ','; + if (cell->active()) + out << static_cast(cell->subdomain_id()); + else + out << 'X'; } if(svg_flags.label_level_subdomain_id)