Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana::Grid::BlockPartitioner< NumSpaceDim > Class Template Referenceabstract

Block partitioner base class. More...

#include <Cabana_Grid_Partitioner.hpp>

Inheritance diagram for Cabana::Grid::BlockPartitioner< NumSpaceDim >:

Public Member Functions

virtual std::array< int, num_space_dimranksPerDimension (MPI_Comm comm, const std::array< int, num_space_dim > &global_cells_per_dim) const =0
 Get the number of MPI ranks in each dimension of the grid.
 
virtual void ownedCellInfo (MPI_Comm cart_comm, const std::array< int, num_space_dim > &global_cells_per_dim, std::array< int, num_space_dim > &owned_num_cell, std::array< int, num_space_dim > &global_cell_offset) const =0
 Get the owned number of cells and global cell offset of the current MPI rank.
 

Static Public Attributes

static constexpr std::size_t num_space_dim = NumSpaceDim
 Spatial dimension.
 

Detailed Description

template<std::size_t NumSpaceDim>
class Cabana::Grid::BlockPartitioner< NumSpaceDim >

Block partitioner base class.

Template Parameters
NumSpaceDimSpatial dimension. Given global mesh parameters, the block partitioner computes how many MPI ranks are assigned to each logical dimension.

Member Function Documentation

◆ ownedCellInfo()

template<std::size_t NumSpaceDim>
virtual void Cabana::Grid::BlockPartitioner< NumSpaceDim >::ownedCellInfo ( MPI_Comm cart_comm,
const std::array< int, num_space_dim > & global_cells_per_dim,
std::array< int, num_space_dim > & owned_num_cell,
std::array< int, num_space_dim > & global_cell_offset ) const
pure virtual

Get the owned number of cells and global cell offset of the current MPI rank.

Parameters
cart_commThe MPI Cartesian communicator for the partitioning.
global_cells_per_dimThe number of global cells in each dimension.
owned_num_cell(Return) The owned number of cells of the current MPI rank in each dimension.
global_cell_offset(Return) The global cell offset of the current MPI rank in each dimension

Implemented in Cabana::Grid::DimBlockPartitioner< NumSpaceDim >, Cabana::Grid::ManualBlockPartitioner< NumSpaceDim >, and Cabana::Grid::SparseDimPartitioner< MemorySpace, CellPerTileDim, NumSpaceDim >.

◆ ranksPerDimension()

template<std::size_t NumSpaceDim>
virtual std::array< int, num_space_dim > Cabana::Grid::BlockPartitioner< NumSpaceDim >::ranksPerDimension ( MPI_Comm comm,
const std::array< int, num_space_dim > & global_cells_per_dim ) const
pure virtual

Get the number of MPI ranks in each dimension of the grid.

Parameters
commThe communicator to use for the partitioning.
global_cells_per_dimThe number of global cells in each dimension.
Returns
The number of MPI ranks in each dimension of the grid.

Implemented in Cabana::Grid::SparseDimPartitioner< MemorySpace, CellPerTileDim, NumSpaceDim >.


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