From: bangerth Date: Mon, 2 Apr 2012 17:29:52 +0000 (+0000) Subject: Improve graphical output. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=325446a7e02f9bcfa46307ea433d7a1f14fbdf67;p=dealii-svn.git Improve graphical output. git-svn-id: https://svn.dealii.org/trunk@25366 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index fdf86e2354..546ff28934 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -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::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 + data_component_interpretation + (dim, DataComponentInterpretation::component_is_part_of_vector); + data_out.add_data_vector (solution, std::vector(dim, "Displacement"), + DataOut::type_dof_data, + data_component_interpretation); + data_out.add_data_vector (lambda, std::vector(dim, "Residual"), + DataOut::type_dof_data, + data_component_interpretation); + data_out.add_data_vector (active_set, std::vector(dim, "ActiveSet"), + DataOut::type_dof_data, + data_component_interpretation); Vector subdomain (triangulation.n_active_cells()); for (unsigned int i=0; i