-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
41 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,23 @@ | ||
|
||
#include <wmtk/TetMeshOperationExecutor.hpp> | ||
#include <wmtk/TriMeshOperationExecutor.hpp> | ||
#include "multi_mesh_edge_split.hpp" | ||
#include <wmtk/invariants/InvariantCollection.hpp> | ||
#include <wmtk/multimesh/MultiMeshVisitor.hpp> | ||
#include <wmtk/operations/utils/MultiMeshEdgeSplitFunctor.hpp> | ||
#include <wmtk/operations/utils/UpdateEdgeOperationMultiMeshMapFunctor.hpp> | ||
#include <wmtk/utils/mesh_type_from_primitive_type.hpp> | ||
|
||
#include <wmtk/TriMesh.hpp> | ||
|
||
namespace wmtk::operations::utils { | ||
namespace { | ||
|
||
struct EdgeSplitFunctor | ||
std::shared_ptr<InvariantCollection> multimesh_edge_split_invariants(const Mesh& m) | ||
{ | ||
void operator()(const Mesh&, const Simplex&) const { throw "Unimplemented!"; } | ||
TriMesh::TriMeshOperationExecutor operator()(const TriMesh& m, const Simplex& s) const | ||
{ | ||
Accessor<long> hash_accessor = m.get_cell_hash_accessor(); | ||
TriMesh::TriMeshOperationExecutor exec(m, t, hash_accessor); | ||
exec.split_edge(); | ||
return exec; | ||
} | ||
TetMeshOperationExecutor operator()(const TetMesh& m, const Simplex& s) const | ||
{ | ||
Accessor<long> hash_accessor = m.get_cell_hash_accessor(); | ||
TetMesh::TetMeshOperationExecutor exec(m, t, hash_accessor); | ||
exec.split_edge(); | ||
return exec; | ||
} | ||
}; | ||
|
||
return std::make_shared<InvariantCollection>(); | ||
} | ||
|
||
void multi_mesh_split_edge(Mesh& mesh, const Tuple& t); | ||
void multi_mesh_edge_split(Mesh& mesh, const Tuple& t) | ||
{ | ||
multimesh::MultiMeshVisitor visitor( | ||
EdgeSplitFunctor{}, | ||
MultiMeshEdgeSplitFunctor{}, | ||
UpdateEdgeOperationMultiMeshMapFunctor{}); | ||
visitor.execute_from_root(mesh, Simplex(PrimitiveType::Edge, t)); | ||
} | ||
} // namespace wmtk::operations::utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters