AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS > Class Template Reference

View for material-dominant matsets. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/bump/views/MaterialView.hpp>

Inheritance diagram for axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >:

Classes

class  const_iterator
 An iterator class for iterating over read-only data in a zone. The iterator can access material ids and volume fractions for one material at a time in the associated zone. More...
 

Public Types

using MaterialID = IndexT
 
using ZoneIndex = IndexT
 
using IndexType = IndexT
 
using FloatType = FloatT
 
using IDList = StaticArray< IndexType, MAXMATERIALS >
 
using VFList = StaticArray< FloatType, MAXMATERIALS >
 

Public Member Functions

void add (MaterialID matno, const axom::ArrayView< ZoneIndex > &ids, const axom::ArrayView< FloatType > &vfs)
 
AXOM_HOST_DEVICE axom::IndexType numberOfZones () const
 
AXOM_HOST_DEVICE axom::IndexType numberOfMaterials (ZoneIndex zi) const
 
AXOM_HOST_DEVICE void zoneMaterials (ZoneIndex zi, IDList &ids, VFList &vfs) const
 
AXOM_HOST_DEVICE axom::IndexType zoneMaterials (ZoneIndex zi, axom::ArrayView< IndexType > &ids, axom::ArrayView< FloatType > &vfs) const
 
AXOM_HOST_DEVICE bool zoneContainsMaterial (ZoneIndex zi, MaterialID mat) const
 
AXOM_HOST_DEVICE bool zoneContainsMaterial (ZoneIndex zi, MaterialID mat, FloatType &vf) const
 
const_iterator AXOM_HOST_DEVICE beginZone (ZoneIndex zi) const
 Return the iterator for the beginning of a zone's material data. More...
 
const_iterator AXOM_HOST_DEVICE endZone (ZoneIndex zi) const
 Return the iterator for the end of a zone's material data. More...
 

Static Public Attributes

constexpr static axom::IndexType MaxMaterials = MAXMATERIALS
 
constexpr static axom::IndexType InvalidIndex = -1
 

Friends

class const_iterator
 

Detailed Description

template<typename IndexT, typename FloatT, axom::IndexType MAXMATERIALS = 20>
class axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >

View for material-dominant matsets.

Template Parameters
IndexTThe integer type used for material data.
FloatTThe floating point type used for material data (volume fractions).
MAXMATERIALSThe maximum number of materials to support.
matsets:
  matset:
    topology: topology
    volume_fractions:
      a: [a0, a1]
      b: [b0, b1, b2]
      c: [c2]
    element_ids:
      a: [0, 1]
      b: [0, 1, 2]
      c: [2]
    material_map: # (optional)
      a: 0
      b: 1
      c: 2
Note
This matset type does not seem so GPU friendly since there is some work to do for some of the queries.

Member Typedef Documentation

◆ MaterialID

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
using axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::MaterialID = IndexT

◆ ZoneIndex

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
using axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::ZoneIndex = IndexT

◆ IndexType

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
using axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::IndexType = IndexT

◆ FloatType

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
using axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::FloatType = FloatT

◆ IDList

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
using axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::IDList = StaticArray<IndexType, MAXMATERIALS>

◆ VFList

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
using axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::VFList = StaticArray<FloatType, MAXMATERIALS>

Member Function Documentation

◆ add()

◆ numberOfZones()

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
AXOM_HOST_DEVICE axom::IndexType axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::numberOfZones ( ) const
inline

◆ numberOfMaterials()

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
AXOM_HOST_DEVICE axom::IndexType axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::numberOfMaterials ( ZoneIndex  zi) const
inline

◆ zoneMaterials() [1/2]

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
AXOM_HOST_DEVICE void axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::zoneMaterials ( ZoneIndex  zi,
IDList ids,
VFList vfs 
) const
inline

◆ zoneMaterials() [2/2]

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
AXOM_HOST_DEVICE axom::IndexType axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::zoneMaterials ( ZoneIndex  zi,
axom::ArrayView< IndexType > &  ids,
axom::ArrayView< FloatType > &  vfs 
) const
inline

◆ zoneContainsMaterial() [1/2]

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
AXOM_HOST_DEVICE bool axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::zoneContainsMaterial ( ZoneIndex  zi,
MaterialID  mat 
) const
inline

◆ zoneContainsMaterial() [2/2]

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
AXOM_HOST_DEVICE bool axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::zoneContainsMaterial ( ZoneIndex  zi,
MaterialID  mat,
FloatType vf 
) const
inline

◆ beginZone()

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
const_iterator AXOM_HOST_DEVICE axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::beginZone ( ZoneIndex  zi) const
inline

Return the iterator for the beginning of a zone's material data.

Parameters
ziThe zone index being queried.
Returns
The iterator for the beginning of a zone's material data.

References axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::const_iterator, axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::numberOfZones(), and SLIC_ASSERT.

◆ endZone()

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
const_iterator AXOM_HOST_DEVICE axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::endZone ( ZoneIndex  zi) const
inline

Return the iterator for the end of a zone's material data.

Parameters
ziThe zone index being queried.
Returns
The iterator for the end of a zone's material data.

References axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::const_iterator, axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::numberOfZones(), and SLIC_ASSERT.

Friends And Related Function Documentation

◆ const_iterator

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
friend class const_iterator
friend

Member Data Documentation

◆ MaxMaterials

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
constexpr static axom::IndexType axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::MaxMaterials = MAXMATERIALS
staticconstexpr

◆ InvalidIndex

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
constexpr static axom::IndexType axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::InvalidIndex = -1
staticconstexpr

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