Wildmeshing Toolkit
wmtk::simplex::RawSimplexCollection Class Reference

#include <RawSimplexCollection.hpp>

Public Member Functions

 RawSimplexCollection (std::vector< RawSimplex > &&simplices={})
 
 RawSimplexCollection (SimplexCollection &&sc)
 
const std::vector< RawSimplex > & simplex_vector () const
 Return const reference to the RawSimplex vector. More...
 
std::vector< RawSimplexsimplex_vector (const int64_t dimension) const
 Return vector of all simplices of the requested dimension. More...
 
void add (const RawSimplex &simplex)
 Add simplex to the collection. More...
 
void add (const Mesh &mesh, const Simplex &simplex)
 
void add (const RawSimplexCollection &simplex_collection)
 
void add (const SimplexCollection &simplex_collection)
 
void add (const Mesh &mesh, const PrimitiveType &ptype, const std::vector< Tuple > &tuple_vec)
 
void sort_and_clean ()
 Sort simplex vector and remove duplicates. More...
 
bool contains (const RawSimplex &simplex) const
 Check if simplex is contained in collection. More...
 
auto begin ()
 
auto end ()
 
auto begin () const
 
auto end () const
 
auto cbegin () const
 
auto cend () const
 

Static Public Member Functions

static RawSimplexCollection get_union (const RawSimplexCollection &collection_a, const RawSimplexCollection &collection_b)
 Get union of two simplex collections. More...
 
static RawSimplexCollection get_intersection (const RawSimplexCollection &collection_a, const RawSimplexCollection &collection_b)
 Get intersection of two simplex collections. More...
 
static bool are_simplex_collections_equal (const RawSimplexCollection &collection_a, const RawSimplexCollection &collection_b)
 Check if the two simplex collections are equal. More...
 

Private Attributes

std::vector< RawSimplexm_simplices
 

Detailed Description

Definition at line 10 of file RawSimplexCollection.hpp.

Constructor & Destructor Documentation

◆ RawSimplexCollection() [1/2]

wmtk::simplex::RawSimplexCollection::RawSimplexCollection ( std::vector< RawSimplex > &&  simplices = {})
inline

Definition at line 13 of file RawSimplexCollection.hpp.

◆ RawSimplexCollection() [2/2]

wmtk::simplex::RawSimplexCollection::RawSimplexCollection ( SimplexCollection &&  sc)

Definition at line 8 of file RawSimplexCollection.cpp.

References add().

Here is the call graph for this function:

Member Function Documentation

◆ add() [1/5]

void wmtk::simplex::RawSimplexCollection::add ( const Mesh mesh,
const PrimitiveType ptype,
const std::vector< Tuple > &  tuple_vec 
)

Definition at line 55 of file RawSimplexCollection.cpp.

References m_simplices.

◆ add() [2/5]

void wmtk::simplex::RawSimplexCollection::add ( const Mesh mesh,
const Simplex simplex 
)

Definition at line 33 of file RawSimplexCollection.cpp.

References add().

Here is the call graph for this function:

◆ add() [3/5]

void wmtk::simplex::RawSimplexCollection::add ( const RawSimplex simplex)

Add simplex to the collection.

There is no sorting or any check if the vertex already exists

Definition at line 28 of file RawSimplexCollection.cpp.

References m_simplices.

Referenced by add(), and RawSimplexCollection().

Here is the caller graph for this function:

◆ add() [4/5]

void wmtk::simplex::RawSimplexCollection::add ( const RawSimplexCollection simplex_collection)

Definition at line 38 of file RawSimplexCollection.cpp.

References m_simplices.

◆ add() [5/5]

void wmtk::simplex::RawSimplexCollection::add ( const SimplexCollection simplex_collection)

Definition at line 44 of file RawSimplexCollection.cpp.

References add(), m_simplices, wmtk::simplex::SimplexCollection::mesh(), and wmtk::simplex::SimplexCollection::simplex_vector().

