Thank you, Wolfgang.

Definitely I want to give it a try. Will let you know when I make progress
or encounter difficulties.

Best regards,
Ce

Wolfgang Bangerth <bange...@colostate.edu> 于2021年2月3日周三 下午1:06写道:

> On 2/2/21 7:57 PM, Ce Qin wrote:
> >
> > 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)?
>
> There might not be a function for it right now. But it seems not
> impossible to
> write a function (or, better, incorporate this into the existing
> copy_from()
> function). Want to give this a try?
>
> I think what would need to happen is that the
> p::d::T::copy_triangulation()
> function extracts the coarse mesh of the given triangulation and calls the
> copy_triangulation() function of the base class with it. It would then
> need to
> recursively walk through the original and the current triangulation and
> refine
> the current one based on whether a cell of the original triangulation was
> refined.
>
> I suspect that that could be done with 200 lines of code, and you'd end up
> with what you actually needed. I'd be happy to help along if you were
> interested in giving that a try!
>
> Best
>   W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth          email:                 bange...@colostate.edu
>                             www: http://www.math.colostate.edu/~bangerth/
>
> --
> 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/27e3b2c9-3929-b988-bc0e-a9c40f9f5697%40colostate.edu
> .
>

-- 
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%2Bg8s4ubQ0c_nzxCfEGtiKt7nVXDVNs%3DKyHr8hXkOC%3DBbJHuZA%40mail.gmail.com.

Reply via email to