Wildmeshing Toolkit
wmtk::operations::SplitNewAttributeStrategy< T > Class Template Reference

#include <SplitNewAttributeStrategy.hpp>

Inheritance diagram for wmtk::operations::SplitNewAttributeStrategy< T >:
[legend]
Collaboration diagram for wmtk::operations::SplitNewAttributeStrategy< T >:
[legend]

Public Types

using VecType = VectorX< T >
 
using ReturnData = BaseSplitNewAttributeStrategy::ReturnData
 
using OperationInOutData = BaseSplitNewAttributeStrategy::OperationInOutData
 
using ReturnVariant = ReturnData::ReturnVariant
 
using SplitRibFuncType = std::function< VecType(const VecType &, const VecType &, const std::bitset< 2 > &)>
 
using SplitFuncType = std::function< std::array< VecType, 2 >(const VecType &, const std::bitset< 2 > &)>
 
- Public Types inherited from wmtk::operations::BaseSplitNewAttributeStrategy
using ReturnData = wmtk::multimesh::operations::SplitReturnData
 
using OperationInOutData = wmtk::multimesh::operations::OperationInOutData
 
- Public Types inherited from wmtk::operations::NewAttributeStrategy
using SimplexPredicateType = std::function< bool(const simplex::Simplex &)>
 

Public Member Functions

 SplitNewAttributeStrategy (const wmtk::attribute::MeshAttributeHandle &h)
 
void update (Mesh &m, const ReturnData &ret_data, const OperationInOutData &op_data) const final override
 
void set_rib_strategy (SplitRibFuncType &&f)
 
void set_strategy (SplitFuncType &&f)
 
void set_rib_strategy (SplitRibBasicStrategy t)
 
void set_strategy (SplitBasicStrategy t)
 
Meshmesh () override
 
PrimitiveType primitive_type () const override
 
void update_handle_mesh (Mesh &m) override
 
bool matches_attribute (const attribute::MeshAttributeHandle &) const override
 
std::vector< wmtk::attribute::MeshAttributeHandletargets () const final override
 
bool invalid_state () const final override
 
std::string name () const final override
 
virtual Meshmesh ()=0
 
const Meshmesh () const
 
- Public Member Functions inherited from wmtk::operations::NewAttributeStrategy
virtual ~NewAttributeStrategy ()
 
const Meshmesh () const
 
void set_simplex_predicate (SimplexPredicateType &&f)
 
void set_simplex_predicate (BasicSimplexPredicate f)
 
std::bitset< 2 > evaluate_predicate (PrimitiveType pt, const std::array< Tuple, 2 > &simplices) const
 
std::vector< wmtk::attribute::MeshAttributeHandlesources () const final override
 
- Public Member Functions inherited from wmtk::operations::AttributeTransferEdge
virtual ~AttributeTransferEdge ()=0
 

Private Member Functions

void assign_split (wmtk::attribute::Accessor< T > &accessor, const Tuple &input_simplex, const std::array< Tuple, 2 > &split_simplices) const
 
void assign_split_ribs (wmtk::attribute::Accessor< T > &accessor, const std::array< Tuple, 2 > &input_ears, const Tuple &final_simplex) const
 
SplitNewAttributeStrategy< Rational >::SplitFuncType standard_split_strategy (SplitBasicStrategy optype, const std::string_view &name)
 
SplitNewAttributeStrategy< Rational >::SplitRibFuncType standard_split_rib_strategy (SplitRibBasicStrategy optype, const std::string_view &name)
 

Static Private Member Functions

static SplitFuncType standard_split_strategy (SplitBasicStrategy optype, const std::string_view &={})
 
static SplitRibFuncType standard_split_rib_strategy (SplitRibBasicStrategy optype, const std::string_view &={})
 

Private Attributes

wmtk::attribute::MeshAttributeHandle m_handle
 
SplitRibFuncType m_split_rib_op
 
SplitFuncType m_split_op
 
bool m_will_throw = false
 
bool m_will_throw_rib = false
 
std::unique_ptr< SplitNewAttributeTopoInfom_topo_info
 

Detailed Description

template<typename T>
class wmtk::operations::SplitNewAttributeStrategy< T >

Definition at line 25 of file SplitNewAttributeStrategy.hpp.

Member Typedef Documentation

◆ OperationInOutData

◆ ReturnData

◆ ReturnVariant

template<typename T >
using wmtk::operations::SplitNewAttributeStrategy< T >::ReturnVariant = ReturnData::ReturnVariant

Definition at line 31 of file SplitNewAttributeStrategy.hpp.

◆ SplitFuncType

template<typename T >
using wmtk::operations::SplitNewAttributeStrategy< T >::SplitFuncType = std::function<std::array<VecType, 2>(const VecType&, const std::bitset<2>&)>

