On 05/26/2016 05:58 AM, Denis Davydov wrote:

Before starting writing the wrappers, i think we should have some tests for
export strategy.
I would say the python preprocessor (leave along GUI for now) for mesh
generation should work with normal triangulation (no MPI).
Then, the user C++ code should be able to read the output together with
hanging nodes either to dealii::Triangulation or
dealii::p::d::Triangulation in case of MPI run.

Doing something like GridOut.write_msh() and GridOut.read_msh() will not work
as information about hanging nodes
will not be read in correctly.

As far as i understand it is also not possible to do Triangulation< dim,
spacedim >::save()     and then
parallel::distributed::Triangulation< dim, spacedim >::load() .

We could of course have different python wrappers for the two classes, but
then the question is if one can
save() p::d::Tria with a single MPI core run (from python wrappers) and then
read it in in C++ code with an arbitrary number of MPI cores?

My suggestion would be to invent a file format that matches what you want to do. The meshes you create this way are likely going to be relatively small, so they should fit into a regular ::Triangulation.

One way such triangulations could be stored is by storing the coarse grid in any of the existing formats, and then essentially only store the refinement flags for each refinement step. Take a look at the PersistentTriangulation class, for example.

As for the p::d::Triangulation: I think the best way to make that happen is to have a function p::d::Triangulation::copy_triangulation that copies from a regular triangulation. This way, the wrappers don't have to deal with the parallel class at all, only the regular triangulation. Writing this copy_triangulation function is not entirely trivial (you basically have to walk the hierarchical tree formed by the mesh) but that can be a second step. I have an algorithm in mind that I'd be happy to share, but that can be a second step you won't need to figure out right away.

Cheers
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth               email:            [email protected]
                                www: http://www.math.tamu.edu/~bangerth/

--
You received this message because you are subscribed to the Google Groups "deal.II 
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to