23 std::vector<Node*>
const& nodes)
31 auto elem_nodes = std::make_unique<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<Line>(elem_nodes.release(), elem.
getID());
44 return std::make_unique<Tri>(elem_nodes.release(), elem.
getID());
48 std::swap(elem_nodes[2], elem_nodes[3]);
49 return std::make_unique<Quad>(elem_nodes.release(), elem.
getID());
62 std::vector<Element*>
const& elems(mesh.
getElements());
63 std::vector<Element*> new_elems;
65 new_elems.reserve(n_elems);
67 for (std::size_t i = 0; i < n_elems; ++i)
73 return std::make_unique<Mesh>(
"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 const Node * getNode(unsigned idx) const =0
virtual unsigned getNumberOfNodes() const =0
virtual constexpr unsigned getDimension() const =0
Get dimension of the mesh element.
virtual std::size_t getID() const final
Returns the ID of the element.
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
Properties & getProperties()
std::size_t getNumberOfElements() const
Get the number of elements.
std::vector< Node * > copyNodeVector(const std::vector< Node * > &nodes)
Creates a deep copy of a Node vector.
std::unique_ptr< Element > createFlippedElement(Element const &elem, std::vector< Node * > const &nodes)
std::unique_ptr< Mesh > createFlippedMesh(Mesh const &mesh)