Definition at line 39 of file SplitNewAttributeStrategy.hpp.

◆ SplitRibFuncType

template<typename T >
using wmtk::operations::SplitNewAttributeStrategy< T >::SplitRibFuncType = std::function<VecType(const VecType&, const VecType&, const std::bitset<2>&)>

Definition at line 34 of file SplitNewAttributeStrategy.hpp.

◆ VecType

template<typename T >
using wmtk::operations::SplitNewAttributeStrategy< T >::VecType = VectorX<T>

Definition at line 28 of file SplitNewAttributeStrategy.hpp.

Constructor & Destructor Documentation

◆ SplitNewAttributeStrategy()

Member Function Documentation

◆ assign_split()

template<typename T >
void wmtk::operations::SplitNewAttributeStrategy< T >::assign_split ( wmtk::attribute::Accessor< T > &  accessor,
const Tuple input_simplex,
const std::array< Tuple, 2 > &  split_simplices 
) const
private

Definition at line 308 of file SplitNewAttributeStrategy.cpp.

References wmtk::attribute::Accessor< T, MeshType, Dim >::const_vector_attribute(), wmtk::attribute::Accessor< T, MeshType, Dim >::primitive_type(), and wmtk::attribute::Accessor< T, MeshType, Dim >::vector_attribute().

Here is the call graph for this function:

◆ assign_split_ribs()

template<typename T >
void wmtk::operations::SplitNewAttributeStrategy< T >::assign_split_ribs ( wmtk::attribute::Accessor< T > &  accessor,
const std::array< Tuple, 2 > &  input_ears,
const Tuple final_simplex 
) const
private

Definition at line 282 of file SplitNewAttributeStrategy.cpp.

References wmtk::attribute::Accessor< T, MeshType, Dim >::const_vector_attribute(), wmtk::attribute::Accessor< T, MeshType, Dim >::primitive_type(), and wmtk::attribute::Accessor< T, MeshType, Dim >::vector_attribute().

Here is the call graph for this function:

◆ invalid_state()

template<typename T >
bool wmtk::operations::SplitNewAttributeStrategy< T >::invalid_state
finaloverridevirtual

◆ matches_attribute()

template<typename T >
bool wmtk::operations::SplitNewAttributeStrategy< T >::matches_attribute ( const attribute::MeshAttributeHandle handle) const
overridevirtual

◆ mesh() [1/3]

template<typename T >
const Mesh & wmtk::operations::NewAttributeStrategy::mesh
virtual

Implements wmtk::operations::NewAttributeStrategy.

Definition at line 34 of file NewAttributeStrategy.cpp.

◆ mesh() [2/3]

template<typename T >
Mesh & wmtk::operations::SplitNewAttributeStrategy< T >::mesh
overridevirtual

Implements wmtk::operations::NewAttributeStrategy.

Definition at line 356 of file SplitNewAttributeStrategy.cpp.

Referenced by wmtk::operations::SplitNewAttributeStrategy< T >::SplitNewAttributeStrategy().

Here is the caller graph for this function:

◆ mesh() [3/3]

template<typename T >
virtual Mesh& wmtk::operations::NewAttributeStrategy::mesh
virtual

◆ name()

template<typename T >
std::string wmtk::operations::SplitNewAttributeStrategy< T >::name
finaloverridevirtual

◆ primitive_type()

template<typename T >
PrimitiveType wmtk::operations::SplitNewAttributeStrategy< T >::primitive_type
overridevirtual

◆ set_rib_strategy() [1/2]

template<typename T >
void wmtk::operations::SplitNewAttributeStrategy< T >::set_rib_strategy ( SplitRibBasicStrategy  t)

Definition at line 330 of file SplitNewAttributeStrategy.cpp.

References wmtk::operations::Throw.

◆ set_rib_strategy() [2/2]

template<typename T >
void wmtk::operations::SplitNewAttributeStrategy< T >::set_rib_strategy ( SplitRibFuncType &&  f)

Definition at line 343 of file SplitNewAttributeStrategy.cpp.

Referenced by wmtk::operations::SplitNewAttributeStrategy< T >::SplitNewAttributeStrategy().

Here is the caller graph for this function:

◆ set_strategy() [1/2]

template<typename T >
void wmtk::operations::SplitNewAttributeStrategy< T >::set_strategy ( SplitBasicStrategy  t)

Definition at line 336 of file SplitNewAttributeStrategy.cpp.

References wmtk::operations::Throw.

◆ set_strategy() [2/2]

template<typename T >
void wmtk::operations::SplitNewAttributeStrategy< T >::set_strategy ( SplitFuncType &&  f)

