Commit eff28b5f authored by Lars Bilke's avatar Lars Bilke

Merge branch 'DoxygenFixes' into 'master'

Fix several doxygen warnings.

See merge request ogs/ogs!3557
parents c678f126 6d59cc40
Pipeline #4108 passed with stages
in 101 minutes and 5 seconds
......@@ -22,12 +22,11 @@ namespace Gocad
std::ostream& operator<<(std::ostream& os, Layer const& l)
{
std::copy(l.regions.begin(), l.regions.end(),
std::ostream_iterator<Gocad::Region>(os, " "));
std::ostream_iterator<Region>(os, " "));
return os;
}
Layer parseLayer(std::string const& line,
std::vector<Gocad::Region> const& regions)
Layer parseLayer(std::string const& line, std::vector<Region> const& regions)
{
std::istringstream iss(line);
std::istream_iterator<std::string> it(iss);
......@@ -45,7 +44,7 @@ Layer parseLayer(std::string const& line,
{
auto const& region_it =
std::find_if(regions.begin(), regions.end(),
[&](Gocad::Region const& r) { return r.name == *it; });
[&](Region const& r) { return r.name == *it; });
if (region_it != regions.end())
{
l.regions.push_back(*region_it);
......
......@@ -32,8 +32,7 @@ struct Layer final
std::ostream& operator<<(std::ostream& os, Layer const& l);
Layer parseLayer(std::string const& line,
std::vector<Gocad::Region> const& regions);
Layer parseLayer(std::string const& line, std::vector<Region> const& regions);
} // end namespace Gocad
} // end namespace FileIO
......@@ -125,7 +125,7 @@ void rotatePoints(Eigen::Matrix3d const& rot_mat, std::vector<P*> const& pnts);
* Points are rotated using a rotation matrix computed from the first three points
* in the vector. Point coordinates are modified as a result of the rotation.
*/
Eigen::Matrix3d rotatePointsToXY(std::vector<GeoLib::Point*>& pnts);
Eigen::Matrix3d rotatePointsToXY(std::vector<Point*>& pnts);
/**
* rotate points to X-Y plane
......@@ -150,10 +150,10 @@ Eigen::Matrix3d rotatePointsToXY(InputIterator1 p_pnts_begin,
* @param intersection_pnt the intersection point if the segments intersect
* @return true, if the polyline contains intersections
*/
bool lineSegmentsIntersect(const GeoLib::Polyline* ply,
GeoLib::Polyline::SegmentIterator& seg_it0,
GeoLib::Polyline::SegmentIterator& seg_it1,
GeoLib::Point& intersection_pnt);
bool lineSegmentsIntersect(const Polyline* ply,
Polyline::SegmentIterator& seg_it0,
Polyline::SegmentIterator& seg_it1,
Point& intersection_pnt);
/**
* Check if the two vectors \f$v, w \in R^3\f$ are in parallel
......@@ -171,8 +171,8 @@ bool parallel(Eigen::Vector3d v, Eigen::Vector3d w);
* @param s the intersection point if the segments do intersect
* @return true, if the line segments intersect, else false
*/
bool lineSegmentIntersect(GeoLib::LineSegment const& s0,
GeoLib::LineSegment const& s1, GeoLib::Point& s);
bool lineSegmentIntersect(LineSegment const& s0, LineSegment const& s1,
Point& s);
/// A line segment is given by its two end-points. The function checks,
/// if the two line segments (ab) and (cd) intersects. This method checks the
......@@ -184,26 +184,26 @@ bool lineSegmentIntersect(GeoLib::LineSegment const& s0,
/// vector containing two points describing the line segment the original line
/// segments are interfering.
std::vector<MathLib::Point3d> lineSegmentIntersect2d(
GeoLib::LineSegment const& ab, GeoLib::LineSegment const& cd);
LineSegment const& ab, LineSegment const& cd);
/**
* Calculates the intersection points of a line PQ and a triangle ABC.
* This method requires ABC to be counterclockwise and PQ to point downward.
* @return Intersection point or nullptr if there is no intersection.
*/
std::unique_ptr<GeoLib::Point> triangleLineIntersection(
std::unique_ptr<Point> triangleLineIntersection(
MathLib::Point3d const& a, MathLib::Point3d const& b,
MathLib::Point3d const& c, MathLib::Point3d const& p,
MathLib::Point3d const& q);
/**
* Method first computes the intersection points of line segments of GeoLib::Polyline objects
* (@see computeIntersectionPoints()) and pushes each intersection point in the GeoLib::PointVec
* Method first computes the intersection points of line segments of Polyline objects
* (@see computeIntersectionPoints()) and pushes each intersection point in the PointVec
* pnt_vec. For each intersection an id is returned. This id is used to split the two
* intersecting straight line segments in four straight line segments.
*/
void computeAndInsertAllIntersectionPoints(GeoLib::PointVec &pnt_vec,
std::vector<GeoLib::Polyline*> & plys);
void computeAndInsertAllIntersectionPoints(PointVec &pnt_vec,
std::vector<Polyline*> & plys);
/**
* Function rotates a polygon to the xy plane. For this reason, (1) the points of
......@@ -216,7 +216,7 @@ void computeAndInsertAllIntersectionPoints(GeoLib::PointVec &pnt_vec,
* @param plane_normal the normal of the original Newell plane
* @return a rotated polygon
*/
GeoLib::Polygon rotatePolygonToXY(GeoLib::Polygon const& polygon_in,
Polygon rotatePolygonToXY(Polygon const& polygon_in,
Eigen::Vector3d& plane_normal);
/// Sorts the vector of segments such that the \f$i\f$-th segment is connected
......@@ -226,7 +226,7 @@ GeoLib::Polygon rotatePolygonToXY(GeoLib::Polygon const& polygon_in,
/// connectable. In order to obtain a unique result the segments are sorted such
/// that the begin point of the first segment is \c seg_beg_pnt.
void sortSegments(MathLib::Point3d const& seg_beg_pnt,
std::vector<GeoLib::LineSegment>& sub_segments);
std::vector<LineSegment>& sub_segments);
} // end namespace GeoLib
......
......@@ -34,15 +34,4 @@ void applyKnownSolution(EigenMatrix &A, EigenVector &b, EigenVector &/*x*/,
const std::vector<EigenMatrix::IndexType> &vec_knownX_id,
const std::vector<double> &vec_knownX_x, double penalty_scaling = 1e+10);
inline void applyKnownSolution(
Eigen::MatrixXd const& A, Eigen::VectorXd const& b, Eigen::VectorXd& /*x*/,
const std::vector<Eigen::MatrixXd::Index>& _vec_knownX_id,
const std::vector<double>& _vec_knownX_x, double penalty_scaling = 1e+10)
{
(void) A; (void) b; (void) _vec_knownX_id; (void) _vec_knownX_x;
(void) penalty_scaling;
OGS_FATAL("Method not implemented."); // TODO implement
}
} // namespace MathLib
......@@ -14,7 +14,7 @@
namespace MeshLib
{
MathLib::Point3d getBulkElementPoint(MeshLib::Tri const& /*tri*/,
MathLib::Point3d getBulkElementPoint(Tri const& /*tri*/,
std::size_t const face_id,
MathLib::WeightedPoint1D const& wp)
{
......@@ -33,7 +33,7 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Tri const& /*tri*/,
}
}
MathLib::Point3d getBulkElementPoint(MeshLib::Quad const& /*quad*/,
MathLib::Point3d getBulkElementPoint(Quad const& /*quad*/,
std::size_t const face_id,
MathLib::WeightedPoint1D const& wp)
{
......@@ -54,7 +54,7 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Quad const& /*quad*/,
}
}
MathLib::Point3d getBulkElementPoint(MeshLib::Hex const& /*hex*/,
MathLib::Point3d getBulkElementPoint(Hex const& /*hex*/,
std::size_t const face_id,
MathLib::WeightedPoint2D const& wp)
{
......@@ -81,7 +81,7 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Hex const& /*hex*/,
}
}
MathLib::Point3d getBulkElementPoint(MeshLib::Prism const& /*prism*/,
MathLib::Point3d getBulkElementPoint(Prism const& /*prism*/,
std::size_t const face_id,
MathLib::WeightedPoint2D const& wp)
{
......@@ -106,7 +106,7 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Prism const& /*prism*/,
}
}
MathLib::Point3d getBulkElementPoint(MeshLib::Pyramid const& /*pyramid*/,
MathLib::Point3d getBulkElementPoint(Pyramid const& /*pyramid*/,
std::size_t const face_id,
MathLib::WeightedPoint2D const& wp)
{
......@@ -132,7 +132,7 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Pyramid const& /*pyramid*/,
}
}
MathLib::Point3d getBulkElementPoint(MeshLib::Tet const& /*tet*/,
MathLib::Point3d getBulkElementPoint(Tet const& /*tet*/,
std::size_t const face_id,
MathLib::WeightedPoint2D const& wp)
{
......@@ -152,60 +152,58 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Tet const& /*tet*/,
}
}
MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh,
MathLib::Point3d getBulkElementPoint(Mesh const& mesh,
std::size_t const bulk_element_id,
std::size_t const bulk_face_id,
MathLib::WeightedPoint1D const& wp)
{
auto const* element = mesh.getElement(bulk_element_id);
if (element->getCellType() == MeshLib::CellType::QUAD4)
if (element->getCellType() == CellType::QUAD4)
{
MeshLib::Quad const& quad(*dynamic_cast<MeshLib::Quad const*>(element));
Quad const& quad(*dynamic_cast<Quad const*>(element));
return getBulkElementPoint(quad, bulk_face_id, wp);
}
if (element->getCellType() == MeshLib::CellType::TRI3)
if (element->getCellType() == CellType::TRI3)
{
MeshLib::Tri const& tri = *static_cast<MeshLib::Tri const*>(element);
Tri const& tri = *static_cast<Tri const*>(element);
return getBulkElementPoint(tri, bulk_face_id, wp);
}
OGS_FATAL("Wrong cell type '{:s}' or functionality not yet implemented.",
MeshLib::CellType2String(element->getCellType()));
CellType2String(element->getCellType()));
}
MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh,
MathLib::Point3d getBulkElementPoint(Mesh const& mesh,
std::size_t bulk_element_id,
std::size_t bulk_face_id,
MathLib::WeightedPoint2D const& wp)
{
auto const* element = mesh.getElement(bulk_element_id);
if (element->getCellType() == MeshLib::CellType::HEX8)
if (element->getCellType() == CellType::HEX8)
{
MeshLib::Hex const& hex = *static_cast<MeshLib::Hex const*>(element);
Hex const& hex = *static_cast<Hex const*>(element);
return getBulkElementPoint(hex, bulk_face_id, wp);
}
if (element->getCellType() == MeshLib::CellType::PRISM6)
if (element->getCellType() == CellType::PRISM6)
{
MeshLib::Prism const& prism =
*static_cast<MeshLib::Prism const*>(element);
Prism const& prism = *static_cast<Prism const*>(element);
return getBulkElementPoint(prism, bulk_face_id, wp);
}
if (element->getCellType() == MeshLib::CellType::PYRAMID5)
if (element->getCellType() == CellType::PYRAMID5)
{
MeshLib::Pyramid const& pyramid =
*static_cast<MeshLib::Pyramid const*>(element);
Pyramid const& pyramid = *static_cast<Pyramid const*>(element);
return getBulkElementPoint(pyramid, bulk_face_id, wp);
}
if (element->getCellType() == MeshLib::CellType::TET4)
if (element->getCellType() == CellType::TET4)
{
MeshLib::Tet const& tet = *static_cast<MeshLib::Tet const*>(element);
Tet const& tet = *static_cast<Tet const*>(element);
return getBulkElementPoint(tet, bulk_face_id, wp);
}
OGS_FATAL("Wrong cell type '{:s}' or functionality not yet implemented.",
MeshLib::CellType2String(element->getCellType()));
CellType2String(element->getCellType()));
}
// TODO disable the 3d elements in the local assembler creator
MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& /*mesh*/,
MathLib::Point3d getBulkElementPoint(Mesh const& /*mesh*/,
std::size_t /*bulk_element_id*/,
std::size_t /*bulk_face_id*/,
MathLib::WeightedPoint3D const& /*wp*/)
......
......@@ -30,7 +30,7 @@ namespace MeshLib
/// \param face_id the id of the triangle face the point will be mapped on
/// \param wp the integration point of the lower dimensional element
/// \return the mapped point
MathLib::Point3d getBulkElementPoint(MeshLib::Tri const& tri,
MathLib::Point3d getBulkElementPoint(Tri const& tri,
std::size_t const face_id,
MathLib::WeightedPoint1D const& wp);
......@@ -42,42 +42,42 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Tri const& tri,
/// \param face_id the id of the quad face the point will be mapped on
/// \param wp the integration point of the lower dimensional element
/// \return the mapped point
MathLib::Point3d getBulkElementPoint(MeshLib::Quad const& quad,
MathLib::Point3d getBulkElementPoint(Quad const& quad,
std::size_t const face_id,
MathLib::WeightedPoint1D const& wp);
/// Maps the given 2d boundary point \c wp of a quad face, given in local
/// coordinates of the quad, to 3d point existing on a hexahedron face also in
/// local coordinates.
MathLib::Point3d getBulkElementPoint(MeshLib::Hex const& hex,
MathLib::Point3d getBulkElementPoint(Hex const& hex,
std::size_t const face_id,
MathLib::WeightedPoint2D const& wp);
/// Maps the given lower dimensional 2d boundary point \c wp of a quad or
/// triangle element, given in local coordinates of the quad or triangle, to a
/// 3d point existing on a tet face also in local coordinates.
MathLib::Point3d getBulkElementPoint(MeshLib::Tet const& tet,
MathLib::Point3d getBulkElementPoint(Tet const& tet,
std::size_t const face_id,
MathLib::WeightedPoint2D const& wp);
/// Maps the given lower dimensional 2d boundary point \c wp of a quad or
/// triangle element, given in local coordinates of the quad or triangle, to a
/// 3d point existing on a prism face also in local coordinates.
MathLib::Point3d getBulkElementPoint(MeshLib::Prism const& prism,
MathLib::Point3d getBulkElementPoint(Prism const& prism,
std::size_t const face_id,
MathLib::WeightedPoint2D const& wp);
/// Maps the given lower dimensional 2d boundary point \c wp of a quad or
/// triangle element, given in local coordinates of the quad or triangle, to a
/// 3d point existing on a pyramid face also in local coordinates.
MathLib::Point3d getBulkElementPoint(MeshLib::Pyramid const& pyramid,
MathLib::Point3d getBulkElementPoint(Pyramid const& pyramid,
std::size_t const face_id,
MathLib::WeightedPoint2D const& wp);
/// Maps the given 1d boundary point \c wp of a boundary element, given in local
/// coordinates of the boundary element, to 3d point existing on a bulk element
/// also in local coordinates.
MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh,
MathLib::Point3d getBulkElementPoint(Mesh const& mesh,
std::size_t const bulk_element_id,
std::size_t const bulk_face_id,
MathLib::WeightedPoint1D const& wp);
......@@ -85,13 +85,13 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh,
/// Maps the given 2d boundary point \c wp of a boundary element, given in local
/// coordinates of the boundary element, to 3d point existing on a bulk element
/// also in local coordinates.
MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh,
MathLib::Point3d getBulkElementPoint(Mesh const& mesh,
std::size_t bulk_element_id,
std::size_t bulk_face_id,
MathLib::WeightedPoint2D const& wp);
// TODO disable the 3d elements in the local assembler creator
MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh,
MathLib::Point3d getBulkElementPoint(Mesh const& mesh,
std::size_t bulk_element_id,
std::size_t bulk_face_id,
MathLib::WeightedPoint3D const& wp);
......
......@@ -38,6 +38,7 @@ struct XdmfData
* @param size_tuple We assume there is at most a rank of 2 of data
* (properties). The size of tuple gives the length of the second dimension
* (index 1).
* @param mesh_property_data_type property vector data type.
* @param name The name of the attribute. It assumed to be unique.
* @param attribute_center XdmfData is used for topology, geometry and
* attributes. Geometry and topology have never a attribute_center.
......
......@@ -38,7 +38,9 @@ Geometry transformGeometry(MeshLib::Mesh const& mesh);
* The topology is specific to xdmf because it contains the xdmf cell types!!
* See section topology in https://www.xdmf.org/index.php/XDMF_Model_and_Format
* @param mesh OGS mesh can be mesh or partitionedMesh
* @param offset Local offset to transform local to global cell ID. Offset must
* be zero in serial and must be defined for each process in parallel execution.
* @return Topology containing a copy of the data and the topology meta data
*/
Topology transformTopology(MeshLib::Mesh const& mesh, std::size_t offset);
} // namespace MeshLib::IO
\ No newline at end of file
} // namespace MeshLib::IO
......@@ -40,7 +40,8 @@ namespace MeshLib
class Mesh
{
/* friend functions: */
friend void removeMeshNodes(MeshLib::Mesh &mesh, const std::vector<std::size_t> &nodes);
friend void removeMeshNodes(Mesh& mesh,
const std::vector<std::size_t>& nodes);
friend class ApplicationUtils::NodeWiseMeshPartitioner;
......@@ -127,8 +128,8 @@ public:
/// Return true if the mesh has any nonlinear nodes
bool isNonlinear() const { return (getNumberOfNodes() != getNumberOfBaseNodes()); }
MeshLib::Properties & getProperties() { return _properties; }
MeshLib::Properties const& getProperties() const { return _properties; }
Properties& getProperties() { return _properties; }
Properties const& getProperties() const { return _properties; }
bool isAxiallySymmetric() const { return _is_axially_symmetric; }
void setAxiallySymmetric(bool is_axial_symmetric) {
......@@ -190,7 +191,7 @@ inline bool operator!=(Mesh const& a, Mesh const& b)
/// Scales the mesh property with name \c property_name by given \c factor.
/// \note The property must be a "double" property.
void scaleMeshPropertyVector(MeshLib::Mesh& mesh,
void scaleMeshPropertyVector(Mesh& mesh,
std::string const& property_name,
double factor);
......@@ -205,12 +206,11 @@ void scaleMeshPropertyVector(MeshLib::Mesh& mesh,
/// \param values A vector containing the values that are used for
/// initialization.
template <typename T>
void addPropertyToMesh(MeshLib::Mesh& mesh, std::string const& name,
MeshLib::MeshItemType item_type,
std::size_t number_of_components,
void addPropertyToMesh(Mesh& mesh, std::string const& name,
MeshItemType item_type, std::size_t number_of_components,
std::vector<T> const& values)
{
if (item_type == MeshLib::MeshItemType::Node)
if (item_type == MeshItemType::Node)
{
if (mesh.getNumberOfNodes() != values.size() / number_of_components)
{
......@@ -220,7 +220,7 @@ void addPropertyToMesh(MeshLib::Mesh& mesh, std::string const& name,
mesh.getNumberOfNodes(), values.size() / number_of_components);
}
}
if (item_type == MeshLib::MeshItemType::Cell)
if (item_type == MeshItemType::Cell)
{
if (mesh.getNumberOfElements() != values.size() / number_of_components)
{
......@@ -249,7 +249,7 @@ void addPropertyToMesh(MeshLib::Mesh& mesh, std::string const& name,
template <typename T>
PropertyVector<T>* getOrCreateMeshProperty(Mesh& mesh,
std::string const& property_name,
MeshLib::MeshItemType const item_type,
MeshItemType const item_type,
int const number_of_components)
{
if (property_name.empty())
......@@ -261,16 +261,16 @@ PropertyVector<T>* getOrCreateMeshProperty(Mesh& mesh,
auto numberOfMeshItems = [&mesh, &item_type]() -> std::size_t {
switch (item_type)
{
case MeshLib::MeshItemType::Cell:
case MeshItemType::Cell:
return mesh.getNumberOfElements();
case MeshLib::MeshItemType::Node:
case MeshItemType::Node:
return mesh.getNumberOfNodes();
case MeshLib::MeshItemType::IntegrationPoint:
case MeshItemType::IntegrationPoint:
return 0; // For the integration point data the size is
// variable
default:
OGS_FATAL(
"MeshLib::getOrCreateMeshProperty cannot handle other "
"getOrCreateMeshProperty cannot handle other "
"types than Node, Cell, or IntegrationPoint.");
}
return 0;
......@@ -309,7 +309,7 @@ PropertyVector<int> const* materialIDs(Mesh const& mesh);
///
/// \note The elements are owned by the returned mesh object as well as the
/// nodes and will be destructed together with the mesh.
std::unique_ptr<MeshLib::Mesh> createMeshFromElementSelection(
std::string mesh_name, std::vector<MeshLib::Element*> const& elements);
std::unique_ptr<Mesh> createMeshFromElementSelection(
std::string mesh_name, std::vector<Element*> const& elements);
} // namespace MeshLib
......@@ -19,26 +19,24 @@
namespace MeshLib
{
std::vector<MeshLib::Node*> copyNodeVector(
const std::vector<MeshLib::Node*>& nodes)
std::vector<Node*> copyNodeVector(const std::vector<Node*>& nodes)
{
const std::size_t nNodes(nodes.size());
std::vector<MeshLib::Node*> new_nodes;
std::vector<Node*> new_nodes;
new_nodes.reserve(nNodes);
for (std::size_t k = 0; k < nNodes; ++k)
{
new_nodes.push_back(
new MeshLib::Node(nodes[k]->getCoords(), new_nodes.size()));
new_nodes.push_back(new Node(nodes[k]->getCoords(), new_nodes.size()));
}
return new_nodes;
}
std::vector<MeshLib::Element*> copyElementVector(
std::vector<MeshLib::Element*> const& elements,
std::vector<MeshLib::Node*> const& new_nodes,
std::vector<Element*> copyElementVector(
std::vector<Element*> const& elements,
std::vector<Node*> const& new_nodes,
std::vector<std::size_t> const* const node_id_map)
{
std::vector<MeshLib::Element*> new_elements;
std::vector<Element*> new_elements;
new_elements.reserve(elements.size());
std::transform(elements.begin(), elements.end(),
std::back_inserter(new_elements),
......@@ -51,12 +49,12 @@ std::vector<MeshLib::Element*> copyElementVector(
/// Copies an element without change, using the nodes vector from the result
/// mesh.
template <typename E>
MeshLib::Element* copyElement(MeshLib::Element const* const element,
const std::vector<MeshLib::Node*>& nodes,
std::vector<std::size_t> const* const id_map)
Element* copyElement(Element const* const element,
const std::vector<Node*>& nodes,
std::vector<std::size_t> const* const id_map)
{
unsigned const number_of_element_nodes(element->getNumberOfNodes());
auto** new_nodes = new MeshLib::Node*[number_of_element_nodes];
auto** new_nodes = new Node*[number_of_element_nodes];
if (id_map)
{
for (unsigned i = 0; i < number_of_element_nodes; ++i)
......@@ -74,42 +72,42 @@ MeshLib::Element* copyElement(MeshLib::Element const* const element,
return new E(new_nodes);
}
MeshLib::Element* copyElement(MeshLib::Element const* const element,
const std::vector<MeshLib::Node*>& nodes,
std::vector<std::size_t> const* const id_map)
Element* copyElement(Element const* const element,
const std::vector<Node*>& nodes,
std::vector<std::size_t> const* const id_map)
{
switch (element->getCellType())
{
case CellType::LINE2:
return copyElement<MeshLib::Line>(element, nodes, id_map);
return copyElement<Line>(element, nodes, id_map);
case CellType::LINE3:
return copyElement<MeshLib::Line3>(element, nodes, id_map);
return copyElement<Line3>(element, nodes, id_map);
case CellType::TRI3:
return copyElement<MeshLib::Tri>(element, nodes, id_map);
return copyElement<Tri>(element, nodes, id_map);
case CellType::TRI6:
return copyElement<MeshLib::Tri6>(element, nodes, id_map);
return copyElement<Tri6>(element, nodes, id_map);
case CellType::QUAD4:
return copyElement<MeshLib::Quad>(element, nodes, id_map);
return copyElement<Quad>(element, nodes, id_map);
case CellType::QUAD8:
return copyElement<MeshLib::Quad8>(element, nodes, id_map);
return copyElement<Quad8>(element, nodes, id_map);
case CellType::QUAD9:
return copyElement<MeshLib::Quad9>(element, nodes, id_map);
return copyElement<Quad9>(element, nodes, id_map);
case CellType::TET4:
return copyElement<MeshLib::Tet>(element, nodes, id_map);
return copyElement<Tet>(element, nodes, id_map);
case CellType::TET10:
return copyElement<MeshLib::Tet10>(element, nodes, id_map);
return copyElement<Tet10>(element, nodes, id_map);
case CellType::HEX8:
return copyElement<MeshLib::Hex>(element, nodes, id_map);
return copyElement<Hex>(element, nodes, id_map);
case CellType::HEX20:
return copyElement<MeshLib::Hex20>(element, nodes, id_map);
return copyElement<Hex20>(element, nodes, id_map);
case CellType::PYRAMID5:
return copyElement<MeshLib::Pyramid>(element, nodes, id_map);
return copyElement<Pyramid>(element, nodes, id_map);
case CellType::PYRAMID13:
return copyElement<MeshLib::Pyramid13>(element, nodes, id_map);
return copyElement<Pyramid13>(element, nodes, id_map);
case CellType::PRISM6:
return copyElement<MeshLib::Prism>(element, nodes, id_map);
return copyElement<Prism>(element, nodes, id_map);
case CellType::PRISM15:
return copyElement<MeshLib::Prism15>(element, nodes, id_map);
return copyElement<Prism15>(element, nodes, id_map);
default:
{
ERR("Error: Unknown cell type.");
......@@ -118,14 +116,13 @@ MeshLib::Element* copyElement(MeshLib::Element const* const element,
}
}
std::vector<MeshLib::Element*> cloneElements(
std::vector<MeshLib::Element*> const& elements)
std::vector<Element*> cloneElements(std::vector<Element*> const& elements)
{
std::vector<MeshLib::Element*> cloned_elements;
std::vector<Element*> cloned_elements;
cloned_elements.reserve(elements.size());
std::transform(begin(elements), end(elements),
std::back_inserter(cloned_elements),
[](MeshLib::Element* const e) { return e->clone(); });
[](Element* const e) { return e->clone(); });
return cloned_elements;
}
......
......@@ -23,8 +23,7 @@ class Node;
class Element;
/// Creates a deep copy of a Node vector