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

Add MeshLineEdgeBoundary

parent f4449982
No related branches found
No related tags found
1 merge request!140Change referenced item list policy
...@@ -28,6 +28,7 @@ add_library( ...@@ -28,6 +28,7 @@ add_library(
MeshFlatFaceBoundary.cpp MeshFlatFaceBoundary.cpp
MeshFlatNodeBoundary.cpp MeshFlatNodeBoundary.cpp
MeshRelaxer.cpp MeshRelaxer.cpp
MeshLineEdgeBoundary.cpp
MeshLineFaceBoundary.cpp MeshLineFaceBoundary.cpp
MeshLineNodeBoundary.cpp MeshLineNodeBoundary.cpp
MeshNodeBoundary.cpp MeshNodeBoundary.cpp
......
#include <mesh/MeshLineEdgeBoundary.hpp>
#include <mesh/Connectivity.hpp>
#include <mesh/Mesh.hpp>
#include <mesh/MeshLineNodeBoundary.hpp>
#include <utils/Messenger.hpp>
template <size_t Dimension>
MeshLineEdgeBoundary<Dimension>
getMeshLineEdgeBoundary(const Mesh<Connectivity<Dimension>>& mesh, const IBoundaryDescriptor& boundary_descriptor)
{
MeshEdgeBoundary<Dimension> mesh_edge_boundary = getMeshEdgeBoundary(mesh, boundary_descriptor);
MeshLineNodeBoundary<Dimension> mesh_line_node_boundary = getMeshLineNodeBoundary(mesh, boundary_descriptor);
return MeshLineEdgeBoundary<Dimension>{mesh, mesh_edge_boundary.refEdgeList(), mesh_line_node_boundary.direction()};
}
template MeshLineEdgeBoundary<2> getMeshLineEdgeBoundary(const Mesh<Connectivity<2>>&, const IBoundaryDescriptor&);
template MeshLineEdgeBoundary<3> getMeshLineEdgeBoundary(const Mesh<Connectivity<3>>&, const IBoundaryDescriptor&);
#ifndef MESH_LINE_EDGE_BOUNDARY_HPP
#define MESH_LINE_EDGE_BOUNDARY_HPP
#include <algebra/TinyMatrix.hpp>
#include <mesh/MeshEdgeBoundary.hpp>
template <size_t Dimension>
class [[nodiscard]] MeshLineEdgeBoundary final
: public MeshEdgeBoundary<Dimension> // clazy:exclude=copyable-polymorphic
{
public:
static_assert(Dimension > 1, "MeshLineEdgeBoundary makes only sense in dimension 1");
using Rd = TinyVector<Dimension, double>;
private:
const Rd m_direction;
public:
template <size_t MeshDimension>
friend MeshLineEdgeBoundary<MeshDimension> getMeshLineEdgeBoundary(const Mesh<Connectivity<MeshDimension>>& mesh,
const IBoundaryDescriptor& boundary_descriptor);
PUGS_INLINE
const Rd& direction() const
{
return m_direction;
}
MeshLineEdgeBoundary& operator=(const MeshLineEdgeBoundary&) = default;
MeshLineEdgeBoundary& operator=(MeshLineEdgeBoundary&&) = default;
private:
MeshLineEdgeBoundary(const Mesh<Connectivity<Dimension>>& mesh, const RefEdgeList& ref_edge_list, const Rd& direction)
: MeshEdgeBoundary<Dimension>(mesh, ref_edge_list), m_direction(direction)
{}
public:
MeshLineEdgeBoundary() = default;
MeshLineEdgeBoundary(const MeshLineEdgeBoundary&) = default;
MeshLineEdgeBoundary(MeshLineEdgeBoundary &&) = default;
~MeshLineEdgeBoundary() = default;
};
template <size_t Dimension>
MeshLineEdgeBoundary<Dimension> getMeshLineEdgeBoundary(const Mesh<Connectivity<Dimension>>& mesh,
const IBoundaryDescriptor& boundary_descriptor);
#endif // MESH_LINE_EDGE_BOUNDARY_HPP
...@@ -180,6 +180,7 @@ add_executable (mpi_unit_tests ...@@ -180,6 +180,7 @@ add_executable (mpi_unit_tests
test_MeshFlatEdgeBoundary.cpp test_MeshFlatEdgeBoundary.cpp
test_MeshFlatFaceBoundary.cpp test_MeshFlatFaceBoundary.cpp
test_MeshFlatNodeBoundary.cpp test_MeshFlatNodeBoundary.cpp
test_MeshLineEdgeBoundary.cpp
test_MeshLineFaceBoundary.cpp test_MeshLineFaceBoundary.cpp
test_MeshLineNodeBoundary.cpp test_MeshLineNodeBoundary.cpp
test_MeshNodeBoundary.cpp test_MeshNodeBoundary.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