28 : mesh(mesh), _mshNodeSearcher(mshNodeSearcher)
48template <
typename CacheType,
typename GeometryType>
50 std::vector<CacheType*>& cached_elements,
51 std::function<GeometryType(CacheType
const&)> getCachedItem,
54 [[maybe_unused]]
bool const multiple_nodes_allowed)
56 if (
auto const it = find_if(cbegin(cached_elements), cend(cached_elements),
57 [&](
auto const& element)
58 {
return getCachedItem(*element) == item; });
59 it != cend(cached_elements))
61 return (*it)->getBoundaryElements();
64 if constexpr (std::is_convertible<GeometryType, GeoLib::Point>::value)
66 cached_elements.push_back(
new CacheType(mesh, mesh_node_searcher, item,
67 multiple_nodes_allowed));
71 cached_elements.push_back(
72 new CacheType(mesh, mesh_node_searcher, item));
74 return cached_elements.back()->getBoundaryElements();
77std::vector<MeshLib::Element*>
const&
79 bool const multiple_nodes_allowed)
115 const static std::vector<MeshLib::Element*> dummy(0);
Definition of the Element class.
Base class for classes Point, Polyline, Surface.
Definition of the Mesh class.
Definition of the Node class.
Definition of the PolyLine class.
Class Polyline consists mainly of a reference to a point vector and a vector that stores the indices ...
A Surface is represented by Triangles. It consists of a reference to a vector of (pointers to) points...
virtual GEOTYPE getGeoType() const =0
return a geometry type