Dear all,
I unfortunately still need your help on this issue.
Goal: Re-import a serial adaptively refined triangulation on another (distributed) code
Saved mesh: has hanging nodes, has been refined with manifolds
External code: requires a distributed or fullydistribtued Triangulation
As suggested in the previous comment I read step-83 and implemented a checkpoint() in the A-project and a restart() in the B-project.
This works smoothly (at least across the same version of deal.II, and thf Boost, which is reasonable).
Problem now is: partitioning the Triangulation and maintaining the curved boundaries.
deal.II version: 9.5.0 or 9.5.1 (*)
Following the documentations of fullydistributed::Triangulation and GridTools this is what we do:
GridTools::partition_triangulation(Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD), tria_base);
const TriangulationDescription::Description<dim, dim> description =
TriangulationDescription::Utilities::create_description_from_triangulation(tria_base, MPI_COMM_WORLD);
tria_pft.create_triangulation(description);
dof_handler.reinit(tria_pft);
First of all this is necessary to prevent holes form appearing somehow:
// Force vertex repositioning:
tria_base.prepare_coarsening_and_refinement();
for (auto cell : tria_base.active_cell_iterators())
cell->clear_refine_flag(); // don't change the number of cells
tria_base.execute_coarsening_and_refinement();
But however there is the problem of the positing of the vertices, once placed thanks to the Manifold description, this is the result after partitioning:
(only 1 process being used for test purposes)
Any idea on how to solve this issue?
Are there other methods to export and reimport adaptively refined meshes on other projects?
Kind regards,
Matteo Malvestiti
(*) for a bug report on version 9.6.0 there is another issue open already, this post doesn't want to be a replica.