]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
avoid calling subdomain_id() for inactive cells
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Jun 2013 10:40:24 +0000 (10:40 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Jun 2013 10:40:24 +0000 (10:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@29869 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/grid/grid_out.cc

index 57169eaae279d04de4009b8d5f4c0ca81dd4adb7..c5f23b65bd798ddf16d23266109d2164be150c8e 100644 (file)
@@ -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<int>(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<int>(cell->subdomain_id());
+                 else
+                   out << 'X';
                 }
 
              if(svg_flags.label_level_subdomain_id)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.