Real&Imaginary Step-29

15 views
Skip to first unread message

Muhammad Adil

unread,
Aug 20, 2019, 12:36:41 AM8/20/19
to deal.II User Group
Hi Everone,
In the tutorial step-29 of deal.II 8.3.0, the solution in paraview can be visualized as Real, Imaginary and Intensity.
Intensity is calculated manually in the tutorial and visualized but how paraview knows that solution ( u[i][0] and u[i][1] ) consits of two parts, one u[i][0] is real and the other u[i][1] is imaginary.
Because there is nothing in the mentioned in the code. Pleae anyone explain?

Adil

step-29 1.pngstep-29 3.pngstep-29 2.png

Bruno Turcksin

unread,
Aug 20, 2019, 9:13:55 AM8/20/19
to deal.II User Group
Adil,

If you look in the output_results section. You can see the following code:

std::vector<std::string> solution_names;
solution_names.emplace_back("Re_u");
solution_names.emplace_back("Im_u");
data_out.add_data_vector(solution, solution_names);

What happens is that the first component of solution is associated with Re_u and the second component with Im_u.

Best,

Bruno
Reply all
Reply to author
Forward
0 new messages