Thank you for your prompt response.

My use case can be described as follows
1) Create a triangulation in Python, refine some cells (several times)
2) Serialize the triangulation in to file using Triangulation::save
3) Load the triangulation from file using Triangulation::load
4) Reconstruct a parallel::distributed::Triangulation from the serial
Triangulation

So my question is how to reconstruct a
*parallel::distributed::Triangulation* from a *serial* Triangulation (with
hanging nodes, n_levels() greater than 2)?

Best regards,
Ce

Daniel Arndt <d.arndt.m...@gmail.com> 于2021年2月3日周三 上午12:10写道:

> Ce,
>
> There is also save_refine_flags
> <https://www.dealii.org/current/doxygen/deal.II/classTriangulation.html#aca5cfa9068a5d3ad32dfca87e2901a87>
> and load_refine_flags
> <https://www.dealii.org/current/doxygen/deal.II/classTriangulation.html#a43fc07c3f9e1f02658ca556f41087c85>
> but you need to make sure that smoothing flags are also the same as
> explained here
> <https://www.dealii.org/current/doxygen/deal.II/classTriangulation.html>
> in "History of a Triangulation".
> This is tested, e.g., in tests/mpi/interpolate_to_different_mesh_01.cc.
>
> Best
> Daniel
>
> Am Di., 2. Feb. 2021 um 10:59 Uhr schrieb Bruno Turcksin <
> bruno.turck...@gmail.com>:
>
>> Ce,
>>
>> If you don't have hanging nodes, you can flatten the triangulation (C++
>> <https://dealii.org/developer/doxygen/deal.II/namespaceGridGenerator.html#afe86bf1a4502131ec811a6de41ab41e9>,
>> python
>> <https://github.com/dealii/dealii/blob/master/contrib/python-bindings/notebooks/tutorial-1.ipynb>)
>> before saving the triangulation. This will create a new coarse mesh. The
>> other solution is to load the mesh from a vtu file (see here
>> <https://dealii.org/developer/doxygen/deal.II/classGridIn.html#aa80d89ec984220daf840b0a34e3d216d>).
>>
>>
>> Best,
>>
>> Bruno
>>
>> On Tuesday, February 2, 2021 at 9:03:00 AM UTC-5 qinc...@gmail.com wrote:
>>
>>> Dear all,
>>>
>>> I want to create a p::d::Triangulation from a locally refined
>>> Triangulation which is loaded from a file (for example, we can create a
>>> triangulation using the python interface, refine some cells, then save it
>>> to file). I am aware that we can't use copy_triangulation since the
>>> triangulation being copied must be a *coarse mesh*. Is there a way to
>>> achieve this? Any suggestion will be appreciated.
>>>
>>> Thanks.
>>>
>>> Best regards,
>>> Ce
>>>
>> --
>> 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/3f51912a-2e9d-47ae-bac1-70f0aade81dbn%40googlegroups.com
>> <https://groups.google.com/d/msgid/dealii/3f51912a-2e9d-47ae-bac1-70f0aade81dbn%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/CAOYDWbKYcpFMAK5aVSOTHbW-XPXZnL87ixCJwa5ENAx2O_NjqA%40mail.gmail.com
> <https://groups.google.com/d/msgid/dealii/CAOYDWbKYcpFMAK5aVSOTHbW-XPXZnL87ixCJwa5ENAx2O_NjqA%40mail.gmail.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/CA%2Bg8s4uynWB-CTCVRj2%2BFeBm5%3DxeG4qkURBwS%2BquDtT1w46_2w%40mail.gmail.com.

Reply via email to