48 sort(begin(sorted_nodes), end(sorted_nodes));
51 auto node_is_part_of_mesh = [& mesh_nodes = sorted_nodes](
53 auto it = lower_bound(begin(mesh_nodes), end(mesh_nodes), n);
54 if (it == end(mesh_nodes))
56 ERR(
"A node {:d} ({:g}, {:g}, {:g}) in mesh subset is not "
57 "a part of the mesh.",
58 n->getID(), (*n)[0], (*n)[1], (*n)[2]);
63 if (!std::all_of(begin(
_nodes), end(
_nodes), node_is_part_of_mesh))
65 OGS_FATAL(
"The mesh subset construction failed.");
Definition of the Element class.
void ERR(char const *fmt, Args const &... args)
Definition of the Mesh class.
Definition of the Node class.
A subset of nodes on a single mesh.
std::vector< Node * > const & _nodes
std::size_t getNumberOfNodes() const
return the number of registered nodes
Mesh const & getMesh() const
std::size_t getNodeID(std::size_t const i) const
std::vector< Element * >::const_iterator elementsEnd() const
MeshSubset(const Mesh &msh, std::vector< Node * > const &vec_items)
std::vector< Element * >::const_iterator elementsBegin() const
std::size_t getMeshID() const
return this mesh ID
std::vector< Node * > const & getNodes() const
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
std::size_t getID() const
Get id of the mesh.
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.