Here is the call graph for this function:

◆ are_simplex_collections_equal()

bool wmtk::simplex::RawSimplexCollection::are_simplex_collections_equal ( const RawSimplexCollection collection_a,
const RawSimplexCollection collection_b 
)
static

Check if the two simplex collections are equal.

The collections must be cleaned and sorted.

Definition at line 115 of file RawSimplexCollection.cpp.

References get_union(), and m_simplices.

Here is the call graph for this function:

◆ begin() [1/2]

auto wmtk::simplex::RawSimplexCollection::begin ( )
inline

Definition at line 83 of file RawSimplexCollection.hpp.

References m_simplices.

Referenced by contains(), and get_union().

Here is the caller graph for this function:

◆ begin() [2/2]

auto wmtk::simplex::RawSimplexCollection::begin ( ) const
inline

Definition at line 85 of file RawSimplexCollection.hpp.

References m_simplices.

◆ cbegin()

auto wmtk::simplex::RawSimplexCollection::cbegin ( ) const
inline

Definition at line 87 of file RawSimplexCollection.hpp.

References m_simplices.

◆ cend()

auto wmtk::simplex::RawSimplexCollection::cend ( ) const
inline

Definition at line 88 of file RawSimplexCollection.hpp.

References m_simplices.

◆ contains()

bool wmtk::simplex::RawSimplexCollection::contains ( const RawSimplex simplex) const

Check if simplex is contained in collection.

Collection musst be sorted! Peform sort_and_clean before calling this function.

Definition at line 74 of file RawSimplexCollection.cpp.

References begin(), and end().

Here is the call graph for this function:

◆ end() [1/2]

auto wmtk::simplex::RawSimplexCollection::end ( )
inline

Definition at line 84 of file RawSimplexCollection.hpp.

References m_simplices.

Referenced by contains(), and get_union().

Here is the caller graph for this function:

◆ end() [2/2]

auto wmtk::simplex::RawSimplexCollection::end ( ) const
inline

Definition at line 86 of file RawSimplexCollection.hpp.

References m_simplices.

◆ get_intersection()

RawSimplexCollection wmtk::simplex::RawSimplexCollection::get_intersection ( const RawSimplexCollection collection_a,
const RawSimplexCollection collection_b 
)
static

Get intersection of two simplex collections.

The collections must be sorted!

Definition at line 96 of file RawSimplexCollection.cpp.

References m_simplices, and wmtk::components::set_intersection().

Here is the call graph for this function:

◆ get_union()

RawSimplexCollection wmtk::simplex::RawSimplexCollection::get_union ( const RawSimplexCollection collection_a,
const RawSimplexCollection collection_b 
)
static

Get union of two simplex collections.

The collections must be sorted!

Definition at line 80 of file RawSimplexCollection.cpp.

References begin(), end(), and m_simplices.

Referenced by are_simplex_collections_equal().

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

◆ simplex_vector() [1/2]

const std::vector<RawSimplex>& wmtk::simplex::RawSimplexCollection::simplex_vector ( ) const
inline

Return const reference to the RawSimplex vector.

Definition at line 22 of file RawSimplexCollection.hpp.

References m_simplices.

◆ simplex_vector() [2/2]

std::vector< RawSimplex > wmtk::simplex::RawSimplexCollection::simplex_vector ( const int64_t  dimension) const

Return vector of all simplices of the requested dimension.

Definition at line 13 of file RawSimplexCollection.cpp.

References m_simplices.

◆ sort_and_clean()

void wmtk::simplex::RawSimplexCollection::sort_and_clean ( )

Sort simplex vector and remove duplicates.

Definition at line 67 of file RawSimplexCollection.cpp.

References m_simplices.

Member Data Documentation

◆ m_simplices

std::vector<RawSimplex> wmtk::simplex::RawSimplexCollection::m_simplices
private

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