Wildmeshing Toolkit
wmtk::operations::OperationSequence Class Referenceabstract

#include <OperationSequence.hpp>

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

Public Member Functions

 OperationSequence (Mesh &mesh, const std::vector< std::shared_ptr< Operation >> &operations={})
 
virtual ~OperationSequence ()
 
std::vector< simplex::Simplexoperator() (const simplex::Simplex &simplex) override
 
double priority (const simplex::Simplex &simplex) const override
 
bool use_random_priority () const override
 
bool & use_random_priority () override
 
PrimitiveType primitive_type () const override
 
void reserve_enough_simplices () override
 
void add_operation (const std::shared_ptr< Operation > &op)
 
- Public Member Functions inherited from wmtk::operations::Operation
 Operation (Mesh &mesh)
 
virtual ~Operation ()
 
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 ()
 

Protected Member Functions

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 OperationSequence. More...
 
virtual std::vector< simplex::Simplexexecute_operations (const simplex::Simplex &simplex)=0
 
- 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

std::vector< std::shared_ptr< Operation > > m_operations
 
- 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
 

Private Attributes

bool m_internal_random_priority = false
 

Detailed Description

Definition at line 14 of file OperationSequence.hpp.

Constructor & Destructor Documentation

◆ OperationSequence()

wmtk::operations::OperationSequence::OperationSequence ( Mesh mesh,
const std::vector< std::shared_ptr< Operation >> &  operations = {} 
)

Definition at line 7 of file OperationSequence.cpp.

◆ ~OperationSequence()

wmtk::operations::OperationSequence::~OperationSequence ( )
virtualdefault

Member Function Documentation

◆ add_operation()

void wmtk::operations::OperationSequence::add_operation ( const std::shared_ptr< Operation > &  op)
inline

Definition at line 48 of file OperationSequence.hpp.

References m_operations.

◆ execute()

std::vector<simplex::Simplex> wmtk::operations::OperationSequence::execute ( const simplex::Simplex simplex)
inlineoverrideprotectedvirtual

returns an empty vector in case of failure

Implements wmtk::operations::Operation.

Definition at line 54 of file OperationSequence.hpp.

◆ execute_operations()

virtual std::vector<simplex::Simplex> wmtk::operations::OperationSequence::execute_operations ( const simplex::Simplex simplex)
protectedpure virtual

Implemented in wmtk::operations::OrOperationSequence, wmtk::operations::MinOperationSequence, and wmtk::operations::AndOperationSequence.

Referenced by operator()().

Here is the caller graph for this function:

◆ operator()()

std::vector< simplex::Simplex > wmtk::operations::OperationSequence::operator() ( const simplex::Simplex simplex)
overridevirtual

Reimplemented from wmtk::operations::Operation.

Definition at line 17 of file OperationSequence.cpp.

References wmtk::operations::Operation::apply_attribute_transfer(), wmtk::operations::Operation::before(), execute_operations(), and m_operations.

Here is the call graph for this function:

◆ primitive_type()

PrimitiveType wmtk::operations::OperationSequence::primitive_type ( ) const
overridevirtual

Implements wmtk::operations::Operation.

Definition at line 45 of file OperationSequence.cpp.

References m_operations.

◆ priority()

double wmtk::operations::OperationSequence::priority ( const simplex::Simplex simplex) const
inlineoverridevirtual

Reimplemented from wmtk::operations::Operation.

Definition at line 23 of file OperationSequence.hpp.

References m_operations, and wmtk::operations::Operation::m_priority.

◆ reserve_enough_simplices()

void wmtk::operations::OperationSequence::reserve_enough_simplices ( )
overridevirtual

Reimplemented from wmtk::operations::Operation.

Definition at line 36 of file OperationSequence.cpp.

References m_operations.

◆ unmodified_primitives()

std::vector<simplex::Simplex> wmtk::operations::OperationSequence::unmodified_primitives ( const simplex::Simplex simplex) const
inlineoverrideprotectedvirtual

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

Implements wmtk::operations::Operation.

Definition at line 62 of file OperationSequence.hpp.

◆ use_random_priority() [1/2]

bool wmtk::operations::OperationSequence::use_random_priority ( ) const
inlineoverridevirtual

Reimplemented from wmtk::operations::Operation.

Definition at line 30 of file OperationSequence.hpp.

References m_internal_random_priority, m_operations, and wmtk::operations::Operation::use_random_priority().

Here is the call graph for this function:

◆ use_random_priority() [2/2]

bool& wmtk::operations::OperationSequence::use_random_priority ( )
inlineoverridevirtual

Reimplemented from wmtk::operations::Operation.

Definition at line 38 of file OperationSequence.hpp.

References m_internal_random_priority, m_operations, and wmtk::operations::Operation::use_random_priority().

Here is the call graph for this function:

Member Data Documentation

◆ m_internal_random_priority

bool wmtk::operations::OperationSequence::m_internal_random_priority = false
private

Definition at line 73 of file OperationSequence.hpp.

Referenced by use_random_priority().

◆ m_operations


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