AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::bump::views::detail Namespace Reference

Functions

template<axom::IndexType MAXMATERIALS>
constexpr void verifyPositiveMaxMaterials ()
 
void verifyMixedField (const conduit::Node &n_field)
 
template<typename FuncType , axom::IndexType MAXMATERIALS = 20>
bool dispatch_material_unibuffer_with_values (const conduit::Node &matset, const conduit::Node &values, FuncType &&func)
 Dispatch Conduit nodes containing a unibuffer element-dominant matset and a values array to a function as the appropriate type of matset view. More...
 
template<typename IntElement >
IntElement getMaterialID (const conduit::Node &matset, const std::string &matName, IntElement defaultValue)
 Use the material_map, if it exists, to get the material id of the named material. More...
 
template<typename FuncType , axom::IndexType MAXMATERIALS = 20>
bool dispatch_material_element_dominant_with_values (const conduit::Node &matset, const conduit::Node &values_object, FuncType &&func)
 Dispatch a Conduit node containing a multibuffer element-dominant matset to a function as the appropriate type of matset view. More...
 
template<typename FuncType , axom::IndexType MAXMATERIALS = 20>
bool dispatch_material_material_dominant_with_values (const conduit::Node &matset, const conduit::Node &values_object, FuncType &&func)
 Dispatch a Conduit node containing a material-dominant matset to a function as the appropriate type of matset view. More...
 
void verifyMatchingMaterialOrder (const conduit::Node &mat_values, const conduit::Node &field_values)
 
template<typename MatsetView , typename FuncType >
bool dispatch_unibuffer_field (const conduit::Node &n_field, FuncType &&func)
 Dispatch a unibuffer matset_values field. More...
 
template<typename MatsetView , typename FuncType >
bool dispatch_multibuffer_field (const conduit::Node &n_field, FuncType &&func)
 Dispatch a multibuffer matset_values field. More...
 

Function Documentation

◆ verifyPositiveMaxMaterials()

template<axom::IndexType MAXMATERIALS>
constexpr void axom::bump::views::detail::verifyPositiveMaxMaterials ( )
constexpr

◆ verifyMixedField()

void axom::bump::views::detail::verifyMixedField ( const conduit::Node &  n_field)
inline

References SLIC_ERROR_IF.

◆ dispatch_material_unibuffer_with_values()

template<typename FuncType , axom::IndexType MAXMATERIALS = 20>
bool axom::bump::views::detail::dispatch_material_unibuffer_with_values ( const conduit::Node &  matset,
const conduit::Node &  values,
FuncType &&  func 
)

Dispatch Conduit nodes containing a unibuffer element-dominant matset and a values array to a function as the appropriate type of matset view.

Template Parameters
FuncTypeThe function/lambda type that will take the matset.
Parameters
matsetThe node that contains the matset.
valuesThe node that contains the values to be used as volume fractions.
funcThe function/lambda that will operate on the matset view.
Returns
true if the dispatch worked, false otherwise.

References axom::bump::views::UnibufferMaterialView< IndexT, FloatT, MAXMATERIALS >::set(), and axom::bump::views::verify().

◆ getMaterialID()

template<typename IntElement >
IntElement axom::bump::views::detail::getMaterialID ( const conduit::Node &  matset,
const std::string &  matName,
IntElement  defaultValue 
)

Use the material_map, if it exists, to get the material id of the named material.

Parameters
matsetThe node that contains the matset.
matNameThe name of the material.
defaultValueThe default matno to use if the material_map is not present.
Returns
The material id for the named material.

◆ dispatch_material_element_dominant_with_values()

template<typename FuncType , axom::IndexType MAXMATERIALS = 20>
bool axom::bump::views::detail::dispatch_material_element_dominant_with_values ( const conduit::Node &  matset,
const conduit::Node &  values_object,
FuncType &&  func 
)

Dispatch a Conduit node containing a multibuffer element-dominant matset to a function as the appropriate type of matset view.

Template Parameters
FuncTypeThe function/lambda type that will take the matset.
Parameters
matsetThe node that contains the matset.
values_objectThe node that contains the values object to be used as volume fractions.
funcThe function/lambda that will operate on the matset view.
Returns
true if the dispatch worked, false otherwise.

References axom::bump::views::ElementDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::add(), and axom::bump::views::verify().

◆ dispatch_material_material_dominant_with_values()

template<typename FuncType , axom::IndexType MAXMATERIALS = 20>
bool axom::bump::views::detail::dispatch_material_material_dominant_with_values ( const conduit::Node &  matset,
const conduit::Node &  values_object,
FuncType &&  func 
)

Dispatch a Conduit node containing a material-dominant matset to a function as the appropriate type of matset view.

Template Parameters
FuncTypeThe function/lambda type that will take the matset.
Parameters
matsetThe node that contains the matset.
values_objectThe node that contains the values to use as volume fractions and indices.
funcThe function/lambda that will operate on the matset view.
Returns
true if the dispatch worked, false otherwise.

References axom::bump::views::MaterialDominantMaterialView< IndexT, FloatT, MAXMATERIALS >::add(), and axom::bump::views::verify().

◆ verifyMatchingMaterialOrder()

void axom::bump::views::detail::verifyMatchingMaterialOrder ( const conduit::Node &  mat_values,
const conduit::Node &  field_values 
)
inline

References SLIC_ERROR_IF.

◆ dispatch_unibuffer_field()

template<typename MatsetView , typename FuncType >
bool axom::bump::views::detail::dispatch_unibuffer_field ( const conduit::Node &  n_field,
FuncType &&  func 
)

Dispatch a unibuffer matset_values field.

Template Parameters
MatsetViewThe type of matset view associated with the field. This has implications for the field storage.
FuncTypeThe function/lambda type to call on the MixedFieldView.

References SLIC_ERROR_IF, axom::bump::views::MixedFieldView< MatsetView, FieldT >::traits(), and verifyMixedField().

◆ dispatch_multibuffer_field()

template<typename MatsetView , typename FuncType >
bool axom::bump::views::detail::dispatch_multibuffer_field ( const conduit::Node &  n_field,
FuncType &&  func 
)

Dispatch a multibuffer matset_values field.

Template Parameters
MatsetViewThe type of matset view associated with the field. This has implications for the field storage.
FuncTypeThe function/lambda type to call on the MixedFieldView.

References SLIC_ERROR_IF, axom::bump::views::MixedFieldView< MatsetView, FieldT >::traits(), and verifyMixedField().