KASKADE 7 development version
Loading...
Searching...
No Matches
Kaskade::Cube< Real_ > Class Template Reference

A 3D brick class. More...

#include <cube.hh>

Inheritance diagram for Kaskade::Cube< Real_ >:
Kaskade::BasicGridElement< double, 3 >

Public Types

typedef Real_ Real

Public Member Functions

 Cube (bool symmetric=false)
 Creates the unit cube \( [0,1]^3 \).
 Cube (Dune::FieldVector< Real, 3 > const &x0, Dune::FieldVector< Real, 3 > const &dx, bool symmetric)
 Creates the cube \( [x,x+dx] \times [y,y+dy] \times [z,z+dz] \).
std::vector< Dune::FieldVector< double, dim > > const & getVertices () const
std::vector< std::vector< unsigned int > > const & getSimplices () const

Static Public Attributes

static constexpr int dim

Protected Attributes

std::vector< Dune::FieldVector< double, dim > > vertices
std::vector< std::vector< unsigned int > > simplices

Detailed Description

template<class Real_ = double>
class Kaskade::Cube< Real_ >

A 3D brick class.

This provides the functionality to create a list of tetrahedra that cover the brick. The coverage by tetrahedra can be symmetric or not, to be chosen on construction.

Nonsymmetric coverage splits the cube into six pyramids, one on each cube face and extending to the cube center, and then splits these pyramids into two tetrahedra each, such that the cube face is subdivided by a diagonal. The diagonals on opposite faces match, such that cubes can be concatenated along any dimension. This is the 3D equivalent of a criss grid. In total, 9 vertices are created (in the cube corners and the center).

Symmetric coverage splits the cube into pyramids as above, but then splits each pyramid symmetrically into four tetrahedra. This leads to 24 tetrahedra and 15 vertices.

Definition at line 145 of file cube.hh.

Member Typedef Documentation

◆ Real

template<class Real_ = double>
typedef Real_ Kaskade::Cube< Real_ >::Real

Definition at line 148 of file cube.hh.

Constructor & Destructor Documentation

◆ Cube() [1/2]

template<class Real_ = double>
Kaskade::Cube< Real_ >::Cube ( bool symmetric = false)
inlineexplicit

Creates the unit cube \( [0,1]^3 \).

Definition at line 153 of file cube.hh.

Referenced by Cube().

◆ Cube() [2/2]

template<class Real_ = double>
Kaskade::Cube< Real_ >::Cube ( Dune::FieldVector< Real, 3 > const & x0,
Dune::FieldVector< Real, 3 > const & dx,
bool symmetric )
inline

Creates the cube \( [x,x+dx] \times [y,y+dy] \times [z,z+dz] \).

Definition at line 160 of file cube.hh.

Member Function Documentation

◆ getSimplices()

std::vector< std::vector< unsigned int > > const & Kaskade::BasicGridElement< double, dim_ >::getSimplices ( ) const
inlineinherited

Definition at line 49 of file cube.hh.

◆ getVertices()

std::vector< Dune::FieldVector< double, dim > > const & Kaskade::BasicGridElement< double, dim_ >::getVertices ( ) const
inlineinherited

Definition at line 48 of file cube.hh.

Member Data Documentation

◆ dim

int Kaskade::BasicGridElement< double, dim_ >::dim
staticconstexprinherited

Definition at line 28 of file cube.hh.

◆ simplices

std::vector<std::vector<unsigned int> > Kaskade::BasicGridElement< double, dim_ >::simplices
protectedinherited

Definition at line 53 of file cube.hh.

◆ vertices

std::vector<Dune::FieldVector<double,dim> > Kaskade::BasicGridElement< double, dim_ >::vertices
protectedinherited

Definition at line 52 of file cube.hh.


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