>
> Is it possible to output the magnitude of displacements and its components 
> all together?
>
> std::vector<DataComponentInterpretation::DataComponentInterpretation> 
> data_component_interpretation(dim, DataComponentInterpretation::
> component_is_part_of_vector);
>
> The above allows me to output the displacements as a vector field and 
> shows one variable containing the magnitude of displacements.
>
> std::vector<DataComponentInterpretation::DataComponentInterpretation> 
> data_component_interpretation(dim, DataComponentInterpretation::
> component_is_scalar);
>
> Hence, this one enables the output of each component separately, e.g. 
> displacement_x (delta_x) according to step-18.
>
> What I want is to have all in one, such as:
>
> displacement_x
> displacement_y
> displacement_z
> displacement_magnitude
>
> Is that possible?
>
There are multiple ways to achieve that. The easiest one would probably be 
to create multiple output data vectors by calling multiple times 
DataOut::add_data_vector, i.e.

std::vector<DataComponentInterpretation::DataComponentInterpretation>data_component_interpretation_vector
 (dim, 
DataComponentInterpretation::component_is_part_of_vector);
std::vector<DataComponentInterpretation::DataComponentInterpretation>data_component_interpretation_scalars
 (dim, 
DataComponentInterpretation::component_is_scalar);
data_out.add_data_vector (solution, 
solution_names_scalars, DataOut<dim>::type_dof_data, 
data_component_interpretation_scalars);
data_out.add_data_vector (solution, 
solution_names_vector, DataOut<dim>::type_dof_data, 
data_component_interpretation_vector);
 

> I am using VisIt 2.11.0.
>
I am not too familiar with Visit but in Paraview you can use the filter 
"Calculator" to store individual components or the magnitude in a new 
visualization object without changing your code.

If you are just interested in the magnitude without storing the solution 
vector separately, you could also compute the magnitude vector via 
DataPostprocessor[1].

Best,
Daniel

[1] https://www.dealii.org/8.4.0/doxygen/deal.II/classDataPostprocessor.html

-- 
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.

Reply via email to