Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::mesh::NgpFieldBLAS

BLAS-like operations for stk::mesh::FieldBase objects with host/device-style execution. More...

Functions

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_fill (const Scalar alpha, stk::mesh::FieldBase &field, int component, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Fill a component of a field with a scalar value.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_fill (const Scalar alpha, stk::mesh::FieldBase &field, int component, const ExecSpace &exec_space)
 Fill a component of a field with a scalar value.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_fill (const Scalar alpha, stk::mesh::FieldBase &field, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Fill all components of a field with a scalar value.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_fill (const Scalar alpha, stk::mesh::FieldBase &field, const ExecSpace &exec_space)
 Fill all components of a field with a scalar value.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize (size_t seed, stk::mesh::FieldBase &counter_field, stk::mesh::FieldBase &field, int component, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Randomize a component of a field (uniform between 0 and 1).
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize (size_t seed, stk::mesh::FieldBase &counter_field, stk::mesh::FieldBase &field, int component, const ExecSpace &exec_space)
 Randomize a component of a field (uniform between 0 and 1).
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize (size_t seed, stk::mesh::FieldBase &counter_field, stk::mesh::FieldBase &field, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Randomize all components of a field (uniform between 0 and 1).
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize (size_t seed, stk::mesh::FieldBase &counter_field, stk::mesh::FieldBase &field, const ExecSpace &exec_space)
 Randomize all components of a field (uniform between 0 and 1).
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize (size_t seed, Scalar min, Scalar max, stk::mesh::FieldBase &counter_field, stk::mesh::FieldBase &field, int component, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Randomize a component of a field (between given min and max).
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize (size_t seed, Scalar min, Scalar max, stk::mesh::FieldBase &counter_field, stk::mesh::FieldBase &field, int component, const ExecSpace &exec_space)
 Randomize a component of a field (between given min and max).
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize (size_t seed, Scalar min, Scalar max, stk::mesh::FieldBase &counter_field, stk::mesh::FieldBase &field, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Randomize all components of a field (between given min and max).
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize (size_t seed, Scalar min, Scalar max, stk::mesh::FieldBase &counter_field, stk::mesh::FieldBase &field, const ExecSpace &exec_space)
 Randomize all components of a field (between given min and max).
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_copy (stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Deep copy y = x.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_copy (stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, const ExecSpace &exec_space)
 Deep copy y = x.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_swap (stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Swap the contents of two fields.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_swap (stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, const ExecSpace &exec_space)
 Swap the contents of two fields.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_scale (const Scalar alpha, stk::mesh::FieldBase &x, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Scale a field by a scalar x = alpha x.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_scale (const Scalar alpha, stk::mesh::FieldBase &x, const ExecSpace &exec_space)
 Scale a field by a scalar x = alpha x.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_product (stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, stk::mesh::FieldBase &z, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the element-wise product of two fields z = x * y.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_product (stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, stk::mesh::FieldBase &z, const ExecSpace &exec_space)
 Compute the element-wise product of two fields z = x * y.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpy (const Scalar alpha, stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the element-wise sum of two fields y += alpha x.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpy (const Scalar alpha, stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, const ExecSpace &exec_space)
 Compute the element-wise sum of two fields y += alpha x.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpby (const Scalar alpha, stk::mesh::FieldBase &x, const Scalar beta, stk::mesh::FieldBase &y, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the element-wise sum of two fields y = alpha x + beta y.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpby (const Scalar alpha, stk::mesh::FieldBase &x, const Scalar beta, stk::mesh::FieldBase &y, const ExecSpace &exec_space)
 Compute the element-wise sum of two fields y = alpha x + beta y.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpbyz (const Scalar alpha, stk::mesh::FieldBase &x, const Scalar beta, stk::mesh::FieldBase &y, stk::mesh::FieldBase &z, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the element-wise sum of three fields z = alpha x + beta y.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpbyz (const Scalar alpha, stk::mesh::FieldBase &x, const Scalar beta, stk::mesh::FieldBase &y, stk::mesh::FieldBase &z, const ExecSpace &exec_space)
 Compute the element-wise sum of three fields z = alpha x + beta y.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpbygz (const Scalar alpha, stk::mesh::FieldBase &x, const Scalar beta, stk::mesh::FieldBase &y, const Scalar gamma, stk::mesh::FieldBase &z, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the element-wise sum of three fields z = alpha x + beta y + gamma z.
template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpbygz (const Scalar alpha, stk::mesh::FieldBase &x, const Scalar beta, stk::mesh::FieldBase &y, const Scalar gamma, stk::mesh::FieldBase &z, const ExecSpace &exec_space)
 Compute the element-wise sum of three fields z = alpha x + beta y + gamma z.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_dot (stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the dot product of two fields.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_dot (stk::mesh::FieldBase &x, stk::mesh::FieldBase &y, const ExecSpace &exec_space)
 Compute the dot product of two fields.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_nrm2 (stk::mesh::FieldBase &x, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the 2-norm of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_nrm2 (stk::mesh::FieldBase &x, const ExecSpace &exec_space)
 Compute the 2-norm of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_sum (stk::mesh::FieldBase &x, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the sum of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_sum (stk::mesh::FieldBase &x, const ExecSpace &exec_space)
 Compute the sum of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_asum (stk::mesh::FieldBase &x, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the 1-norm of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_asum (stk::mesh::FieldBase &x, const ExecSpace &exec_space)
 Compute the 1-norm of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_max (stk::mesh::FieldBase &x, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the maximum value of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_max (stk::mesh::FieldBase &x, const ExecSpace &exec_space)
 Compute the maximum value of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_amax (stk::mesh::FieldBase &x, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the maximum absolute value of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_amax (stk::mesh::FieldBase &x, const ExecSpace &exec_space)
 Compute the maximum absolute value of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_min (stk::mesh::FieldBase &x, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the minimum value of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_min (stk::mesh::FieldBase &x, const ExecSpace &exec_space)
 Compute the minimum value of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_amin (stk::mesh::FieldBase &x, const stk::mesh::Selector &selector, const ExecSpace &exec_space)
 Compute the minimum absolute value of a field.
template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_amin (stk::mesh::FieldBase &x, const ExecSpace &exec_space)
 Compute the minimum absolute value of a field.

Detailed Description

These overloads expose fill, copy, scale, product, axpy-style updates, norms, dot products, and reductions over STK fields and selectors.

Function Documentation

◆ field_fill() [1/4]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_fill ( const Scalar alpha,
stk::mesh::FieldBase & field,
int component,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_fill() [2/4]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_fill ( const Scalar alpha,
stk::mesh::FieldBase & field,
int component,
const ExecSpace & exec_space )

◆ field_fill() [3/4]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_fill ( const Scalar alpha,
stk::mesh::FieldBase & field,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_fill() [4/4]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_fill ( const Scalar alpha,
stk::mesh::FieldBase & field,
const ExecSpace & exec_space )

◆ field_randomize() [1/8]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize ( size_t seed,
stk::mesh::FieldBase & counter_field,
stk::mesh::FieldBase & field,
int component,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
Note
This function uses the a counter-based random number generator (Philox) from OpenRAND to draw random number in a performance portable way. Will increment the counter for all entities in the selector that own the field.

◆ field_randomize() [2/8]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize ( size_t seed,
stk::mesh::FieldBase & counter_field,
stk::mesh::FieldBase & field,
int component,
const ExecSpace & exec_space )

◆ field_randomize() [3/8]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize ( size_t seed,
stk::mesh::FieldBase & counter_field,
stk::mesh::FieldBase & field,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_randomize() [4/8]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize ( size_t seed,
stk::mesh::FieldBase & counter_field,
stk::mesh::FieldBase & field,
const ExecSpace & exec_space )

◆ field_randomize() [5/8]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize ( size_t seed,
Scalar min,
Scalar max,
stk::mesh::FieldBase & counter_field,
stk::mesh::FieldBase & field,
int component,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_randomize() [6/8]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize ( size_t seed,
Scalar min,
Scalar max,
stk::mesh::FieldBase & counter_field,
stk::mesh::FieldBase & field,
int component,
const ExecSpace & exec_space )

◆ field_randomize() [7/8]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize ( size_t seed,
Scalar min,
Scalar max,
stk::mesh::FieldBase & counter_field,
stk::mesh::FieldBase & field,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_randomize() [8/8]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_randomize ( size_t seed,
Scalar min,
Scalar max,
stk::mesh::FieldBase & counter_field,
stk::mesh::FieldBase & field,
const ExecSpace & exec_space )

◆ field_copy() [1/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_copy ( stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_copy() [2/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_copy ( stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
const ExecSpace & exec_space )

◆ field_swap() [1/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_swap ( stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_swap() [2/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_swap ( stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
const ExecSpace & exec_space )

◆ field_scale() [1/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_scale ( const Scalar alpha,
stk::mesh::FieldBase & x,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_scale() [2/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_scale ( const Scalar alpha,
stk::mesh::FieldBase & x,
const ExecSpace & exec_space )

◆ field_product() [1/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_product ( stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
stk::mesh::FieldBase & z,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_product() [2/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_product ( stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
stk::mesh::FieldBase & z,
const ExecSpace & exec_space )

◆ field_axpy() [1/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpy ( const Scalar alpha,
stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_axpy() [2/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpy ( const Scalar alpha,
stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
const ExecSpace & exec_space )

◆ field_axpby() [1/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpby ( const Scalar alpha,
stk::mesh::FieldBase & x,
const Scalar beta,
stk::mesh::FieldBase & y,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_axpby() [2/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpby ( const Scalar alpha,
stk::mesh::FieldBase & x,
const Scalar beta,
stk::mesh::FieldBase & y,
const ExecSpace & exec_space )

◆ field_axpbyz() [1/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpbyz ( const Scalar alpha,
stk::mesh::FieldBase & x,
const Scalar beta,
stk::mesh::FieldBase & y,
stk::mesh::FieldBase & z,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_axpbyz() [2/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpbyz ( const Scalar alpha,
stk::mesh::FieldBase & x,
const Scalar beta,
stk::mesh::FieldBase & y,
stk::mesh::FieldBase & z,
const ExecSpace & exec_space )

◆ field_axpbygz() [1/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpbygz ( const Scalar alpha,
stk::mesh::FieldBase & x,
const Scalar beta,
stk::mesh::FieldBase & y,
const Scalar gamma,
stk::mesh::FieldBase & z,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )

◆ field_axpbygz() [2/2]

template<typename Scalar, typename ExecSpace>
void mundy::mesh::field_axpbygz ( const Scalar alpha,
stk::mesh::FieldBase & x,
const Scalar beta,
stk::mesh::FieldBase & y,
const Scalar gamma,
stk::mesh::FieldBase & z,
const ExecSpace & exec_space )

◆ field_dot() [1/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_dot ( stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
inline

◆ field_dot() [2/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_dot ( stk::mesh::FieldBase & x,
stk::mesh::FieldBase & y,
const ExecSpace & exec_space )
inline

◆ field_nrm2() [1/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_nrm2 ( stk::mesh::FieldBase & x,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
inline

◆ field_nrm2() [2/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_nrm2 ( stk::mesh::FieldBase & x,
const ExecSpace & exec_space )
inline

◆ field_sum() [1/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_sum ( stk::mesh::FieldBase & x,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
inline

◆ field_sum() [2/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_sum ( stk::mesh::FieldBase & x,
const ExecSpace & exec_space )
inline

◆ field_asum() [1/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_asum ( stk::mesh::FieldBase & x,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
inline

◆ field_asum() [2/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_asum ( stk::mesh::FieldBase & x,
const ExecSpace & exec_space )
inline

◆ field_max() [1/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_max ( stk::mesh::FieldBase & x,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
inline

◆ field_max() [2/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_max ( stk::mesh::FieldBase & x,
const ExecSpace & exec_space )
inline

◆ field_amax() [1/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_amax ( stk::mesh::FieldBase & x,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
inline

◆ field_amax() [2/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_amax ( stk::mesh::FieldBase & x,
const ExecSpace & exec_space )
inline

◆ field_min() [1/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_min ( stk::mesh::FieldBase & x,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
inline

◆ field_min() [2/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_min ( stk::mesh::FieldBase & x,
const ExecSpace & exec_space )
inline

◆ field_amin() [1/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_amin ( stk::mesh::FieldBase & x,
const stk::mesh::Selector & selector,
const ExecSpace & exec_space )
inline

◆ field_amin() [2/2]

template<typename Scalar, typename ExecSpace>
Scalar mundy::mesh::field_amin ( stk::mesh::FieldBase & x,
const ExecSpace & exec_space )
inline