Skip to content
Snippets Groups Projects
Commit beee128a authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add MeshFlatEdgeBoundary

parent a0639266
No related branches found
No related tags found
1 merge request!140Change referenced item list policy
......@@ -24,6 +24,7 @@ add_library(
MeshDataManager.cpp
MeshEdgeBoundary.cpp
MeshFaceBoundary.cpp
MeshFlatEdgeBoundary.cpp
MeshFlatFaceBoundary.cpp
MeshFlatNodeBoundary.cpp
MeshRelaxer.cpp
......
#include <mesh/MeshFlatEdgeBoundary.hpp>
#include <mesh/Connectivity.hpp>
#include <mesh/Mesh.hpp>
#include <mesh/MeshFlatNodeBoundary.hpp>
template <size_t Dimension>
MeshFlatEdgeBoundary<Dimension>
getMeshFlatEdgeBoundary(const Mesh<Connectivity<Dimension>>& mesh, const IBoundaryDescriptor& boundary_descriptor)
{
MeshEdgeBoundary<Dimension> mesh_edge_boundary = getMeshEdgeBoundary(mesh, boundary_descriptor);
MeshFlatNodeBoundary<Dimension> mesh_flat_node_boundary = getMeshFlatNodeBoundary(mesh, boundary_descriptor);
return MeshFlatEdgeBoundary<Dimension>{mesh, mesh_edge_boundary.refEdgeList(),
mesh_flat_node_boundary.outgoingNormal()};
}
template MeshFlatEdgeBoundary<1> getMeshFlatEdgeBoundary(const Mesh<Connectivity<1>>&, const IBoundaryDescriptor&);
template MeshFlatEdgeBoundary<2> getMeshFlatEdgeBoundary(const Mesh<Connectivity<2>>&, const IBoundaryDescriptor&);
template MeshFlatEdgeBoundary<3> getMeshFlatEdgeBoundary(const Mesh<Connectivity<3>>&, const IBoundaryDescriptor&);
#ifndef MESH_FLAT_EDGE_BOUNDARY_HPP
#define MESH_FLAT_EDGE_BOUNDARY_HPP
#include <mesh/MeshEdgeBoundary.hpp>
template <size_t Dimension>
class MeshFlatEdgeBoundary final : public MeshEdgeBoundary<Dimension> // clazy:exclude=copyable-polymorphic
{
public:
using Rd = TinyVector<Dimension, double>;
private:
const Rd m_outgoing_normal;
public:
const Rd&
outgoingNormal() const
{
return m_outgoing_normal;
}
MeshFlatEdgeBoundary& operator=(const MeshFlatEdgeBoundary&) = default;
MeshFlatEdgeBoundary& operator=(MeshFlatEdgeBoundary&&) = default;
template <size_t MeshDimension>
friend MeshFlatEdgeBoundary<MeshDimension> getMeshFlatEdgeBoundary(const Mesh<Connectivity<MeshDimension>>& mesh,
const IBoundaryDescriptor& boundary_descriptor);
private:
template <typename MeshType>
MeshFlatEdgeBoundary(const MeshType& mesh, const RefEdgeList& ref_edge_list, const Rd& outgoing_normal)
: MeshEdgeBoundary<Dimension>(mesh, ref_edge_list), m_outgoing_normal(outgoing_normal)
{}
public:
MeshFlatEdgeBoundary() = default;
MeshFlatEdgeBoundary(const MeshFlatEdgeBoundary&) = default;
MeshFlatEdgeBoundary(MeshFlatEdgeBoundary&&) = default;
~MeshFlatEdgeBoundary() = default;
};
template <size_t Dimension>
MeshFlatEdgeBoundary<Dimension> getMeshFlatEdgeBoundary(const Mesh<Connectivity<Dimension>>& mesh,
const IBoundaryDescriptor& boundary_descriptor);
#endif // MESH_FLAT_EDGE_BOUNDARY_HPP
......@@ -177,6 +177,7 @@ add_executable (mpi_unit_tests
test_ItemValueUtils.cpp
test_MeshEdgeBoundary.cpp
test_MeshFaceBoundary.cpp
test_MeshFlatEdgeBoundary.cpp
test_MeshFlatFaceBoundary.cpp
test_MeshFlatNodeBoundary.cpp
test_MeshLineFaceBoundary.cpp
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment