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

Material view for unibuffer 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::UnibufferMaterialView< 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< MaterialID, MAXMATERIALS >
 
using VFList = StaticArray< FloatType, MAXMATERIALS >
 

Public Member Functions

void set (const axom::ArrayView< IndexType > &material_ids, const axom::ArrayView< FloatType > &volume_fractions, const axom::ArrayView< IndexType > &sizes, const axom::ArrayView< IndexType > &offsets, const axom::ArrayView< IndexType > &indices)
 
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
 

Friends

class const_iterator
 

Detailed Description

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

Material view for unibuffer 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
    material_map:
      a: 1
      b: 2
      c: 0
    material_ids: [0, 1, 2, 2, 2, 0, 1, 0]
    volume_fractions: [0, a0, b2, b1, b0, 0, a1, 0]
    sizes: [2, 2, 1]
    offsets: [0, 2, 4]
    indices: [1, 4, 6, 3, 2]

Member Typedef Documentation

◆ MaterialID

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

◆ ZoneIndex

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

◆ IndexType

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

◆ FloatType

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

◆ IDList

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

◆ VFList

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

Member Function Documentation

◆ set()

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
void axom::bump::views::UnibufferMaterialView< IndexT, FloatT, MAXMATERIALS >::set ( const axom::ArrayView< IndexType > &  material_ids,
const axom::ArrayView< FloatType > &  volume_fractions,
const axom::ArrayView< IndexType > &  sizes,
const axom::ArrayView< IndexType > &  offsets,
const axom::ArrayView< IndexType > &  indices 
)
inline

◆ numberOfZones()

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

◆ numberOfMaterials()

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

◆ zoneMaterials() [1/2]

◆ zoneMaterials() [2/2]

◆ zoneContainsMaterial() [1/2]

template<typename IndexT , typename FloatT , axom::IndexType MAXMATERIALS = 20>
AXOM_HOST_DEVICE bool axom::bump::views::UnibufferMaterialView< 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::UnibufferMaterialView< 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::UnibufferMaterialView< 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::UnibufferMaterialView< IndexT, FloatT, MAXMATERIALS >::const_iterator, axom::bump::views::UnibufferMaterialView< 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::UnibufferMaterialView< 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::UnibufferMaterialView< IndexT, FloatT, MAXMATERIALS >::const_iterator, axom::bump::views::UnibufferMaterialView< 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::UnibufferMaterialView< IndexT, FloatT, MAXMATERIALS >::MaxMaterials = MAXMATERIALS
staticconstexpr

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