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

Namespaces

 detail
 
 internal
 

Classes

struct  cpp2conduit
 This class provides type traits that let us map C++ types to types / values useful in Conduit. More...
 
struct  cpp2conduit< conduit::int8 >
 
struct  cpp2conduit< conduit::int16 >
 
struct  cpp2conduit< conduit::int32 >
 
struct  cpp2conduit< conduit::int64 >
 
struct  cpp2conduit< conduit::uint8 >
 
struct  cpp2conduit< conduit::uint16 >
 
struct  cpp2conduit< conduit::uint32 >
 
struct  cpp2conduit< conduit::uint64 >
 
struct  cpp2conduit< conduit::float32 >
 
struct  cpp2conduit< conduit::float64 >
 
struct  mask_traits
 Determines best mask type to use for an ExecSpace. More...
 
struct  accumulation_traits
 This class and its specializations provide a type trait that lets us determine the type that should be used to accumulate values when we do floating point math. More...
 
struct  accumulation_traits< double >
 
struct  accumulation_traits< long >
 
struct  accumulation_traits< unsigned long >
 
struct  ComputeShapeAmount
 Base template for computing a shape's area or volume. More...
 
struct  ComputeShapeAmount< 2 >
 2D specialization for shapes to compute area. More...
 
struct  ComputeShapeAmount< 3 >
 3D specialization for shapes to compute volume. More...
 

Functions

std::vector< std::string > coordsetAxes (const conduit::Node &n_input)
 Return the names of the axes for a coordset. More...
 
bool isDeviceAllocated (const conduit::Node &n)
 Returns whether the data pointer in the Conduit node appears to be allocated on a device. More...
 
template<typename ExecSpace >
void copy (conduit::Node &dest, const conduit::Node &src, int destAllocatorID=axom::execution_space< ExecSpace >::allocatorID())
 Copies a Conduit tree in the src node to a new Conduit dest node, making sure to allocate array data in the appropriate memory space for the execution space. More...
 
template<typename ArrayType >
bool fillFromNode (const conduit::Node &n, const std::string &key, ArrayType &arr, bool moveToHost=false)
 Fill an array with int values from a Conduit node. More...
 
template<typename T >
axom::ArrayView< T > make_array_view (conduit::Node &n)
 Make an axom::ArrayView from a Conduit node. More...
 
template<typename T >
axom::ArrayView< T > make_array_view (const conduit::Node &n)
 

Function Documentation

◆ coordsetAxes()

std::vector<std::string> axom::bump::utilities::coordsetAxes ( const conduit::Node &  n_input)

Return the names of the axes for a coordset.

Parameters
n_inputA Conduit node containing a coordset.
Returns
A vector containing the names of the coordset's axes.

◆ make_array_view() [1/2]

template<typename T >
axom::ArrayView<T> axom::bump::utilities::make_array_view ( conduit::Node &  n)
inline

Make an axom::ArrayView from a Conduit node.

Template Parameters
TThe type for the array view elements.
Parameters
nThe conduit node for which we want an array view.
Returns
An axom::ArrayView that wraps the data in the Conduit node.

◆ make_array_view() [2/2]

template<typename T >
axom::ArrayView<T> axom::bump::utilities::make_array_view ( const conduit::Node &  n)
inline

◆ isDeviceAllocated()

bool axom::bump::utilities::isDeviceAllocated ( const conduit::Node &  n)

Returns whether the data pointer in the Conduit node appears to be allocated on a device.

Parameters
nThe node whose data we're checking for device allocation.
Returns
True if the data looks device-allocated; false otherwise.

◆ copy()

template<typename ExecSpace >
void axom::bump::utilities::copy ( conduit::Node &  dest,
const conduit::Node &  src,
int  destAllocatorID = axom::execution_space<ExecSpace>::allocatorID() 
)

Copies a Conduit tree in the src node to a new Conduit dest node, making sure to allocate array data in the appropriate memory space for the execution space.

Template Parameters
ExecSpaceThe destination execution space (e.g. axom::SEQ_EXEC).
Parameters
destThe conduit node that will receive the copied data.
srcThe source data to be copied.
destAllocatorIDThe allocator for the destination. It defaults to the allocator for ExecSpace.

References axom::isDeviceAllocator().

◆ fillFromNode()

template<typename ArrayType >
bool axom::bump::utilities::fillFromNode ( const conduit::Node &  n,
const std::string &  key,
ArrayType &  arr,
bool  moveToHost = false 
)

Fill an array with int values from a Conduit node.

Template Parameters
ArrayTypeThe array type being filled. It must supply size(), operator[].
Parameters
nThe node that contains the data.
keyThe name of the node that contains the data in n.
[out]arrThe array being filled.
moveToHostSometimes data are on device and need to be moved to host first.