Entity layout for sparse array data on the local sparse mesh.
More...
#include <Cabana_Grid_SparseArray.hpp>
|
using | mesh_type = MeshType |
| Mesh Type, should be SparseMesh.
|
|
using | scalar_type = typename mesh_type::scalar_type |
| Scalar Type.
|
|
using | entity_type = EntityType |
| Entity Type.
|
|
using | member_types = DataTypes |
| Array member types, such as Cabana::MemberTypes<double, float[3]>
|
|
using | sparse_map_type = SparseMapType |
| Abbreviation for Sparse Map Type.
|
|
using | value_type = typename sparse_map_type::value_type |
| value type in sparse map, i.e., the tile ID (array ID) type
|
|
using | key_type = typename sparse_map_type::key_type |
| key type in sparse map, i.e., the tile key type
|
|
using | memory_space = typename sparse_map_type::memory_space |
| Memory space, the same memory space in sparse map.
|
|
|
| SparseArrayLayout (const std::shared_ptr< LocalGrid< MeshType > > &local_grid, SparseMapType &sparse_map, const float over_allocation) |
| (Host) Constructor
|
|
SparseMapType & | sparseMap () |
| get reference of sparse map
|
|
const std::shared_ptr< LocalGrid< MeshType > > | localGrid () const |
| Get the local grid over which this layout is defined.
|
|
uint64_t | sizeCell () const |
| array size in cell
|
|
uint64_t | sizeTile () const |
| array size in tile
|
|
uint64_t | reservedCellSize (float factor) const |
| array reservation size in cell
|
|
uint64_t | arraySize () const |
| Array size in cell (default size measurse: cell)
|
|
void | clear () |
| clear valid info inside array layout; i.e. clear sparse map
|
|
template<class ExecSpace, class PositionSliceType> |
void | registerSparseMap (PositionSliceType &positions, const int particle_num, const int p2g_radius=1) |
| Register valid grids in sparse map according to input particle positions.
|
|
KOKKOS_FORCEINLINE_FUNCTION value_type | queryCell (const int cell_i, const int cell_j, const int cell_k) const |
| (Device) Query the 1D cell ID from the 3D cell ijk
|
|
KOKKOS_FORCEINLINE_FUNCTION value_type | queryTile (const int cell_i, const int cell_j, const int cell_k) const |
| (Device) Query the 1D tile ID from the 3D tile ijk
|
|
KOKKOS_FORCEINLINE_FUNCTION value_type | queryTileFromTileId (const int tile_i, const int tile_j, const int tile_k) const |
| (Device) Query the 1D tile key from the 3D tile ijk
|
|
KOKKOS_FORCEINLINE_FUNCTION value_type | queryTileFromTileKey (const key_type tile_key) const |
| (Device) Query the 1D tile key from the 1D tile key
|
|
KOKKOS_FORCEINLINE_FUNCTION value_type | cellLocalId (const int cell_i, const int cell_j, const int cell_k) const |
| (Device) Get local cell ID from cell IJK
|
|
|
static constexpr unsigned long long | cell_bits_per_tile_dim |
|
static constexpr unsigned long long | cell_num_per_tile_dim |
| cell number inside each tile per dimension
|
|
static constexpr std::size_t | num_space_dim = sparse_map_type::rank |
| dimension number
|
|
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
class Cabana::Grid::Experimental::SparseArrayLayout< DataTypes, EntityType, MeshType, SparseMapType >
Entity layout for sparse array data on the local sparse mesh.
- Template Parameters
-
◆ SparseArrayLayout()
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
(Host) Constructor
- Parameters
-
local_grid | Shared pointer to local grid |
sparse_map | Reference to sparse map |
over_allocation | Factor to increase reserved size for Edge and Face entity |
◆ cellLocalId()
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
(Device) Get local cell ID from cell IJK
- Parameters
-
cell_i,cell_j,cell_k | Cell ID in each dimension (both local and global IJK work) |
◆ queryCell()
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
(Device) Query the 1D cell ID from the 3D cell ijk
- Parameters
-
cell_i,cell_j,cell_k | Cell ID in each dimension |
◆ queryTile()
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
(Device) Query the 1D tile ID from the 3D tile ijk
- Parameters
-
cell_i,cell_j,cell_k | Cell ID in each dimension |
◆ queryTileFromTileId()
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
(Device) Query the 1D tile key from the 3D tile ijk
- Parameters
-
tile_i,tile_j,tile_k | Tile ID in each dimension |
◆ queryTileFromTileKey()
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
(Device) Query the 1D tile key from the 1D tile key
- Parameters
-
◆ registerSparseMap()
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
template<class ExecSpace, class PositionSliceType>
Register valid grids in sparse map according to input particle positions.
- Parameters
-
positions | Input particle positions. |
particle_num | Number of valid particles inside positions |
p2g_radius | The half range of grids that will be influenced by each particle, depending on the interpolation kernel |
◆ reservedCellSize()
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
array reservation size in cell
- Parameters
-
factor | scale up the real size as reserved space |
◆ cell_bits_per_tile_dim
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
Initial value:=
sparse_map_type::cell_bits_per_tile_dim
least bit number required to represent local cell ids inside a tile per dimension
◆ cell_num_per_tile_dim
template<class DataTypes, class EntityType, class MeshType, class SparseMapType>
Initial value:=
sparse_map_type::cell_num_per_tile_dim
cell number inside each tile per dimension
The documentation for this class was generated from the following file: