Wildmeshing Toolkit
|
#include <Operation.hpp>
Protected Member Functions | |
virtual std::vector< simplex::Simplex > | execute (const simplex::Simplex &simplex)=0 |
returns an empty vector in case of failure More... | |
virtual std::vector< simplex::Simplex > | unmodified_primitives (const simplex::Simplex &simplex) const =0 |
Returns all simplices that will be potentially affected by the operation. More... | |
virtual bool | before (const simplex::Simplex &simplex) const |
virtual bool | after (const std::vector< simplex::Simplex > &unmods, const std::vector< simplex::Simplex > &mods) const |
void | apply_attribute_transfer (const std::vector< simplex::Simplex > &direct_mods) |
Protected Attributes | |
std::function< double(const simplex::Simplex &)> | m_priority = nullptr |
invariants::InvariantCollection | m_invariants |
std::vector< std::shared_ptr< const operations::AttributeTransferStrategyBase > > | m_attr_transfer_strategies |
Private Attributes | |
Mesh & | m_mesh |
bool | m_use_random_priority = false |
Definition at line 23 of file Operation.hpp.
wmtk::operations::Operation::Operation | ( | Mesh & | mesh | ) |
Definition at line 18 of file Operation.cpp.
|
virtualdefault |
|
inline |
Definition at line 48 of file Operation.hpp.
References wmtk::invariants::InvariantCollection::add(), and m_invariants.
Referenced by wmtk::components::Marching::process(), wmtk::components::internal::RegularSpace::regularize_tags(), wmtk::components::wildmeshing(), and wmtk::components::internal::wildmeshing2d().
void wmtk::operations::Operation::add_transfer_strategy | ( | const std::shared_ptr< const operations::AttributeTransferStrategyBase > & | other | ) |
Definition at line 59 of file Operation.cpp.
References m_attr_transfer_strategies.
Referenced by wmtk::components::Marching::process(), wmtk::components::wildmeshing(), and wmtk::components::internal::wildmeshing2d().
|
protectedvirtual |
Reimplemented in wmtk::operations::EdgeCollapse.
Definition at line 135 of file Operation.cpp.
References wmtk::invariants::InvariantCollection::directly_modified_after(), and m_invariants.
Referenced by wmtk::operations::EdgeCollapse::after(), and operator()().
|
protected |
Definition at line 142 of file Operation.cpp.
References wmtk::simplex::IdSimplexCollection::add(), wmtk::simplex::closed_star_iterable(), wmtk::Mesh::get_const_flag_accessor(), wmtk::Mesh::get_simplex(), wmtk::Mesh::is_valid(), m_attr_transfer_strategies, m_mesh, wmtk::Mesh::map(), wmtk::simplex::IdSimplexCollection::reserve(), wmtk::simplex::IdSimplexCollection::simplex_vector(), and wmtk::simplex::IdSimplexCollection::sort_and_clean().
Referenced by operator()(), and wmtk::operations::OperationSequence::operator()().
|
protectedvirtual |
Definition at line 97 of file Operation.cpp.
References wmtk::invariants::InvariantCollection::before(), m_invariants, m_mesh, wmtk::Mesh::map(), wmtk::invariants::Invariant::mesh(), mesh(), and wmtk::simplex::Simplex::tuple().
Referenced by operator()(), and wmtk::operations::OperationSequence::operator()().
void wmtk::operations::Operation::clear_attribute_transfer_strategies | ( | ) |
Definition at line 38 of file Operation.cpp.
References m_attr_transfer_strategies.
Referenced by wmtk::operations::AttributeTransferConfiguration::apply().
|
protectedpure virtual |
returns an empty vector in case of failure
Implemented in wmtk::operations::TetWildTangentialLaplacianSmoothing, wmtk::operations::Rounding, wmtk::operations::OptimizationSmoothing, wmtk::operations::OperationSequence, wmtk::operations::EdgeSplit, wmtk::operations::EdgeCollapse, wmtk::operations::composite::TriFaceSplit, wmtk::operations::composite::TriEdgeSwap, wmtk::operations::composite::TetFaceSwap, wmtk::operations::composite::TetEdgeSwap, wmtk::operations::composite::TetCellSplit, wmtk::operations::composite::ProjectOperation, wmtk::operations::AttributesUpdateWithFunction, wmtk::operations::AttributesUpdate, wmtk::operations::AMIPSOptimizationSmoothingPeriodic, and wmtk::operations::AMIPSOptimizationSmoothing.
Referenced by operator()().
std::shared_ptr< const operations::AttributeTransferStrategyBase > wmtk::operations::Operation::get_transfer_strategy | ( | const attribute::MeshAttributeHandle & | attribute | ) |
Definition at line 26 of file Operation.cpp.
References wmtk::attribute::MeshAttributeHandle::is_same_mesh(), m_attr_transfer_strategies, and mesh().
|
inline |
Definition at line 46 of file Operation.hpp.
References m_mesh.
|
inline |
Definition at line 45 of file Operation.hpp.
References m_mesh.
Referenced by wmtk::operations::EdgeCollapse::after(), before(), wmtk::operations::EdgeCollapse::EdgeCollapse(), wmtk::operations::EdgeSplit::EdgeSplit(), wmtk::operations::AMIPSOptimizationSmoothing::execute(), wmtk::operations::AMIPSOptimizationSmoothingPeriodic::execute(), wmtk::operations::AttributesUpdate::execute(), wmtk::operations::AttributesUpdateWithFunction::execute(), wmtk::operations::composite::ProjectOperation::execute(), wmtk::operations::composite::TetCellSplit::execute(), wmtk::operations::composite::TetEdgeSwap::execute(), wmtk::operations::composite::TetFaceSwap::execute(), wmtk::operations::composite::TriEdgeSwap::execute(), wmtk::operations::composite::TriFaceSplit::execute(), wmtk::operations::EdgeCollapse::execute(), wmtk::operations::EdgeSplit::execute(), wmtk::operations::OptimizationSmoothing::execute(), wmtk::operations::Rounding::execute(), wmtk::operations::TetWildTangentialLaplacianSmoothing::execute(), wmtk::operations::AndOperationSequence::execute_operations(), get_transfer_strategy(), wmtk::operations::EdgeSplit::new_spine_edges(), operator()(), wmtk::operations::composite::ProjectOperation::ProjectOperation(), reserve_enough_simplices(), wmtk::Scheduler::run_operation_on_all(), wmtk::Scheduler::run_operation_on_all_coloring(), set_transfer_strategy(), wmtk::operations::TetWildTangentialLaplacianSmoothing::TetWildTangentialLaplacianSmoothing(), and wmtk::operations::EdgeCollapse::unmodified_primitives().
|
virtual |
Reimplemented in wmtk::operations::OperationSequence.
Definition at line 66 of file Operation.cpp.
References after(), apply_attribute_transfer(), before(), wmtk::Mesh::create_scope(), execute(), mesh(), wmtk::simplex::Simplex::primitive_type(), primitive_type(), and unmodified_primitives().
|
pure virtual |
Implemented in wmtk::operations::OperationSequence, wmtk::operations::EdgeSplit, wmtk::operations::EdgeCollapse, wmtk::operations::composite::TriFaceSplit, wmtk::operations::composite::TriEdgeSwap, wmtk::operations::composite::TetFaceSwap, wmtk::operations::composite::TetEdgeSwap, wmtk::operations::composite::TetCellSplit, wmtk::operations::composite::ProjectOperation, and wmtk::operations::AttributesUpdate.
Referenced by operator()(), wmtk::Scheduler::run_operation_on_all(), wmtk::Scheduler::run_operation_on_all_coloring(), wmtk::components::wildmeshing(), and wmtk::components::internal::wildmeshing2d().
|
inlinevirtual |
Reimplemented in wmtk::operations::OperationSequence.
Definition at line 35 of file Operation.hpp.
References m_priority.
Referenced by wmtk::Scheduler::run_operation_on_all().
|
virtual |
Reimplemented in wmtk::operations::OperationSequence.
Definition at line 195 of file Operation.cpp.
References wmtk::multimesh::MultiMeshVisitor< NodeFunctor_ >::execute_from_root(), and mesh().
|
inline |
Definition at line 50 of file Operation.hpp.
References m_priority.
Referenced by wmtk::components::wildmeshing(), and wmtk::components::internal::wildmeshing2d().
void wmtk::operations::Operation::set_transfer_strategy | ( | const attribute::MeshAttributeHandle & | attribute, |
const std::shared_ptr< const operations::AttributeTransferStrategyBase > & | other | ||
) |
Definition at line 43 of file Operation.cpp.
References wmtk::attribute::MeshAttributeHandle::is_same_mesh(), m_attr_transfer_strategies, and mesh().
Referenced by wmtk::operations::AttributeTransferConfiguration::apply().
|
protectedpure virtual |
Returns all simplices that will be potentially affected by the operation.
Implemented in wmtk::operations::OperationSequence, wmtk::operations::EdgeSplit, wmtk::operations::EdgeCollapse, wmtk::operations::composite::TriFaceSplit, wmtk::operations::composite::TriEdgeSwap, wmtk::operations::composite::TetFaceSwap, wmtk::operations::composite::TetEdgeSwap, wmtk::operations::composite::TetCellSplit, and wmtk::operations::AttributesUpdate.
Referenced by operator()().
|
inlinevirtual |
Reimplemented in wmtk::operations::OperationSequence.
Definition at line 41 of file Operation.hpp.
References m_use_random_priority.
|
inlinevirtual |
Reimplemented in wmtk::operations::OperationSequence.
Definition at line 40 of file Operation.hpp.
References m_use_random_priority.
Referenced by wmtk::Scheduler::run_operation_on_all(), and wmtk::operations::OperationSequence::use_random_priority().
|
protected |
Definition at line 104 of file Operation.hpp.
Referenced by add_transfer_strategy(), apply_attribute_transfer(), clear_attribute_transfer_strategies(), get_transfer_strategy(), and set_transfer_strategy().
|
protected |
Definition at line 101 of file Operation.hpp.
Referenced by add_invariant(), after(), before(), wmtk::operations::OptimizationSmoothing::execute(), and wmtk::operations::OptimizationSmoothing::WMTKProblem< T >::is_step_valid().
|
private |
Definition at line 94 of file Operation.hpp.
Referenced by apply_attribute_transfer(), before(), and mesh().
|
protected |
Definition at line 99 of file Operation.hpp.
Referenced by priority(), wmtk::operations::OperationSequence::priority(), and set_priority().
|
private |
Definition at line 95 of file Operation.hpp.
Referenced by use_random_priority().