Wildmeshing Toolkit
wmtk::operations::AttributesUpdateWithFunction Class Reference

#include <AttributesUpdate.hpp>

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

Public Types

using UpdateFunction = std::function< bool(Mesh &, const simplex::Simplex &s)>
 

Public Member Functions

 AttributesUpdateWithFunction (Mesh &m)
 
std::vector< simplex::Simplexexecute (const simplex::Simplex &simplex) override
 returns an empty vector in case of failure More...
 
void set_function (const UpdateFunction &func)
 
- Public Member Functions inherited from wmtk::operations::AttributesUpdate
 AttributesUpdate (Mesh &m)
 
virtual PrimitiveType primitive_type () const override
 
- 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

UpdateFunction m_function
 

Additional Inherited Members

- Protected Member Functions inherited from wmtk::operations::AttributesUpdate
virtual std::vector< simplex::Simplexunmodified_primitives (const simplex::Simplex &simplex) const override
 Returns all simplices that will be potentially affected by the operation. More...
 
- Protected Member Functions inherited from wmtk::operations::Operation
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 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 20 of file AttributesUpdate.hpp.

Member Typedef Documentation

◆ UpdateFunction

Definition at line 25 of file AttributesUpdate.hpp.

Constructor & Destructor Documentation

◆ AttributesUpdateWithFunction()

wmtk::operations::AttributesUpdateWithFunction::AttributesUpdateWithFunction ( Mesh m)

Definition at line 46 of file AttributesUpdate.cpp.

Member Function Documentation

◆ execute()

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

returns an empty vector in case of failure

Reimplemented from wmtk::operations::AttributesUpdate.

Definition at line 50 of file AttributesUpdate.cpp.

References wmtk::operations::AttributesUpdate::execute(), m_function, and wmtk::operations::Operation::mesh().

Here is the call graph for this function:

◆ set_function()

void wmtk::operations::AttributesUpdateWithFunction::set_function ( const UpdateFunction func)
inline

Definition at line 29 of file AttributesUpdate.hpp.

References m_function.

Member Data Documentation

◆ m_function

UpdateFunction wmtk::operations::AttributesUpdateWithFunction::m_function
private

Definition at line 32 of file AttributesUpdate.hpp.

Referenced by execute(), and set_function().


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