]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Change the defaults for GridOut::write_svg.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 6 Aug 2019 02:13:52 +0000 (20:13 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Aug 2019 22:10:13 +0000 (16:10 -0600)
include/deal.II/grid/grid_out.h
tests/grid/get_finest_common_cells_04.cc
tests/grid/grid_out_svg_01.cc
tests/grid/grid_out_svg_02.cc

index 89b053a906454ab3cd1b44debf0497df807962e7..f708ecc00493fdae69f3792fba2b6b721c697c21 100644 (file)
@@ -819,12 +819,12 @@ namespace GridOutFlags
         const int          polar_angle                    = 0,
         const Coloring     coloring                       = level_number,
         const bool         convert_level_number_to_height = false,
-        const bool         label_level_number             = true,
-        const bool         label_cell_index               = true,
+        const bool         label_level_number             = false,
+        const bool         label_cell_index               = false,
         const bool         label_material_id              = false,
         const bool         label_subdomain_id             = false,
-        const bool         draw_colorbar                  = true,
-        const bool         draw_legend                    = true);
+        const bool         draw_colorbar                  = false,
+        const bool         draw_legend                    = false);
   };
 
   /**
index cab08b18c5558614ae752b81f74b4db0478116b9..fb750f37ad33ed74c5bc199061e1a0549643c1c4 100644 (file)
@@ -58,8 +58,10 @@ test()
       std::string tria_1_out =
         "tria-1-" + std::to_string(Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)) + ".svg";
       std::ofstream tria_1_out_stream(tria_1_out);
-      GridOut().write_svg(tria_0, tria_0_out_stream);
-      GridOut().write_svg(tria_1, tria_1_out_stream);
+      GridOut go;
+      go.set_flags (GridOutFlags::Svg(2, 4, true, GridOutFlags::Svg::white, 0, 0, GridOutFlags::Svg::level_number, false, true, true));
+      go.write_svg(tria_0, tria_0_out_stream);
+      go.write_svg(tria_1, tria_1_out_stream);
     }
 
   deallog << "tria 0 cells:" << std::endl;
index 8360f7d36cddcf8e083eb84da67b8d8928a8a50b..1742b975b8dd525e7a6daf7ef7de3f88cdf0fa40 100644 (file)
@@ -73,9 +73,13 @@ main()
   GridOut           grid_out;
   GridOutFlags::Svg svg_flags;
 
-  svg_flags.coloring          = GridOutFlags::Svg::level_number;
-  svg_flags.label_material_id = true;
-  svg_flags.background        = GridOutFlags::Svg::transparent;
+  svg_flags.coloring           = GridOutFlags::Svg::level_number;
+  svg_flags.label_material_id  = true;
+  svg_flags.background         = GridOutFlags::Svg::transparent;
+  svg_flags.label_level_number = true;
+  svg_flags.label_cell_index   = true;
+  svg_flags.draw_legend        = true;
+  svg_flags.draw_colorbar      = true;
 
   grid_out.set_flags(svg_flags);
   grid_out.write_svg(create_grid(), deallog.get_file_stream());
index 632120fb5893c8e569ec842560b6cb28057ea4db..3e719b2ffbdebe20d277b680048efc1233617440 100644 (file)
@@ -86,6 +86,11 @@ main()
   svg_flags.level_height_factor            = .5;
   svg_flags.height                         = 0;
   svg_flags.width                          = 2000;
+  svg_flags.label_level_number             = true;
+  svg_flags.label_cell_index               = true;
+  svg_flags.draw_legend                    = true;
+  svg_flags.draw_colorbar                  = true;
+
   grid_out.set_flags(svg_flags);
   grid_out.write_svg(create_grid(), deallog.get_file_stream());
 

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.