Wildmeshing Toolkit
MultiMeshEdgeSplitFunctor.cpp
Go to the documentation of this file.
1
#include "
MultiMeshEdgeSplitFunctor.hpp
"
2
3
#include <
wmtk/EdgeMeshOperationExecutor.hpp
>
4
#include <
wmtk/TetMeshOperationExecutor.hpp
>
5
#include <
wmtk/TriMeshOperationExecutor.hpp
>
6
#include <
wmtk/operations/Operation.hpp
>
7
8
#include <
wmtk/utils/Logger.hpp
>
9
10
namespace
wmtk::operations::utils
{
11
12
wmtk::operations::EdgeOperationData
MultiMeshEdgeSplitFunctor::run
(
13
Mesh
& mesh,
14
const
simplex::Simplex
& s)
const
15
{
16
switch
(mesh.
top_simplex_type
()) {
17
case
PrimitiveType::Vertex
:
break
;
18
case
PrimitiveType::Edge
:
return
(*
this
)(
static_cast<
EdgeMesh
&
>
(mesh), s);
19
case
PrimitiveType::Triangle
:
return
(*
this
)(
static_cast<
TriMesh
&
>
(mesh), s);
20
case
PrimitiveType::Tetrahedron
:
return
(*
this
)(
static_cast<
TetMesh
&
>
(mesh), s);
21
default
:
break
;
22
}
23
assert(
false
);
24
return
{};
25
}
26
27
edge_mesh::EdgeOperationData
MultiMeshEdgeSplitFunctor::operator()
(
28
EdgeMesh
& m,
29
const
simplex::Simplex
& s)
const
30
{
31
EdgeMesh::EdgeMeshOperationExecutor
exec(m, s.
tuple
());
32
exec.
split_edge
();
33
return
std::move(
static_cast<
edge_mesh::EdgeOperationData
&
>
(exec));
34
}
35
tri_mesh::EdgeOperationData
MultiMeshEdgeSplitFunctor::operator()
(
36
TriMesh
& m,
37
const
simplex::Simplex
& s)
const
38
{
39
TriMesh::TriMeshOperationExecutor
exec(m, s.
tuple
());
40
41
exec.
split_edge
();
42
for
(
const
auto
&
id
: exec.
incident_face_datas
()) {
43
logger
().trace(
44
"[{}] mapped {}->{}"
,
45
fmt::join(m.
absolute_multi_mesh_id
(),
","
),
46
id
.fid,
47
fmt::join(
id
.split_f,
","
));
48
}
49
50
return
std::move(
static_cast<
tri_mesh::EdgeOperationData
&
>
(exec));
51
}
52
tet_mesh::EdgeOperationData
MultiMeshEdgeSplitFunctor::operator()
(
53
TetMesh
& m,
54
const
simplex::Simplex
& s)
const
55
{
56
TetMesh::TetMeshOperationExecutor
exec(m, s.
tuple
());
57
exec.
split_edge
();
58
return
std::move(
static_cast<
tet_mesh::EdgeOperationData
&
>
(exec));
59
}
60
}
// namespace wmtk::operations::utils
EdgeMeshOperationExecutor.hpp
Logger.hpp
MultiMeshEdgeSplitFunctor.hpp
Operation.hpp
TetMeshOperationExecutor.hpp
TriMeshOperationExecutor.hpp
wmtk::EdgeMesh::EdgeMeshOperationExecutor
Definition:
EdgeMeshOperationExecutor.hpp:8
wmtk::EdgeMesh::EdgeMeshOperationExecutor::split_edge
void split_edge()
Definition:
EdgeMeshOperationExecutor.cpp:73
wmtk::EdgeMesh
Definition:
EdgeMesh.hpp:16
wmtk::Mesh
Definition:
Mesh.hpp:107
wmtk::Mesh::absolute_multi_mesh_id
std::vector< int64_t > absolute_multi_mesh_id() const
returns a unique identifier for this mesh within a single multimesh structure
Definition:
Mesh_multimesh.cpp:12
wmtk::Mesh::top_simplex_type
PrimitiveType top_simplex_type() const
Definition:
Mesh.hpp:997
wmtk::TetMesh::TetMeshOperationExecutor
Definition:
TetMeshOperationExecutor.hpp:8
wmtk::TetMesh::TetMeshOperationExecutor::split_edge
void split_edge()
split edge v1-v2
Definition:
TetMeshOperationExecutor.cpp:243
wmtk::TetMesh
Definition:
TetMesh.hpp:14
wmtk::TriMesh::TriMeshOperationExecutor
Definition:
TriMeshOperationExecutor.hpp:10
wmtk::TriMesh::TriMeshOperationExecutor::split_edge
void split_edge()
Definition:
TriMeshOperationExecutor.cpp:550
wmtk::TriMesh
Definition:
TriMesh.hpp:19
wmtk::operations::EdgeOperationData
Definition:
EdgeOperationData.hpp:20
wmtk::operations::edge_mesh::EdgeOperationData
Definition:
EdgeOperationData.hpp:9
wmtk::operations::tet_mesh::EdgeOperationData
Definition:
EdgeOperationData.hpp:9
wmtk::operations::tri_mesh::EdgeOperationData
Definition:
EdgeOperationData.hpp:9
wmtk::operations::tri_mesh::EdgeOperationData::incident_face_datas
const std::vector< IncidentFaceData > & incident_face_datas() const
Definition:
EdgeOperationData.hpp:66
wmtk::operations::utils::MultiMeshEdgeSplitFunctor::run
wmtk::operations::EdgeOperationData run(Mesh &, const simplex::Simplex &) const
Definition:
MultiMeshEdgeSplitFunctor.cpp:12
wmtk::operations::utils::MultiMeshEdgeSplitFunctor::operator()
void operator()(const Mesh &, const simplex::Simplex &) const
Definition:
MultiMeshEdgeSplitFunctor.hpp:21
wmtk::simplex::Simplex
Definition:
Simplex.hpp:22
wmtk::simplex::Simplex::tuple
const Tuple & tuple() const
Definition:
Simplex.hpp:53
wmtk::operations::utils
Definition:
EdgeMesh.hpp:10
wmtk::logger
spdlog::logger & logger()
Retrieves the current logger.
Definition:
Logger.cpp:58
wmtk::PrimitiveType::Triangle
@ Triangle
wmtk::PrimitiveType::Vertex
@ Vertex
wmtk::PrimitiveType::Tetrahedron
@ Tetrahedron
wmtk::PrimitiveType::Edge
@ Edge
src
wmtk
operations
utils
MultiMeshEdgeSplitFunctor.cpp
Generated by
1.9.1