From fd6ff28c940a1e518fcea73fa1d16e1ca1a24852 Mon Sep 17 00:00:00 2001 From: Wenjuan Zhang Date: Thu, 8 Aug 2019 11:21:36 -0600 Subject: [PATCH] Add extension to step2 --- examples/step-2/doc/results.dox | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/examples/step-2/doc/results.dox b/examples/step-2/doc/results.dox index 99d18e512b..9b8ce55bdb 100644 --- a/examples/step-2/doc/results.dox +++ b/examples/step-2/doc/results.dox @@ -73,3 +73,30 @@ Terminal type set to 'x11' gnuplot> set style data points gnuplot> plot "sparsity_pattern.1" @endcode + +Another practice based on +GNUPLOT 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 > support_points; + DoFTools::map_dofs_to_support_points (MappingQ1(), + 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. -- 2.39.5