]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add extension to step2
authorWenjuan Zhang <wenjuan.zhang@ucdenver.edu>
Thu, 8 Aug 2019 17:21:36 +0000 (11:21 -0600)
committerWenjuan Zhang <wenjuan.zhang@ucdenver.edu>
Thu, 8 Aug 2019 17:21:36 +0000 (11:21 -0600)
examples/step-2/doc/results.dox

index 99d18e512b8c02416b7bbc5afe8941e9af03a295..9b8ce55bdb72c9659257eb2ba9ad870aa2018931 100644 (file)
@@ -73,3 +73,30 @@ Terminal type set to 'x11'
 gnuplot> set style data points
 gnuplot> plot "sparsity_pattern.1"
 @endcode
+
+Another practice based on
+<a href="http://www.gnuplot.info/">GNUPLOT</a> is trying to
+print out the mesh with locations and numbering of the support
+points where you need to include GridOut and MappingQ1 first.
+The code for this is:
+@code
+  std::ofstream out("gnuplot.gpl");
+  out << "plot '-' using 1:2 with lines, "
+      << "'-' with labels point pt 2 offset 1,1"
+      << std::endl;
+  GridOut().write_gnuplot (triangulation, out);
+  out << "e" << std::endl;
+  const int dim = 2;
+  std::map<types::global_dof_index, Point<dim> > support_points;
+  DoFTools::map_dofs_to_support_points (MappingQ1<dim>(),
+                                        dof_handler,
+                                        support_points);
+  DoFTools::write_gnuplot_dof_support_point_info(out,
+                                                 support_points);
+  out << "e" << std::endl;
+@endcode
+After run the code, we can get a file called gnuplot.gpl. To view this
+file, we can run the following code in the command line:
+@code
+gnuplot -p gnuplot.gpl
+@endcode.

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.