Wildmeshing Toolkit
wmtk::operations::EdgeCollapse Class Reference

#include <EdgeCollapse.hpp>

Inheritance diagram for wmtk::operations::EdgeCollapse:
[legend]
Collaboration diagram for wmtk::operations::EdgeCollapse:
[legend]

Public Member Functions

 EdgeCollapse (Mesh &m)
 
PrimitiveType primitive_type () const override
 
std::shared_ptr< const operations::BaseCollapseNewAttributeStrategyget_new_attribute_strategy (const attribute::MeshAttributeHandle &attribute) const
 
void set_new_attribute_strategy (const attribute::MeshAttributeHandle &attribute, const std::shared_ptr< const operations::BaseCollapseNewAttributeStrategy > &other)
 
void clear_attribute_new_strategies ()
 
void set_new_attribute_strategy (const attribute::MeshAttributeHandle &attribute, const wmtk::operations::CollapseBasicStrategy &strategy=wmtk::operations::CollapseBasicStrategy::Default)
 
std::vector< simplex::Simplexexecute (const simplex::Simplex &simplex) override
 returns an empty vector in case of failure More...
 
std::vector< simplex::Simplexunmodified_primitives (const simplex::Simplex &simplex) const override
 Returns all simplices that will be potentially affected by the operation. More...
 
bool after (const std::vector< simplex::Simplex > &unmods, const std::vector< simplex::Simplex > &mods) const final override
 
bool attribute_new_all_configured () const
 
- Public Member Functions inherited from wmtk::operations::Operation
 Operation (Mesh &mesh)
 
virtual ~Operation ()
 
virtual std::vector< simplex::Simplexoperator() (const simplex::Simplex &simplex)
 
virtual double priority (const simplex::Simplex &simplex) const
 
virtual bool use_random_priority () const
 
virtual bool & use_random_priority ()
 
const Meshmesh () const
 
Meshmesh ()
 
void add_invariant (std::shared_ptr< Invariant > invariant)
 
void set_priority (const std::function< double(const simplex::Simplex &)> &func)
 
std::shared_ptr< const operations::AttributeTransferStrategyBaseget_transfer_strategy (const attribute::MeshAttributeHandle &attribute)
 
void add_transfer_strategy (const std::shared_ptr< const operations::AttributeTransferStrategyBase > &other)
 
void set_transfer_strategy (const attribute::MeshAttributeHandle &attribute, const std::shared_ptr< const operations::AttributeTransferStrategyBase > &other)
 
void clear_attribute_transfer_strategies ()
 
virtual void reserve_enough_simplices ()
 

Private Attributes

std::vector< std::shared_ptr< const operations::BaseCollapseNewAttributeStrategy > > m_new_attr_strategies
 

Additional Inherited Members

- Protected Member Functions inherited from wmtk::operations::Operation
virtual bool before (const simplex::Simplex &simplex) const
 
void apply_attribute_transfer (const std::vector< simplex::Simplex > &direct_mods)
 
- Protected Attributes inherited from wmtk::operations::Operation
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
 

Detailed Description

Definition at line 7 of file EdgeCollapse.hpp.

Constructor & Destructor Documentation

◆ EdgeCollapse()

wmtk::operations::EdgeCollapse::EdgeCollapse ( Mesh m)

Definition at line 26 of file EdgeCollapse.cpp.

References wmtk::Mesh::custom_attributes(), wmtk::multimesh::MultiMeshVisitor< NodeFunctor_ >::execute_from_root(), wmtk::Mesh::is_free(), m_new_attr_strategies, and wmtk::operations::Operation::mesh().

Here is the call graph for this function:

Member Function Documentation

◆ after()

bool wmtk::operations::EdgeCollapse::after ( const std::vector< simplex::Simplex > &  unmods,
const std::vector< simplex::Simplex > &  mods 
) const
finaloverridevirtual

Reimplemented from wmtk::operations::Operation.

Definition at line 132 of file EdgeCollapse.cpp.

