31 auto elem_nodes = std::make_unique<MeshLib::Node*[]>(n_nodes);
32 for (
unsigned i = 0; i < n_nodes; ++i)
36 std::swap(elem_nodes[0], elem_nodes[1]);
40 return std::make_unique<MeshLib::Line>(elem_nodes.release(),
45 return std::make_unique<MeshLib::Tri>(elem_nodes.release(),
50 std::swap(elem_nodes[2], elem_nodes[3]);
51 return std::make_unique<MeshLib::Quad>(elem_nodes.release(),
64 std::vector<MeshLib::Node*> new_nodes(copyNodeVector(mesh.
getNodes()));
65 std::vector<MeshLib::Element*>
const& elems(mesh.
getElements());
66 std::vector<MeshLib::Element*> new_elems;
68 new_elems.reserve(n_elems);
70 for (std::size_t i = 0; i < n_elems; ++i)
76 return std::make_unique<MeshLib::Mesh>(
77 "FlippedElementMesh", new_nodes, new_elems,
Definition of Duplicate functions.
Definition of the Element class.
Definition of the Line class.
Definition of the Node class.
Definition of the Quad class.
Definition of the Tri class.
std::size_t getID() const
virtual MeshElemType getGeomType() const =0
virtual unsigned getNumberOfNodes() const =0
virtual const Node * getNode(unsigned idx) const =0
virtual constexpr unsigned getDimension() const =0
Get dimension of the mesh element.
std::size_t getID() const
Returns the ID of the element.
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
Properties & getProperties()
std::size_t getNumberOfElements() const
Get the number of elements.