17#include <dune/grid/uggrid/uggridfactory.hh>
21#include <dune/alugrid/3d/gridfactory.hh>
35 struct FactoryGenerator
37 using Factory = Dune::GridFactory<Grid>;
39 static Factory createFactory(
unsigned int =0)
46 struct BoundarySegmentIndexWrapper
48 template <
class Factory,
class VertexVector,
class BoundaryVector,
class TmpIdVector,
class IdVector>
49 static void readBoundarySegmentIndices(Grid
const& grid,
Factory const& factory, VertexVector
const& vertices, BoundaryVector
const& boundary, TmpIdVector
const& boundaryIdsFromFile, IdVector& boundaryIds)
51 boundaryIds.resize(boundaryIdsFromFile.size());
52 for (
auto const& cell : elements(grid.leafGridView()))
53 for (
auto const& intersection : intersections(grid.leafGridView(), cell))
54 if (intersection.boundary())
55 boundaryIds[intersection.boundarySegmentIndex()]
56 = boundaryIdsFromFile[factory.insertionIndex(intersection)][0];