preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
precice::mesh::Tetrahedron Class Reference

Tetrahedron of a mesh, defined by 4 vertices. More...

#include <Tetrahedron.hpp>

Collaboration diagram for precice::mesh::Tetrahedron:
[legend]

Public Member Functions

 Tetrahedron (Vertex &vertexOne, Vertex &vertexTwo, Vertex &vertexThree, Vertex &vertexFour)
 
int getDimensions () const
 Returns dimensionalty of space the Tetrahedron is embedded in.
 
Vertexvertex (int i)
 Returns tetrahedron vertex with index 0, 1, 2 or 3.
 
const Vertexvertex (int i) const
 Returns const tetrahedron vertex with index 0, 1, 2 or 3.
 
double getVolume () const
 Returns the unsigned volume of the tetrahedron.
 
const Eigen::VectorXd getCenter () const
 Returns the barycenter of the tetrahedron.
 
double getEnclosingRadius () const
 Returns the radius of the sphere enclosing the tetrahedron.
 
bool operator== (const Tetrahedron &other) const
 Compares two Tetrahedrons for equality.
 
bool operator!= (const Tetrahedron &other) const
 Not equal, implemented in terms of equal.
 
bool operator< (const Tetrahedron &other) const
 Weak ordering based on vertex ids.
 

Static Public Attributes

static constexpr int vertexCount {4}
 Amount of vertices.
 

Private Attributes

std::array< Vertex *, 4 > _vertices
 Vertices defining the Tetrahedron.
 

Detailed Description

Tetrahedron of a mesh, defined by 4 vertices.

Definition at line 17 of file Tetrahedron.hpp.

Constructor & Destructor Documentation

◆ Tetrahedron()

precice::mesh::Tetrahedron::Tetrahedron ( Vertex & vertexOne,
Vertex & vertexTwo,
Vertex & vertexThree,
Vertex & vertexFour )

Constructor based on 4 vertices

The vertices will be sorted by Vertex::getID(). This allows to weakly order tetrahedra.

Definition at line 12 of file Tetrahedron.cpp.

Member Function Documentation

◆ getCenter()

const Eigen::VectorXd precice::mesh::Tetrahedron::getCenter ( ) const

Returns the barycenter of the tetrahedron.

Definition at line 50 of file Tetrahedron.cpp.

Here is the call graph for this function:

◆ getDimensions()

int precice::mesh::Tetrahedron::getDimensions ( ) const

Returns dimensionalty of space the Tetrahedron is embedded in.

Definition at line 45 of file Tetrahedron.cpp.

◆ getEnclosingRadius()

double precice::mesh::Tetrahedron::getEnclosingRadius ( ) const

Returns the radius of the sphere enclosing the tetrahedron.

Definition at line 55 of file Tetrahedron.cpp.

Here is the call graph for this function:

◆ getVolume()

double precice::mesh::Tetrahedron::getVolume ( ) const

Returns the unsigned volume of the tetrahedron.

Definition at line 40 of file Tetrahedron.cpp.

Here is the call graph for this function:

◆ operator!=()

bool precice::mesh::Tetrahedron::operator!= ( const Tetrahedron & other) const

Not equal, implemented in terms of equal.

Definition at line 70 of file Tetrahedron.cpp.

◆ operator<()

bool precice::mesh::Tetrahedron::operator< ( const Tetrahedron & other) const
inline

Weak ordering based on vertex ids.

Definition at line 66 of file Tetrahedron.hpp.

Here is the call graph for this function:

◆ operator==()

bool precice::mesh::Tetrahedron::operator== ( const Tetrahedron & other) const

Compares two Tetrahedrons for equality.

Two Tetrahedrons are equal if their vertices are the same, up to permutations

Definition at line 64 of file Tetrahedron.cpp.

Here is the call graph for this function:

◆ vertex() [1/2]

Vertex & precice::mesh::Tetrahedron::vertex ( int i)
inline

Returns tetrahedron vertex with index 0, 1, 2 or 3.

Definition at line 79 of file Tetrahedron.hpp.

◆ vertex() [2/2]

const Vertex & precice::mesh::Tetrahedron::vertex ( int i) const
inline

Returns const tetrahedron vertex with index 0, 1, 2 or 3.

Definition at line 85 of file Tetrahedron.hpp.

Member Data Documentation

◆ _vertices

std::array<Vertex *, 4> precice::mesh::Tetrahedron::_vertices
private

Vertices defining the Tetrahedron.

Definition at line 74 of file Tetrahedron.hpp.

◆ vertexCount

constexpr int precice::mesh::Tetrahedron::vertexCount {4}
staticconstexpr

Amount of vertices.

Definition at line 20 of file Tetrahedron.hpp.


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