]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Improve graphical output.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Apr 2012 17:29:52 +0000 (17:29 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Apr 2012 17:29:52 +0000 (17:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@25366 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-42/step-42.cc

index fdf86e235415156e762f7ae8b21035895320bb22..546ff289343804f87282d05429b2ca9f337b3d9e 100644 (file)
@@ -4,7 +4,7 @@
 
 /*    $Id$       */
 /*                                                                */
-/*    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors */
+/*    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyrightG and license information. Please refer     */
@@ -1200,9 +1200,18 @@ void Step4<dim>::output_results (const std::string& title) const
 
   data_out.attach_dof_handler (dof_handler);
 
-  data_out.add_data_vector (solution, "Displacement");
-  data_out.add_data_vector (lambda, "Residual");
-  data_out.add_data_vector (active_set, "ActiveSet");
+  const std::vector<DataComponentInterpretation::DataComponentInterpretation>
+    data_component_interpretation
+    (dim, DataComponentInterpretation::component_is_part_of_vector);
+  data_out.add_data_vector (solution, std::vector<std::string>(dim, "Displacement"),
+                           DataOut<dim>::type_dof_data,
+                           data_component_interpretation);
+  data_out.add_data_vector (lambda, std::vector<std::string>(dim, "Residual"),
+                           DataOut<dim>::type_dof_data,
+                           data_component_interpretation);
+  data_out.add_data_vector (active_set, std::vector<std::string>(dim, "ActiveSet"),
+                           DataOut<dim>::type_dof_data,
+                           data_component_interpretation);
 
   Vector<float> subdomain (triangulation.n_active_cells());
   for (unsigned int i=0; i<subdomain.size(); ++i)

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.