5#include <amdis/Boundary.hpp>
6#include <amdis/BoundaryManager.hpp>
7#include <amdis/ContextGeometry.hpp>
8#include <amdis/common/Concepts.hpp>
9#include <amdis/common/ConceptsBase.hpp>
25 using Domain =
typename IS::GlobalCoordinate;
28 using Intersection = IS;
32 : predicate_([](Intersection const& is) -> bool { return is.boundary(); })
38 : predicate_([boundaryManager, id](Intersection const& is) -> bool {
39 return is.boundary() && boundaryManager->boundaryId(is) == id;
46 :
BoundarySubset{Dune::stackobject_to_shared_ptr(boundaryManager), id}
53 : predicate_([predicate](Intersection const& is) -> bool {
54 return predicate(is.geometry().center());
61 return predicate_(is);
65 std::function<bool(Intersection
const&)> predicate_;
69 BoundarySubset(std::shared_ptr<BoundaryManager<Grid>>, BoundaryType)
70 -> BoundarySubset<typename Grid::LeafIntersection>;
73 BoundarySubset(BoundaryManager<Grid>&, BoundaryType)
74 -> BoundarySubset<typename Grid::LeafIntersection>;
78 struct Impl::ContextTagType<BoundarySubset<I>>
Manage boundary ids of boundary segments in a grid.
Definition: BoundaryManager.hpp:54
Class defining a subset of a domain boundary.
Definition: BoundarySubset.hpp:24
BoundarySubset()
Default constructor. Uses a predicate that returns true on the complete boundary.
Definition: BoundarySubset.hpp:31
BoundarySubset(std::shared_ptr< BoundaryManager< G > > const &boundaryManager, BoundaryType id)
Use a boundary manager and id to determine a subset.
Definition: BoundarySubset.hpp:37
BoundarySubset(BoundaryManager< G > &boundaryManager, BoundaryType id)
Use a boundary manager and id to determine a subset.
Definition: BoundarySubset.hpp:45
bool operator()(Intersection const &is) const
Return true if intersection is on boundary segment.
Definition: BoundarySubset.hpp:59
BoundarySubset(Predicate &&predicate)
Use a predicate of the form bool(GlobalCoordinate) to determine a subset.
Definition: BoundarySubset.hpp:52
constexpr bool Predicate
A predicate is a function that returns a boolean.
Definition: Concepts.hpp:141
constexpr bool Functor
A Functor is a function F with signature Signature.
Definition: Concepts.hpp:133