Malhar,

the template arguments for DataOut are dim and DoFHandlerType where
DoFHandlerType defaults to DoFHandler<dim>
since you are using a DoFHandler<2, 3> object you need to specify the
second template argument explicitly, i.e.

DataOut<2, DoFHandler<2,3>> data_out;

You could have a look at step-38.

Best,
Daniel

Am Di., 22. Sept. 2020 um 01:37 Uhr schrieb Malhar T. <
malhar.ti...@gmail.com>:

> Hello All,
> I hope you are doing well !
>
> I am working on a surface patch in 3D (dim=2 & spacedim=3 and developed
> using ChartManifold<2,3> by following code similar to step-53
> <https://www.dealii.org/current/doxygen/deal.II/step_53.html>) and I
> would like to output the results into a vtk file. I am mostly following
> tutorials, as I am not really great with C++. So, initially I used the
> class DataOut and tried to specify the geometry using attach_dof_handler.
>
> This is how its defined,
>
> Triangulation<2, 3> triangulation;
> DoFHandler<2, 3>    dof_handler;
>
> And output_results function was written as
>
> {
> DataOut<dim> data_out;
> data_out.attach_dof_handler(dof_handler);
> }
>
> But I got the error
>
>
> error: cannot convert ‘const dealii::DoFHandler<2, 3>’ to ‘const 
> dealii::DoFHandler<2, 2>&’
> note:   initializing argument 1 of ‘void 
> dealii::DataOut_DoFData<DoFHandlerType, patch_dim, 
> patch_space_dim>::attach_dof_handler(const DoFHandlerType&) [with 
> DoFHandlerType = dealii::DoFHandler<2, 2>; int patch_dim = 2; int 
> patch_space_dim = 2]’
>
> I tried searching in the forum and came to know about DataOutFaces
> (through this post
> <https://groups.google.com/g/dealii/c/B6q1FzxY1lE/m/c0bBi096AQAJ>), and I
> also looked at the step-61
> <https://www.dealii.org/developer/doxygen/deal.II/step_61.html#WGDarcyEquationoutput_results>
> tutorial on its implementation, but I got the same error again. I have a
> feeling that I am not understanding something very trivial, thus, any
> pointers would be really helpful.
>
> Thank You.
>
>
> I tried searching in the forum and came to know about DataOutFaces
> (through this post)
> <https://groups.google.com/g/dealii/c/B6q1FzxY1lE/m/c0bBi096AQAJ>, and I
> also looked at the step-61
> <https://www.dealii.org/developer/doxygen/deal.II/step_61.html#WGDarcyEquationoutput_results>
> tutorial on its implementation, but I got the same error again. I have a
> feeling that I am not understanding something very trivial, any pointers
> would be helpful. Thank You.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/7e032f3f-2957-4235-9f32-df8858a2c575n%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/7e032f3f-2957-4235-9f32-df8858a2c575n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWb%2Be3gw%2BaxNgw9ogx6CMvB0uzJM21pTEKRb7YP4-0807iw%40mail.gmail.com.

Reply via email to