GEOS
Functions
geos::meshMapUtilities Namespace Reference

This namespace contains helper functions that facilitate access into the assortment of maps used by GEOSX mesh object managers (e.g. array2d/array1d(array1d)/ArrayOfArrays/ArrayOfSets, etc.) More...

Functions

template<typename T , int USD>
GEOS_HOST_DEVICE localIndex size0 (arrayView2d< T, USD > const &map)
 
template<typename T >
GEOS_HOST_DEVICE localIndex size0 (ArrayOfArraysView< T > const &map)
 
template<typename T >
GEOS_HOST_DEVICE localIndex size0 (ArrayOfSetsView< T > const &map)
 
template<typename POLICY , typename VIEW_TYPE >
ArrayOfArrays< std::remove_const_t< typename VIEW_TYPE::ValueType > > transposeIndexMap (VIEW_TYPE const &srcMap, localIndex const dstSize, localIndex const overAlloc=0)
 Transposes an input map (array2d, ArrayOfArrays or ArrayOfSets) More...
 
template<typename POLICY >
void transformCellBlockToRegionMap (arrayView2d< localIndex const > const &blockToSubRegion, ToCellRelation< ArrayOfArrays< localIndex > > const &srcMap, ToElementRelation< ArrayOfArrays< localIndex > > &dstMap)
 Convert ToCellRelation into ToElementRelation. More...
 
template<typename POLICY , typename PERM1 , typename PERM2 >
void transformCellBlockToRegionMap (arrayView2d< localIndex const > const &blockToSubRegion, ToCellRelation< array2d< localIndex, PERM1 > > const &srcMap, ToElementRelation< array2d< localIndex, PERM2 > > &dstMap)
 Convert ToCellRelation into ToElementRelation. More...
 

Detailed Description

This namespace contains helper functions that facilitate access into the assortment of maps used by GEOSX mesh object managers (e.g. array2d/array1d(array1d)/ArrayOfArrays/ArrayOfSets, etc.)

Function Documentation

◆ size0() [1/3]

template<typename T >
GEOS_HOST_DEVICE localIndex geos::meshMapUtilities::size0 ( ArrayOfArraysView< T > const &  map)
inline
Returns
the size of the map along first dimension
Template Parameters
Ttype of map element
Parameters
mapreference to the map

Definition at line 59 of file MeshMapUtilities.hpp.

◆ size0() [2/3]

template<typename T >
GEOS_HOST_DEVICE localIndex geos::meshMapUtilities::size0 ( ArrayOfSetsView< T > const &  map)
inline
Returns
the size of the map along first dimension
Template Parameters
Ttype of map element
Parameters
mapreference to the map

Definition at line 71 of file MeshMapUtilities.hpp.

◆ size0() [3/3]

template<typename T , int USD>
GEOS_HOST_DEVICE localIndex geos::meshMapUtilities::size0 ( arrayView2d< T, USD > const &  map)
inline
Returns
the size of the map along first dimension
Template Parameters
Ttype of map element
USDunit-stride dimension of the map
Parameters
mapreference to the map

Definition at line 47 of file MeshMapUtilities.hpp.

◆ transformCellBlockToRegionMap() [1/2]

template<typename POLICY , typename PERM1 , typename PERM2 >
void geos::meshMapUtilities::transformCellBlockToRegionMap ( arrayView2d< localIndex const > const &  blockToSubRegion,
ToCellRelation< array2d< localIndex, PERM1 > > const &  srcMap,
ToElementRelation< array2d< localIndex, PERM2 > > &  dstMap 
)

Convert ToCellRelation into ToElementRelation.

Template Parameters
POLICYexecution policy
Parameters
blockToSubRegiona map from cell blocks to region/subregion pairs
srcMapsource map (object-to-cells)
dstMaptarget map (object-to-elements)

Definition at line 173 of file MeshMapUtilities.hpp.

◆ transformCellBlockToRegionMap() [2/2]

template<typename POLICY >
void geos::meshMapUtilities::transformCellBlockToRegionMap ( arrayView2d< localIndex const > const &  blockToSubRegion,
ToCellRelation< ArrayOfArrays< localIndex > > const &  srcMap,
ToElementRelation< ArrayOfArrays< localIndex > > &  dstMap 
)

Convert ToCellRelation into ToElementRelation.

Template Parameters
POLICYexecution policy
Parameters
blockToSubRegiona map from cell blocks to region/subregion pairs
srcMapsource map (object-to-cells)
dstMaptarget map (object-to-elements)

Definition at line 128 of file MeshMapUtilities.hpp.

◆ transposeIndexMap()

template<typename POLICY , typename VIEW_TYPE >
ArrayOfArrays< std::remove_const_t< typename VIEW_TYPE::ValueType > > geos::meshMapUtilities::transposeIndexMap ( VIEW_TYPE const &  srcMap,
localIndex const  dstSize,
localIndex const  overAlloc = 0 
)

Transposes an input map (array2d, ArrayOfArrays or ArrayOfSets)

Template Parameters
POLICYexecution policy to use
VIEW_TYPEtype of view of the source map
Parameters
srcMapthe source map
dstSizenumber of target objects ("cols" of srcMap)
overAllocoverallocation (extra capacity per row) for resulting map
Returns
the transpose of srcMap stored as ArrayOfArrays (most general form)

Definition at line 89 of file MeshMapUtilities.hpp.