Wildmeshing Toolkit
wmtk::operations::composite::ProjectOperation Class Reference

#include <ProjectOperation.hpp>

Inheritance diagram for wmtk::operations::composite::ProjectOperation:
[legend]
Collaboration diagram for wmtk::operations::composite::ProjectOperation:
[legend]

Public Types

using MeshConstrainPair = std::pair< attribute::MeshAttributeHandle, attribute::MeshAttributeHandle >
 

Public Member Functions

 ProjectOperation (std::shared_ptr< Operation > main_op, const attribute::MeshAttributeHandle &project_to_mesh, attribute::MeshAttributeHandle &child_mesh_coordinates)
 
 ProjectOperation (std::shared_ptr< Operation > main_op, const std::vector< MeshConstrainPair > &mesh_constaint_pairs)
 
std::vector< simplex::Simplexexecute (const simplex::Simplex &simplex) override
 returns an empty vector in case of failure More...
 
PrimitiveType primitive_type () const override
 
- Public Member Functions inherited from wmtk::operations::AttributesUpdate
 AttributesUpdate (Mesh &m)
 
- 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 Types

using BVHConstrainPair = std::pair< attribute::MeshAttributeHandle, std::shared_ptr< SimpleBVH::BVH > >
 

Private Attributes

const std::shared_ptr< wmtk::operations::Operationm_main_op
 
std::vector< BVHConstrainPairm_bvh
 

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 12 of file ProjectOperation.hpp.

Member Typedef Documentation

◆ BVHConstrainPair

using wmtk::operations::composite::ProjectOperation::BVHConstrainPair = std::pair<attribute::MeshAttributeHandle, std::shared_ptr<SimpleBVH::BVH> >
private

Definition at line 32 of file ProjectOperation.hpp.

◆ MeshConstrainPair

Constructor & Destructor Documentation

◆ ProjectOperation() [1/2]

wmtk::operations::composite::ProjectOperation::ProjectOperation ( std::shared_ptr< Operation main_op,
const attribute::MeshAttributeHandle project_to_mesh,
attribute::MeshAttributeHandle child_mesh_coordinates 
)

Definition at line 10 of file ProjectOperation.cpp.

◆ ProjectOperation() [2/2]

wmtk::operations::composite::ProjectOperation::ProjectOperation ( std::shared_ptr< Operation main_op,
const std::vector< MeshConstrainPair > &  mesh_constaint_pairs 
)

Member Function Documentation

◆ execute()

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

returns an empty vector in case of failure

Reimplemented from wmtk::operations::AttributesUpdate.

Definition at line 87 of file ProjectOperation.cpp.

References m_bvh, m_main_op, wmtk::Mesh::map_tuples(), wmtk::attribute::Accessor< T, MeshType, Dim >::mesh(), wmtk::operations::Operation::mesh(), primitive_type(), and wmtk::attribute::Accessor< T, MeshType, Dim >::vector_attribute().

Here is the call graph for this function:

◆ primitive_type()

PrimitiveType wmtk::operations::composite::ProjectOperation::primitive_type ( ) const
inlineoverridevirtual

Reimplemented from wmtk::operations::AttributesUpdate.

Definition at line 28 of file ProjectOperation.hpp.

References m_main_op.

Referenced by execute().

Here is the caller graph for this function:

Member Data Documentation

◆ m_bvh

std::vector<BVHConstrainPair> wmtk::operations::composite::ProjectOperation::m_bvh
private

Definition at line 36 of file ProjectOperation.hpp.

Referenced by execute(), and ProjectOperation().

◆ m_main_op

const std::shared_ptr<wmtk::operations::Operation> wmtk::operations::composite::ProjectOperation::m_main_op
private

Definition at line 35 of file ProjectOperation.hpp.

Referenced by execute(), and primitive_type().


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