29 : _mesh(mesh), _ply(ply)
38 for (
auto ele_id : ele_ids_near_ply)
42 if (e->getDimension() == 1)
47 if (!e->isBoundaryElement())
52 for (
unsigned i = 0; i < e->getNumberOfEdges(); i++)
57 std::vector<std::size_t> edge_node_distances_along_ply;
59 edge_node_distances_along_ply))
62 *edge, ply, edge_node_distances_along_ply,
84 std::size_t dist1 = std::distance(
85 node_ids_on_poly.begin(),
86 std::find(node_ids_on_poly.begin(),
88 std::size_t dist2 = std::distance(
89 node_ids_on_poly.begin(),
90 std::find(node_ids_on_poly.begin(),
92 return (dist1 < dist2);
106 std::vector<std::size_t>& edge_node_distances)
111 auto itr = std::find(vec_node_ids.begin(), vec_node_ids.end(),
113 if (itr != vec_node_ids.end())
115 edge_node_distances.push_back(
116 std::distance(vec_node_ids.begin(), itr));
128 const std::vector<std::size_t>& edge_node_distances_along_ply,
129 const std::vector<std::size_t>& node_ids_on_poly)
const
133 if (edge_node_distances_along_ply.front() >
134 edge_node_distances_along_ply.back() ||
136 edge_node_distances_along_ply.back() == node_ids_on_poly.size() - 1))
138 if (
auto const* e =
dynamic_cast<MeshLib::Line const*
>(&edge))
140 std::array nodes = {
const_cast<MeshLib::Node*
>(e->getNode(1)),
144 else if (
auto const* e =
dynamic_cast<MeshLib::Line3 const*
>(&edge))
146 std::array nodes = {
const_cast<MeshLib::Node*
>(e->getNode(1)),
153 OGS_FATAL(
"Not implemented for element type {:s}",
154 typeid(edge).
name());
Definition of the Element class.
Definition of the Line class.
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 ...
std::size_t searchByNodeIDs(const std::vector< std::size_t > &nodes)
Marks all elements connecting to any of the given nodes.
const std::vector< std::size_t > & getSearchedElementIDs() const
return marked elements
virtual unsigned getNumberOfBaseNodes() const =0
virtual const Element * getEdge(unsigned i) const =0
Returns the i-th edge of the element.
const Element * getElement(std::size_t idx) const
Get the element with the given index.
TemplateElement< MeshLib::LineRule2 > Line
TemplateElement< MeshLib::LineRule3 > Line3
std::size_t getNodeIndex(Element const &element, unsigned const idx)
Definition of the quicksort function.