Skip to content

Distributed boundary segments.

Robert K requested to merge feature/distributed-boundary-segments into master

This MR implements a missing feature in the grid interface, the possibility to distribute boundary segments during load balancing. This create a problem, because grid readers such as GmshReader only read grid on rank 0, and thus boundary segments only exist on that rank. So far there was not possibility to re-distribute these segments leading to false boundary projections in parallel computations. This MR implements this by providing a BoundarySegmentBackupRestore class that allows to re-create a boundary segment from a stringstream (char buffer). This requires the registry of a static function that can restore the correct object from the stream. The factory is necessary because of the type erasure when passing pointers of BoundarySegment to the GridFactory. This also means a slight interface change for GmshReader. The methods of GmshReader, such as GmshReader::read have to be called on all ranks, because the correct BoundarySegment factory methods have to be registered on all cores. As before reading is only done on core 0 which already was checked in GmshReader before. The other implementation concerns the DGF::ProjectionBlock where the boundary projections are now also distributable.

Testing has been done with a corresponding branch on dune-alugrid.

Edited by Robert K

Merge request reports