Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana::Grid::ArrayLayout< EntityType, MeshType > Class Template Reference

Entity layout for array data on the local mesh. More...

#include <Cabana_Grid_Array.hpp>

Public Types

using entity_type = EntityType
 Entity type.
 
using mesh_type = MeshType
 Mesh type.
 

Public Member Functions

 ArrayLayout (const std::shared_ptr< LocalGrid< MeshType > > &local_grid, const int dofs_per_entity)
 Constructor.
 
const std::shared_ptr< LocalGrid< MeshType > > localGrid () const
 Get the local grid over which this layout is defined.
 
int dofsPerEntity () const
 Get the number of degrees-of-freedom on each grid entity.
 
template<class DecompositionTag, class IndexType>
IndexSpace< num_space_dim+1 > indexSpace (DecompositionTag decomposition_tag, IndexType index_type) const
 
template<class DecompositionTag>
IndexSpace< num_space_dim+1 > sharedIndexSpace (DecompositionTag decomposition_tag, const std::array< int, num_space_dim > &off_ijk, const int halo_width=-1) const
 
template<class DecompositionTag, std::size_t NSD = num_space_dim>
std::enable_if_t< 3==NSD, IndexSpace< 4 > > sharedIndexSpace (DecompositionTag decomposition_tag, const int off_i, const int off_j, const int off_k, const int halo_width=-1) const
 
template<class DecompositionTag, std::size_t NSD = num_space_dim>
std::enable_if_t< 2==NSD, IndexSpace< 3 > > sharedIndexSpace (DecompositionTag decomposition_tag, const int off_i, const int off_j, const int halo_width=-1) const
 

Static Public Attributes

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

Detailed Description

template<class EntityType, class MeshType>
class Cabana::Grid::ArrayLayout< EntityType, MeshType >

Entity layout for array data on the local mesh.

Template Parameters
EntityTypeArray entity type: Cell, Node, Edge, or Face
MeshTypeMesh type: UniformMesh, NonUniformMesh

Constructor & Destructor Documentation

◆ ArrayLayout()

template<class EntityType, class MeshType>
Cabana::Grid::ArrayLayout< EntityType, MeshType >::ArrayLayout ( const std::shared_ptr< LocalGrid< MeshType > > & local_grid,
const int dofs_per_entity )
inline

Constructor.

Parameters
local_gridThe local grid over which the layout will be constructed.
dofs_per_entityThe number of degrees-of-freedom per grid entity.

Member Function Documentation

◆ indexSpace()

template<class EntityType, class MeshType>
template<class DecompositionTag, class IndexType>
IndexSpace< num_space_dim+1 > Cabana::Grid::ArrayLayout< EntityType, MeshType >::indexSpace ( DecompositionTag decomposition_tag,
IndexType index_type ) const
inline

Get the index space of the array elements in the given decomposition.

◆ sharedIndexSpace() [1/3]

template<class EntityType, class MeshType>
template<class DecompositionTag, std::size_t NSD = num_space_dim>
std::enable_if_t< 2==NSD, IndexSpace< 3 > > Cabana::Grid::ArrayLayout< EntityType, MeshType >::sharedIndexSpace ( DecompositionTag decomposition_tag,
const int off_i,
const int off_j,
const int halo_width = -1 ) const
inline

Get the local index space of the array elements we shared with the given neighbor in the given decomposition.

Parameters
decomposition_tagDecomposition type: Own or Ghost
off_i,off_jNeighbor offset index in a given dimension.
halo_widthOptional depth of shared indices within the halo. Must be less than or equal to the halo width of the local grid. Default is to use the halo width of the local grid.

◆ sharedIndexSpace() [2/3]

template<class EntityType, class MeshType>
template<class DecompositionTag, std::size_t NSD = num_space_dim>
std::enable_if_t< 3==NSD, IndexSpace< 4 > > Cabana::Grid::ArrayLayout< EntityType, MeshType >::sharedIndexSpace ( DecompositionTag decomposition_tag,
const int off_i,
const int off_j,
const int off_k,
const int halo_width = -1 ) const
inline

Get the local index space of the array elements we shared with the given neighbor in the given decomposition.

Parameters
decomposition_tagDecomposition type: Own or Ghost
off_i,off_j,off_kNeighbor offset index in a given dimension.
halo_widthOptional depth of shared indices within the halo. Must be less than or equal to the halo width of the local grid. Default is to use the halo width of the local grid.

◆ sharedIndexSpace() [3/3]

template<class EntityType, class MeshType>
template<class DecompositionTag>
IndexSpace< num_space_dim+1 > Cabana::Grid::ArrayLayout< EntityType, MeshType >::sharedIndexSpace ( DecompositionTag decomposition_tag,
const std::array< int, num_space_dim > & off_ijk,
const int halo_width = -1 ) const
inline

Get the local index space of the array elements we shared with the given neighbor in the given decomposition.

Parameters
decomposition_tagDecomposition type: Own or Ghost
off_ijkArray of neighbor offset indices.
halo_widthOptional depth of shared indices within the halo. Must be less than or equal to the halo width of the local grid. Default is to use the halo width of the local grid.

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