#include <Cabana_Grid_GlobalGrid.hpp>
Public Types | |
| using | mesh_type = MeshType |
| Mesh type. | |
Public Member Functions | |
| GlobalGrid (MPI_Comm comm, const std::shared_ptr< GlobalMesh< MeshType > > &global_mesh, const std::array< bool, num_space_dim > &periodic, const BlockPartitioner< num_space_dim > &partitioner) | |
| Constructor. | |
| MPI_Comm | comm () const |
| Get the communicator. This communicator was generated with a Cartesian topology. | |
| const GlobalMesh< MeshType > & | globalMesh () const |
| Get the global mesh data. | |
| bool | isPeriodic (const int dim) const |
| Get whether a given dimension is periodic. | |
| bool | onLowBoundary (const int dim) const |
| Determine if this block is on a low boundary in this dimension. | |
| bool | onHighBoundary (const int dim) const |
| Determine if this block is on a high boundary in this dimension. | |
| int | dimNumBlock (const int dim) const |
| Get the number of blocks in each dimension in the global mesh. | |
| int | totalNumBlock () const |
| Get the total number of blocks. | |
| int | dimBlockId (const int dim) const |
| Get the id of this block in a given dimension. | |
| int | blockId () const |
| Get the id of this block. | |
| int | blockRank (const std::array< int, num_space_dim > &ijk) const |
| Get the MPI rank of a block with the given indices. If the rank is out of bounds and the boundary is not periodic, return -1 to indicate an invalid rank. | |
| template<std::size_t NSD = num_space_dim> | |
| std::enable_if_t< 3==NSD, int > | blockRank (const int i, const int j, const int k) const |
| Get the MPI rank of a block with the given indices. If the rank is out of bounds and the boundary is not periodic, return -1 to indicate an invalid rank. | |
| template<std::size_t NSD = num_space_dim> | |
| std::enable_if_t< 2==NSD, int > | blockRank (const int i, const int j) const |
| Get the MPI rank of a block with the given indices. If the rank is out of bounds and the boundary is not periodic, return -1 to indicate an invalid rank. | |
| int | globalNumEntity (Cell, const int dim) const |
| Get the global number of entities in a given dimension. | |
| int | globalNumEntity (Node, const int dim) const |
| Get the global number of entities in a given dimension. | |
| int | globalNumEntity (Face< Dim::I >, const int dim) const |
| Get the global number of entities in a given dimension. | |
| int | globalNumEntity (Face< Dim::J >, const int dim) const |
| Get the global number of entities in a given dimension. | |
| template<std::size_t NSD = num_space_dim> | |
| std::enable_if_t< 3==NSD, int > | globalNumEntity (Face< Dim::K >, const int dim) const |
| Get the global number of entities in a given dimension. | |
| template<std::size_t NSD = num_space_dim> | |
| std::enable_if_t< 3==NSD, int > | globalNumEntity (Edge< Dim::I >, const int dim) const |
| Get the global number of entities in a given dimension. | |
| template<std::size_t NSD = num_space_dim> | |
| std::enable_if_t< 3==NSD, int > | globalNumEntity (Edge< Dim::J >, const int dim) const |
| Get the global number of entities in a given dimension. | |
| template<std::size_t NSD = num_space_dim> | |
| std::enable_if_t< 3==NSD, int > | globalNumEntity (Edge< Dim::K >, const int dim) const |
| Get the global number of entities in a given dimension. | |
| int | ownedNumCell (const int dim) const |
| Get the owned number of cells in a given dimension of this block. | |
| int | globalOffset (const int dim) const |
| Get the global offset in a given dimension. This is where our block starts in the global indexing scheme. | |
| void | setNumCellAndOffset (const std::array< int, num_space_dim > &num_cell, const std::array< int, num_space_dim > &offset) |
| Set number of cells and offset of local part of the grid. Make sure these are consistent across all ranks. | |
Static Public Attributes | |
| static constexpr std::size_t | num_space_dim = mesh_type::num_space_dim |
| Spatial dimension. | |
Global logical grid.
| MeshType | Mesh type (uniform, non-uniform, sparse) |
| Cabana::Grid::GlobalGrid< MeshType >::GlobalGrid | ( | MPI_Comm | comm, |
| const std::shared_ptr< GlobalMesh< MeshType > > & | global_mesh, | ||
| const std::array< bool, num_space_dim > & | periodic, | ||
| const BlockPartitioner< num_space_dim > & | partitioner ) |
Constructor.
| comm | The communicator over which to define the grid. |
| global_mesh | The global mesh data. |
| periodic | Whether each logical dimension is periodic. |
| partitioner | The grid partitioner. |
| std::enable_if_t< 2==NSD, int > Cabana::Grid::GlobalGrid< MeshType >::blockRank | ( | const int | i, |
| const int | j ) const |
Get the MPI rank of a block with the given indices. If the rank is out of bounds and the boundary is not periodic, return -1 to indicate an invalid rank.
| i,j | Block index. |
| std::enable_if_t< 3==NSD, int > Cabana::Grid::GlobalGrid< MeshType >::blockRank | ( | const int | i, |
| const int | j, | ||
| const int | k ) const |
Get the MPI rank of a block with the given indices. If the rank is out of bounds and the boundary is not periodic, return -1 to indicate an invalid rank.
| i,j,k | Block index. |
| int Cabana::Grid::GlobalGrid< MeshType >::blockRank | ( | const std::array< int, num_space_dim > & | ijk | ) | const |
Get the MPI rank of a block with the given indices. If the rank is out of bounds and the boundary is not periodic, return -1 to indicate an invalid rank.
| ijk | Array of block indices. |
| int Cabana::Grid::GlobalGrid< MeshType >::dimBlockId | ( | const int | dim | ) | const |
Get the id of this block in a given dimension.
| dim | Spatial dimension. |
| int Cabana::Grid::GlobalGrid< MeshType >::dimNumBlock | ( | const int | dim | ) | const |
Get the number of blocks in each dimension in the global mesh.
| dim | Spatial dimension. |
| int Cabana::Grid::GlobalGrid< MeshType >::globalNumEntity | ( | Cell | , |
| const int | dim ) const |
Get the global number of entities in a given dimension.
| dim | Spatial dimension. |
| std::enable_if_t< 3==NSD, int > Cabana::Grid::GlobalGrid< MeshType >::globalNumEntity | ( | Edge< Dim::I > | , |
| const int | dim ) const |
Get the global number of entities in a given dimension.
| dim | Spatial dimension. |
| std::enable_if_t< 3==NSD, int > Cabana::Grid::GlobalGrid< MeshType >::globalNumEntity | ( | Edge< Dim::J > | , |
| const int | dim ) const |
Get the global number of entities in a given dimension.
| dim | Spatial dimension. |
| std::enable_if_t< 3==NSD, int > Cabana::Grid::GlobalGrid< MeshType >::globalNumEntity | ( | Edge< Dim::K > | , |
| const int | dim ) const |
Get the global number of entities in a given dimension.
| dim | Spatial dimension. |
| int Cabana::Grid::GlobalGrid< MeshType >::globalNumEntity | ( | Face< Dim::I > | , |
| const int | dim ) const |
Get the global number of entities in a given dimension.
| dim | Spatial dimension. |
| int Cabana::Grid::GlobalGrid< MeshType >::globalNumEntity | ( | Face< Dim::J > | , |
| const int | dim ) const |
Get the global number of entities in a given dimension.
| dim | Spatial dimension. |
| std::enable_if_t< 3==NSD, int > Cabana::Grid::GlobalGrid< MeshType >::globalNumEntity | ( | Face< Dim::K > | , |
| const int | dim ) const |
Get the global number of entities in a given dimension.
| dim | Spatial dimension. |
| int Cabana::Grid::GlobalGrid< MeshType >::globalNumEntity | ( | Node | , |
| const int | dim ) const |
Get the global number of entities in a given dimension.
| dim | Spatial dimension. |
| int Cabana::Grid::GlobalGrid< MeshType >::globalOffset | ( | const int | dim | ) | const |
Get the global offset in a given dimension. This is where our block starts in the global indexing scheme.
| dim | Spatial dimension. |
| bool Cabana::Grid::GlobalGrid< MeshType >::onHighBoundary | ( | const int | dim | ) | const |
Determine if this block is on a high boundary in this dimension.
| dim | Spatial dimension. |
| bool Cabana::Grid::GlobalGrid< MeshType >::onLowBoundary | ( | const int | dim | ) | const |
Determine if this block is on a low boundary in this dimension.
| dim | Spatial dimension. |
| int Cabana::Grid::GlobalGrid< MeshType >::ownedNumCell | ( | const int | dim | ) | const |
Get the owned number of cells in a given dimension of this block.
| dim | Spatial dimension. |
| void Cabana::Grid::GlobalGrid< MeshType >::setNumCellAndOffset | ( | const std::array< int, num_space_dim > & | num_cell, |
| const std::array< int, num_space_dim > & | offset ) |
Set number of cells and offset of local part of the grid. Make sure these are consistent across all ranks.
| num_cell | New number of owned cells for all dimensions. |
| offset | New global offset for all dimensions. |