Wildmeshing Toolkit
wmtk::simplex::RawSimplex Class Reference

A meshless implementation of the simplex that just stores an array of ids. More...

#include <RawSimplex.hpp>

Public Member Functions

 RawSimplex ()=default
 
 RawSimplex (const Mesh &mesh, const std::vector< Tuple > &vertices)
 
 RawSimplex (std::vector< int64_t > &&vertices)
 
 RawSimplex (const Mesh &mesh, const Simplex &simplex)
 
int64_t dimension () const
 
bool operator== (const RawSimplex &o) const
 
bool operator< (const RawSimplex &o) const
 
RawSimplex opposite_face (const int64_t excluded_id)
 Get the face opposite to the given vertex. More...
 
RawSimplex opposite_face (const Mesh &mesh, const Tuple &vertex)
 Get the face opposite to the given vertex. More...
 
RawSimplex opposite_face (const RawSimplex &face)
 Get the face opposite to the given face. More...
 
RawSimplexCollection faces ()
 Get all faces of the simplex. More...
 

Private Attributes

std::vector< int64_t > m_vertices
 

Detailed Description

A meshless implementation of the simplex that just stores an array of ids.

It is used for scenarios where a mesh does not exist.

It must not be used for "degenerated" simplices that contain the same vertex several times, e.g. {0,1,2,0} because it would be reduced to {0,1,2}.

Definition at line 19 of file RawSimplex.hpp.

Constructor & Destructor Documentation

◆ RawSimplex() [1/4]

wmtk::simplex::RawSimplex::RawSimplex ( )
default

Referenced by faces(), and opposite_face().

Here is the caller graph for this function:

◆ RawSimplex() [2/4]

wmtk::simplex::RawSimplex::RawSimplex ( const Mesh mesh,
const std::vector< Tuple > &  vertices 
)

Definition at line 11 of file RawSimplex.cpp.

References wmtk::Mesh::id(), wmtk::Mesh::is_valid(), m_vertices, wmtk::Vertex, and wmtk::simplex::vertices().

Here is the call graph for this function:

◆ RawSimplex() [3/4]

wmtk::simplex::RawSimplex::RawSimplex ( std::vector< int64_t > &&  vertices)

Definition at line 24 of file RawSimplex.cpp.

References m_vertices.

◆ RawSimplex() [4/4]

wmtk::simplex::RawSimplex::RawSimplex ( const Mesh mesh,
const Simplex simplex 
)

Definition at line 30 of file RawSimplex.cpp.

References wmtk::simplex::Simplex::tuple(), and wmtk::Vertex.

Here is the call graph for this function:

Member Function Documentation

◆ dimension()

int64_t wmtk::simplex::RawSimplex::dimension ( ) const

Definition at line 38 of file RawSimplex.cpp.

References m_vertices.

Referenced by faces(), operator<(), and opposite_face().

Here is the caller graph for this function:

◆ faces()

RawSimplexCollection wmtk::simplex::RawSimplex::faces ( )

Get all faces of the simplex.

Definition at line 111 of file RawSimplex.cpp.

References dimension(), m_vertices, and RawSimplex().

Here is the call graph for this function:

◆ operator<()

bool wmtk::simplex::RawSimplex::operator< ( const RawSimplex o) const

Definition at line 52 of file RawSimplex.cpp.

References dimension(), and m_vertices.

Here is the call graph for this function:

◆ operator==()

bool wmtk::simplex::RawSimplex::operator== ( const RawSimplex o) const

Definition at line 43 of file RawSimplex.cpp.

References m_vertices.

◆ opposite_face() [1/3]

RawSimplex wmtk::simplex::RawSimplex::opposite_face ( const int64_t  excluded_id)

Get the face opposite to the given vertex.

The face consists of all vertices except for the given one.

Parameters
excluded_idThe vertex index that is not included in the returned simplex.
Returns
RawSimplex representing the face opposing the given vertex.

Definition at line 65 of file RawSimplex.cpp.

References dimension(), and m_vertices.

Referenced by opposite_face().

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

◆ opposite_face() [2/3]

RawSimplex wmtk::simplex::RawSimplex::opposite_face ( const Mesh mesh,
const Tuple vertex 
)

Get the face opposite to the given vertex.

The face consists of all vertices except for the given one.

Parameters
mesh
vertexA tuple representing the vertex that is not included in the returned simplex.
Returns
RawSimplex representing the face opposing the given vertex.

Definition at line 82 of file RawSimplex.cpp.

References wmtk::Mesh::id(), wmtk::Mesh::is_valid(), opposite_face(), and wmtk::Vertex.

Here is the call graph for this function:

◆ opposite_face() [3/3]

RawSimplex wmtk::simplex::RawSimplex::opposite_face ( const RawSimplex face)

Get the face opposite to the given face.

The opposite face consists of all vertices except for the one that belong to the given face.

Parameters
faceA RawSimplex representing that part of the simplex that is not included in the returned simplex.
Returns
RawSimplex representing the face opposing the given face.

Definition at line 89 of file RawSimplex.cpp.

References m_vertices, and RawSimplex().

Here is the call graph for this function:

Member Data Documentation

◆ m_vertices

std::vector<int64_t> wmtk::simplex::RawSimplex::m_vertices
private

Definition at line 73 of file RawSimplex.hpp.

Referenced by dimension(), faces(), operator<(), operator==(), opposite_face(), and RawSimplex().


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