Definition at line 349 of file SplitNewAttributeStrategy.cpp.

Referenced by wmtk::operations::SplitNewAttributeStrategy< T >::SplitNewAttributeStrategy().

Here is the caller graph for this function:

◆ standard_split_rib_strategy() [1/2]

template<typename T >
SplitNewAttributeStrategy< T >::SplitRibFuncType wmtk::operations::SplitNewAttributeStrategy< T >::standard_split_rib_strategy ( SplitRibBasicStrategy  optype,
const std::string_view &  name = {} 
)
staticprivate

Definition at line 82 of file SplitNewAttributeStrategy.cpp.

References wmtk::operations::CopyOther, wmtk::operations::CopyTuple, wmtk::operations::Default, wmtk::log_and_throw_error(), wmtk::operations::Mean, wmtk::operations::None, wmtk::operations::SplitNewAttributeStrategy< T >::standard_split_rib_strategy(), and wmtk::operations::Throw.

Referenced by wmtk::operations::SplitNewAttributeStrategy< T >::standard_split_rib_strategy().

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

◆ standard_split_rib_strategy() [2/2]

SplitNewAttributeStrategy< Rational >::SplitRibFuncType wmtk::operations::SplitNewAttributeStrategy< Rational >::standard_split_rib_strategy ( SplitRibBasicStrategy  optype,
const std::string_view &  name 
)
private

Definition at line 135 of file SplitNewAttributeStrategy.cpp.

References wmtk::operations::CopyOther, wmtk::operations::CopyTuple, wmtk::operations::Default, wmtk::log_and_throw_error(), wmtk::operations::Mean, wmtk::operations::None, and wmtk::operations::Throw.

Here is the call graph for this function:

◆ standard_split_strategy() [1/2]

template<typename T >
SplitNewAttributeStrategy< T >::SplitFuncType wmtk::operations::SplitNewAttributeStrategy< T >::standard_split_strategy ( SplitBasicStrategy  optype,
const std::string_view &  name = {} 
)
staticprivate

Definition at line 25 of file SplitNewAttributeStrategy.cpp.

References wmtk::operations::Copy, wmtk::operations::Default, wmtk::operations::Half, wmtk::log_and_throw_error(), wmtk::operations::None, and wmtk::operations::Throw.

Here is the call graph for this function:

◆ standard_split_strategy() [2/2]

SplitNewAttributeStrategy< Rational >::SplitFuncType wmtk::operations::SplitNewAttributeStrategy< Rational >::standard_split_strategy ( SplitBasicStrategy  optype,
const std::string_view &  name 
)
private

Definition at line 53 of file SplitNewAttributeStrategy.cpp.

References wmtk::operations::Copy, wmtk::operations::Default, wmtk::operations::Half, wmtk::log_and_throw_error(), wmtk::operations::None, and wmtk::operations::Throw.

Here is the call graph for this function:

◆ targets()

template<typename T >
std::vector<wmtk::attribute::MeshAttributeHandle> wmtk::operations::SplitNewAttributeStrategy< T >::targets ( ) const
inlinefinaloverridevirtual

◆ update()

template<typename T >
void wmtk::operations::SplitNewAttributeStrategy< T >::update ( Mesh m,
const ReturnData ret_data,
const OperationInOutData op_data 
) const
finaloverridevirtual

Implements wmtk::operations::BaseSplitNewAttributeStrategy.

Definition at line 217 of file SplitNewAttributeStrategy.cpp.

References wmtk::Mesh::create_accessor(), wmtk::simplex::NavigatableSimplex::tuple(), and wmtk::Vertex.

Here is the call graph for this function:

◆ update_handle_mesh()

template<typename T >
void wmtk::operations::SplitNewAttributeStrategy< T >::update_handle_mesh ( Mesh m)
overridevirtual

Member Data Documentation

◆ m_handle

◆ m_split_op

template<typename T >
SplitFuncType wmtk::operations::SplitNewAttributeStrategy< T >::m_split_op
private

Definition at line 72 of file SplitNewAttributeStrategy.hpp.

◆ m_split_rib_op

template<typename T >
SplitRibFuncType wmtk::operations::SplitNewAttributeStrategy< T >::m_split_rib_op
private

Definition at line 71 of file SplitNewAttributeStrategy.hpp.

◆ m_topo_info

◆ m_will_throw

template<typename T >
bool wmtk::operations::SplitNewAttributeStrategy< T >::m_will_throw = false
private

Definition at line 73 of file SplitNewAttributeStrategy.hpp.

◆ m_will_throw_rib

template<typename T >
bool wmtk::operations::SplitNewAttributeStrategy< T >::m_will_throw_rib = false
private

Definition at line 74 of file SplitNewAttributeStrategy.hpp.


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