Thanks a lot,
That solved the issue!

I really appreciate your help.

For future readers, here is the correct call to build_patches():
data_out.build_patches(mapping, 5, DataOut<2,2>::CurvedCellRegion
::curved_inner_cells);

Best regards,
Matteo Malvestiti
Il giorno domenica 26 gennaio 2025 alle 11:10:37 UTC+1 peterr...@gmail.com 
ha scritto:

> Hi Matteo,
>
> it is probably only the output. DataOut::build_patches() has an additional 
> parameter that specifies the curved region (
> https://www.dealii.org/developer/doxygen/deal.II/classDataOut.html#a1303b5d99f10f3fae984e7d406cfeb37).
>  
> Select CurvedCellRegion::curved_inner_cells. 
>
> Best,
> Peter
>
> On Sunday, 26 January 2025 at 11:06:34 UTC+1 Matteo Malvestiti wrote:
>
>> Good morning,
>> I've been following the instructions on step-38 to use curved elements.
>> Problem is: only the elements at the boundary get curved (see attached 
>> photo).
>>
>> Here is a simple test program:
>>
>> // Mesh
>> const std::string filename = "../mesh.msh";
>> std::ifstream input_file(filename);
>> Triangulation<2,2> triangulation;
>> GridIn<2> grid_in;
>> grid_in.attach_triangulation(triangulation);
>> grid_in.read_msh(input_file);
>>
>> //Manifold
>> const Point<2> center(0.0, 0.0);
>> SphericalManifold<2,2> circular_manifold(center);
>> triangulation.reset_all_manifolds();
>> triangulation.set_all_manifold_ids(0);
>> triangulation.set_manifold (0, circular_manifold);
>>
>> // DoFHandler, Mapping, and FE
>> DoFHandler<2,2> dof_handler(triangulation);
>> MappingQ<2,2> mapping(2);
>> const FE_Q<2,2> fe(1);
>> dof_handler.distribute_dofs(fe);
>>
>> // Output
>> DataOut<2> data_out;
>> data_out.attach_dof_handler(dof_handler);
>> data_out.build_patches(mapping, 5);
>> std::ofstream out("output_mesh.vtu");
>> data_out.write(out, DataOutBase::vtu);
>>
>> I'm surely doing something wrong, any hint?
>>
>> I leave a zip file attached with all the necessary to compile and run 
>> this snippet of code.
>>
>>

-- 
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 visit 
https://groups.google.com/d/msgid/dealii/83ce2e9f-725d-43c0-b724-42ad6bb0aed3n%40googlegroups.com.

Reply via email to