On 04/17/2017 08:37 AM, Alberto Salvadori wrote:
Thanks Wolfgang.
What you surmised is exactly what it is happening, see the error message below.
I have no run-time errors in running this code
conststd::vector<DataComponentInterpretation::DataComponentInterpretation>
data_component_interpretation(dim+2,
DataComponentInterpretation::component_is_part_of_vector);
data_out.add_data_vector(system_solution,
std::vector<std::string> (dim+2, "displacement"),
DataOut<dim>::type_dof_data,
data_component_interpretation);
but I believe it is not what I want. I suppose that the data_out contains now
4 components for each node, two displacements, plus pressure and dilatation.
I'd love to export displacements
and the other two separately, but I am not sure how to achieve this. Doing this:
data_out.add_data_vector(system_solution,
std::vector<std::string> (dim, "displacement"),
DataOut<dim>::type_dof_data,
data_component_interpretation);
provides an run-time error, which makes sense.
Just provide the missing components to the data_out_interpretation -- take a
look at step-22 how this looks like.
Why do you want to output things separately? Why not have everything in one
output file? (It's possible to extract individual components using a
DataPostprocessor, but I don't usually understand why one would want to do that.)
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.