Template Numerical Library version\ main:4e58ea6
|
Orthogonal n-dimensional grid. More...
#include <TNL/Meshes/Grid.h>
Public Types | |
using | Cell = EntityType< Dimension > |
Type of grid entity expressing cells, i.e. grid entity with dimension equal to the grid dimension. | |
using | CoordinatesType = Containers::StaticVector< Dimension, Index > |
Type for grid entities cordinates. | |
using | DeviceType = Device |
Device to be used for the execution of grid operations. | |
using | Edge = EntityType< 1 > |
Type of grid entity expressing edges, i.e. grid entity with dimension equal to one. | |
using | EntitiesCounts = Containers::StaticVector< Dimension + 1, Index > |
template<int EntityDimension> | |
using | EntityType = GridEntity< Grid, EntityDimension > |
Alias for grid entities with given dimension. | |
using | Face = EntityType< Dimension - 1 > |
Type of grid entity expressing faces, i.e. grid entity with dimension equal to the grid dimension minus one. | |
using | GlobalIndexType = Index |
Type for indexing of the mesh entities of the grid. | |
using | IndexType = Index |
Type for indexing of the mesh entities of the grid. | |
using | OrientationNormalsContainer = Containers::StaticVector< 1 << Dimension, CoordinatesType > |
using | PointType = Containers::StaticVector< Dimension, Real > |
Type for world coordinates. | |
using | RealType = Real |
Type of the floating point numbers. | |
using | SpaceProductsContainer |
using | Vertex = EntityType< 0 > |
Type of grid entity expressing vertexes, i.e. grid entity with dimension equal to zero. | |
Public Member Functions | |
Grid () | |
Grid constructor with no parameters. | |
Grid (const CoordinatesType &dimensions) | |
Grid constructor with grid dimensions given as TNL::Meshes::Grid::CoordinatesType. | |
template<typename... Dimensions, std::enable_if_t< Templates::conjunction_v< std::is_convertible< Index, Dimensions >... >, bool > = true, std::enable_if_t< sizeof...(Dimensions)==Dimension, bool > = true> | |
Grid (Dimensions... dimensions) | |
Grid constructor with grid dimensions parameters. | |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | forAllEntities (Func func, FuncArgs... args) const |
Iterate over all mesh entities with given dimension and perform given lambda function on each of them. | |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | forBoundaryEntities (const CoordinatesType &begin, const CoordinatesType &end, Func func, FuncArgs... args) const |
Iterate over all boundary mesh entities of given region with given dimension and perform given lambda function on each of them. | |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | forBoundaryEntities (Func func, FuncArgs... args) const |
Iterate over all boundary mesh entities with given dimension and perform given lambda function on each of them. | |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | forEntities (const CoordinatesType &begin, const CoordinatesType &end, Func func, FuncArgs... args) const |
Iterate over all mesh entities within given region with given dimension and perform given lambda function on each of them. | |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | forInteriorEntities (Func func, FuncArgs... args) const |
Iterate over all interior mesh entities with given dimension and perform given lambda function on each of them. | |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | forLocalEntities (Func func, FuncArgs... args) const |
Iterate over all mesh entities within the local subdomain with given dimension and perform given lambda function on each of them. | |
template<int EntityDimension> | |
__cuda_callable__ CoordinatesType | getBasis (Index orientation) const noexcept |
Returns basis of the entity with the specific orientation. | |
__cuda_callable__ Real | getCellMeasure () const |
__cuda_callable__ const CoordinatesType & | getDimensions () const noexcept |
Returns dimensions as a number of edges along each axis in a form of coordinate vector. | |
template<int EntityDimension, std::enable_if_t< Templates::isInClosedInterval(0, EntityDimension, Dimension), bool > = true> | |
__cuda_callable__ Index | getEntitiesCount () const noexcept |
Returns number of entities of specific dimension given as a template parameter. | |
template<typename Entity , std::enable_if_t< Templates::isInClosedInterval(0, Entity::getEntityDimension(), Dimension), bool > = true> | |
__cuda_callable__ Index | getEntitiesCount () const noexcept |
Returns number of entities of specific entity type as a template parameter. | |
__cuda_callable__ Index | getEntitiesCount (IndexType dimension) const |
Returns number of entities of specific dimension. | |
__cuda_callable__ const EntitiesCounts & | getEntitiesCounts () const noexcept |
Returns count of entities for all dimensions. | |
template<typename... DimensionIndex, std::enable_if_t< Templates::conjunction_v< std::is_convertible< Index, DimensionIndex >... >, bool > = true, std::enable_if_t<(sizeof...(DimensionIndex) > 0), bool > = true> | |
__cuda_callable__ Containers::StaticVector< sizeof...(DimensionIndex), Index > | getEntitiesCounts (DimensionIndex... indices) const |
Returns count of entities of specific dimensions. | |
template<typename EntityType > | |
__cuda_callable__ EntityType | getEntity (const CoordinatesType &coordinates) const |
Grid entity getter based on entity type and entity coordinates. | |
template<int EntityDimension> | |
__cuda_callable__ EntityType< EntityDimension > | getEntity (const CoordinatesType &coordinates) const |
Grid entity getter based on entity dimension and entity coordinates. | |
template<typename EntityType > | |
__cuda_callable__ EntityType | getEntity (IndexType entityIdx) const |
Grid entity getter based on entity type and entity index. | |
template<int EntityDimension> | |
__cuda_callable__ EntityType< EntityDimension > | getEntity (IndexType entityIdx) const |
Grid entity getter based on entity dimension and entity index. | |
template<int EntityDimension> | |
__cuda_callable__ CoordinatesType | getEntityCoordinates (IndexType entityIdx, CoordinatesType &normals, Index &orientation) const noexcept |
Computes coordinates of a grid entity based on an index of the entity. | |
template<typename Entity > | |
__cuda_callable__ Index | getEntityIndex (const Entity &entity) const |
Gets entity index using entity type. | |
const CoordinatesType & | getInteriorBegin () const |
Gets begin of the region of interior cells, i.e. all cells without the boundary cells. | |
const CoordinatesType & | getInteriorEnd () const |
Gets end of the region of interior cells, i.e. all cells without the boundary cells. | |
const CoordinatesType & | getLocalBegin () const |
Gets the "lower left" corner of subdomain for distributed grid. | |
const CoordinatesType & | getLocalEnd () const |
Gets the "upper right" corner of subdomain for distributed grid. | |
template<int EntityDimension> | |
__cuda_callable__ CoordinatesType | getNormals (Index orientation) const noexcept |
Returns normals of the entity with the specific orientation. | |
template<int EntityDimension> | |
__cuda_callable__ IndexType | getOrientation (const CoordinatesType &normals) const noexcept |
Computes orientation index of a grid entity based on normals. | |
template<int EntityDimension, int EntityOrientation, std::enable_if_t< Templates::isInClosedInterval(0, EntityDimension, Dimension), bool > = true, std::enable_if_t< Templates::isInClosedInterval(0, EntityOrientation, Dimension), bool > = true> | |
__cuda_callable__ Index | getOrientedEntitiesCount () const noexcept |
Returns number of entities of specific dimension and orientation given as template parameters. | |
__cuda_callable__ Index | getOrientedEntitiesCount (IndexType dimension, IndexType orientation) const |
Returns number of entities of specific dimension and orientation. | |
__cuda_callable__ const PointType & | getOrigin () const noexcept |
Returns the origin of the grid. | |
__cuda_callable__ const PointType & | getProportions () const noexcept |
Get the proportions of the grid. | |
__cuda_callable__ Real | getSmallestSpaceStep () const noexcept |
Get the smallest space step. | |
__cuda_callable__ const PointType & | getSpaceSteps () const noexcept |
Returns the space steps of the grid. | |
template<Index... Powers, std::enable_if_t< sizeof...(Powers)==Dimension, bool > = true> | |
__cuda_callable__ Real | getSpaceStepsProducts () const noexcept |
Returns product of space step powers given as template parameters. | |
__cuda_callable__ Real | getSpaceStepsProducts (const CoordinatesType &powers) const |
Returns product of space steps powers. | |
template<typename... Powers, std::enable_if_t< Templates::conjunction_v< std::is_convertible< Index, Powers >... >, bool > = true, std::enable_if_t< sizeof...(Powers)==Dimension, bool > = true> | |
__cuda_callable__ Real | getSpaceStepsProducts (Powers... powers) const |
Returns product of given space steps powers. | |
void | setDimensions (const CoordinatesType &dimensions) |
Set the dimensions (or resolution) of the grid. This method accepts particular dimensions packed in a static vector. | |
template<typename... Dimensions, std::enable_if_t< Templates::conjunction_v< std::is_convertible< Index, Dimensions >... >, bool > = true, std::enable_if_t< sizeof...(Dimensions)==Dimension, bool > = true> | |
void | setDimensions (Dimensions... dimensions) |
Set the dimensions (or resolution) of the grid. The resolution must be given in terms on grid cells not grid vertices. The mthod accepts as many indexes for the dimensions as the dimension of the grid. | |
void | setDomain (const PointType &origin, const PointType &proportions) |
Sets the origin and proportions of this grid. | |
void | setInteriorBegin (const CoordinatesType &begin) |
Sets begin of the region of interior cells, i.e. all cells without the boundary cells. | |
void | setInteriorEnd (const CoordinatesType &end) |
Sets end of the region of interior cells, i.e. all cells without the boundary cells. | |
void | setLocalBegin (const CoordinatesType &begin) |
Sets the "lower left" corfner of subdomain of distributed grid. | |
void | setLocalEnd (const CoordinatesType &end) |
Sets the "upper right" corfner of subdomain of distributed grid. | |
void | setLocalSubdomain (const CoordinatesType &begin, const CoordinatesType &end) |
Sets the subdomain of distributed grid. | |
void | setOrigin (const PointType &origin) noexcept |
Set the origin of the grid in a form of a point. | |
template<typename... Coordinates, std::enable_if_t< Templates::conjunction_v< std::is_convertible< Real, Coordinates >... >, bool > = true, std::enable_if_t< sizeof...(Coordinates)==Dimension, bool > = true> | |
void | setOrigin (Coordinates... coordinates) noexcept |
Set the origin of the grid in a form of a pack of real numbers. | |
void | setSpaceSteps (const PointType &spaceSteps) noexcept |
Set the space steps along each dimension of the grid. | |
template<typename... Steps, std::enable_if_t< Templates::conjunction_v< std::is_convertible< Real, Steps >... >, bool > = true, std::enable_if_t< sizeof...(Steps)==Dimension, bool > = true> | |
void | setSpaceSteps (Steps... spaceSteps) noexcept |
Set the space steps along each dimension of the grid in a form of a pack of real numbers. | |
void | writeProlog (TNL::Logger &logger) const noexcept |
Writes info about the grid. | |
Static Public Member Functions | |
static constexpr Index | getEntityOrientationsCount (IndexType entityDimension) |
Returns the number of orientations for entity dimension. For example in 2-D Grid the edge can be vertical or horizontal. | |
static constexpr int | getMeshDimension () |
Returns the dimension of grid. | |
Static Public Attributes | |
static constexpr int | spaceStepsPowersSize = 5 |
Returns the coefficient powers size. | |
Protected Member Functions | |
void | fillEntitiesCount () |
void | fillNormals () |
void | fillProportions () |
void | fillSpaceSteps () |
void | fillSpaceStepsPowers () |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | traverseAll (const CoordinatesType &from, const CoordinatesType &to, Func func, FuncArgs... args) const |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | traverseAll (Func func, FuncArgs... args) const |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | traverseBoundary (const CoordinatesType &from, const CoordinatesType &to, Func func, FuncArgs... args) const |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | traverseBoundary (Func func, FuncArgs... args) const |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | traverseInterior (const CoordinatesType &from, const CoordinatesType &to, Func func, FuncArgs... args) const |
template<int EntityDimension, typename Func , typename... FuncArgs> | |
void | traverseInterior (Func func, FuncArgs... args) const |
Protected Attributes | |
Containers::StaticVector< Dimension+1, Index > | cumulativeEntitiesCountAlongNormals |
A cumulative map over dimensions. | |
CoordinatesType | dimensions |
Grid dimensions. | |
Containers::StaticVector< 1<< Dimension, Index > | entitiesCountAlongNormals |
A list of elements count along specific directions. | |
CoordinatesType | interiorBegin |
CoordinatesType | interiorEnd |
CoordinatesType | localBegin |
Region of subdomain if this grid represents one sudbdomain of distributed grid. | |
CoordinatesType | localEnd |
OrientationNormalsContainer | normals |
Container with normals defining grid entity orientations. | |
PointType | origin |
PointType | proportions |
PointType | spaceSteps |
SpaceProductsContainer | spaceStepsProducts |
Orthogonal n-dimensional grid.
This data structure represents regular orthogonal numerical mesh. It provides indexing of mesh entities like vertexes, edges, faces or cells together with parallel traversing of all, interior or boundary mesh entities.
Dimension | is grid dimension. |
Real | is type of the floating point numbers. |
Device | is the device to be used for the execution of grid operations. |
Index | is type for indexing of the mesh entities of the grid. |
using TNL::Meshes::Grid< Dimension, Real, Device, Index >::EntityType = GridEntity< Grid, EntityDimension > |
Alias for grid entities with given dimension.
EntityDimension | is dimensions of the grid entity. |
using TNL::Meshes::Grid< Dimension, Real, Device, Index >::GlobalIndexType = Index |
Type for indexing of the mesh entities of the grid.
This is for compatiblity with unstructured meshes.
using TNL::Meshes::Grid< Dimension, Real, Device, Index >::SpaceProductsContainer |
TNL::Meshes::Grid< Dimension, Real, Device, Index >::Grid | ( | Dimensions... | dimensions | ) |
Grid constructor with grid dimensions parameters.
Dimensions | is variadic template pack. |
dimensions | are dimensions along particular axes of the grid. The number of parameters must be equal to the size od the grid. |
TNL::Meshes::Grid< Dimension, Real, Device, Index >::Grid | ( | const CoordinatesType & | dimensions | ) |
Grid constructor with grid dimensions given as TNL::Meshes::Grid::CoordinatesType.
dimensions | are dimensions along particular axes of the grid. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::forAllEntities | ( | Func | func, |
FuncArgs... | args ) const |
Iterate over all mesh entities with given dimension and perform given lambda function on each of them.
Entities processed by this method are such that their coordinates \(c\) fullfil \( origin \leq c < origin + proportions\).
EntityDimension | is dimension of the grid entities. |
func | is an instance of the lambda function to be performed on each grid entity. It is supposed to have the following form: |
where entity represents given grid entity. See TNL::Meshes::GridEntity.
args | are packed arguments that are going to be passed to the lambda function. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::forBoundaryEntities | ( | const CoordinatesType & | begin, |
const CoordinatesType & | end, | ||
Func | func, | ||
FuncArgs... | args ) const |
Iterate over all boundary mesh entities of given region with given dimension and perform given lambda function on each of them.
EntityDimension | is dimension of the grid entities. |
begin | is the 'lower left' corner of the region. |
end | is the 'upper right' corner of the region. |
func | is an instance of the lambda function to be performed on each grid entity. It is supposed to have the following form: |
where entity represents given grid entity. See TNL::Meshes::GridEntity.
args | are packed arguments that are going to be passed to the lambda function. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::forBoundaryEntities | ( | Func | func, |
FuncArgs... | args ) const |
Iterate over all boundary mesh entities with given dimension and perform given lambda function on each of them.
EntityDimension | is dimension of the grid entities. |
func | is an instance of the lambda function to be performed on each grid entity. It is supposed to have the following form: |
where entity represents given grid entity. See TNL::Meshes::GridEntity.
args | are packed arguments that are going to be passed to the lambda function. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::forEntities | ( | const CoordinatesType & | begin, |
const CoordinatesType & | end, | ||
Func | func, | ||
FuncArgs... | args ) const |
Iterate over all mesh entities within given region with given dimension and perform given lambda function on each of them.
Entities processed by this method are such that their coordinates \(c\) fullfil \( begin \leq c < end\).
EntityDimension | is dimension of the grid entities. |
begin | is the 'lower left' corner of the region. |
end | is the 'upper right' corner of the region. |
func | is an instance of the lambda function to be performed on each grid entity. It is supposed to have the following form: |
where entity represents given grid entity. See TNL::Meshes::GridEntity.
args | are packed arguments that are going to be passed to the lambda function. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::forInteriorEntities | ( | Func | func, |
FuncArgs... | args ) const |
Iterate over all interior mesh entities with given dimension and perform given lambda function on each of them.
Entities processed by this method are such that their coordinates \(c\) fullfil \( origin < c < origin + proportions - 1\).
EntityDimension | is dimension of the grid entities. |
func | is an instance of the lambda function to be performed on each grid entity. It is supposed to have the following form: |
where entity represents given grid entity. See TNL::Meshes::GridEntity.
args | are packed arguments that are going to be passed to the lambda function. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::forLocalEntities | ( | Func | func, |
FuncArgs... | args ) const |
Iterate over all mesh entities within the local subdomain with given dimension and perform given lambda function on each of them.
Entities processed by this method are such that their coordinates \(c\) fullfil \( localBegin \leq c < localEnd\).
EntityDimension | is dimension of the grid entities. It is supposed to have the following form: |
where entity represents given grid entity. See TNL::Meshes::GridEntity.
func | is an instance of the lambda function to be performed on each grid entity. |
args | are packed arguments that are going to be passed to the lambda function. |
|
nodiscardnoexcept |
Returns basis of the entity with the specific orientation.
Basis is integer vector having ones for axis along which the entity has non-zero lengths. For example in 3D grid we have the following posibilities:
Entity | Basis |
---|---|
Cells | ( 1, 1, 1 ) |
Faces along x- and y- axes | ( 1, 1, 0 ) |
Faces along x- and z- axes | ( 1, 0, 1 ) |
Faces along y- and z- axes | ( 0, 1, 1 ) |
Edges along x-axis | ( 1, 0, 0 ) |
Edges along y-axis | ( 0, 1, 0 ) |
Edges along z-axis | ( 0, 0, 1 ) |
Vertexes | ( 0, 0, 0 ) |
EntityDimension | is dimensions of grid entity. |
[in] | orientation | is orientation of the entity |
|
nodiscardnoexcept |
Returns dimensions as a number of edges along each axis in a form of coordinate vector.
|
nodiscardnoexcept |
Returns number of entities of specific dimension given as a template parameter.
EntityDimension | is dimension of grid entities to be counted. |
|
nodiscardnoexcept |
Returns number of entities of specific entity type as a template parameter.
Entity | is type of grid entities to be counted. |
|
nodiscard |
Returns number of entities of specific dimension.
[in] | dimension | is a dimension of grid entities to be counted. |
|
nodiscardnoexcept |
Returns count of entities for all dimensions.
|
nodiscard |
Returns count of entities of specific dimensions.
DimensionsIndex | variadic template parameter for a list of dimensions. |
[in] | indices | is a list of dimensions of grid entities to be counted. |
|
nodiscard |
Grid entity getter based on entity type and entity coordinates.
Grid entity orientation is set to the default value. This is especially no problem in case of cells and vertexes.
EntityType | is type of the grid entity. |
coordinates | are coordinates of the grid entity. |
|
nodiscard |
Grid entity getter based on entity dimension and entity coordinates.
Grid entity orientation is set to the default value. This is especially no problem in case of cells and vertexes.
EntityDimension | is dimension of the grid entity. |
coordinates | are coordinates of the grid entity. |
|
nodiscard |
Grid entity getter based on entity type and entity index.
Remark: Computation of grid coordinates and its orientation based on the grid entity index is highly inefficient and it should not be used at critical parts of algorithms.
EntityType | is type of the grid entity. |
entityIdx | is index of the grid entity. |
|
nodiscard |
Grid entity getter based on entity dimension and entity index.
Remark: Computation of grid coordinates and its orientation based on the grid entity index is highly inefficient and it should not be used at critical parts of algorithms.
EntityDimension | is dimension of the grid entity. |
entityIdx | is index of the grid entity. |
|
nodiscardnoexcept |
Computes coordinates of a grid entity based on an index of the entity.
Remark: Computation of grid coordinates and its orientation based on the grid entity index is highly inefficient and it should not be used at critical parts of algorithms.
EntityDimension | is dimension of an entity. |
entityIdx | is an index of the entity. |
normals | this parameter is filled with the grid entity orientation in a form of normals. |
orientation | is an index of the grid entity orientation. |
|
nodiscard |
Gets entity index using entity type.
Entity | is a type of the entity. |
entity | is instance of the entity. |
|
staticconstexpr |
Returns the number of orientations for entity dimension. For example in 2-D Grid the edge can be vertical or horizontal.
[in] | entityDimension | is dimension of grid entities to be counted. |
|
nodiscard |
Gets begin of the region of interior cells, i.e. all cells without the boundary cells.
|
nodiscard |
Gets end of the region of interior cells, i.e. all cells without the boundary cells.
|
nodiscard |
Gets the "lower left" corner of subdomain for distributed grid.
|
nodiscard |
Gets the "upper right" corner of subdomain for distributed grid.
|
nodiscardnoexcept |
Returns normals of the entity with the specific orientation.
Normals is integer vector having ones for axis along which the entity has zero length. For example in 3D grid we have the following posibilities:
Entity | Normals |
---|---|
Cells | ( 0, 0, 0 ) |
Faces along x- and y- axes | ( 0, 0, 1 ) |
Faces along x- and z- axes | ( 0, 1, 0 ) |
Faces along y- and z- axes | ( 0, 1, 1 ) |
Edges along x-axis | ( 0, 1, 1 ) |
Edges along y-axis | ( 1, 0, 1 ) |
Edges along z-axis | ( 1, 1, 0 ) |
Vertexes | ( 1, 1, 1 ) |
EntityDimension | is dimensions of grid entity. |
[in] | orientation | is orientation of the entity |
|
nodiscardnoexcept |
Computes orientation index of a grid entity based on normals.
EntityDimension | is dimension of the grid entity. |
normals | defines the orientation of an entity. |
|
nodiscardnoexcept |
Returns number of entities of specific dimension and orientation given as template parameters.
EntityDimension | is dimension of the grid entities. |
EntityOrientation | is orientation of the grid entitie. |
|
nodiscard |
Returns number of entities of specific dimension and orientation.
[in] | dimension | is dimension of grid entities. |
[in] | orientation | is orientation of the entities. |
|
nodiscardnoexcept |
Returns the origin of the grid.
|
nodiscardnoexcept |
Get the proportions of the grid.
|
nodiscardnoexcept |
Get the smallest space step.
|
nodiscardnoexcept |
Returns the space steps of the grid.
|
nodiscardnoexcept |
Returns product of space step powers given as template parameters.
The powers can be only integers.
For example in 3D grid if powers are \( 1, 2, 3 \) the methods returns \( h_x^1 \cdot h_y^2 \cdot h_z^3\).
Powers | is a pack of indexes. |
|
nodiscard |
Returns product of space steps powers.
For example in 3D grid if powers are \( 1, 2, 3 \) the methods returns \( h_x^1 \cdot h_y^2 \cdot h_z^3\).
[in] | powers | is vector of numbers telling power of particular space steps. |
|
nodiscard |
Returns product of given space steps powers.
For example in 3D grid if powers are \( 1, 2, 3 \) the methods returns \( h_x^1 \cdot h_y^2 \cdot h_z^3\).
Powers | is a pack of template types. |
[in] | powers | is a pack of numbers telling power of particular space steps. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::setDimensions | ( | const CoordinatesType & | dimensions | ) |
Set the dimensions (or resolution) of the grid. This method accepts particular dimensions packed in a static vector.
dimensions | grid dimensions given in a form of coordinate vector. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::setDimensions | ( | Dimensions... | dimensions | ) |
Set the dimensions (or resolution) of the grid. The resolution must be given in terms on grid cells not grid vertices. The mthod accepts as many indexes for the dimensions as the dimension of the grid.
Dimensions | variadic template accepting a serie of indexes. |
[in] | dimensions | serie of indexes defining resolution of the grid. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::setDomain | ( | const PointType & | origin, |
const PointType & | proportions ) |
Sets the origin and proportions of this grid.
origin | is the origin of the grid. |
proportions | is total length of this grid along particular axis. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::setInteriorBegin | ( | const CoordinatesType & | begin | ) |
Sets begin of the region of interior cells, i.e. all cells without the boundary cells.
begin | is begin of the region of interior cells. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::setInteriorEnd | ( | const CoordinatesType & | end | ) |
Sets end of the region of interior cells, i.e. all cells without the boundary cells.
end | is end of the region of interior cells. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::setLocalBegin | ( | const CoordinatesType & | begin | ) |
Sets the "lower left" corfner of subdomain of distributed grid.
begin | is "lower left" corner of the subdomain. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::setLocalEnd | ( | const CoordinatesType & | end | ) |
Sets the "upper right" corfner of subdomain of distributed grid.
end | is "upper right" corner of the subdomain. |
void TNL::Meshes::Grid< Dimension, Real, Device, Index >::setLocalSubdomain | ( | const CoordinatesType & | begin, |
const CoordinatesType & | end ) |
Sets the subdomain of distributed grid.
begin | is "lower left" corner of the subdomain. |
end | is "upper right" corner of the subdomain. |
|
noexcept |
Set the origin of the grid in a form of a point.
[in] | origin | of the grid. |
|
noexcept |
Set the origin of the grid in a form of a pack of real numbers.
Coordinates | is a pack of templates types. |
[in] | coordinates | is a pack of real numbers defining the origin. |
|
noexcept |
Set the space steps along each dimension of the grid.
Calling of this method may change the grid proportions.
[in] | spaceSteps | are the space steps along each dimension of the grid. |
|
noexcept |
Set the space steps along each dimension of the grid in a form of a pack of real numbers.
Steps | is a pack of template types. |
[in] | spaceSteps | is a pack of real numbers defining the space steps of the grid. |
|
noexcept |
Writes info about the grid.
[in] | logger | is a logger used to write the grid. |
|
protected |
A list of elements count along specific directions.
First, elements will contain the count of 0 dimension elements. Second, elements will contain the count of 1-dimension elements and so on.
For example, let's have a 3-d grid, then the map indexing will be the next: 0 - 0 - count of vertices 1, 2, 3 - count of edges in x, y, z plane 4, 5, 6 - count of faces in xy, yz, zy plane 7 - count of cells in z y x plane
|
protected |
Container with normals defining grid entity orientations.
normals[ orientationIdx ]
gives normals for given orientation index.