References wmtk::operations::Operation::after(), and wmtk::operations::Operation::mesh().

Here is the call graph for this function:

◆ attribute_new_all_configured()

bool wmtk::operations::EdgeCollapse::attribute_new_all_configured ( ) const

Definition at line 14 of file EdgeCollapse.cpp.

References wmtk::logger(), and m_new_attr_strategies.

Here is the call graph for this function:

◆ clear_attribute_new_strategies()

void wmtk::operations::EdgeCollapse::clear_attribute_new_strategies ( )

Definition at line 87 of file EdgeCollapse.cpp.

References m_new_attr_strategies.

Referenced by wmtk::operations::AttributeTransferConfiguration::apply().

Here is the caller graph for this function:

◆ execute()

std::vector< simplex::Simplex > wmtk::operations::EdgeCollapse::execute ( const simplex::Simplex simplex)
overridevirtual

returns an empty vector in case of failure

Implements wmtk::operations::Operation.

Definition at line 56 of file EdgeCollapse.cpp.

References m_new_attr_strategies, wmtk::operations::Operation::mesh(), and wmtk::operations::utils::multi_mesh_edge_collapse_with_modified_simplices().

Here is the call graph for this function:

◆ get_new_attribute_strategy()

std::shared_ptr< const operations::BaseCollapseNewAttributeStrategy > wmtk::operations::EdgeCollapse::get_new_attribute_strategy ( const attribute::MeshAttributeHandle attribute) const

Definition at line 79 of file EdgeCollapse.cpp.

References m_new_attr_strategies.

◆ primitive_type()

PrimitiveType wmtk::operations::EdgeCollapse::primitive_type ( ) const
inlineoverridevirtual

Implements wmtk::operations::Operation.

Definition at line 13 of file EdgeCollapse.hpp.

References wmtk::Edge.

Referenced by wmtk::operations::composite::TetEdgeSwap::execute(), and wmtk::operations::composite::TriEdgeSwap::execute().

Here is the caller graph for this function:

◆ set_new_attribute_strategy() [1/2]

void wmtk::operations::EdgeCollapse::set_new_attribute_strategy ( const attribute::MeshAttributeHandle attribute,
const std::shared_ptr< const operations::BaseCollapseNewAttributeStrategy > &  other 
)

Definition at line 92 of file EdgeCollapse.cpp.

References wmtk::Mesh::is_free(), wmtk::logger(), m_new_attr_strategies, and wmtk::attribute::MeshAttributeHandle::mesh().

Referenced by wmtk::operations::AttributeTransferConfiguration::apply(), wmtk::components::internal::edge_insertion(), wmtk::components::internal::RegularSpace::regularize_tags(), and set_new_attribute_strategy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_new_attribute_strategy() [2/2]

void wmtk::operations::EdgeCollapse::set_new_attribute_strategy ( const attribute::MeshAttributeHandle attribute,
const wmtk::operations::CollapseBasicStrategy strategy = wmtk::operations::CollapseBasicStrategy::Default 
)

Definition at line 111 of file EdgeCollapse.cpp.

References wmtk::attribute::MeshAttributeHandle::handle(), and set_new_attribute_strategy().

Here is the call graph for this function:

◆ unmodified_primitives()

std::vector< simplex::Simplex > wmtk::operations::EdgeCollapse::unmodified_primitives ( const simplex::Simplex simplex) const
overridevirtual

Returns all simplices that will be potentially affected by the operation.

Implements wmtk::operations::Operation.

Definition at line 64 of file EdgeCollapse.cpp.

References wmtk::operations::Operation::mesh(), wmtk::Mesh::parent_scope(), wmtk::simplex::Simplex::tuple(), wmtk::Vertex, and wmtk::simplex::Simplex::vertex().

Here is the call graph for this function:

Member Data Documentation

◆ m_new_attr_strategies

std::vector<std::shared_ptr<const operations::BaseCollapseNewAttributeStrategy> > wmtk::operations::EdgeCollapse::m_new_attr_strategies
private

The documentation for this class was generated from the following files: