Template Numerical Library version\ main:4e58ea6
|
Structure describing a grid entity i.e., grid cells, faces, edges, vertexes and so on. More...
#include <TNL/Meshes/GridEntity.h>
Public Types | |
using | CoordinatesType = typename Grid::CoordinatesType |
Type of grid entities coordinates. | |
using | DeviceType = typename Grid::DeviceType |
Device to be used for execution of operations with the grid. | |
using | GridType = Grid |
Type of grid the entity belongs to. | |
using | IndexType = typename Grid::IndexType |
Type for indexing of the grid entities. | |
using | PointType = typename Grid::PointType |
Type of world coordinates. | |
using | RealType = typename Grid::RealType |
Type of floating point numbers. | |
Public Member Functions | |
__cuda_callable__ | GridEntity (const Grid &grid) |
Constructore with a grid reference. | |
__cuda_callable__ | GridEntity (const Grid &grid, const CoordinatesType &coordinates) |
Constructor with a grid reference and grid entity coordinates. | |
__cuda_callable__ | GridEntity (const Grid &grid, const CoordinatesType &coordinates, const CoordinatesType &normals) |
Constructor with a grid reference, grid entity coordinates and entity normals. | |
__cuda_callable__ | GridEntity (const Grid &grid, const CoordinatesType &coordinates, const CoordinatesType &normals, IndexType orientation) |
Constructor with a grid reference, grid entity coordinates, entity normals and index of entity orientation. | |
__cuda_callable__ | GridEntity (const Grid &grid, IndexType entityIdx) |
Constructor with a grid reference and grid entity index. | |
__cuda_callable__ CoordinatesType | getBasis () const |
Getter of the basis vector. | |
__cuda_callable__ PointType | getCenter () const |
Returns the center of the grid entity. | |
__cuda_callable__ CoordinatesType & | getCoordinates () |
Getter of the grid entity coordinates for non-constant instances. | |
__cuda_callable__ const CoordinatesType & | getCoordinates () const |
Getter of the grid entity coordinates for constant instances. | |
__cuda_callable__ const Grid & | getGrid () const |
Returns a reference on the grid the grid entity belongs to. | |
__cuda_callable__ IndexType | getIndex () const |
Get the entity index in the grid. | |
__cuda_callable__ RealType | getMeasure () const |
Returns the measure (length, surface or volume) of the grid entity. | |
__cuda_callable__ const Grid & | getMesh () const |
Returns reference to the grid the grid entity belongs to. | |
template<int Dimension> | |
__cuda_callable__ GridEntity< Grid, Dimension > | getNeighbourEntity (const CoordinatesType &offset) const |
Returns the neighbour grid entity. | |
template<int Dimension, int Orientation> | |
__cuda_callable__ GridEntity< Grid, Dimension > | getNeighbourEntity (const CoordinatesType &offset) const |
Returns the neighbour grid entity. | |
__cuda_callable__ const CoordinatesType & | getNormals () const |
Returns the packed normals vector of the grid entity. | |
__cuda_callable__ IndexType | getOrientation () const |
Returns index of the entity orientation. | |
PointType | getPoint () const |
Returns the point at the origin of the grid entity. | |
__cuda_callable__ bool | isBoundary () const |
Tells, if the entity is boundary entity. | |
__cuda_callable__ void | refresh () |
__cuda_callable__ void | setCoordinates (const CoordinatesType &coordinates) |
Setter of the grid entity coordinates. | |
__cuda_callable__ void | setNormals (const CoordinatesType &normals) |
Setter for the packed normals vector of the grid entity. | |
__cuda_callable__ void | setOrientation (IndexType orientation) |
Setter of the grid entity orientation index. | |
Static Public Member Functions | |
static constexpr int | getEntityDimension () |
Getter of the dimensions of the grid entity. | |
static constexpr int | getMeshDimension () |
Getter of the dimension of the grid. | |
Protected Attributes | |
CoordinatesType | coordinates |
const Grid & | grid |
IndexType | index |
CoordinatesType | normals |
IndexType | orientation |
Structure describing a grid entity i.e., grid cells, faces, edges, vertexes and so on.
Grid | is a typa of grid the entity belongs to. |
EntityDimension | is a dimensions of the grid entity. |
__cuda_callable__ TNL::Meshes::GridEntity< Grid, EntityDimension >::GridEntity | ( | const Grid & | grid | ) |
Constructore with a grid reference.
grid | is a reference on a grid the entity belongs to. |
__cuda_callable__ TNL::Meshes::GridEntity< Grid, EntityDimension >::GridEntity | ( | const Grid & | grid, |
const CoordinatesType & | coordinates ) |
Constructor with a grid reference and grid entity coordinates.
grid | is a reference on a grid the entity belongs to. |
coordinates | are coordinates of the grid entity. |
__cuda_callable__ TNL::Meshes::GridEntity< Grid, EntityDimension >::GridEntity | ( | const Grid & | grid, |
const CoordinatesType & | coordinates, | ||
const CoordinatesType & | normals ) |
Constructor with a grid reference, grid entity coordinates and entity normals.
Entity normals define the grid entity orientation.
grid | is a reference on a grid the entity belongs to. |
coordinates | are coordinates of the grid entity. |
normals | is a vector of packed normal vectors to the grid entity. |
__cuda_callable__ TNL::Meshes::GridEntity< Grid, EntityDimension >::GridEntity | ( | const Grid & | grid, |
const CoordinatesType & | coordinates, | ||
const CoordinatesType & | normals, | ||
IndexType | orientation ) |
Constructor with a grid reference, grid entity coordinates, entity normals and index of entity orientation.
Entity normals define the grid entity orientation. Index of entity orientation is rather internal information. Constructor without this parameter may be used preferably. The index can be computed using the method TNL::Meshes::Grid::getOrientation.
grid | is a reference on a grid the entity belongs to. |
coordinates | are coordinates of the grid entity. |
normals | is a vector of packed normal vectors to the grid entity. |
orientation | is an index of the grid entity orientation. |
__cuda_callable__ TNL::Meshes::GridEntity< Grid, EntityDimension >::GridEntity | ( | const Grid & | grid, |
IndexType | entityIdx ) |
Constructor with a grid reference and grid entity index.
grid | is a reference on a grid the entity belongs to. |
entityIdx | is index of the grid entity. |
|
nodiscard |
Getter of the basis vector.
The basis vector has one for each axis along which the grid entity has non-zero length.
The basis vector is not stored explicitly in the grid entity and it is computed on the fly.
|
nodiscard |
Returns the center of the grid entity.
|
nodiscard |
Getter of the grid entity coordinates for non-constant instances.
|
nodiscard |
Getter of the grid entity coordinates for constant instances.
|
staticconstexpr |
Getter of the dimensions of the grid entity.
|
nodiscard |
Returns a reference on the grid the grid entity belongs to.
|
nodiscard |
Get the entity index in the grid.
|
nodiscard |
Returns the measure (length, surface or volume) of the grid entity.
|
nodiscard |
Returns reference to the grid the grid entity belongs to.
|
staticconstexpr |
Getter of the dimension of the grid.
|
nodiscard |
Returns the neighbour grid entity.
Dimension | is a dimension of the neighbour grid entity. |
offset | is a offset of coordinates of the neighbour entity relative to this grid entity. |
|
nodiscard |
Returns the neighbour grid entity.
Dimension | is a dimension of the neighbour grid entity. |
Orientation | is an orientatio index of the grid entity. |
offset | is a offset of coordinates of the neighbour entity relative to this grid entity. |
|
nodiscard |
Returns index of the entity orientation.
Orientation is always paired with the normals. In other words, if orientations, entity dimensions and dimensions are equal, then normals are equal also.
|
nodiscard |
Returns the point at the origin of the grid entity.
|
nodiscard |
Tells, if the entity is boundary entity.
true
if the entity is a boundary entity and false
otherwise. __cuda_callable__ void TNL::Meshes::GridEntity< Grid, EntityDimension >::setCoordinates | ( | const CoordinatesType & | coordinates | ) |
Setter of the grid entity coordinates.
coordinates | are new coordinates of the grid entity. |
__cuda_callable__ void TNL::Meshes::GridEntity< Grid, EntityDimension >::setNormals | ( | const CoordinatesType & | normals | ) |
Setter for the packed normals vector of the grid entity.
This vector defines the orienation of the grid entity.
normals | is a vector of packed normal vectors to the grid entity. |
__cuda_callable__ void TNL::Meshes::GridEntity< Grid, EntityDimension >::setOrientation | ( | IndexType | orientation | ) |
Setter of the grid entity orientation index.
This is rather internal information. The index can be computed using the method TNL::Meshes::Grid::getOrientation.
orientation | is a index of the grid entity orientation. |