44 std::vector<CacheType*>& cached_elements,
45 std::function<GeometryType(CacheType
const&)> getCachedItem,
48 [[maybe_unused]]
bool const multiple_nodes_allowed)
50 if (
auto const it = find_if(cbegin(cached_elements), cend(cached_elements),
51 [&](
auto const& element)
52 {
return getCachedItem(*element) == item; });
53 it != cend(cached_elements))
55 return (*it)->getBoundaryElements();
58 if constexpr (std::is_convertible<GeometryType, GeoLib::Point>::value)
60 cached_elements.push_back(
new CacheType(mesh, mesh_node_searcher, item,
61 multiple_nodes_allowed));
65 cached_elements.push_back(
66 new CacheType(mesh, mesh_node_searcher, item));
68 return cached_elements.back()->getBoundaryElements();