]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make definition of function conditional on whether we want to color
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Sep 2003 23:33:37 +0000 (23:33 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Sep 2003 23:33:37 +0000 (23:33 +0000)
lines or not.

git-svn-id: https://svn.dealii.org/trunk@7972 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_out.cc

index 9c23fcb1adc799592ca383e183aac648d2b68e94..322f7054ad3b8775de4c4f82fe8d72bf6dd6de3a 100644 (file)
@@ -1019,13 +1019,12 @@ void GridOut::write_eps (const Triangulation<dim> &tria,
                                       // coloring; level 0 is black,
                                       // other levels are blue
                                       // ... red
-      double levelscale  = 0.66666/std::max(1U,(max_level-1));
-      
-      out  << "/l  { neg "
-          << (max_level)
-          << " add "
-          << levelscale
-          << " mul 1 0.8 sethsbcolor} def" << std::endl;
+      if (eps_flags_base.color_lines_level)
+       out  << "/l  { neg "
+            << (max_level)
+            << " add "
+            << (0.66666/std::max(1U,(max_level-1)))
+            << " mul 1 0.8 sethsbcolor} def" << std::endl;
 
                                       // in 2d, we can also plot cell
                                       // and vertex numbers, but this
@@ -1066,7 +1065,7 @@ void GridOut::write_eps (const Triangulation<dim> &tria,
   
   for (LineList::const_iterator line=line_list.begin();
        line!=line_list.end(); ++line)
-    if (eps_flags_base.color_lines_level && line-> level > 0)
+    if (eps_flags_base.color_lines_level && (line->level > 0))
                                       // lines colored according to
                                       // refinement level,
                                       // contributed by Jörg

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.