MFEM v4.9.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::future Namespace Reference

Namespaces

namespace  detail
 
namespace  dfem
 
namespace  Entity
 Entity struct.
 

Classes

struct  always_false
 
struct  create_function_signature
 
struct  create_function_signature< output_t(*)(input_ts...)>
 
struct  create_function_signature< output_t(T::*)(input_ts...) const >
 
class  DerivativeOperator
 
class  DifferentiableOperator
 
struct  DofToQuadMap
 DofToQuadMap struct. More...
 
struct  dual
 Dual number struct (value plus gradient) More...
 
class  FDJacobian
 
struct  FieldDescriptor
 FieldDescriptor struct. More...
 
class  FieldOperator
 Base class for FieldOperators. More...
 
struct  FunctionSignature
 
struct  FunctionSignature< output_t(input_ts...)>
 
class  Gradient
 Gradient FieldOperator. More...
 
class  Identity
 Identity FieldOperator. More...
 
struct  is_dual_number
 class for checking if a type is a dual number or not More...
 
struct  is_dual_number< dual< value_type, gradient_type > >
 class for checking if a type is a dual number or not More...
 
struct  is_gradient_fop
 
struct  is_gradient_fop< Gradient< FIELD_ID > >
 
struct  is_identity_fop
 
struct  is_identity_fop< Identity< FIELD_ID > >
 
struct  is_sum_fop
 
struct  is_sum_fop< Sum< FIELD_ID > >
 
struct  is_tuple
 Trait for checking if a type is a mfem::tuple. More...
 
struct  is_tuple< tuple< T... > >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
struct  is_tuple_of_tuples
 Trait for checking if a type if a mfem::tuple containing only mfem::tuple. More...
 
struct  is_tuple_of_tuples< tuple< T... > >
 Trait for checking if a type if a mfem::tuple containing only mfem::tuple. More...
 
struct  is_value_fop
 
struct  is_value_fop< Value< FIELD_ID > >
 
struct  is_weight_fop
 
struct  is_weight_fop< Weight >
 
struct  is_zero
 checks if a type is zero More...
 
struct  is_zero< zero >
 
struct  isotropic_tensor
 
struct  isotropic_tensor< T, 3, 3, 3 >
 
struct  isotropic_tensor< T, m, m >
 
struct  isotropic_tensor< T, m, m, m, m >
 
struct  isotropic_tensor< T, n >
 
class  ParameterFunction
 
class  ParameterSpace
 Base class for parametric spaces. More...
 
struct  SharedMemory
 
struct  SharedMemoryInfo
 
class  Sum
 Sum FieldOperator. More...
 
struct  tensor
 
struct  tensor< T >
 
struct  tensor< T, 0 >
 
struct  tensor< T, 0, n1 >
 
struct  tensor< T, n0 >
 
struct  tensor< T, n0, n1 >
 
struct  tensor< T, n0, n1, n2 >
 
struct  tensor< T, n0, n1, n2, n3 >
 
struct  tensor< T, n0, n1, n2, n3, n4 >
 
struct  ThreadBlocks
 ThreadBlocks struct. More...
 
struct  tuple
 This is a class that mimics most of std::tuple's interface, except that it is usable in CUDA kernels and admits some arithmetic operator overloads. More...
 
struct  tuple< T0 >
 Type that mimics std::tuple. More...
 
struct  tuple< T0, T1 >
 Type that mimics std::tuple. More...
 
struct  tuple< T0, T1, T2 >
 Type that mimics std::tuple. More...
 
struct  tuple< T0, T1, T2, T3 >
 Type that mimics std::tuple. More...
 
struct  tuple< T0, T1, T2, T3, T4 >
 Type that mimics std::tuple. More...
 
struct  tuple< T0, T1, T2, T3, T4, T5 >
 Type that mimics std::tuple. More...
 
struct  tuple< T0, T1, T2, T3, T4, T5, T6 >
 Type that mimics std::tuple. More...
 
struct  tuple< T0, T1, T2, T3, T4, T5, T6, T7 >
 Type that mimics std::tuple. More...
 
struct  tuple< T0, T1, T2, T3, T4, T5, T6, T7, T8 >
 
struct  tuple_element
 a struct used to determine the type at index I of a tuple More...
 
struct  tuple_element< 0, tuple< Head, Tail... > >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
struct  tuple_element< I, tuple< Head, Tail... > >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
struct  tuple_size
 
struct  tuple_size< tuple< Types... > >
 
class  UniformParameterSpace
 Uniform parameter space. More...
 
class  Value
 Value FieldOperator. More...
 
class  Weight
 Weight FieldOperator. More...
 
struct  zero
 A sentinel struct for eliding no-op tensor operations. More...
 

Typedefs

template<typename T , int n1, int n2 = 1>
using reduced_tensor
 Removes 1s from tensor dimensions For example, a tensor<T, 1, 10> is equivalent to a tensor<T, 10>
 
template<typename T1 , typename T2 >
using outer_product_t = typename detail::outer_prod<T1, T2>::type
 a type function that returns the tensor type of an outer product of two tensors
 
using action_t
 Type alias for a function that computes the action of an operator.
 
using derivative_setup_t
 Type alias for a function that computes the cache for the action of a derivative.
 
using derivative_action_t
 Type alias for a function that computes the action of a derivative.
 
using assemble_derivative_sparsematrix_callback_t
 Type alias for a function that assembles the SparseMatrix of a derivative operator.
 
using assemble_derivative_hypreparmatrix_callback_t
 Type alias for a function that assembles the HypreParMatrix of a derivative operator.
 
using restriction_callback_t
 Type alias for a function that applies the appropriate restriction to the solution and parameters.
 
template<typename T >
using decay_tuple = decltype(decay_types(std::declval<T>()))
 

Functions

template<typename other_type , typename value_type , typename gradient_type , typename = typename std::enable_if< std::is_arithmetic<other_type>::value || is_dual_number<other_type>::value>::type>
MFEM_HOST_DEVICE constexpr auto operator+ (dual< value_type, gradient_type > a, other_type b) -> dual< value_type, gradient_type >
 addition of a dual number and a non-dual number
 
template<typename other_type , typename value_type , typename gradient_type , typename = typename std::enable_if< std::is_arithmetic<other_type>::value || is_dual_number<other_type>::value>::type>
MFEM_HOST_DEVICE constexpr auto operator+ (other_type a, dual< value_type, gradient_type > b) -> dual< value_type, gradient_type >
 addition of a dual number and a non-dual number
 
template<typename value_type_a , typename gradient_type_a , typename value_type_b , typename gradient_type_b >
MFEM_HOST_DEVICE constexpr auto operator+ (dual< value_type_a, gradient_type_a > a, dual< value_type_b, gradient_type_b > b) -> dual< decltype(a.value+b.value), decltype(a.gradient+b.gradient)>
 addition of two dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto operator- (dual< value_type, gradient_type > x) -> dual< value_type, gradient_type >
 unary negation of a dual number
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto operator- (dual< value_type, gradient_type > a, real_t b) -> dual< value_type, gradient_type >
 subtraction of a non-dual number from a dual number
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto operator- (real_t a, dual< value_type, gradient_type > b) -> dual< value_type, gradient_type >
 subtraction of a dual number from a non-dual number
 
template<typename value_type_a , typename gradient_type_a , typename value_type_b , typename gradient_type_b >
MFEM_HOST_DEVICE constexpr auto operator- (dual< value_type_a, gradient_type_a > a, dual< value_type_b, gradient_type_b > b) -> dual< decltype(a.value - b.value), decltype(a.gradient - b.gradient)>
 subtraction of two dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto operator* (const dual< value_type, gradient_type > &a, real_t b) -> dual< decltype(a.value *b), decltype(a.gradient *b)>
 multiplication of a dual number and a non-dual number
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto operator* (real_t a, const dual< value_type, gradient_type > &b) -> dual< decltype(a *b.value), decltype(a *b.gradient)>
 multiplication of a dual number and a non-dual number
 
template<typename value_type_a , typename gradient_type_a , typename value_type_b , typename gradient_type_b >
MFEM_HOST_DEVICE constexpr auto operator* (dual< value_type_a, gradient_type_a > a, dual< value_type_b, gradient_type_b > b) -> dual< decltype(a.value *b.value), decltype(b.value *a.gradient+a.value *b.gradient)>
 multiplication of two dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto operator/ (const dual< value_type, gradient_type > &a, real_t b) -> dual< decltype(a.value/b), decltype(a.gradient/b)>
 division of a dual number by a non-dual number
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto operator/ (real_t a, const dual< value_type, gradient_type > &b) -> dual< decltype(a/b.value), decltype(-(a/(b.value *b.value)) *b.gradient)>
 division of a non-dual number by a dual number
 
template<typename value_type_a , typename gradient_type_a , typename value_type_b , typename gradient_type_b >
MFEM_HOST_DEVICE constexpr auto operator/ (dual< value_type_a, gradient_type_a > a, dual< value_type_b, gradient_type_b > b) -> dual< decltype(a.value/b.value), decltype((a.gradient/b.value) -(a.value *b.gradient)/(b.value *b.value))>
 division of two dual numbers
 
 mfem_binary_comparator_overload (<) mfem_binary_comparator_overload(<
 implement operator<= for dual numbers
 
gradient_type MFEM_HOST_DEVICE dual< value_type, gradient_type > & operator+= (dual< value_type, gradient_type > &a, const dual< value_type, gradient_type > &b)
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > & operator-= (dual< value_type, gradient_type > &a, const dual< value_type, gradient_type > &b)
 compound assignment (-) for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > & operator+= (dual< value_type, gradient_type > &a, real_t b)
 compound assignment (+) for dual numbers with real_t righthand side
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > & operator-= (dual< value_type, gradient_type > &a, real_t b)
 compound assignment (-) for dual numbers with real_t righthand side
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > abs (dual< value_type, gradient_type > x)
 implementation of absolute value function for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > sqrt (dual< value_type, gradient_type > x)
 implementation of square root for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > cos (dual< value_type, gradient_type > a)
 implementation of cosine for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > sin (dual< value_type, gradient_type > a)
 implementation of sine for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > sinh (dual< value_type, gradient_type > a)
 implementation of sinh for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > acos (dual< value_type, gradient_type > a)
 implementation of acos for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > asin (dual< value_type, gradient_type > a)
 implementation of asin for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > tan (dual< value_type, gradient_type > a)
 implementation of tan for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > atan (dual< value_type, gradient_type > a)
 implementation of atan for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > exp (dual< value_type, gradient_type > a)
 implementation of exponential function for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > log (dual< value_type, gradient_type > a)
 implementation of the natural logarithm function for dual numbers
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > pow (dual< value_type, gradient_type > a, dual< value_type, gradient_type > b)
 implementation of a (dual) raised to the b (dual) power
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > pow (real_t a, dual< value_type, gradient_type > b)
 implementation of a (non-dual) raised to the b (dual) power
 
template<typename value_type >
MFEM_HOST_DEVICE value_type pow (value_type a, value_type b)
 implementation of a (non-dual) raised to the b (non-dual) power
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > pow (dual< value_type, gradient_type > a, real_t b)
 implementation of a (dual) raised to the b (non-dual) power
 
template<typename value_type , typename gradient_type , int... n>
std::ostream & operator<< (std::ostream &os, dual< value_type, gradient_type > A)
 overload of operator<< for dual to work with work with standard output streams
 
MFEM_HOST_DEVICE constexpr dual< real_t, real_tmake_dual (real_t x)
 promote a value to a dual number of the appropriate type
 
template<typename T >
MFEM_HOST_DEVICE T get_value (const T &arg)
 return the "value" part from a given type. For non-dual types, this is just the identity function
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE gradient_type get_value (dual< value_type, gradient_type > arg)
 return the "value" part from a dual number type
 
template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE gradient_type get_gradient (dual< value_type, gradient_type > arg)
 return the "gradient" part from a dual number type
 
MFEM_HOST_DEVICE constexpr zero operator+ (zero, zero)
 the sum of two zeros is zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr T operator+ (zero, T other)
 the sum of zero with something non-zero just returns the other value
 
template<typename T >
MFEM_HOST_DEVICE constexpr T operator+ (T other, zero)
 the sum of zero with something non-zero just returns the other value
 
MFEM_HOST_DEVICE constexpr zero operator- (zero)
 the unary negation of zero is zero
 
MFEM_HOST_DEVICE constexpr zero operator- (zero, zero)
 the difference of two zeros is zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr T operator- (zero, T other)
 the difference of zero with something else is the unary negation of the other thing
 
template<typename T >
MFEM_HOST_DEVICE constexpr T operator- (T other, zero)
 the difference of something else with zero is the other thing itself
 
MFEM_HOST_DEVICE constexpr zero operator* (zero, zero)
 the product of two zeros is zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr zero operator* (zero, T)
 the product zero with something else is also zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr zero operator* (T, zero)
 the product zero with something else is also zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr zero operator/ (zero, T)
 zero divided by something is zero
 
MFEM_HOST_DEVICE constexpr zero operator+= (zero, zero)
 zero plus zero is `zero
 
MFEM_HOST_DEVICE constexpr zero operator-= (zero, zero)
 zero minus zero is `zero
 
template<int i>
MFEM_HOST_DEVICE zeroget (zero &x)
 let zero be accessed like a tuple
 
template<typename T >
MFEM_HOST_DEVICE zero dot (const T &, zero)
 the dot product of anything with zero is zero
 
template<typename T >
MFEM_HOST_DEVICE zero dot (zero, const T &)
 the dot product of anything with zero is zero
 
template<typename lambda_type >
MFEM_HOST_DEVICE constexpr auto make_tensor (lambda_type f) -> tensor< decltype(f())>
 Creates a tensor of requested dimension by subsequent calls to a functor Can be thought of as analogous to std::transform in that the set of possible indices for dimensions n are transformed into the values of the tensor by f.
 
template<int n1, typename lambda_type >
MFEM_HOST_DEVICE auto make_tensor (lambda_type f) -> tensor< decltype(f(n1)), n1 >
 Creates a tensor of requested dimension by subsequent calls to a functor.
 
template<int n1, int n2, typename lambda_type >
MFEM_HOST_DEVICE auto make_tensor (lambda_type f) -> tensor< decltype(f(n1, n2)), n1, n2 >
 Creates a tensor of requested dimension by subsequent calls to a functor.
 
template<int n1, int n2, int n3, typename lambda_type >
MFEM_HOST_DEVICE auto make_tensor (lambda_type f) -> tensor< decltype(f(n1, n2, n3)), n1, n2, n3 >
 Creates a tensor of requested dimension by subsequent calls to a functor.
 
template<int n1, int n2, int n3, int n4, typename lambda_type >
MFEM_HOST_DEVICE auto make_tensor (lambda_type f) -> tensor< decltype(f(n1, n2, n3, n4)), n1, n2, n3, n4 >
 Creates a tensor of requested dimension by subsequent calls to a functor.
 
template<typename T , int m, int n>
MFEM_HOST_DEVICE tensor< T, n > get_col (tensor< T, m, n > A, int j)
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 1 > get_col (tensor< T, 1, 1 > A, int j)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename S , typename T , int... n>
MFEM_HOST_DEVICE auto operator+ (const tensor< S, n... > &A, const tensor< T, n... > &B) -> tensor< decltype(S {}+T{}), n... >
 return the sum of two tensors
 
template<typename T , int... n>
MFEM_HOST_DEVICE tensor< T, n... > operator- (const tensor< T, n... > &A)
 return the unary negation of a tensor
 
template<typename S , typename T , int... n>
MFEM_HOST_DEVICE auto operator- (const tensor< S, n... > &A, const tensor< T, n... > &B) -> tensor< decltype(S {}+T{}), n... >
 return the difference of two tensors
 
template<typename S , typename T , int... n, typename = typename std::enable_if<std::is_arithmetic<S>::value || is_dual_number<S>::value>::type>
MFEM_HOST_DEVICE auto operator* (S scale, const tensor< T, n... > &A) -> tensor< decltype(S {} *T{}), n... >
 multiply a tensor by a scalar value
 
template<typename S , typename T , int... n, typename = typename std::enable_if<std::is_arithmetic<S>::value || is_dual_number<S>::value>::type>
MFEM_HOST_DEVICE auto operator* (const tensor< T, n... > &A, S scale) -> tensor< decltype(T {} *S{}), n... >
 multiply a tensor by a scalar value
 
template<typename S , typename T , int... n, typename = typename std::enable_if<std::is_arithmetic<S>::value || is_dual_number<S>::value>::type>
MFEM_HOST_DEVICE auto operator/ (S scale, const tensor< T, n... > &A) -> tensor< decltype(S {} *T{}), n... >
 divide a scalar by each element in a tensor
 
template<typename S , typename T , int... n, typename = typename std::enable_if<std::is_arithmetic<S>::value || is_dual_number<S>::value>::type>
MFEM_HOST_DEVICE auto operator/ (const tensor< T, n... > &A, S scale) -> tensor< decltype(T {} *S{}), n... >
 divide a tensor by a scalar
 
template<typename S , typename T , int... n>
MFEM_HOST_DEVICE tensor< S, n... > & operator+= (tensor< S, n... > &A, const tensor< T, n... > &B)
 compound assignment (+) on tensors
 
template<typename T >
MFEM_HOST_DEVICE tensor< T > & operator+= (tensor< T > &A, const T &B)
 compound assignment (+) on tensors
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 1 > & operator+= (tensor< T, 1 > &A, const T &B)
 compound assignment (+) on tensors
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 1, 1 > & operator+= (tensor< T, 1, 1 > &A, const T &B)
 compound assignment (+) on tensors
 
template<typename T , int... n>
MFEM_HOST_DEVICE tensor< T, n... > & operator+= (tensor< T, n... > &A, zero)
 compound assignment (+) between a tensor and zero (no-op)
 
template<typename S , typename T , int... n>
MFEM_HOST_DEVICE tensor< S, n... > & operator-= (tensor< S, n... > &A, const tensor< T, n... > &B)
 compound assignment (-) on tensors
 
template<typename T , int... n>
MFEM_HOST_DEVICE constexpr tensor< T, n... > & operator-= (tensor< T, n... > &A, zero)
 compound assignment (-) between a tensor and zero (no-op)
 
template<typename S , typename T >
MFEM_HOST_DEVICE auto outer (S A, T B) -> decltype(A *B)
 compute the outer product of two tensors
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE tensor< T, n+m > flatten (tensor< T, n, m > A)
 
template<typename S , typename T , int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), n > outer (S A, tensor< T, n > B)
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m > outer (const tensor< S, m > &A, T B)
 
template<typename T , int n>
MFEM_HOST_DEVICE zero outer (zero, const tensor< T, n > &)
 
template<typename T , int n>
MFEM_HOST_DEVICE zero outer (const tensor< T, n > &, zero)
 
template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n > outer (S A, const tensor< T, m, n > &B)
 
template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n > outer (const tensor< S, m > &A, const tensor< T, n > &B)
 
template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n > outer (const tensor< S, m, n > &A, T B)
 
template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n, pouter (const tensor< S, m, n > &A, const tensor< T, p > &B)
 
template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n, pouter (const tensor< S, m > &A, const tensor< T, n, p > &B)
 
template<typename S , typename T , int m, int n, int p, int q>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n, p, q > outer (const tensor< S, m, n > &A, const tensor< T, p, q > &B)
 
template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE auto inner (const tensor< S, m, n > &A, const tensor< T, m, n > &B) -> decltype(S {} *T{})
 this function contracts over all indices of the two tensor arguments
 
template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE auto dot (const tensor< S, m, n > &A, const tensor< T, n, p > &B) -> tensor< decltype(S {} *T{}), m, p >
 this function contracts over the "middle" index of the two tensor arguments. E.g. returns tensor C, such that C_ij = sum_kl A_ijkl B_kl.
 
template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE auto dot (const tensor< S, m > &A, const tensor< T, m, n > &B) -> tensor< decltype(S {} *T{}), n >
 
template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE auto dot (const tensor< S, m, n > &A, const tensor< T, n > &B) -> tensor< decltype(S {} *T{}), m >
 
template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE auto dot (const tensor< S, m, n, p > &A, const tensor< T, p > &B) -> tensor< decltype(S {} *T{}), m, n >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto dot (const tensor< S, m > &A, const tensor< T, m > &B) -> decltype(S {} *T{})
 Dot product of a vector . vector and vector . tensor.
 
template<typename T , int m>
MFEM_HOST_DEVICE auto dot (const tensor< T, m > &A, const tensor< T, m > &B) -> decltype(T {})
 
template<typename S , typename T , int m, int n0, int n1, int... n>
MFEM_HOST_DEVICE auto dot (const tensor< S, m > &A, const tensor< T, m, n0, n1, n... > &B) -> tensor< decltype(S {} *T{}), n0, n1, n... >
 
template<typename S , typename T , typename U , int m, int n>
MFEM_HOST_DEVICE auto dot (const tensor< S, m > &u, const tensor< T, m, n > &A, const tensor< U, n > &v) -> decltype(S {} *T{} *U{})
 
template<typename S , typename T , int m, int n, int p, int q>
MFEM_HOST_DEVICE auto ddot (const tensor< S, m, n, p, q > &A, const tensor< T, p, q > &B) -> tensor< decltype(S {} *T{}), m, n >
 real_t dot product, contracting over the two "middle" indices
 
template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE auto ddot (const tensor< S, m, n, p > &A, const tensor< T, n, p > &B) -> tensor< decltype(S {} *T{}), m >
 
template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE auto ddot (const tensor< S, m, n > &A, const tensor< T, m, n > &B) -> decltype(S {} *T{})
 
template<typename S , typename T , int... m, int... n>
MFEM_HOST_DEVICE auto operator* (const tensor< S, m... > &A, const tensor< T, n... > &B) -> decltype(dot(A, B))
 this is a shorthand for dot(A, B)
 
template<typename T , int m>
MFEM_HOST_DEVICE T sqnorm (const tensor< T, m > &A)
 Returns the squared Frobenius norm of the tensor.
 
template<typename T , int m, int n>
MFEM_HOST_DEVICE T sqnorm (const tensor< T, m, n > &A)
 Returns the squared Frobenius norm of the tensor.
 
template<typename T , int... n>
MFEM_HOST_DEVICE T norm (const tensor< T, n... > &A)
 Returns the Frobenius norm of the tensor.
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE T weight (const tensor< T, n, m > &A)
 
template<typename T , int... n>
MFEM_HOST_DEVICE auto normalize (const tensor< T, n... > &A) -> decltype(A/norm(A))
 Normalizes the tensor Each element is divided by the Frobenius norm of the tensor,.
 
template<typename T , int n>
MFEM_HOST_DEVICE T tr (const tensor< T, n, n > &A)
 Returns the trace of a square matrix.
 
template<typename T , int n>
MFEM_HOST_DEVICE tensor< T, n, n > sym (const tensor< T, n, n > &A)
 Returns the symmetric part of a square matrix.
 
template<typename T , int n>
MFEM_HOST_DEVICE tensor< T, n, n > dev (const tensor< T, n, n > &A)
 Calculates the deviator of a matrix (rank-2 tensor)
 
template<int dim>
MFEM_HOST_DEVICE tensor< real_t, dim, dimIdentityMatrix ()
 Obtains the identity matrix of the specified dimension.
 
template<typename T , int m, int n>
MFEM_HOST_DEVICE tensor< T, n, m > transpose (const tensor< T, m, n > &A)
 Returns the transpose of the matrix.
 
template<typename T >
MFEM_HOST_DEVICE T det (const tensor< T, 1, 1 > &A)
 Returns the determinant of a matrix.
 
template<typename T >
MFEM_HOST_DEVICE T det (const tensor< T, 2, 2 > &A)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
MFEM_HOST_DEVICE T det (const tensor< T, 3, 3 > &A)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
MFEM_HOST_DEVICE std::tuple< tensor< T, 1 >, tensor< T, 1, 1 > > eig (tensor< T, 1, 1 > &A)
 
template<typename T >
MFEM_HOST_DEVICE std::tuple< tensor< T, 2 >, tensor< T, 2, 2 > > eig (tensor< T, 2, 2 > &A)
 
template<typename T >
MFEM_HOST_DEVICE void GetScalingFactor (const T &d_max, T &mult)
 
template<typename T >
MFEM_HOST_DEVICE T calcsv (const tensor< T, 1, 1 > A, const int i)
 
template<typename T >
MFEM_HOST_DEVICE T calcsv (const tensor< T, 2, 2 > A, const int i)
 Compute the i-th singular value of a 2x2 matrix A.
 
template<int n>
MFEM_HOST_DEVICE bool is_symmetric (tensor< real_t, n, n > A, real_t abs_tolerance=1.0e-8_r)
 Return whether a square rank 2 tensor is symmetric.
 
MFEM_HOST_DEVICE bool is_symmetric_and_positive_definite (tensor< real_t, 2, 2 > A)
 Return whether a matrix is symmetric and positive definite This check uses Sylvester's criterion, checking that each upper left subtensor has a determinant greater than zero.
 
MFEM_HOST_DEVICE bool is_symmetric_and_positive_definite (tensor< real_t, 3, 3 > A)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T , int n>
MFEM_HOST_DEVICE tensor< T, n > linear_solve (tensor< T, n, n > A, const tensor< T, n > b)
 Solves Ax = b for x using Gaussian elimination with partial pivoting.
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 1, 1 > inv (const tensor< T, 1, 1 > &A)
 Inverts a matrix.
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 2, 2 > inv (const tensor< T, 2, 2 > &A)
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 3, 3 > inv (const tensor< T, 3, 3 > &A)
 
template<typename T , int n>
MFEM_HOST_DEVICE std::enable_if<(n >3), tensor< T, n, n > >::type inv (const tensor< T, n, n > &A)
 
template<typename value_type , typename gradient_type , int n>
MFEM_HOST_DEVICE dual< value_type, gradient_type > inv (tensor< dual< value_type, gradient_type >, n, n > A)
 
template<typename T , int... n>
std::ostream & operator<< (std::ostream &os, const tensor< T, n... > &A)
 recursively serialize the entries in a tensor to an output stream. Output format uses braces and comma separators to mimic C syntax for multidimensional array initialization.
 
template<int n>
MFEM_HOST_DEVICE tensor< real_t, n > chop (const tensor< real_t, n > &A)
 replace all entries in a tensor satisfying |x| < 1.0e-10 by literal zero
 
template<int m, int n>
MFEM_HOST_DEVICE tensor< real_t, m, n > chop (const tensor< real_t, m, n > &A)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
MFEM_HOST_DEVICE zero get_gradient (real_t)
 Retrieves the gradient component of a real_t (which is nothing)
 
template<int... n>
MFEM_HOST_DEVICE zero get_gradient (const tensor< real_t, n... > &)
 get the gradient of type tensor (note: since its stored type is not a dual number, the derivative term is identically zero)
 
MFEM_HOST_DEVICE zero chain_rule (const zero, const zero)
 evaluate the change (to first order) in a function, f, given a small change in the input argument, dx.
 
template<typename T >
MFEM_HOST_DEVICE zero chain_rule (const zero, const T)
 
template<typename T >
MFEM_HOST_DEVICE zero chain_rule (const T, const zero)
 
MFEM_HOST_DEVICE real_t chain_rule (const real_t df_dx, const real_t dx)
 
template<int... n>
MFEM_HOST_DEVICE auto chain_rule (const tensor< real_t, n... > &df_dx, const real_t dx) -> decltype(df_dx *dx)
 
template<int m>
MFEM_HOST_DEVICE constexpr isotropic_tensor< real_t, m, m > IsotropicIdentity ()
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto operator* (S scale, const isotropic_tensor< T, m, m > &I) -> isotropic_tensor< decltype(S {} *T{}), m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto operator* (const isotropic_tensor< T, m, m > &I, const S scale) -> isotropic_tensor< decltype(S {}, T{}), m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto operator+ (const isotropic_tensor< S, m, m > &I1, const isotropic_tensor< T, m, m > &I2) -> isotropic_tensor< decltype(S {}+T{}), m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto operator- (const isotropic_tensor< S, m, m > &I1, const isotropic_tensor< T, m, m > &I2) -> isotropic_tensor< decltype(S {} - T{}), m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto operator+ (const isotropic_tensor< S, m, m > &I, const tensor< T, m, m > &A) -> tensor< decltype(S {}+T{}), m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto operator+ (const tensor< S, m, m > &A, const isotropic_tensor< T, m, m > &I) -> tensor< decltype(S {}+T{}), m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto operator- (const isotropic_tensor< S, m, m > &I, const tensor< T, m, m > &A) -> tensor< decltype(S {} - T{}), m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto operator- (const tensor< S, m, m > &A, const isotropic_tensor< T, m, m > &I) -> tensor< decltype(S {} - T{}), m, m >
 
template<typename S , typename T , int m, int... n>
MFEM_HOST_DEVICE constexpr auto dot (const isotropic_tensor< S, m, m > &I, const tensor< T, m, n... > &A) -> tensor< decltype(S {} *T{}), m, n... >
 
template<typename S , typename T , int m, int... n>
MFEM_HOST_DEVICE auto dot (const tensor< S, n... > &A, const isotropic_tensor< T, m, m > &I) -> tensor< decltype(S {} *T{}), n... >
 
template<typename S , typename T , int m, int... n>
MFEM_HOST_DEVICE constexpr auto ddot (const isotropic_tensor< S, m, m > &I, const tensor< T, m, m > &A) -> decltype(S {} *T{})
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto sym (const isotropic_tensor< T, m, m > &I) -> isotropic_tensor< T, m, m >
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto antisym (const isotropic_tensor< T, m, m > &) -> zero
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto tr (const isotropic_tensor< T, m, m > &I) -> decltype(T {} *m)
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto transpose (const isotropic_tensor< T, m, m > &I) -> isotropic_tensor< T, m, m >
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto det (const isotropic_tensor< T, m, m > &I) -> T
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto norm (const isotropic_tensor< T, m, m > &I) -> T
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto sqnorm (const isotropic_tensor< T, m, m > &I) -> T
 
template<int m>
MFEM_HOST_DEVICE constexpr auto SymmetricIdentity () -> isotropic_tensor< real_t, m, m, m, m >
 
template<int m>
MFEM_HOST_DEVICE constexpr auto AntisymmetricIdentity () -> isotropic_tensor< real_t, m, m, m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto operator* (S scale, isotropic_tensor< T, m, m, m, m > I) -> isotropic_tensor< decltype(S {} *T{}), m, m, m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto operator* (isotropic_tensor< S, m, m, m, m > I, T scale) -> isotropic_tensor< decltype(S {} *T{}), m, m, m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto operator+ (isotropic_tensor< S, m, m, m, m > I1, isotropic_tensor< T, m, m, m, m > I2) -> isotropic_tensor< decltype(S {}+T{}), m, m, m, m >
 
template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto operator- (isotropic_tensor< S, m, m, m, m > I1, isotropic_tensor< T, m, m, m, m > I2) -> isotropic_tensor< decltype(S {} - T{}), m, m, m, m >
 
template<typename S , typename T , int m, int... n>
MFEM_HOST_DEVICE constexpr auto ddot (const isotropic_tensor< S, m, m, m, m > &I, const tensor< T, m, m > &A) -> tensor< decltype(S {} *T{}), m, m >
 
template<typename input_fop_ts , size_t num_inputs, typename output_fop_t >
MFEM_HOST_DEVICE void assemble_element_mat_t3d (const DeviceTensor< 4, real_t > &A, const DeviceTensor< 3, real_t > &fhat, const DeviceTensor< 5, const real_t > &qpdc, const DeviceTensor< 1, const real_t > &itod, const input_fop_ts &inputs, const output_fop_t &output, const std::array< DofToQuadMap, num_inputs > &input_dtqmaps, const DofToQuadMap &output_dtqmap, std::array< DeviceTensor< 1 >, 6 > &scratch_shmem, const int &q1d, const int &td1d)
 Assemble element matrix for three dimensional data.
 
template<typename input_fop_ts , size_t num_inputs, typename output_fop_t >
MFEM_HOST_DEVICE void assemble_element_mat_t2d (const DeviceTensor< 4, real_t > &A, const DeviceTensor< 3, real_t > &fhat, const DeviceTensor< 5, const real_t > &qpdc, const DeviceTensor< 1, const real_t > &itod, const input_fop_ts &inputs, const output_fop_t &output, const std::array< DofToQuadMap, num_inputs > &input_dtqmaps, const DofToQuadMap &output_dtqmap, std::array< DeviceTensor< 1 >, 6 > &scratch_shmem, const int &q1d, const int &td1d)
 Assemble element matrix for two dimensional data.
 
template<typename input_fop_ts , size_t num_inputs, typename output_fop_t >
MFEM_HOST_DEVICE void assemble_element_mat_naive (const DeviceTensor< 4, real_t > &A, const DeviceTensor< 3, real_t > &fhat, const DeviceTensor< 5, const real_t > &qpdc, const DeviceTensor< 1, const real_t > &itod, const input_fop_ts &inputs, const output_fop_t &output, const std::array< DofToQuadMap, num_inputs > &input_dtqmaps, const DofToQuadMap &output_dtqmap, std::array< DeviceTensor< 1 >, 6 > &scratch_shmem, const int &dimension, const int &q1d, const int &td1d, const bool &use_sum_factorization)
 Assemble element matrix for two or three dimensional data.
 
template<typename output_t >
MFEM_HOST_DEVICE void map_quadrature_data_to_fields_impl (DeviceTensor< 2, real_t > &y, const DeviceTensor< 3, real_t > &f, const output_t &output, const DofToQuadMap &dtq)
 
template<typename output_t >
MFEM_HOST_DEVICE void map_quadrature_data_to_fields_tensor_impl_1d (DeviceTensor< 2, real_t > &y, const DeviceTensor< 3, real_t > &f, const output_t &output, const DofToQuadMap &dtq, std::array< DeviceTensor< 1 >, 6 > &scratch_mem)
 
template<typename output_t >
MFEM_HOST_DEVICE void map_quadrature_data_to_fields_tensor_impl_2d (DeviceTensor< 2, real_t > &y, const DeviceTensor< 3, real_t > &f, const output_t &output, const DofToQuadMap &dtq, std::array< DeviceTensor< 1 >, 6 > &scratch_mem)
 
template<typename output_t >
MFEM_HOST_DEVICE void map_quadrature_data_to_fields_tensor_impl_3d (DeviceTensor< 2, real_t > &y, const DeviceTensor< 3, real_t > &f, const output_t &output, const DofToQuadMap &dtq, std::array< DeviceTensor< 1 >, 6 > &scratch_mem)
 
template<typename output_t >
MFEM_HOST_DEVICE void map_quadrature_data_to_fields (DeviceTensor< 2, real_t > &y, const DeviceTensor< 3, real_t > &f, const output_t &output, const DofToQuadMap &dtq, std::array< DeviceTensor< 1 >, 6 > &scratch_mem, const int &dimension, const bool &use_sum_factorization)
 
template<typename field_operator_t >
MFEM_HOST_DEVICE void map_field_to_quadrature_data_tensor_product_3d (DeviceTensor< 2 > &field_qp, const DofToQuadMap &dtq, const DeviceTensor< 1 > &field_e, const field_operator_t &input, const DeviceTensor< 1, const real_t > &integration_weights, const std::array< DeviceTensor< 1 >, 6 > &scratch_mem)
 
template<typename field_operator_t >
MFEM_HOST_DEVICE void map_field_to_quadrature_data_tensor_product_2d (DeviceTensor< 2 > &field_qp, const DofToQuadMap &dtq, const DeviceTensor< 1 > &field_e, const field_operator_t &input, const DeviceTensor< 1, const real_t > &integration_weights, const std::array< DeviceTensor< 1 >, 6 > &scratch_mem)
 
template<typename field_operator_t >
MFEM_HOST_DEVICE void map_field_to_quadrature_data_tensor_product_1d (DeviceTensor< 2 > &field_qp, const DofToQuadMap &dtq, const DeviceTensor< 1 > &field_e, const field_operator_t &input, const DeviceTensor< 1, const real_t > &integration_weights, const std::array< DeviceTensor< 1 >, 6 > &scratch_mem)
 
template<typename field_operator_t >
MFEM_HOST_DEVICE void map_field_to_quadrature_data (DeviceTensor< 2 > field_qp, const DofToQuadMap &dtq, const DeviceTensor< 1 > &field_e, const field_operator_t &input, const DeviceTensor< 1, const real_t > &integration_weights)
 
template<typename field_operator_ts , size_t num_inputs, size_t num_fields>
MFEM_HOST_DEVICE void map_fields_to_quadrature_data (std::array< DeviceTensor< 2 >, num_inputs > &fields_qp, const std::array< DeviceTensor< 1 >, num_fields > &fields_e, const std::array< DofToQuadMap, num_inputs > &dtqmaps, const std::array< size_t, num_inputs > &input_to_field, const field_operator_ts &fops, const DeviceTensor< 1, const real_t > &integration_weights, const std::array< DeviceTensor< 1 >, 6 > &scratch_mem, const int &dimension, const bool &use_sum_factorization=false)
 
template<typename field_operator_t >
MFEM_HOST_DEVICE void map_field_to_quadrature_data_conditional (DeviceTensor< 2 > &field_qp, const DeviceTensor< 1 > &field_e, const DofToQuadMap &dtqmap, field_operator_t &fop, const DeviceTensor< 1, const real_t > &integration_weights, const std::array< DeviceTensor< 1 >, 6 > &scratch_mem, const bool &condition, const int &dimension, const bool &use_sum_factorization=false)
 
template<size_t num_fields, size_t num_inputs, typename field_operator_ts >
MFEM_HOST_DEVICE void map_fields_to_quadrature_data_conditional (std::array< DeviceTensor< 2 >, num_inputs > &fields_qp, const std::array< DeviceTensor< 1, const real_t >, num_fields > &fields_e, const std::array< DofToQuadMap, num_inputs > &dtqmaps, field_operator_ts fops, const DeviceTensor< 1, const real_t > &integration_weights, const std::array< DeviceTensor< 1 >, 6 > &scratch_mem, const std::array< bool, num_inputs > &conditions, const bool &use_sum_factorization=false)
 
template<size_t num_inputs, typename field_operator_ts >
MFEM_HOST_DEVICE void map_direction_to_quadrature_data_conditional (std::array< DeviceTensor< 2 >, num_inputs > &directions_qp, const DeviceTensor< 1 > &direction_e, const std::array< DofToQuadMap, num_inputs > &dtqmaps, field_operator_ts fops, const DeviceTensor< 1, const real_t > &integration_weights, const std::array< DeviceTensor< 1 >, 6 > &scratch_mem, const std::array< bool, num_inputs > &conditions, const int &dimension, const bool &use_sum_factorization)
 
template<typename qf_param_ts , typename qfunc_t , std::size_t num_fields>
MFEM_HOST_DEVICE void call_qfunction (qfunc_t &qfunc, const std::array< DeviceTensor< 2 >, num_fields > &input_shmem, DeviceTensor< 2 > &residual_shmem, const int &rs_qp, const int &num_qp, const int &q1d, const int &dimension, const bool &use_sum_factorization)
 Call a qfunction with the given parameters.
 
template<typename qf_param_ts , typename qfunc_t , std::size_t num_fields>
MFEM_HOST_DEVICE void call_qfunction_derivative_action (qfunc_t &qfunc, const std::array< DeviceTensor< 2 >, num_fields > &input_shmem, const std::array< DeviceTensor< 2 >, num_fields > &shadow_shmem, DeviceTensor< 2 > &residual_shmem, const int &das_qp, const int &num_qp, const int &q1d, const int &dimension, const bool &use_sum_factorization)
 Call a qfunction with the given parameters and compute it's derivative action.
 
template<typename qf_param_ts , typename qfunc_t , std::size_t num_fields>
MFEM_HOST_DEVICE void call_qfunction_derivative (qfunc_t &qfunc, const std::array< DeviceTensor< 2 >, num_fields > &input_shmem, const std::array< DeviceTensor< 2 >, num_fields > &shadow_shmem, DeviceTensor< 2 > &residual_shmem, DeviceTensor< 5 > &qpdc, const DeviceTensor< 1, const real_t > &itod, const int &das_qp, const int &q1d, const int &dimension, const bool &use_sum_factorization)
 Call a qfunction with the given parameters and compute it's derivative represented by the Jacobian on each quadrature point.
 
template<size_t num_fields>
MFEM_HOST_DEVICE void apply_qpdc (DeviceTensor< 3 > &fhat, const std::array< DeviceTensor< 2 >, num_fields > &shadow_shmem, const DeviceTensor< 5, const real_t > &qpdc, const DeviceTensor< 1, const real_t > &itod, const int &q1d, const int &dimension, const bool &use_sum_factorization)
 Apply the quadrature point data cache (qpdc) to a vector (usually a direction).
 
template<typename qfunc_t , typename args_ts , size_t num_args>
MFEM_HOST_DEVICE void apply_kernel (DeviceTensor< 1, real_t > &f_qp, const qfunc_t &qfunc, args_ts &args, const std::array< DeviceTensor< 2 >, num_args > &u, int qp)
 
template<typename qfunc_t , typename arg_ts , size_t num_args>
MFEM_HOST_DEVICE void apply_kernel_native_dual (DeviceTensor< 1, real_t > &f_qp, const qfunc_t &qfunc, arg_ts &args, const std::array< DeviceTensor< 2 >, num_args > &u, const std::array< DeviceTensor< 2 >, num_args > &v, const int &qp_idx)
 
template<typename func_t , typename... arg_ts>
MFEM_HOST_DEVICE auto qfunction_wrapper (const func_t &f, arg_ts &&...args)
 
template<typename qfunc_t , typename arg_ts , std::size_t... Is, typename inactive_arg_ts >
MFEM_HOST_DEVICE auto fwddiff_apply_enzyme_indexed (qfunc_t &qfunc, arg_ts &&args, arg_ts &&shadow_args, std::index_sequence< Is... >, inactive_arg_ts &&inactive_args, std::index_sequence<>)
 
template<typename qfunc_t , typename arg_ts , std::size_t... Is, typename inactive_arg_ts , std::size_t... Js>
MFEM_HOST_DEVICE auto fwddiff_apply_enzyme_indexed (qfunc_t &qfunc, arg_ts &&args, arg_ts &&shadow_args, std::index_sequence< Is... >, inactive_arg_ts &&inactive_args, std::index_sequence< Js... >)
 
template<typename qfunc_t , typename arg_ts , typename inactive_arg_ts >
MFEM_HOST_DEVICE auto fwddiff_apply_enzyme (qfunc_t &qfunc, arg_ts &&args, arg_ts &&shadow_args, inactive_arg_ts &&inactive_args)
 
template<typename qfunc_t , typename arg_ts , size_t num_args>
MFEM_HOST_DEVICE void apply_kernel_fwddiff_enzyme (DeviceTensor< 1, real_t > &f_qp, qfunc_t &qfunc, arg_ts &args, arg_ts &shadow_args, const std::array< DeviceTensor< 2 >, num_args > &u, const std::array< DeviceTensor< 2 >, num_args > &v, int qp_idx)
 
template<typename T0 , typename T1 , typename T2 >
MFEM_HOST_DEVICE void process_qf_arg (const T0 &, const T1 &, T2 &)
 
template<typename T >
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1, T > &u, const DeviceTensor< 1, T > &v, T &arg)
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1 > &u, tensor< dual< T, T >, n, m > &arg)
 
template<typename T >
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1 > &u, dual< T, T > &arg)
 
template<typename T >
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1 > &u, const DeviceTensor< 1 > &v, dual< T, T > &arg)
 
template<typename T , int n>
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1 > &u, const DeviceTensor< 1 > &v, tensor< dual< T, T >, n > &arg)
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1 > &u, const DeviceTensor< 1 > &v, tensor< dual< T, T >, n, m > &arg)
 
template<typename T , int n>
MFEM_HOST_DEVICE void process_qf_result (DeviceTensor< 1, T > &r, const tensor< dual< T, T >, n > &x)
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE void process_qf_result (DeviceTensor< 1, T > &r, const tensor< dual< T, T >, n, m > &x)
 
template<typename arg_type >
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 2 > &u, const DeviceTensor< 2 > &v, arg_type &arg, const int &qp)
 
template<size_t num_fields, typename qf_args >
MFEM_HOST_DEVICE void process_qf_args (const std::array< DeviceTensor< 2 >, num_fields > &u, const std::array< DeviceTensor< 2 >, num_fields > &v, qf_args &args, const int &qp)
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE void process_derivative_from_native_dual (DeviceTensor< 1, T > &r, const tensor< dual< T, T >, n, m > &x)
 
template<typename T , int n>
MFEM_HOST_DEVICE void process_derivative_from_native_dual (DeviceTensor< 1, T > &r, const tensor< dual< T, T >, n > &x)
 
template<typename T >
MFEM_HOST_DEVICE void process_derivative_from_native_dual (DeviceTensor< 1, T > &r, const dual< T, T > &x)
 
template<typename T0 , typename T1 >
MFEM_HOST_DEVICE void process_qf_arg (const T0 &, T1 &)
 
template<typename T >
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1, T > &u, T &arg)
 
template<typename T >
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1, T > &u, tensor< T > &arg)
 
template<typename T , int n>
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1 > &u, tensor< T, n > &arg)
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1 > &u, tensor< T, n, m > &arg)
 
template<typename arg_type >
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 2 > &u, arg_type &arg, int qp)
 
template<size_t num_fields, typename qf_args >
MFEM_HOST_DEVICE void process_qf_args (const std::array< DeviceTensor< 2 >, num_fields > &u, qf_args &args, const int &qp)
 
template<typename T0 , typename T1 >
MFEM_HOST_DEVICE Vector process_qf_result (T0, T1)
 
template<typename T >
MFEM_HOST_DEVICE void process_qf_result (DeviceTensor< 1, T > &r, const T &x)
 
template<typename T >
MFEM_HOST_DEVICE void process_qf_result (DeviceTensor< 1 > &r, const dual< T, T > &x)
 
template<typename T >
MFEM_HOST_DEVICE void process_qf_result (DeviceTensor< 1, T > &r, const tensor< T > &x)
 
template<typename T , int n>
MFEM_HOST_DEVICE void process_qf_result (DeviceTensor< 1, T > &r, const tensor< T, n > &x)
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE void process_qf_result (DeviceTensor< 1, T > &r, const tensor< T, n, m > &x)
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE void process_qf_arg (const DeviceTensor< 1, T > &u, const DeviceTensor< 1, T > &v, tensor< T, n, m > &arg)
 
template<typename... T>
MFEM_HOST_DEVICE tuple (T...) -> tuple< T... >
 Class template argument deduction rule for tuples.
 
template<typename... T>
MFEM_HOST_DEVICE tuple< T... > make_tuple (const T &... args)
 helper function for combining a list of values into a tuple
 
template<int i, typename... T>
MFEM_HOST_DEVICE constexpr auto & get (tuple< T... > &values)
 return a reference to the ith tuple entry
 
template<int i, typename... T>
MFEM_HOST_DEVICE constexpr const auto & get (const tuple< T... > &values)
 return a copy of the ith tuple entry
 
template<int i, typename... T>
MFEM_HOST_DEVICE constexpr auto type (const tuple< T... > &values)
 a function intended to be used for extracting the ith type from a tuple.
 
template<typename... S, typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto plus_helper (const tuple< S... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >)
 A helper function for the + operator of tuples.
 
template<typename... S, typename... T>
MFEM_HOST_DEVICE constexpr auto operator+ (const tuple< S... > &x, const tuple< T... > &y)
 return a tuple of values defined by elementwise sum of x and y
 
template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr void plus_equals_helper (tuple< T... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >)
 A helper function for the += operator of tuples.
 
template<typename... T>
MFEM_HOST_DEVICE constexpr auto operator+= (tuple< T... > &x, const tuple< T... > &y)
 add values contained in y, to the tuple x
 
template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr void minus_equals_helper (tuple< T... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >)
 A helper function for the -= operator of tuples.
 
template<typename... T>
MFEM_HOST_DEVICE constexpr auto operator-= (tuple< T... > &x, const tuple< T... > &y)
 add values contained in y, to the tuple x
 
template<typename... S, typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto minus_helper (const tuple< S... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >)
 A helper function for the - operator of tuples.
 
template<typename... S, typename... T>
MFEM_HOST_DEVICE constexpr auto operator- (const tuple< S... > &x, const tuple< T... > &y)
 return a tuple of values defined by elementwise difference of x and y
 
template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto unary_minus_helper (const tuple< T... > &x, std::integer_sequence< int, i... >)
 A helper function for the - operator of tuples.
 
template<typename... T>
MFEM_HOST_DEVICE constexpr auto operator- (const tuple< T... > &x)
 return a tuple of values defined by applying the unary minus operator to each element of x
 
template<typename... S, typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto div_helper (const tuple< S... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >)
 A helper function for the / operator of tuples.
 
template<typename... S, typename... T>
MFEM_HOST_DEVICE constexpr auto operator/ (const tuple< S... > &x, const tuple< T... > &y)
 return a tuple of values defined by elementwise division of x by y
 
template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto div_helper (const real_t a, const tuple< T... > &x, std::integer_sequence< int, i... >)
 A helper function for the / operator of tuples.
 
template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto div_helper (const tuple< T... > &x, const real_t a, std::integer_sequence< int, i... >)
 A helper function for the / operator of tuples.
 
template<typename... T>
MFEM_HOST_DEVICE constexpr auto operator/ (const real_t a, const tuple< T... > &x)
 return a tuple of values defined by division of a by the elements of x
 
template<typename... T>
MFEM_HOST_DEVICE constexpr auto operator/ (const tuple< T... > &x, const real_t a)
 return a tuple of values defined by elementwise division of x by a
 
template<typename... S, typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mult_helper (const tuple< S... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >)
 A helper function for the * operator of tuples.
 
template<typename... S, typename... T>
MFEM_HOST_DEVICE constexpr auto operator* (const tuple< S... > &x, const tuple< T... > &y)
 return a tuple of values defined by elementwise multiplication of x and y
 
template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mult_helper (const real_t a, const tuple< T... > &x, std::integer_sequence< int, i... >)
 A helper function for the * operator of tuples.
 
template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mult_helper (const tuple< T... > &x, const real_t a, std::integer_sequence< int, i... >)
 A helper function for the * operator of tuples.
 
template<typename... T>
MFEM_HOST_DEVICE constexpr auto operator* (const real_t a, const tuple< T... > &x)
 multiply each component of x by the value a on the left
 
template<typename... T>
MFEM_HOST_DEVICE constexpr auto operator* (const tuple< T... > &x, const real_t a)
 multiply each component of x by the value a on the right
 
template<typename... T, std::size_t... i>
auto & print_helper (std::ostream &out, const tuple< T... > &A, std::integer_sequence< size_t, i... >)
 helper used to implement printing a tuple of values
 
template<typename... T>
auto & operator<< (std::ostream &out, const tuple< T... > &A)
 print a tuple of values
 
template<typename lambda , typename... T, int... i>
MFEM_HOST_DEVICE auto apply_helper (lambda f, tuple< T... > &args, std::integer_sequence< int, i... >)
 A helper to apply a lambda to a tuple.
 
template<typename lambda , typename... T>
MFEM_HOST_DEVICE auto apply (lambda f, tuple< T... > &args)
 a way of passing an n-tuple to a function that expects n separate arguments
 
template<typename lambda , typename... T, int... i>
MFEM_HOST_DEVICE auto apply_helper (lambda f, const tuple< T... > &args, std::integer_sequence< int, i... >)
 
template<typename lambda , typename... T>
MFEM_HOST_DEVICE auto apply (lambda f, const tuple< T... > &args)
 a way of passing an n-tuple to a function that expects n separate arguments
 
template<typename... T1s, typename... T2s>
constexpr auto merge_mfem_tuples_as_empty_std_tuple (const mfem::future::tuple< T1s... > &, const mfem::future::tuple< T2s... > &)
 Auxiliary template function that merges (concatenates) two mfem::future::tuple types into a single std::tuple that is empty, i.e. it is value initialized.
 
template<typename... Ts>
constexpr auto to_array (const std::tuple< Ts... > &tuple)
 
template<typename lambda , std::size_t... i>
constexpr void for_constexpr (lambda &&f, std::integer_sequence< std::size_t, i ... >)
 
template<typename lambda >
constexpr void for_constexpr (lambda &&f, std::integer_sequence< std::size_t >)
 
template<int... n, typename lambda >
constexpr void for_constexpr (lambda &&f)
 
template<typename lambda , typename arg_t >
constexpr void for_constexpr_with_arg (lambda &&f, arg_t &&arg, std::integer_sequence< std::size_t >)
 
template<typename lambda , typename arg_t , std::size_t i, std::size_t... Is>
constexpr void for_constexpr_with_arg (lambda &&f, arg_t &&arg, std::integer_sequence< std::size_t, i, Is... >)
 
template<typename lambda , typename arg_t >
constexpr void for_constexpr_with_arg (lambda &&f, arg_t &&arg)
 
template<std::size_t I, typename Tuple , std::size_t... Is>
std::array< bool, sizeof...(Is)> make_dependency_array (const Tuple &inputs, std::index_sequence< Is... >)
 
template<typename... input_ts, std::size_t... Is>
auto make_dependency_map_impl (tuple< input_ts... > inputs, std::index_sequence< Is... >)
 
template<typename... input_ts>
auto make_dependency_map (tuple< input_ts... > inputs)
 
template<typename T >
constexpr auto get_type_name () -> std::string_view
 
template<typename Tuple , std::size_t... Is>
void print_tuple_impl (const Tuple &t, std::index_sequence< Is... >)
 
template<typename... Args>
void print_tuple (const std::tuple< Args... > &t)
 
void pretty_print (std::ostream &out, const mfem::DenseMatrix &A)
 Pretty print an mfem::DenseMatrix to out.
 
void pretty_print (const mfem::Vector &v)
 Pretty print an mfem::Vector to out.
 
template<typename T >
void pretty_print (const mfem::Array< T > &v)
 Pretty print an mfem::Array to out.
 
template<typename K , typename T , std::size_t N>
void pretty_print (const std::unordered_map< K, std::array< T, N > > &map)
 Pretty prints an unordered map of std::array to out.
 
void print_mpi_root (const std::string &msg)
 
void print_mpi_sync (const std::string &msg)
 print with MPI rank synchronization
 
void pretty_print_mpi (const mfem::Vector &v)
 Pretty print an mfem::Vector with MPI rank.
 
template<typename ... Ts>
constexpr auto decay_types (tuple< Ts... > const &) -> tuple< std::remove_cv_t< std::remove_reference_t< Ts > >... >
 
template<typename T >
constexpr int GetFieldId ()
 
template<typename Tuple , std::size_t... Is>
constexpr auto extract_field_ids_impl (Tuple &&t, std::index_sequence< Is... >)
 
template<typename... Ts>
constexpr auto extract_field_ids (const std::tuple< Ts... > &t)
 Extracts field IDs from a tuple of objects derived from FieldOperator.
 
constexpr bool contains (const int *arr, std::size_t size, int value)
 Helper function to check if an element is in the array.
 
template<typename... Ts>
constexpr std::size_t count_unique_field_ids (const std::tuple< Ts... > &t)
 Function to count unique field IDs in a tuple.
 
template<typename T , std::size_t N>
auto get_marked_entries (const std::array< T, N > &a, const std::array< bool, N > &marker)
 Get marked entries from an std::array based on a marker array.
 
template<typename... Ts>
constexpr auto filter_fields (const std::tuple< Ts... > &t)
 Filter fields from a tuple based on their field IDs.
 
template<typename func_t >
__global__ void forall_kernel_shmem (func_t f, int n)
 
template<typename func_t >
void forall (func_t f, const int &N, const ThreadBlocks &blocks, int num_shmem=0, real_t *shmem=nullptr)
 
std::size_t FindIdx (const std::size_t &id, const std::vector< FieldDescriptor > &fields)
 Find the index of a field descriptor in a vector of field descriptors.
 
int GetVSize (const FieldDescriptor &f)
 Get the vdof size of a field descriptor.
 
void GetElementVDofs (const FieldDescriptor &f, int el, Array< int > &vdofs)
 Get the element vdofs of a field descriptor.
 
int GetTrueVSize (const FieldDescriptor &f)
 Get the true dof size of a field descriptor.
 
int GetVDim (const FieldDescriptor &f)
 Get the vdim of a field descriptor.
 
template<typename entity_t >
int GetDimension (const FieldDescriptor &f)
 Get the spatial dimension of a field descriptor.
 
const Operatorget_prolongation (const FieldDescriptor &f)
 Get the prolongation operator for a field descriptor.
 
const Operatorget_element_restriction (const FieldDescriptor &f, ElementDofOrdering o)
 Get the element restriction operator for a field descriptor.
 
const Operatorget_face_restriction (const FieldDescriptor &f, ElementDofOrdering o, FaceType ft, L2FaceValues m)
 Get the face restriction operator for a field descriptor.
 
template<typename entity_t >
const Operatorget_restriction (const FieldDescriptor &f, const ElementDofOrdering &o)
 Get the restriction operator for a field descriptor.
 
template<typename entity_t , typename fop_t >
std::tuple< std::function< void(const Vector &, Vector &)>, int > get_restriction_transpose (const FieldDescriptor &f, const ElementDofOrdering &o, const fop_t &fop)
 Get a transpose restriction callback for a field descriptor.
 
void prolongation (const FieldDescriptor field, const Vector &x, Vector &field_l)
 Apply the prolongation operator to a field.
 
template<std::size_t N, std::size_t M>
void prolongation (const std::array< FieldDescriptor, N > fields, const Vector &x, std::array< Vector, M > &fields_l)
 Apply the prolongation operator to a vector of fields.
 
void prolongation (const std::vector< FieldDescriptor > fields, const Vector &x, std::vector< Vector > &fields_l)
 Apply the prolongation operator to a vector of fields.
 
void get_lvectors (const std::vector< FieldDescriptor > fields, const Vector &x, std::vector< Vector > &fields_l)
 
template<typename fop_t >
std::function< void(const Vector &, Vector &)> get_prolongation_transpose (const FieldDescriptor &f, const fop_t &fop, MPI_Comm mpi_comm)
 Get a transpose prolongation callback for a field descriptor.
 
template<typename entity_t >
void restriction (const FieldDescriptor u, const Vector &u_l, Vector &field_e, ElementDofOrdering ordering)
 Apply the restriction operator to a field.
 
template<typename entity_t >
void restriction (const std::vector< FieldDescriptor > u, const std::vector< Vector > &u_l, std::vector< Vector > &fields_e, ElementDofOrdering ordering, const int offset=0)
 Apply the restriction operator to a vector of fields.
 
template<std::size_t N, std::size_t M>
void element_restriction (const std::array< FieldDescriptor, N > u, const std::array< Vector, N > &u_l, std::array< Vector, M > &fields_e, ElementDofOrdering ordering, const int offset=0)
 
template<typename entity_t >
int GetNumEntities (const mfem::Mesh &mesh)
 Get the number of entities of a given type.
 
template<typename entity_t >
const DofToQuadGetDofToQuad (const FieldDescriptor &f, const IntegrationRule &ir, DofToQuad::Mode mode)
 Get the GetDofToQuad object for a given entity type.
 
template<typename field_operator_t >
void CheckCompatibility (const FieldDescriptor &f)
 Check the compatibility of a field operator type with a FieldDescriptor.
 
template<typename entity_t , typename field_operator_t >
int GetSizeOnQP (const field_operator_t &, const FieldDescriptor &f)
 Get the size on quadrature point for a field operator type and FieldDescriptor combination.
 
template<typename entity_t , typename field_operator_ts >
std::array< size_t, tuple_size< field_operator_ts >::value > create_descriptors_to_fields_map (const std::vector< FieldDescriptor > &fields, field_operator_ts &fops)
 Create a map from field operator types to FieldDescriptor indices.
 
template<typename input_t , std::size_t... i>
std::array< DeviceTensor< 3 >, sizeof...(i)> wrap_input_memory (std::array< Vector, sizeof...(i)> &input_qp_mem, int num_qp, int num_entities, const input_t &inputs, std::index_sequence< i... >)
 Wrap input memory for a given set of inputs.
 
template<typename input_t , std::size_t... i>
std::array< Vector, sizeof...(i)> create_input_qp_memory (int num_qp, int num_entities, input_t &inputs, std::index_sequence< i... >)
 Create input memory for a given set of inputs.
 
template<typename input_t , std::size_t... i>
std::vector< int > get_input_size_on_qp (const input_t &inputs, std::index_sequence< i... >)
 Get the size on quadrature point for a given set of inputs.
 
template<typename entity_t , std::size_t num_fields, std::size_t num_inputs, std::size_t num_outputs, typename input_t >
SharedMemoryInfo< num_fields, num_inputs, num_outputs > get_shmem_info (const std::array< DofToQuadMap, num_inputs > &input_dtq_maps, const std::array< DofToQuadMap, num_outputs > &output_dtq_maps, const std::vector< FieldDescriptor > &fields, const int &num_entities, const input_t &inputs, const int &num_qp, const std::vector< int > &input_size_on_qp, const int &residual_size_on_qp, const ElementDofOrdering &dof_ordering, const int &derivative_action_field_idx=-1)
 
template<typename shmem_info_t >
void print_shared_memory_info (shmem_info_t &shmem_info)
 
template<std::size_t N>
MFEM_HOST_DEVICE std::array< DofToQuadMap, N > load_dtq_mem (void *mem, int offset, const std::array< std::array< int, 2 >, N > &sizes, const std::array< DofToQuadMap, N > &dtq)
 
template<std::size_t num_fields>
MFEM_HOST_DEVICE std::array< DeviceTensor< 1 >, num_fields > load_field_mem (void *mem, int offset, const std::array< int, num_fields > &sizes, const std::array< DeviceTensor< 2 >, num_fields > &fields_e, const int &entity_idx)
 
MFEM_HOST_DEVICE DeviceTensor< 1 > load_direction_mem (void *mem, int offset, const int &size, const DeviceTensor< 2 > &direction, const int &entity_idx)
 
template<std::size_t N>
MFEM_HOST_DEVICE std::array< DeviceTensor< 2 >, N > load_input_mem (void *mem, int offset, const std::array< int, N > &sizes, const int &num_qp)
 
MFEM_HOST_DEVICE DeviceTensor< 2 > load_residual_mem (void *mem, int offset, const int &residual_size, const int &num_qp)
 
template<std::size_t N>
MFEM_HOST_DEVICE std::array< DeviceTensor< 1 >, 6 > load_scratch_mem (void *mem, int offset, const std::array< int, N > &sizes)
 
template<typename shared_mem_info_t , std::size_t num_inputs, std::size_t num_outputs, std::size_t num_fields>
MFEM_HOST_DEVICE auto unpack_shmem (void *shmem, const shared_mem_info_t &shmem_info, const std::array< DofToQuadMap, num_inputs > &input_dtq_maps, const std::array< DofToQuadMap, num_outputs > &output_dtq_maps, const std::array< DeviceTensor< 2 >, num_fields > &wrapped_fields_e, const int &num_qp, const int &e)
 
template<typename shared_mem_info_t , std::size_t num_inputs, std::size_t num_outputs, std::size_t num_fields>
MFEM_HOST_DEVICE auto unpack_shmem (void *shmem, const shared_mem_info_t &shmem_info, const std::array< DofToQuadMap, num_inputs > &input_dtq_maps, const std::array< DofToQuadMap, num_outputs > &output_dtq_maps, const std::array< DeviceTensor< 2 >, num_fields > &wrapped_fields_e, const DeviceTensor< 2 > &wrapped_direction_e, const int &num_qp, const int &e)
 
template<std::size_t... i>
MFEM_HOST_DEVICE std::array< DeviceTensor< 2 >, sizeof...(i)> get_local_input_qp (const std::array< DeviceTensor< 3 >, sizeof...(i)> &input_qp_global, int e, std::index_sequence< i... >)
 
template<std::size_t N>
MFEM_HOST_DEVICE void set_zero (std::array< DeviceTensor< 2 >, N > &v)
 
template<std::size_t n>
MFEM_HOST_DEVICE void set_zero (DeviceTensor< n > &u)
 
template<int n>
MFEM_HOST_DEVICE void copy (DeviceTensor< n > &u, DeviceTensor< n > &v)
 Copy data from DeviceTensor u to DeviceTensor v.
 
template<int n, std::size_t m>
MFEM_HOST_DEVICE void copy (std::array< DeviceTensor< n >, m > &u, std::array< DeviceTensor< n >, m > &v)
 Copy data from array of DeviceTensor u to array of DeviceTensor v.
 
template<std::size_t num_fields>
std::array< DeviceTensor< 2 >, num_fields > wrap_fields (std::vector< Vector > &fields, std::array< int, num_fields > &field_sizes, const int &num_entities)
 Wraps plain data in DeviceTensors for fields.
 
template<typename input_t , std::size_t num_fields, std::size_t... i>
int accumulate_sizes_on_qp (const input_t &inputs, std::array< bool, sizeof...(i)> &kinput_is_dependent, const std::array< int, sizeof...(i)> &input_to_field, const std::array< FieldDescriptor, num_fields > &fields, std::index_sequence< i... > seq)
 Accumulates the sizes of field operators on quadrature points for dependent inputs.
 
template<typename entity_t , typename field_operator_ts , std::size_t N = tuple_size<field_operator_ts>::value, std::size_t... Is>
std::array< DofToQuadMap, N > create_dtq_maps_impl (field_operator_ts &fops, std::vector< const DofToQuad * > &dtqs, const std::array< size_t, N > &field_map, std::index_sequence< Is... >)
 
template<typename entity_t , typename field_operator_ts , std::size_t num_fields>
std::array< DofToQuadMap, num_fields > create_dtq_maps (field_operator_ts &fops, std::vector< const DofToQuad * > &dtqmaps, const std::array< size_t, num_fields > &to_field_map)
 Create DofToQuad maps for a given set of field operators.
 

Typedef Documentation

◆ action_t

Initial value:
std::function<void(std::vector<Vector> &, const std::vector<Vector> &, Vector &)>

Type alias for a function that computes the action of an operator.

Definition at line 31 of file doperator.hpp.

◆ assemble_derivative_hypreparmatrix_callback_t

Initial value:
std::function<void(std::vector<Vector> &, HypreParMatrix *&)>

Type alias for a function that assembles the HypreParMatrix of a derivative operator.

Definition at line 49 of file doperator.hpp.

◆ assemble_derivative_sparsematrix_callback_t

Initial value:
std::function<void(std::vector<Vector> &, SparseMatrix *&)>

Type alias for a function that assembles the SparseMatrix of a derivative operator.

Definition at line 44 of file doperator.hpp.

◆ decay_tuple

template<typename T >
using mfem::future::decay_tuple = decltype(decay_types(std::declval<T>()))

Definition at line 420 of file util.hpp.

◆ derivative_action_t

Initial value:
std::function<void(std::vector<Vector> &, const Vector &, Vector &)>

Type alias for a function that computes the action of a derivative.

Definition at line 39 of file doperator.hpp.

◆ derivative_setup_t

Initial value:
std::function<void(std::vector<Vector> &, const Vector &)>

Type alias for a function that computes the cache for the action of a derivative.

Definition at line 35 of file doperator.hpp.

◆ outer_product_t

template<typename T1 , typename T2 >
using mfem::future::outer_product_t = typename detail::outer_prod<T1, T2>::type

a type function that returns the tensor type of an outer product of two tensors

Template Parameters
T1the first argument to the outer product
T2the second argument to the outer product

Definition at line 1953 of file tensor.hpp.

◆ reduced_tensor

template<typename T , int n1, int n2 = 1>
using mfem::future::reduced_tensor
Initial value:
typename std::conditional<
(n1 == 1 && n2 == 1), T,
typename std::conditional<n1 == 1, tensor<T, n2>,
typename std::conditional<n2 == 1, tensor<T, n1>, tensor<T, n1, n2>
>::type
>::type
>::type

Removes 1s from tensor dimensions For example, a tensor<T, 1, 10> is equivalent to a tensor<T, 10>

Template Parameters
TThe scalar type of the tensor
n1The first dimension
n2The second dimension

Definition at line 308 of file tensor.hpp.

◆ restriction_callback_t

Initial value:
std::function<void(std::vector<Vector> &,
const std::vector<Vector> &,
std::vector<Vector> &)>

Type alias for a function that applies the appropriate restriction to the solution and parameters.

Definition at line 54 of file doperator.hpp.

Function Documentation

◆ abs()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::abs ( dual< value_type, gradient_type > x)

implementation of absolute value function for dual numbers

Definition at line 281 of file dual.hpp.

◆ accumulate_sizes_on_qp()

template<typename input_t , std::size_t num_fields, std::size_t... i>
int mfem::future::accumulate_sizes_on_qp ( const input_t & inputs,
std::array< bool, sizeof...(i)> & kinput_is_dependent,
const std::array< int, sizeof...(i)> & input_to_field,
const std::array< FieldDescriptor, num_fields > & fields,
std::index_sequence< i... > seq )

Accumulates the sizes of field operators on quadrature points for dependent inputs.

Template Parameters
input_tType of input field operators tuple
num_fieldsNumber of fields
iParameter pack indices for field operators
Parameters
inputsTuple of input field operators
kinput_is_dependentArray indicating which inputs are dependent
input_to_fieldArray mapping input indices to field indices
fieldsArray of field descriptors
seqIndex sequence for inputs
Returns
Sum of sizes on quadrature points for all dependent inputs

This function accumulates the sizes needed on quadrature points for all dependent input field operators. For each dependent input, it calculates the size required on quadrature points using GetSizeOnQP() and adds it to the total. Non-dependent inputs contribute zero to the total size.

Definition at line 2223 of file util.hpp.

◆ acos()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::acos ( dual< value_type, gradient_type > a)

implementation of acos for dual numbers

Definition at line 323 of file dual.hpp.

◆ antisym()

template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::antisym ( const isotropic_tensor< T, m, m > & ) -> zero
constexpr

Definition at line 2176 of file tensor.hpp.

◆ AntisymmetricIdentity()

template<int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::AntisymmetricIdentity ( ) -> isotropic_tensor<real_t, m, m, m, m>
constexpr

Definition at line 2244 of file tensor.hpp.

◆ apply() [1/2]

template<typename lambda , typename... T>
MFEM_HOST_DEVICE auto mfem::future::apply ( lambda f,
const tuple< T... > & args )

a way of passing an n-tuple to a function that expects n separate arguments

Template Parameters
lambdaa callable type
Tthe types of arguments to be passed in to f
Parameters
fthe callable object
argsa tuple of arguments

e.g. foo(bar, baz) is equivalent to apply(foo, mfem::tuple(bar,baz));

Definition at line 809 of file tuple.hpp.

◆ apply() [2/2]

template<typename lambda , typename... T>
MFEM_HOST_DEVICE auto mfem::future::apply ( lambda f,
tuple< T... > & args )

a way of passing an n-tuple to a function that expects n separate arguments

Template Parameters
lambdaa callable type
Tthe types of arguments to be passed in to f
Parameters
fthe callable object
argsa tuple of arguments

e.g. foo(bar, baz) is equivalent to apply(foo, mfem::tuple(bar,baz));

Definition at line 783 of file tuple.hpp.

◆ apply_helper() [1/2]

template<typename lambda , typename... T, int... i>
MFEM_HOST_DEVICE auto mfem::future::apply_helper ( lambda f,
const tuple< T... > & args,
std::integer_sequence< int, i... >  )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 793 of file tuple.hpp.

◆ apply_helper() [2/2]

template<typename lambda , typename... T, int... i>
MFEM_HOST_DEVICE auto mfem::future::apply_helper ( lambda f,
tuple< T... > & args,
std::integer_sequence< int, i... >  )

A helper to apply a lambda to a tuple.

Template Parameters
lambdaThe functor type
TThe tuple types
iThe integer sequence to i
Parameters
fThe functor to apply to the tuple
argsThe input tuple
Returns
The functor output

Definition at line 767 of file tuple.hpp.

◆ apply_kernel()

template<typename qfunc_t , typename args_ts , size_t num_args>
MFEM_HOST_DEVICE void mfem::future::apply_kernel ( DeviceTensor< 1, real_t > & f_qp,
const qfunc_t & qfunc,
args_ts & args,
const std::array< DeviceTensor< 2 >, num_args > & u,
int qp )
inline

Definition at line 510 of file qfunction_apply.hpp.

◆ apply_kernel_fwddiff_enzyme()

template<typename qfunc_t , typename arg_ts , size_t num_args>
MFEM_HOST_DEVICE void mfem::future::apply_kernel_fwddiff_enzyme ( DeviceTensor< 1, real_t > & f_qp,
qfunc_t & qfunc,
arg_ts & args,
arg_ts & shadow_args,
const std::array< DeviceTensor< 2 >, num_args > & u,
const std::array< DeviceTensor< 2 >, num_args > & v,
int qp_idx )
inline

Definition at line 603 of file qfunction_apply.hpp.

◆ apply_kernel_native_dual()

template<typename qfunc_t , typename arg_ts , size_t num_args>
MFEM_HOST_DEVICE void mfem::future::apply_kernel_native_dual ( DeviceTensor< 1, real_t > & f_qp,
const qfunc_t & qfunc,
arg_ts & args,
const std::array< DeviceTensor< 2 >, num_args > & u,
const std::array< DeviceTensor< 2 >, num_args > & v,
const int & qp_idx )
inline

Definition at line 523 of file qfunction_apply.hpp.

◆ apply_qpdc()

template<size_t num_fields>
MFEM_HOST_DEVICE void mfem::future::apply_qpdc ( DeviceTensor< 3 > & fhat,
const std::array< DeviceTensor< 2 >, num_fields > & shadow_shmem,
const DeviceTensor< 5, const real_t > & qpdc,
const DeviceTensor< 1, const real_t > & itod,
const int & q1d,
const int & dimension,
const bool & use_sum_factorization )
inline

Apply the quadrature point data cache (qpdc) to a vector (usually a direction).

The qpdc consists of compatible data to be used for integration with a test operator, e.g. Jacobians of a linearization from a FE operation with a trial function including integration weights and necessesary transformations.

Parameters
fhatthe qpdc applied to a vector in shadow_memory.
shadow_shmemthe shadow shared memory.
qpdcthe quadrature point data cache holding the resulting Jacobians on each quadrature point.
itodinputs trial operator dimension. If input is dependent the value corresponds to the spatial dimension, otherwise a zero indicates non-dependence on the variable.
q1dnumber of quadrature points in 1D.
dimensionspatial dimension.
use_sum_factorizationwhether to use sum factorization.

Definition at line 450 of file qfunction_apply.hpp.

◆ asin()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::asin ( dual< value_type, gradient_type > a)

implementation of asin for dual numbers

Definition at line 332 of file dual.hpp.

◆ assemble_element_mat_naive()

template<typename input_fop_ts , size_t num_inputs, typename output_fop_t >
MFEM_HOST_DEVICE void mfem::future::assemble_element_mat_naive ( const DeviceTensor< 4, real_t > & A,
const DeviceTensor< 3, real_t > & fhat,
const DeviceTensor< 5, const real_t > & qpdc,
const DeviceTensor< 1, const real_t > & itod,
const input_fop_ts & inputs,
const output_fop_t & output,
const std::array< DofToQuadMap, num_inputs > & input_dtqmaps,
const DofToQuadMap & output_dtqmap,
std::array< DeviceTensor< 1 >, 6 > & scratch_shmem,
const int & dimension,
const int & q1d,
const int & td1d,
const bool & use_sum_factorization )

Assemble element matrix for two or three dimensional data.

Note: In the below layouts, total_trial_op_dim is > 1 if there are more than one inputs dependent on the derivative variable.

Parameters
AMemory for one element matrix with layout [test_ndof, test_vdim, trial_ndof, trial_vdim].
fhatMemory to hold the residual computation with layout [test_vdim, test_op_dim, nqp].
qpdcThe quadrature point data cache with data layout [test_vdim, test_op_dim, trial_vdim, total_trial_op_dim, nqp].
itodInput Trial Operator Dimension array. If the trial operator is not dependent, the dimension is 0 to indicate that.
inputsThe input field operator types.
outputThe output field operator types.
input_dtqmapsThe input DofToQuad maps.
output_dtqmapThe output DofToQuad maps.
scratch_shmemScratch shared memory for computations.
dimensionThe spatial dimension.
q1dThe number of quadrature points in one dimension.
td1dThe number of trial dofs in one dimension.
use_sum_factorizationIndicator if sum factorization is used.

Definition at line 366 of file assemble.hpp.

◆ assemble_element_mat_t2d()

template<typename input_fop_ts , size_t num_inputs, typename output_fop_t >
MFEM_HOST_DEVICE void mfem::future::assemble_element_mat_t2d ( const DeviceTensor< 4, real_t > & A,
const DeviceTensor< 3, real_t > & fhat,
const DeviceTensor< 5, const real_t > & qpdc,
const DeviceTensor< 1, const real_t > & itod,
const input_fop_ts & inputs,
const output_fop_t & output,
const std::array< DofToQuadMap, num_inputs > & input_dtqmaps,
const DofToQuadMap & output_dtqmap,
std::array< DeviceTensor< 1 >, 6 > & scratch_shmem,
const int & q1d,
const int & td1d )

Assemble element matrix for two dimensional data.

Note: In the below layouts, total_trial_op_dim is > 1 if there are more than one inputs dependent on the derivative variable.

Parameters
AMemory for one element matrix with layout [test_ndof, test_vdim, trial_ndof, trial_vdim].
fhatMemory to hold the residual computation with layout [test_vdim, test_op_dim, nqp].
qpdcThe quadrature point data cache with data layout [test_vdim, test_op_dim, trial_vdim, total_trial_op_dim, nqp].
itodInput Trial Operator Dimension array. If the trial operator is not dependent, the dimension is 0 to indicate that.
inputsThe input field operator types.
outputThe output field operator types.
input_dtqmapsThe input DofToQuad maps.
output_dtqmapThe output DofToQuad maps.
scratch_shmemScratch shared memory for computations.
q1dThe number of quadrature points in one dimension.
td1dThe number of trial dofs in one dimension.

Definition at line 210 of file assemble.hpp.

◆ assemble_element_mat_t3d()

template<typename input_fop_ts , size_t num_inputs, typename output_fop_t >
MFEM_HOST_DEVICE void mfem::future::assemble_element_mat_t3d ( const DeviceTensor< 4, real_t > & A,
const DeviceTensor< 3, real_t > & fhat,
const DeviceTensor< 5, const real_t > & qpdc,
const DeviceTensor< 1, const real_t > & itod,
const input_fop_ts & inputs,
const output_fop_t & output,
const std::array< DofToQuadMap, num_inputs > & input_dtqmaps,
const DofToQuadMap & output_dtqmap,
std::array< DeviceTensor< 1 >, 6 > & scratch_shmem,
const int & q1d,
const int & td1d )

Assemble element matrix for three dimensional data.

Note: In the below layouts, total_trial_op_dim is > 1 if there are more than one inputs dependent on the derivative variable.

Parameters
AMemory for one element matrix with layout [test_ndof, test_vdim, trial_ndof, trial_vdim].
fhatMemory to hold the residual computation with layout [test_vdim, test_op_dim, nqp].
qpdcThe quadrature point data cache with data layout [test_vdim, test_op_dim, trial_vdim, total_trial_op_dim, nqp].
itodInput Trial Operator Dimension array. If the trial operator is not dependent, the dimension is 0 to indicate that.
inputsThe input field operator types.
outputThe output field operator types.
input_dtqmapsThe input DofToQuad maps.
output_dtqmapThe output DofToQuad maps.
scratch_shmemScratch shared memory for computations.
q1dThe number of quadrature points in one dimension.
td1dThe number of trial dofs in one dimension.

Definition at line 39 of file assemble.hpp.

◆ atan()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::atan ( dual< value_type, gradient_type > a)

implementation of atan for dual numbers

Definition at line 350 of file dual.hpp.

◆ calcsv() [1/2]

template<typename T >
MFEM_HOST_DEVICE T mfem::future::calcsv ( const tensor< T, 1, 1 > A,
const int i )

Definition at line 1510 of file tensor.hpp.

◆ calcsv() [2/2]

template<typename T >
MFEM_HOST_DEVICE T mfem::future::calcsv ( const tensor< T, 2, 2 > A,
const int i )

Compute the i-th singular value of a 2x2 matrix A.

Definition at line 1519 of file tensor.hpp.

◆ call_qfunction()

template<typename qf_param_ts , typename qfunc_t , std::size_t num_fields>
MFEM_HOST_DEVICE void mfem::future::call_qfunction ( qfunc_t & qfunc,
const std::array< DeviceTensor< 2 >, num_fields > & input_shmem,
DeviceTensor< 2 > & residual_shmem,
const int & rs_qp,
const int & num_qp,
const int & q1d,
const int & dimension,
const bool & use_sum_factorization )
inline

Call a qfunction with the given parameters.

Parameters
qfuncthe qfunction to call.
input_shmemthe input shared memory.
residual_shmemthe residual shared memory.
rs_qpthe size of the residual.
num_qpthe number of quadrature points.
q1dthe number of quadrature points in 1D.
dimensionthe spatial dimension.
use_sum_factorizationwhether to use sum factorization.
Template Parameters
qf_param_tsthe tuple type of the qfunction parameters.

Definition at line 35 of file qfunction_apply.hpp.

◆ call_qfunction_derivative()

template<typename qf_param_ts , typename qfunc_t , std::size_t num_fields>
MFEM_HOST_DEVICE void mfem::future::call_qfunction_derivative ( qfunc_t & qfunc,
const std::array< DeviceTensor< 2 >, num_fields > & input_shmem,
const std::array< DeviceTensor< 2 >, num_fields > & shadow_shmem,
DeviceTensor< 2 > & residual_shmem,
DeviceTensor< 5 > & qpdc,
const DeviceTensor< 1, const real_t > & itod,
const int & das_qp,
const int & q1d,
const int & dimension,
const bool & use_sum_factorization )
inline

Call a qfunction with the given parameters and compute it's derivative represented by the Jacobian on each quadrature point.

Parameters
qfuncthe qfunction to call.
input_shmemthe input shared memory.
shadow_shmemthe shadow shared memory.
residual_shmemthe residual shared memory.
qpdcthe quadrature point data cache holding the resulting Jacobians on each quadrature point.
itodinputs trial operator dimension. If input is dependent the value corresponds to the spatial dimension, otherwise a zero indicates non-dependence on the variable.
das_qpthe size of the derivative action.
q1dthe number of quadrature points in 1D.
dimensionthe spatial dimension.
use_sum_factorizationwhether to use sum factorization.
Template Parameters
qf_param_tsthe tuple type of the qfunction parameters.

Definition at line 302 of file qfunction_apply.hpp.

◆ call_qfunction_derivative_action()

template<typename qf_param_ts , typename qfunc_t , std::size_t num_fields>
MFEM_HOST_DEVICE void mfem::future::call_qfunction_derivative_action ( qfunc_t & qfunc,
const std::array< DeviceTensor< 2 >, num_fields > & input_shmem,
const std::array< DeviceTensor< 2 >, num_fields > & shadow_shmem,
DeviceTensor< 2 > & residual_shmem,
const int & das_qp,
const int & num_qp,
const int & q1d,
const int & dimension,
const bool & use_sum_factorization )
inline

Call a qfunction with the given parameters and compute it's derivative action.

Parameters
qfuncthe qfunction to call.
input_shmemthe input shared memory.
shadow_shmemthe shadow shared memory.
residual_shmemthe residual shared memory.
das_qpthe size of the derivative action.
num_qpthe number of quadrature points.
q1dthe number of quadrature points in 1D.
dimensionthe spatial dimension.
use_sum_factorizationwhether to use sum factorization.
Template Parameters
qf_param_tsthe tuple type of the qfunction parameters.

Definition at line 122 of file qfunction_apply.hpp.

◆ chain_rule() [1/5]

MFEM_HOST_DEVICE real_t mfem::future::chain_rule ( const real_t df_dx,
const real_t dx )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
for a scalar-valued function of a scalar, the chain rule is just multiplication

Definition at line 2004 of file tensor.hpp.

◆ chain_rule() [2/5]

template<typename T >
MFEM_HOST_DEVICE zero mfem::future::chain_rule ( const T ,
const zero  )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements a no-op for the case where the small change is identically zero

Definition at line 1994 of file tensor.hpp.

◆ chain_rule() [3/5]

template<int... n>
MFEM_HOST_DEVICE auto mfem::future::chain_rule ( const tensor< real_t, n... > & df_dx,
const real_t dx ) -> decltype(df_dx * dx)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
for a tensor-valued function of a scalar, the chain rule is just scalar multiplication

Definition at line 2012 of file tensor.hpp.

◆ chain_rule() [4/5]

template<typename T >
MFEM_HOST_DEVICE zero mfem::future::chain_rule ( const zero ,
const T  )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements a no-op for the case where the gradient w.r.t. an input argument is identically zero

Definition at line 1983 of file tensor.hpp.

◆ chain_rule() [5/5]

MFEM_HOST_DEVICE zero mfem::future::chain_rule ( const zero ,
const zero  )
inline

evaluate the change (to first order) in a function, f, given a small change in the input argument, dx.

Definition at line 1975 of file tensor.hpp.

◆ CheckCompatibility()

template<typename field_operator_t >
void mfem::future::CheckCompatibility ( const FieldDescriptor & f)

Check the compatibility of a field operator type with a FieldDescriptor.

This function checks if the field operator type is compatible with the FieldDescriptor type.

Parameters
fthe field descriptor.
Template Parameters
field_operator_tthe field operator type.

Definition at line 1350 of file util.hpp.

◆ chop() [1/2]

template<int m, int n>
MFEM_HOST_DEVICE tensor< real_t, m, n > mfem::future::chop ( const tensor< real_t, m, n > & A)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 1886 of file tensor.hpp.

◆ chop() [2/2]

template<int n>
MFEM_HOST_DEVICE tensor< real_t, n > mfem::future::chop ( const tensor< real_t, n > & A)

replace all entries in a tensor satisfying |x| < 1.0e-10 by literal zero

Parameters
[in]AThe tensor to "chop"

Definition at line 1871 of file tensor.hpp.

◆ contains()

bool mfem::future::contains ( const int * arr,
std::size_t size,
int value )
constexpr

Helper function to check if an element is in the array.

Parameters
arrthe array to search in.
sizethe size of the array.
valuethe value to search for.
Returns
true if the value is found, false otherwise.

Definition at line 478 of file util.hpp.

◆ copy() [1/2]

template<int n>
MFEM_HOST_DEVICE void mfem::future::copy ( DeviceTensor< n > & u,
DeviceTensor< n > & v )
inline

Copy data from DeviceTensor u to DeviceTensor v.

Parameters
usource DeviceTensor
vdestination DeviceTensor
Template Parameters
nDeviceTensor rank

Definition at line 2147 of file util.hpp.

◆ copy() [2/2]

template<int n, std::size_t m>
MFEM_HOST_DEVICE void mfem::future::copy ( std::array< DeviceTensor< n >, m > & u,
std::array< DeviceTensor< n >, m > & v )
inline

Copy data from array of DeviceTensor u to array of DeviceTensor v.

Parameters
usource DeviceTensor array
vdestination DeviceTensor array
Template Parameters
nDeviceTensor rank
mnumber of DeviceTensors

Definition at line 2170 of file util.hpp.

◆ cos()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::cos ( dual< value_type, gradient_type > a)

implementation of cosine for dual numbers

Definition at line 296 of file dual.hpp.

◆ count_unique_field_ids()

template<typename... Ts>
std::size_t mfem::future::count_unique_field_ids ( const std::tuple< Ts... > & t)
constexpr

Function to count unique field IDs in a tuple.

Parameters
tthe tuple to count unique field IDs from.
Returns
the number of unique field IDs.

Definition at line 495 of file util.hpp.

◆ create_descriptors_to_fields_map()

template<typename entity_t , typename field_operator_ts >
std::array< size_t, tuple_size< field_operator_ts >::value > mfem::future::create_descriptors_to_fields_map ( const std::vector< FieldDescriptor > & fields,
field_operator_ts & fops )

Create a map from field operator types to FieldDescriptor indices.

Parameters
fieldsthe vector of field descriptors.
fopsthe field operator types.
Template Parameters
entity_tthe entity type (see Entity).
Returns
an array mapping field operator types to field descriptor indices.

Definition at line 1437 of file util.hpp.

◆ create_dtq_maps()

template<typename entity_t , typename field_operator_ts , std::size_t num_fields>
std::array< DofToQuadMap, num_fields > mfem::future::create_dtq_maps ( field_operator_ts & fops,
std::vector< const DofToQuad * > & dtqmaps,
const std::array< size_t, num_fields > & to_field_map )

Create DofToQuad maps for a given set of field operators.

Parameters
fopsfield operators
dtqmapsDofToQuad maps
to_field_mapmapping from input indices to field indices
Template Parameters
entity_ttype of the entity
Returns
array of DofToQuad maps

Definition at line 2334 of file util.hpp.

◆ create_dtq_maps_impl()

template<typename entity_t , typename field_operator_ts , std::size_t N = tuple_size<field_operator_ts>::value, std::size_t... Is>
std::array< DofToQuadMap, N > mfem::future::create_dtq_maps_impl ( field_operator_ts & fops,
std::vector< const DofToQuad * > & dtqs,
const std::array< size_t, N > & field_map,
std::index_sequence< Is... >  )

Definition at line 2249 of file util.hpp.

◆ create_input_qp_memory()

template<typename input_t , std::size_t... i>
std::array< Vector, sizeof...(i)> mfem::future::create_input_qp_memory ( int num_qp,
int num_entities,
input_t & inputs,
std::index_sequence< i... >  )

Create input memory for a given set of inputs.

Definition at line 1504 of file util.hpp.

◆ ddot() [1/5]

template<typename S , typename T , int m, int... n>
MFEM_HOST_DEVICE constexpr auto mfem::future::ddot ( const isotropic_tensor< S, m, m > & I,
const tensor< T, m, m > & A ) -> decltype(S {} * T{})
constexpr

Definition at line 2162 of file tensor.hpp.

◆ ddot() [2/5]

template<typename S , typename T , int m, int... n>
MFEM_HOST_DEVICE constexpr auto mfem::future::ddot ( const isotropic_tensor< S, m, m, m, m > & I,
const tensor< T, m, m > & A ) -> tensor<decltype(S {} * T{}), m, m>
constexpr

Definition at line 2282 of file tensor.hpp.

◆ ddot() [3/5]

template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE auto mfem::future::ddot ( const tensor< S, m, n > & A,
const tensor< T, m, n > & B ) -> decltype(S {} * T{})

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
2nd-order-tensor : 2nd-order-tensor, like inner()

Definition at line 1207 of file tensor.hpp.

◆ ddot() [4/5]

template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE auto mfem::future::ddot ( const tensor< S, m, n, p > & A,
const tensor< T, n, p > & B ) -> tensor<decltype(S {} * T{}), m>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
3rd-order-tensor : 2nd-order-tensor. Returns vector C, such that C_i = sum_jk A_ijk B_jk.

Definition at line 1185 of file tensor.hpp.

◆ ddot() [5/5]

template<typename S , typename T , int m, int n, int p, int q>
MFEM_HOST_DEVICE auto mfem::future::ddot ( const tensor< S, m, n, p, q > & A,
const tensor< T, p, q > & B ) -> tensor<decltype(S {} * T{}), m, n>

real_t dot product, contracting over the two "middle" indices

Template Parameters
Sthe underlying type of the tensor (lefthand) argument
Tthe underlying type of the tensor (righthand) argument
mfirst dimension of A
nsecond dimension of A
pthird dimension of A, first dimensions of B
qfourth dimension of A, second dimensions of B
Parameters
[in]AThe lefthand tensor
[in]BThe righthand tensor

Definition at line 1159 of file tensor.hpp.

◆ decay_types()

template<typename ... Ts>
auto mfem::future::decay_types ( tuple< Ts... > const & ) -> tuple< std::remove_cv_t< std::remove_reference_t< Ts > >... >
constexpr

◆ det() [1/4]

template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::det ( const isotropic_tensor< T, m, m > & I) -> T
constexpr

Definition at line 2194 of file tensor.hpp.

◆ det() [2/4]

template<typename T >
MFEM_HOST_DEVICE T mfem::future::det ( const tensor< T, 1, 1 > & A)

Returns the determinant of a matrix.

Parameters
[in]AThe matrix to obtain the determinant of

Definition at line 1406 of file tensor.hpp.

◆ det() [3/4]

template<typename T >
MFEM_HOST_DEVICE T mfem::future::det ( const tensor< T, 2, 2 > & A)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 1412 of file tensor.hpp.

◆ det() [4/4]

template<typename T >
MFEM_HOST_DEVICE T mfem::future::det ( const tensor< T, 3, 3 > & A)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 1418 of file tensor.hpp.

◆ dev()

template<typename T , int n>
MFEM_HOST_DEVICE tensor< T, n, n > mfem::future::dev ( const tensor< T, n, n > & A)

Calculates the deviator of a matrix (rank-2 tensor)

Parameters
[in]AThe matrix to calculate the deviator of In the context of stress tensors, the deviator is obtained by subtracting the mean stress (average of main diagonal elements) from each element on the main diagonal

Definition at line 1354 of file tensor.hpp.

◆ div_helper() [1/3]

template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::div_helper ( const real_t a,
const tuple< T... > & x,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the / operator of tuples.

Template Parameters
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
athe constant numerator
Returns
the returned tuple ratio

Definition at line 587 of file tuple.hpp.

◆ div_helper() [2/3]

template<typename... S, typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::div_helper ( const tuple< S... > & x,
const tuple< T... > & y,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the / operator of tuples.

Template Parameters
Sthe types stored in the tuple x
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
ytuple of values
Returns
the returned tuple ratio

Definition at line 554 of file tuple.hpp.

◆ div_helper() [3/3]

template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::div_helper ( const tuple< T... > & x,
const real_t a,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the / operator of tuples.

Template Parameters
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
athe constant denominator
Returns
the returned tuple ratio

Definition at line 603 of file tuple.hpp.

◆ dot() [1/12]

template<typename S , typename T , int m, int... n>
MFEM_HOST_DEVICE constexpr auto mfem::future::dot ( const isotropic_tensor< S, m, m > & I,
const tensor< T, m, n... > & A ) -> tensor<decltype(S {} * T{}), m, n...>
constexpr

Definition at line 2144 of file tensor.hpp.

◆ dot() [2/12]

template<typename T >
MFEM_HOST_DEVICE zero mfem::future::dot ( const T & ,
zero  )

the dot product of anything with zero is zero

Definition at line 288 of file tensor.hpp.

◆ dot() [3/12]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< S, m > & A,
const tensor< T, m > & B ) -> decltype(S {} * T{})

Dot product of a vector . vector and vector . tensor.

Template Parameters
Sthe underlying type of the tensor (lefthand) argument
Tthe underlying type of the tensor (righthand) argument
mthe dimension of the first tensor
nthe parameter pack of dimensions of the second tensor
Parameters
AThe lefthand tensor
BThe righthand tensor
Returns
The computed dot product

Definition at line 1088 of file tensor.hpp.

◆ dot() [4/12]

template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< S, m > & A,
const tensor< T, m, n > & B ) -> tensor<decltype(S {} * T{}), n>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
vector . matrix

Definition at line 988 of file tensor.hpp.

◆ dot() [5/12]

template<typename S , typename T , int m, int n0, int n1, int... n>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< S, m > & A,
const tensor< T, m, n0, n1, n... > & B ) -> tensor<decltype(S {} * T{}), n0, n1, n...>

Definition at line 1113 of file tensor.hpp.

◆ dot() [6/12]

template<typename S , typename T , typename U , int m, int n>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< S, m > & u,
const tensor< T, m, n > & A,
const tensor< U, n > & v ) -> decltype(S {} * T{} * U{})

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
vector . matrix . vector

Definition at line 1132 of file tensor.hpp.

◆ dot() [7/12]

template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< S, m, n > & A,
const tensor< T, n > & B ) -> tensor<decltype(S {} * T{}), m>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
matrix . vector

Definition at line 1007 of file tensor.hpp.

◆ dot() [8/12]

template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< S, m, n > & A,
const tensor< T, n, p > & B ) -> tensor<decltype(S {} * T{}), m, p>

this function contracts over the "middle" index of the two tensor arguments. E.g. returns tensor C, such that C_ij = sum_kl A_ijkl B_kl.

Template Parameters
Sthe underlying type of the tensor (lefthand) argument
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]AThe lefthand tensor
[in]BThe righthand tensor

Definition at line 965 of file tensor.hpp.

◆ dot() [9/12]

template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< S, m, n, p > & A,
const tensor< T, p > & B ) -> tensor<decltype(S {} * T{}), m, n>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
3rd-order-tensor . vector

Definition at line 1026 of file tensor.hpp.

◆ dot() [10/12]

template<typename S , typename T , int m, int... n>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< S, n... > & A,
const isotropic_tensor< T, m, m > & I ) -> tensor<decltype(S {} * T{}), n...>

Definition at line 2152 of file tensor.hpp.

◆ dot() [11/12]

template<typename T , int m>
MFEM_HOST_DEVICE auto mfem::future::dot ( const tensor< T, m > & A,
const tensor< T, m > & B ) -> decltype(T {})

Definition at line 1100 of file tensor.hpp.

◆ dot() [12/12]

template<typename T >
MFEM_HOST_DEVICE zero mfem::future::dot ( zero ,
const T &  )

the dot product of anything with zero is zero

Definition at line 295 of file tensor.hpp.

◆ eig() [1/2]

template<typename T >
MFEM_HOST_DEVICE std::tuple< tensor< T, 1 >, tensor< T, 1, 1 > > mfem::future::eig ( tensor< T, 1, 1 > & A)

Definition at line 1427 of file tensor.hpp.

◆ eig() [2/2]

template<typename T >
MFEM_HOST_DEVICE std::tuple< tensor< T, 2 >, tensor< T, 2, 2 > > mfem::future::eig ( tensor< T, 2, 2 > & A)

Definition at line 1433 of file tensor.hpp.

◆ element_restriction()

template<std::size_t N, std::size_t M>
void mfem::future::element_restriction ( const std::array< FieldDescriptor, N > u,
const std::array< Vector, N > & u_l,
std::array< Vector, M > & fields_e,
ElementDofOrdering ordering,
const int offset = 0 )

Definition at line 1259 of file util.hpp.

◆ exp()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::exp ( dual< value_type, gradient_type > a)

implementation of exponential function for dual numbers

Definition at line 358 of file dual.hpp.

◆ extract_field_ids()

template<typename... Ts>
auto mfem::future::extract_field_ids ( const std::tuple< Ts... > & t)
constexpr

Extracts field IDs from a tuple of objects derived from FieldOperator.

Parameters
tthe tuple to extract field IDs from.
Returns
an array of field IDs.

Definition at line 467 of file util.hpp.

◆ extract_field_ids_impl()

template<typename Tuple , std::size_t... Is>
auto mfem::future::extract_field_ids_impl ( Tuple && t,
std::index_sequence< Is... >  )
constexpr

Definition at line 454 of file util.hpp.

◆ filter_fields()

template<typename... Ts>
auto mfem::future::filter_fields ( const std::tuple< Ts... > & t)
constexpr

Filter fields from a tuple based on their field IDs.

Parameters
tthe tuple to filter fields from.
Returns
a tuple containing only the fields with field IDs not equal to -1.

Definition at line 541 of file util.hpp.

◆ FindIdx()

std::size_t mfem::future::FindIdx ( const std::size_t & id,
const std::vector< FieldDescriptor > & fields )
inline

Find the index of a field descriptor in a vector of field descriptors.

Parameters
idthe field ID to search for.
fieldsthe vector of field descriptors.
Returns
the index of the field descriptor with the given ID, or SIZE_MAX if not found.

Definition at line 742 of file util.hpp.

◆ flatten()

template<typename T , int n, int m>
MFEM_HOST_DEVICE tensor< T, n+m > mfem::future::flatten ( tensor< T, n, m > A)

Definition at line 732 of file tensor.hpp.

◆ for_constexpr() [1/3]

template<int... n, typename lambda >
void mfem::future::for_constexpr ( lambda && f)
constexpr

Definition at line 81 of file util.hpp.

◆ for_constexpr() [2/3]

template<typename lambda >
void mfem::future::for_constexpr ( lambda && f,
std::integer_sequence< std::size_t >  )
constexpr

Definition at line 78 of file util.hpp.

◆ for_constexpr() [3/3]

template<typename lambda , std::size_t... i>
void mfem::future::for_constexpr ( lambda && f,
std::integer_sequence< std::size_t, i ... >  )
constexpr

Definition at line 71 of file util.hpp.

◆ for_constexpr_with_arg() [1/3]

template<typename lambda , typename arg_t >
void mfem::future::for_constexpr_with_arg ( lambda && f,
arg_t && arg )
constexpr

Definition at line 103 of file util.hpp.

◆ for_constexpr_with_arg() [2/3]

template<typename lambda , typename arg_t >
void mfem::future::for_constexpr_with_arg ( lambda && f,
arg_t && arg,
std::integer_sequence< std::size_t >  )
constexpr

Definition at line 87 of file util.hpp.

◆ for_constexpr_with_arg() [3/3]

template<typename lambda , typename arg_t , std::size_t i, std::size_t... Is>
void mfem::future::for_constexpr_with_arg ( lambda && f,
arg_t && arg,
std::integer_sequence< std::size_t, i, Is... >  )
constexpr

Definition at line 94 of file util.hpp.

◆ forall()

template<typename func_t >
void mfem::future::forall ( func_t f,
const int & N,
const ThreadBlocks & blocks,
int num_shmem = 0,
real_t * shmem = nullptr )

Definition at line 614 of file util.hpp.

◆ forall_kernel_shmem()

template<typename func_t >
__global__ void mfem::future::forall_kernel_shmem ( func_t f,
int n )

Definition at line 602 of file util.hpp.

◆ fwddiff_apply_enzyme()

template<typename qfunc_t , typename arg_ts , typename inactive_arg_ts >
MFEM_HOST_DEVICE auto mfem::future::fwddiff_apply_enzyme ( qfunc_t & qfunc,
arg_ts && args,
arg_ts && shadow_args,
inactive_arg_ts && inactive_args )
inline

Definition at line 587 of file qfunction_apply.hpp.

◆ fwddiff_apply_enzyme_indexed() [1/2]

template<typename qfunc_t , typename arg_ts , std::size_t... Is, typename inactive_arg_ts , std::size_t... Js>
MFEM_HOST_DEVICE auto mfem::future::fwddiff_apply_enzyme_indexed ( qfunc_t & qfunc,
arg_ts && args,
arg_ts && shadow_args,
std::index_sequence< Is... > ,
inactive_arg_ts && inactive_args,
std::index_sequence< Js... >  )
inline

Definition at line 569 of file qfunction_apply.hpp.

◆ fwddiff_apply_enzyme_indexed() [2/2]

template<typename qfunc_t , typename arg_ts , std::size_t... Is, typename inactive_arg_ts >
MFEM_HOST_DEVICE auto mfem::future::fwddiff_apply_enzyme_indexed ( qfunc_t & qfunc,
arg_ts && args,
arg_ts && shadow_args,
std::index_sequence< Is... > ,
inactive_arg_ts && inactive_args,
std::index_sequence<>  )
inline

Definition at line 551 of file qfunction_apply.hpp.

◆ get() [1/3]

template<int i, typename... T>
MFEM_HOST_DEVICE constexpr const auto & mfem::future::get ( const tuple< T... > & values)
constexpr

return a copy of the ith tuple entry

Template Parameters
ithe tuple index to access
Tthe types stored in the tuple

Definition at line 294 of file tuple.hpp.

◆ get() [2/3]

template<int i, typename... T>
MFEM_HOST_DEVICE constexpr auto & mfem::future::get ( tuple< T... > & values)
constexpr

return a reference to the ith tuple entry

Template Parameters
ithe tuple index to access
Tthe types stored in the tuple

Definition at line 246 of file tuple.hpp.

◆ get() [3/3]

template<int i>
MFEM_HOST_DEVICE zero & mfem::future::get ( zero & x)

let zero be accessed like a tuple

Definition at line 281 of file tensor.hpp.

◆ get_col() [1/2]

template<typename T >
MFEM_HOST_DEVICE tensor< T, 1 > mfem::future::get_col ( tensor< T, 1, 1 > A,
int j )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 465 of file tensor.hpp.

◆ get_col() [2/2]

template<typename T , int m, int n>
MFEM_HOST_DEVICE tensor< T, n > mfem::future::get_col ( tensor< T, m, n > A,
int j )

Definition at line 455 of file tensor.hpp.

◆ get_element_restriction()

const Operator * mfem::future::get_element_restriction ( const FieldDescriptor & f,
ElementDofOrdering o )
inline

Get the element restriction operator for a field descriptor.

Parameters
fthe field descriptor.
othe element dof ordering.
Returns
the element restriction operator for the field descriptor in specified ordering.

Definition at line 959 of file util.hpp.

◆ get_face_restriction()

const Operator * mfem::future::get_face_restriction ( const FieldDescriptor & f,
ElementDofOrdering o,
FaceType ft,
L2FaceValues m )
inline

Get the face restriction operator for a field descriptor.

Parameters
fthe field descriptor.
othe face dof ordering.
ftthe face type
mindicator if single or double valued
Returns
the face restriction operator for the field descriptor in specified ordering.

Definition at line 992 of file util.hpp.

◆ get_gradient() [1/3]

template<int... n>
MFEM_HOST_DEVICE zero mfem::future::get_gradient ( const tensor< real_t, n... > & )

get the gradient of type tensor (note: since its stored type is not a dual number, the derivative term is identically zero)

Returns
The sentinel,
See also
zero

Definition at line 1967 of file tensor.hpp.

◆ get_gradient() [2/3]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE gradient_type mfem::future::get_gradient ( dual< value_type, gradient_type > arg)

return the "gradient" part from a dual number type

Definition at line 433 of file dual.hpp.

◆ get_gradient() [3/3]

MFEM_HOST_DEVICE zero mfem::future::get_gradient ( real_t )
inline

Retrieves the gradient component of a real_t (which is nothing)

Returns
The sentinel,
See also
zero

Definition at line 1959 of file tensor.hpp.

◆ get_input_size_on_qp()

template<typename input_t , std::size_t... i>
std::vector< int > mfem::future::get_input_size_on_qp ( const input_t & inputs,
std::index_sequence< i... >  )

Get the size on quadrature point for a given set of inputs.

Parameters
inputsthe inputs tuple.
Returns
a vector containing the size on quadrature point for each input.

Definition at line 1546 of file util.hpp.

◆ get_local_input_qp()

template<std::size_t... i>
MFEM_HOST_DEVICE std::array< DeviceTensor< 2 >, sizeof...(i)> mfem::future::get_local_input_qp ( const std::array< DeviceTensor< 3 >, sizeof...(i)> & input_qp_global,
int e,
std::index_sequence< i... >  )
inline

Definition at line 2096 of file util.hpp.

◆ get_lvectors()

void mfem::future::get_lvectors ( const std::vector< FieldDescriptor > fields,
const Vector & x,
std::vector< Vector > & fields_l )
inline

Definition at line 1151 of file util.hpp.

◆ get_marked_entries()

template<typename T , std::size_t N>
auto mfem::future::get_marked_entries ( const std::array< T, N > & a,
const std::array< bool, N > & marker )

Get marked entries from an std::array based on a marker array.

Parameters
athe std::array to get entries from.
markerthe marker std::array indicating which entries to get.
Returns
a std::vector containing the marked entries.

Definition at line 521 of file util.hpp.

◆ get_prolongation()

const Operator * mfem::future::get_prolongation ( const FieldDescriptor & f)
inline

Get the prolongation operator for a field descriptor.

Parameters
fthe field descriptor.
Returns
the prolongation operator for the field descriptor.

Definition at line 930 of file util.hpp.

◆ get_prolongation_transpose()

template<typename fop_t >
std::function< void(const Vector &, Vector &)> mfem::future::get_prolongation_transpose ( const FieldDescriptor & f,
const fop_t & fop,
MPI_Comm mpi_comm )
inline

Get a transpose prolongation callback for a field descriptor.

In the special case of a one field operator, the transpose prolongation is a simple sum of the local vector that is reduced to the global vector.

Parameters
fthe field descriptor.
fopthe field operator.
mpi_commthe MPI communicator.
Template Parameters
fop_tthe field operator type.

Definition at line 1179 of file util.hpp.

◆ get_restriction()

template<typename entity_t >
const Operator * mfem::future::get_restriction ( const FieldDescriptor & f,
const ElementDofOrdering & o )
inline

Get the restriction operator for a field descriptor.

Parameters
fthe field descriptor.
othe element dof ordering.
Returns
the restriction operator for the field descriptor in specified ordering.

Definition at line 1027 of file util.hpp.

◆ get_restriction_transpose()

template<typename entity_t , typename fop_t >
std::tuple< std::function< void(const Vector &, Vector &)>, int > mfem::future::get_restriction_transpose ( const FieldDescriptor & f,
const ElementDofOrdering & o,
const fop_t & fop )
inline

Get a transpose restriction callback for a field descriptor.

Parameters
fthe field descriptor.
othe element dof ordering.
fopthe field operator.
Returns
a tuple containing a std::function with the transpose restriction callback and it's height.

Definition at line 1052 of file util.hpp.

◆ get_shmem_info()

template<typename entity_t , std::size_t num_fields, std::size_t num_inputs, std::size_t num_outputs, typename input_t >
SharedMemoryInfo< num_fields, num_inputs, num_outputs > mfem::future::get_shmem_info ( const std::array< DofToQuadMap, num_inputs > & input_dtq_maps,
const std::array< DofToQuadMap, num_outputs > & output_dtq_maps,
const std::vector< FieldDescriptor > & fields,
const int & num_entities,
const input_t & inputs,
const int & num_qp,
const std::vector< int > & input_size_on_qp,
const int & residual_size_on_qp,
const ElementDofOrdering & dof_ordering,
const int & derivative_action_field_idx = -1 )

Definition at line 1585 of file util.hpp.

◆ get_type_name()

template<typename T >
auto mfem::future::get_type_name ( ) -> std::string_view
constexpr

Definition at line 161 of file util.hpp.

◆ get_value() [1/2]

template<typename T >
MFEM_HOST_DEVICE T mfem::future::get_value ( const T & arg)

return the "value" part from a given type. For non-dual types, this is just the identity function

Definition at line 422 of file dual.hpp.

◆ get_value() [2/2]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE gradient_type mfem::future::get_value ( dual< value_type, gradient_type > arg)

return the "value" part from a dual number type

Definition at line 426 of file dual.hpp.

◆ GetDimension()

template<typename entity_t >
int mfem::future::GetDimension ( const FieldDescriptor & f)

Get the spatial dimension of a field descriptor.

Parameters
fthe field descriptor.
Template Parameters
entity_tthe entity type (see Entity).
Returns
the spatial dimension of the field descriptor.

Definition at line 895 of file util.hpp.

◆ GetDofToQuad()

template<typename entity_t >
const DofToQuad * mfem::future::GetDofToQuad ( const FieldDescriptor & f,
const IntegrationRule & ir,
DofToQuad::Mode mode )
inline

Get the GetDofToQuad object for a given entity type.

This function retrieves the DofToQuad object for a given field descriptor and integration rule.

Parameters
fthe field descriptor.
irthe integration rule.
modethe mode of the DofToQuad object.
Template Parameters
entity_tthe entity type (see Entity).

Definition at line 1310 of file util.hpp.

◆ GetElementVDofs()

void mfem::future::GetElementVDofs ( const FieldDescriptor & f,
int el,
Array< int > & vdofs )
inline

Get the element vdofs of a field descriptor.

Note
Can't be used with ParameterSpace.
Parameters
fthe field descriptor.
elthe element index.
vdofsthe array to store the element vdofs.

Definition at line 795 of file util.hpp.

◆ GetFieldId()

template<typename T >
int mfem::future::GetFieldId ( )
constexpr

Definition at line 448 of file util.hpp.

◆ GetNumEntities()

template<typename entity_t >
int mfem::future::GetNumEntities ( const mfem::Mesh & mesh)

Get the number of entities of a given type.

Parameters
meshthe mesh.
Template Parameters
entity_tthe entity type (see Entity).
Returns
the number of entities of the given type.

Definition at line 1282 of file util.hpp.

◆ GetScalingFactor()

template<typename T >
MFEM_HOST_DEVICE void mfem::future::GetScalingFactor ( const T & d_max,
T & mult )

Definition at line 1491 of file tensor.hpp.

◆ GetSizeOnQP()

template<typename entity_t , typename field_operator_t >
int mfem::future::GetSizeOnQP ( const field_operator_t & ,
const FieldDescriptor & f )

Get the size on quadrature point for a field operator type and FieldDescriptor combination.

Template Parameters
entity_tthe entity type (see Entity).
field_operator_tthe field operator type.
Parameters
fthe field descriptor.
Returns
the size on quadrature point.

Definition at line 1402 of file util.hpp.

◆ GetTrueVSize()

int mfem::future::GetTrueVSize ( const FieldDescriptor & f)
inline

Get the true dof size of a field descriptor.

Parameters
fthe field descriptor.
Returns
the true dof size of the field descriptor.

Definition at line 829 of file util.hpp.

◆ GetVDim()

int mfem::future::GetVDim ( const FieldDescriptor & f)
inline

Get the vdim of a field descriptor.

Parameters
fthe field descriptor.
Returns
the vdim of the field descriptor.

Definition at line 864 of file util.hpp.

◆ GetVSize()

int mfem::future::GetVSize ( const FieldDescriptor & f)
inline

Get the vdof size of a field descriptor.

Parameters
fthe field descriptor.
Returns
the vdof size of the field descriptor.

Definition at line 760 of file util.hpp.

◆ IdentityMatrix()

template<int dim>
MFEM_HOST_DEVICE tensor< real_t, dim, dim > mfem::future::IdentityMatrix ( )

Obtains the identity matrix of the specified dimension.

Returns
I_dim

Definition at line 1370 of file tensor.hpp.

◆ inner()

template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE auto mfem::future::inner ( const tensor< S, m, n > & A,
const tensor< T, m, n > & B ) -> decltype(S {} * T{})

this function contracts over all indices of the two tensor arguments

Template Parameters
Sthe underlying type of the tensor (lefthand) argument
Tthe underlying type of the tensor (righthand) argument
mthe number of rows
nthe number of columns
Parameters
[in]AThe lefthand tensor
[in]BThe righthand tensor

Definition at line 941 of file tensor.hpp.

◆ inv() [1/5]

template<typename T >
MFEM_HOST_DEVICE tensor< T, 1, 1 > mfem::future::inv ( const tensor< T, 1, 1 > & A)
inline

Inverts a matrix.

Parameters
[in]AThe matrix to invert
Note
Uses a shortcut for inverting a 1x1, 2x2 and 3x3 matrix

Definition at line 1707 of file tensor.hpp.

◆ inv() [2/5]

template<typename T >
MFEM_HOST_DEVICE tensor< T, 2, 2 > mfem::future::inv ( const tensor< T, 2, 2 > & A)
inline

Definition at line 1713 of file tensor.hpp.

◆ inv() [3/5]

template<typename T >
MFEM_HOST_DEVICE tensor< T, 3, 3 > mfem::future::inv ( const tensor< T, 3, 3 > & A)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
Uses a shortcut for inverting a 3-by-3 matrix

Definition at line 1732 of file tensor.hpp.

◆ inv() [4/5]

template<typename T , int n>
MFEM_HOST_DEVICE std::enable_if<(n >3), tensor< T, n, n > >::type mfem::future::inv ( const tensor< T, n, n > & A)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
For N-by-N matrices with N > 3, requires Gaussian elimination with partial pivoting

Definition at line 1758 of file tensor.hpp.

◆ inv() [5/5]

template<typename value_type , typename gradient_type , int n>
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::inv ( tensor< dual< value_type, gradient_type >, n, n > A)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
when inverting a tensor of dual numbers, hardcode the analytic derivative of the inverse of a square matrix, rather than apply Gauss elimination directly on the dual number types

TODO: compare performance of this hardcoded implementation to just using inv() directly

Definition at line 1827 of file tensor.hpp.

◆ is_symmetric()

template<int n>
MFEM_HOST_DEVICE bool mfem::future::is_symmetric ( tensor< real_t, n, n > A,
real_t abs_tolerance = 1.0e-8_r )

Return whether a square rank 2 tensor is symmetric.

Template Parameters
nThe height of the tensor
Parameters
AThe square rank 2 tensor
abs_toleranceThe absolute tolerance to check for symmetry
Returns
Whether the square rank 2 tensor (matrix) is symmetric

Definition at line 1574 of file tensor.hpp.

◆ is_symmetric_and_positive_definite() [1/2]

MFEM_HOST_DEVICE bool mfem::future::is_symmetric_and_positive_definite ( tensor< real_t, 2, 2 > A)
inline

Return whether a matrix is symmetric and positive definite This check uses Sylvester's criterion, checking that each upper left subtensor has a determinant greater than zero.

Parameters
AThe matrix to test for positive definiteness
Returns
Whether the matrix is positive definite

Definition at line 1598 of file tensor.hpp.

◆ is_symmetric_and_positive_definite() [2/2]

MFEM_HOST_DEVICE bool mfem::future::is_symmetric_and_positive_definite ( tensor< real_t, 3, 3 > A)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 1616 of file tensor.hpp.

◆ IsotropicIdentity()

template<int m>
MFEM_HOST_DEVICE constexpr isotropic_tensor< real_t, m, m > mfem::future::IsotropicIdentity ( )
constexpr

Definition at line 2042 of file tensor.hpp.

◆ linear_solve()

template<typename T , int n>
MFEM_HOST_DEVICE tensor< T, n > mfem::future::linear_solve ( tensor< T, n, n > A,
const tensor< T, n > b )

Solves Ax = b for x using Gaussian elimination with partial pivoting.

Parameters
[in]AThe coefficient matrix A
[in]bThe righthand side vector b
Note
A and b are by-value as they are mutated as part of the elimination

Definition at line 1641 of file tensor.hpp.

◆ load_direction_mem()

MFEM_HOST_DEVICE DeviceTensor< 1 > mfem::future::load_direction_mem ( void * mem,
int offset,
const int & size,
const DeviceTensor< 2 > & direction,
const int & entity_idx )
inline

Definition at line 1882 of file util.hpp.

◆ load_dtq_mem()

template<std::size_t N>
MFEM_HOST_DEVICE std::array< DofToQuadMap, N > mfem::future::load_dtq_mem ( void * mem,
int offset,
const std::array< std::array< int, 2 >, N > & sizes,
const std::array< DofToQuadMap, N > & dtq )
inline

Definition at line 1785 of file util.hpp.

◆ load_field_mem()

template<std::size_t num_fields>
MFEM_HOST_DEVICE std::array< DeviceTensor< 1 >, num_fields > mfem::future::load_field_mem ( void * mem,
int offset,
const std::array< int, num_fields > & sizes,
const std::array< DeviceTensor< 2 >, num_fields > & fields_e,
const int & entity_idx )
inline

Definition at line 1849 of file util.hpp.

◆ load_input_mem()

template<std::size_t N>
MFEM_HOST_DEVICE std::array< DeviceTensor< 2 >, N > mfem::future::load_input_mem ( void * mem,
int offset,
const std::array< int, N > & sizes,
const int & num_qp )
inline

Definition at line 1907 of file util.hpp.

◆ load_residual_mem()

MFEM_HOST_DEVICE DeviceTensor< 2 > mfem::future::load_residual_mem ( void * mem,
int offset,
const int & residual_size,
const int & num_qp )
inline

Definition at line 1925 of file util.hpp.

◆ load_scratch_mem()

template<std::size_t N>
MFEM_HOST_DEVICE std::array< DeviceTensor< 1 >, 6 > mfem::future::load_scratch_mem ( void * mem,
int offset,
const std::array< int, N > & sizes )
inline

Definition at line 1937 of file util.hpp.

◆ log()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::log ( dual< value_type, gradient_type > a)

implementation of the natural logarithm function for dual numbers

Definition at line 366 of file dual.hpp.

◆ make_dependency_array()

template<std::size_t I, typename Tuple , std::size_t... Is>
std::array< bool, sizeof...(Is)> mfem::future::make_dependency_array ( const Tuple & inputs,
std::index_sequence< Is... >  )

Definition at line 113 of file util.hpp.

◆ make_dependency_map()

template<typename... input_ts>
auto mfem::future::make_dependency_map ( tuple< input_ts... > inputs)

Definition at line 147 of file util.hpp.

◆ make_dependency_map_impl()

template<typename... input_ts, std::size_t... Is>
auto mfem::future::make_dependency_map_impl ( tuple< input_ts... > inputs,
std::index_sequence< Is... >  )

Definition at line 119 of file util.hpp.

◆ make_dual()

MFEM_HOST_DEVICE constexpr dual< real_t, real_t > mfem::future::make_dual ( real_t x)
constexpr

promote a value to a dual number of the appropriate type

Definition at line 419 of file dual.hpp.

◆ make_tensor() [1/5]

template<typename lambda_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::make_tensor ( lambda_type f) -> tensor<decltype(f())>
constexpr

Creates a tensor of requested dimension by subsequent calls to a functor Can be thought of as analogous to std::transform in that the set of possible indices for dimensions n are transformed into the values of the tensor by f.

Template Parameters
lambda_typeThe type of the functor
Parameters
[in]fThe functor to generate the tensor values from
Note
the different cases of 0D, 1D, 2D, 3D, and 4D are implemented separately to work around a limitation in nvcc involving host device lambdas with auto parameters.

Definition at line 327 of file tensor.hpp.

◆ make_tensor() [2/5]

template<int n1, typename lambda_type >
MFEM_HOST_DEVICE auto mfem::future::make_tensor ( lambda_type f) -> tensor<decltype(f(n1)), n1>

Creates a tensor of requested dimension by subsequent calls to a functor.

Template Parameters
n1The dimension of the tensor
lambda_typeThe type of the functor
Parameters
[in]fThe functor to generate the tensor values from
Precondition
f must accept n1 arguments of type int
Note
the different cases of 0D, 1D, 2D, 3D, and 4D are implemented separately to work around a limitation in nvcc involving host device lambdas with auto parameters.

Definition at line 345 of file tensor.hpp.

◆ make_tensor() [3/5]

template<int n1, int n2, typename lambda_type >
MFEM_HOST_DEVICE auto mfem::future::make_tensor ( lambda_type f) -> tensor<decltype(f(n1, n2)), n1, n2>

Creates a tensor of requested dimension by subsequent calls to a functor.

Template Parameters
n1The first dimension of the tensor
n2The second dimension of the tensor
lambda_typeThe type of the functor
Parameters
[in]fThe functor to generate the tensor values from
Precondition
f must accept n1 x n2 arguments of type int
Note
the different cases of 0D, 1D, 2D, 3D, and 4D are implemented separately to work around a limitation in nvcc involving host device lambdas with auto parameters.

Definition at line 370 of file tensor.hpp.

◆ make_tensor() [4/5]

template<int n1, int n2, int n3, typename lambda_type >
MFEM_HOST_DEVICE auto mfem::future::make_tensor ( lambda_type f) -> tensor<decltype(f(n1, n2, n3)), n1, n2, n3>

Creates a tensor of requested dimension by subsequent calls to a functor.

Template Parameters
n1The first dimension of the tensor
n2The second dimension of the tensor
n3The third dimension of the tensor
lambda_typeThe type of the functor
Parameters
[in]fThe functor to generate the tensor values from
Precondition
f must accept n1 x n2 x n3 arguments of type int
Note
the different cases of 0D, 1D, 2D, 3D, and 4D are implemented separately to work around a limitation in nvcc involving host device lambdas with auto parameters.

Definition at line 399 of file tensor.hpp.

◆ make_tensor() [5/5]

template<int n1, int n2, int n3, int n4, typename lambda_type >
MFEM_HOST_DEVICE auto mfem::future::make_tensor ( lambda_type f) -> tensor<decltype(f(n1, n2, n3, n4)), n1, n2, n3, n4>

Creates a tensor of requested dimension by subsequent calls to a functor.

Template Parameters
n1The first dimension of the tensor
n2The second dimension of the tensor
n3The third dimension of the tensor
n4The fourth dimension of the tensor
lambda_typeThe type of the functor
Parameters
[in]fThe functor to generate the tensor values from
Precondition
f must accept n1 x n2 x n3 x n4 arguments of type int
Note
the different cases of 0D, 1D, 2D, 3D, and 4D are implemented separately to work around a limitation in nvcc involving host device lambdas with auto parameters.

Definition at line 432 of file tensor.hpp.

◆ make_tuple()

template<typename... T>
MFEM_HOST_DEVICE tuple< T... > mfem::future::make_tuple ( const T &... args)

helper function for combining a list of values into a tuple

Template Parameters
Ttypes of the values to be tuple-d
Parameters
argsthe actual values to be put into a tuple

Definition at line 224 of file tuple.hpp.

◆ map_direction_to_quadrature_data_conditional()

template<size_t num_inputs, typename field_operator_ts >
MFEM_HOST_DEVICE void mfem::future::map_direction_to_quadrature_data_conditional ( std::array< DeviceTensor< 2 >, num_inputs > & directions_qp,
const DeviceTensor< 1 > & direction_e,
const std::array< DofToQuadMap, num_inputs > & dtqmaps,
field_operator_ts fops,
const DeviceTensor< 1, const real_t > & integration_weights,
const std::array< DeviceTensor< 1 >, 6 > & scratch_mem,
const std::array< bool, num_inputs > & conditions,
const int & dimension,
const bool & use_sum_factorization )

Definition at line 632 of file interpolate.hpp.

◆ map_field_to_quadrature_data()

template<typename field_operator_t >
MFEM_HOST_DEVICE void mfem::future::map_field_to_quadrature_data ( DeviceTensor< 2 > field_qp,
const DofToQuadMap & dtq,
const DeviceTensor< 1 > & field_e,
const field_operator_t & input,
const DeviceTensor< 1, const real_t > & integration_weights )

Definition at line 429 of file interpolate.hpp.

◆ map_field_to_quadrature_data_conditional()

template<typename field_operator_t >
MFEM_HOST_DEVICE void mfem::future::map_field_to_quadrature_data_conditional ( DeviceTensor< 2 > & field_qp,
const DeviceTensor< 1 > & field_e,
const DofToQuadMap & dtqmap,
field_operator_t & fop,
const DeviceTensor< 1, const real_t > & integration_weights,
const std::array< DeviceTensor< 1 >, 6 > & scratch_mem,
const bool & condition,
const int & dimension,
const bool & use_sum_factorization = false )

Definition at line 570 of file interpolate.hpp.

◆ map_field_to_quadrature_data_tensor_product_1d()

template<typename field_operator_t >
MFEM_HOST_DEVICE void mfem::future::map_field_to_quadrature_data_tensor_product_1d ( DeviceTensor< 2 > & field_qp,
const DofToQuadMap & dtq,
const DeviceTensor< 1 > & field_e,
const field_operator_t & input,
const DeviceTensor< 1, const real_t > & integration_weights,
const std::array< DeviceTensor< 1 >, 6 > & scratch_mem )
inline

Definition at line 344 of file interpolate.hpp.

◆ map_field_to_quadrature_data_tensor_product_2d()

template<typename field_operator_t >
MFEM_HOST_DEVICE void mfem::future::map_field_to_quadrature_data_tensor_product_2d ( DeviceTensor< 2 > & field_qp,
const DofToQuadMap & dtq,
const DeviceTensor< 1 > & field_e,
const field_operator_t & input,
const DeviceTensor< 1, const real_t > & integration_weights,
const std::array< DeviceTensor< 1 >, 6 > & scratch_mem )
inline

Definition at line 211 of file interpolate.hpp.

◆ map_field_to_quadrature_data_tensor_product_3d()

template<typename field_operator_t >
MFEM_HOST_DEVICE void mfem::future::map_field_to_quadrature_data_tensor_product_3d ( DeviceTensor< 2 > & field_qp,
const DofToQuadMap & dtq,
const DeviceTensor< 1 > & field_e,
const field_operator_t & input,
const DeviceTensor< 1, const real_t > & integration_weights,
const std::array< DeviceTensor< 1 >, 6 > & scratch_mem )
inline

Definition at line 20 of file interpolate.hpp.

◆ map_fields_to_quadrature_data()

template<typename field_operator_ts , size_t num_inputs, size_t num_fields>
MFEM_HOST_DEVICE void mfem::future::map_fields_to_quadrature_data ( std::array< DeviceTensor< 2 >, num_inputs > & fields_qp,
const std::array< DeviceTensor< 1 >, num_fields > & fields_e,
const std::array< DofToQuadMap, num_inputs > & dtqmaps,
const std::array< size_t, num_inputs > & input_to_field,
const field_operator_ts & fops,
const DeviceTensor< 1, const real_t > & integration_weights,
const std::array< DeviceTensor< 1 >, 6 > & scratch_mem,
const int & dimension,
const bool & use_sum_factorization = false )
inline

Definition at line 510 of file interpolate.hpp.

◆ map_fields_to_quadrature_data_conditional()

template<size_t num_fields, size_t num_inputs, typename field_operator_ts >
MFEM_HOST_DEVICE void mfem::future::map_fields_to_quadrature_data_conditional ( std::array< DeviceTensor< 2 >, num_inputs > & fields_qp,
const std::array< DeviceTensor< 1, const real_t >, num_fields > & fields_e,
const std::array< DofToQuadMap, num_inputs > & dtqmaps,
field_operator_ts fops,
const DeviceTensor< 1, const real_t > & integration_weights,
const std::array< DeviceTensor< 1 >, 6 > & scratch_mem,
const std::array< bool, num_inputs > & conditions,
const bool & use_sum_factorization = false )

Definition at line 612 of file interpolate.hpp.

◆ map_quadrature_data_to_fields()

template<typename output_t >
MFEM_HOST_DEVICE void mfem::future::map_quadrature_data_to_fields ( DeviceTensor< 2, real_t > & y,
const DeviceTensor< 3, real_t > & f,
const output_t & output,
const DofToQuadMap & dtq,
std::array< DeviceTensor< 1 >, 6 > & scratch_mem,
const int & dimension,
const bool & use_sum_factorization )

Definition at line 502 of file integrate.hpp.

◆ map_quadrature_data_to_fields_impl()

template<typename output_t >
MFEM_HOST_DEVICE void mfem::future::map_quadrature_data_to_fields_impl ( DeviceTensor< 2, real_t > & y,
const DeviceTensor< 3, real_t > & f,
const output_t & output,
const DofToQuadMap & dtq )

Definition at line 20 of file integrate.hpp.

◆ map_quadrature_data_to_fields_tensor_impl_1d()

template<typename output_t >
MFEM_HOST_DEVICE void mfem::future::map_quadrature_data_to_fields_tensor_impl_1d ( DeviceTensor< 2, real_t > & y,
const DeviceTensor< 3, real_t > & f,
const output_t & output,
const DofToQuadMap & dtq,
std::array< DeviceTensor< 1 >, 6 > & scratch_mem )

Definition at line 100 of file integrate.hpp.

◆ map_quadrature_data_to_fields_tensor_impl_2d()

template<typename output_t >
MFEM_HOST_DEVICE void mfem::future::map_quadrature_data_to_fields_tensor_impl_2d ( DeviceTensor< 2, real_t > & y,
const DeviceTensor< 3, real_t > & f,
const output_t & output,
const DofToQuadMap & dtq,
std::array< DeviceTensor< 1 >, 6 > & scratch_mem )

Definition at line 179 of file integrate.hpp.

◆ map_quadrature_data_to_fields_tensor_impl_3d()

template<typename output_t >
MFEM_HOST_DEVICE void mfem::future::map_quadrature_data_to_fields_tensor_impl_3d ( DeviceTensor< 2, real_t > & y,
const DeviceTensor< 3, real_t > & f,
const output_t & output,
const DofToQuadMap & dtq,
std::array< DeviceTensor< 1 >, 6 > & scratch_mem )

Definition at line 316 of file integrate.hpp.

◆ merge_mfem_tuples_as_empty_std_tuple()

template<typename... T1s, typename... T2s>
auto mfem::future::merge_mfem_tuples_as_empty_std_tuple ( const mfem::future::tuple< T1s... > & ,
const mfem::future::tuple< T2s... > &  )
constexpr

Auxiliary template function that merges (concatenates) two mfem::future::tuple types into a single std::tuple that is empty, i.e. it is value initialized.

Definition at line 878 of file tuple.hpp.

◆ mfem_binary_comparator_overload()

mfem::future::mfem_binary_comparator_overload ( )

implement operator<= for dual numbers

implement operator== for dual numbers implement operator>= for dual numbers implement operator> for dual numbers

◆ minus_equals_helper()

template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr void mfem::future::minus_equals_helper ( tuple< T... > & x,
const tuple< T... > & y,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the -= operator of tuples.

Template Parameters
Tthe types stored in the tuples x and y
iinteger sequence used to index the tuples
Parameters
xtuple of values to be subtracted from
ytuple of values to subtract from x

Definition at line 461 of file tuple.hpp.

◆ minus_helper()

template<typename... S, typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::minus_helper ( const tuple< S... > & x,
const tuple< T... > & y,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the - operator of tuples.

Template Parameters
Sthe types stored in the tuple x
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
ytuple of values
Returns
the returned tuple difference

Definition at line 493 of file tuple.hpp.

◆ mult_helper() [1/3]

template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::mult_helper ( const real_t a,
const tuple< T... > & x,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the * operator of tuples.

Template Parameters
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
aa constant multiplier
Returns
the returned tuple product

Definition at line 679 of file tuple.hpp.

◆ mult_helper() [2/3]

template<typename... S, typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::mult_helper ( const tuple< S... > & x,
const tuple< T... > & y,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the * operator of tuples.

Template Parameters
Sthe types stored in the tuple x
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
ytuple of values
Returns
the returned tuple product

Definition at line 646 of file tuple.hpp.

◆ mult_helper() [3/3]

template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::mult_helper ( const tuple< T... > & x,
const real_t a,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the * operator of tuples.

Template Parameters
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
aa constant multiplier
Returns
the returned tuple product

Definition at line 695 of file tuple.hpp.

◆ norm() [1/2]

template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::norm ( const isotropic_tensor< T, m, m > & I) -> T
constexpr

Definition at line 2200 of file tensor.hpp.

◆ norm() [2/2]

template<typename T , int... n>
MFEM_HOST_DEVICE T mfem::future::norm ( const tensor< T, n... > & A)

Returns the Frobenius norm of the tensor.

Parameters
[in]AThe tensor to obtain the norm from

Definition at line 1269 of file tensor.hpp.

◆ normalize()

template<typename T , int... n>
MFEM_HOST_DEVICE auto mfem::future::normalize ( const tensor< T, n... > & A) -> decltype(A / norm(A))

Normalizes the tensor Each element is divided by the Frobenius norm of the tensor,.

See also
norm
Parameters
[in]AThe tensor to normalize

Definition at line 1305 of file tensor.hpp.

◆ operator*() [1/16]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( const dual< value_type, gradient_type > & a,
real_t b ) -> dual<decltype(a.value * b), decltype(a.gradient * b)>
constexpr

multiplication of a dual number and a non-dual number

Definition at line 146 of file dual.hpp.

◆ operator*() [2/16]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( const isotropic_tensor< T, m, m > & I,
const S scale ) -> isotropic_tensor<decltype(S {}, T{}), m, m>
constexpr

Definition at line 2056 of file tensor.hpp.

◆ operator*() [3/16]

template<typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( const real_t a,
const tuple< T... > & x )
constexpr

multiply each component of x by the value a on the left

Template Parameters
Tthe types stored in the tuple
Parameters
aa scaling factor
xthe tuple object

Definition at line 708 of file tuple.hpp.

◆ operator*() [4/16]

template<typename S , typename T , int... m, int... n>
MFEM_HOST_DEVICE auto mfem::future::operator* ( const tensor< S, m... > & A,
const tensor< T, n... > & B ) -> decltype(dot(A, B))

this is a shorthand for dot(A, B)

Definition at line 1225 of file tensor.hpp.

◆ operator*() [5/16]

template<typename S , typename T , int... n, typename = typename std::enable_if<std::is_arithmetic<S>::value || is_dual_number<S>::value>::type>
MFEM_HOST_DEVICE auto mfem::future::operator* ( const tensor< T, n... > & A,
S scale ) -> tensor<decltype(T {} * S{}), n...>

multiply a tensor by a scalar value

Template Parameters
Sthe scalar value type. Must be arithmetic (e.g. float, real_t, int) or a dual number
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]AThe tensor to be scaled
[in]scaleThe scaling factor

Definition at line 562 of file tensor.hpp.

◆ operator*() [6/16]

template<typename... S, typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( const tuple< S... > & x,
const tuple< T... > & y )
constexpr

return a tuple of values defined by elementwise multiplication of x and y

Template Parameters
Sthe types stored in the tuple x
Tthe types stored in the tuple y
Parameters
xa tuple of values
ya tuple of values

Definition at line 661 of file tuple.hpp.

◆ operator*() [7/16]

template<typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( const tuple< T... > & x,
const real_t a )
constexpr

multiply each component of x by the value a on the right

Template Parameters
Tthe types stored in the tuple
Parameters
xthe tuple object
aa scaling factor

Definition at line 721 of file tuple.hpp.

◆ operator*() [8/16]

template<typename value_type_a , typename gradient_type_a , typename value_type_b , typename gradient_type_b >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( dual< value_type_a, gradient_type_a > a,
dual< value_type_b, gradient_type_b > b ) -> dual<decltype(a.value * b.value), decltype(b.value * a.gradient + a.value * b.gradient)>
constexpr

multiplication of two dual numbers

Definition at line 164 of file dual.hpp.

◆ operator*() [9/16]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( isotropic_tensor< S, m, m, m, m > I,
T scale ) -> isotropic_tensor<decltype(S {} * T{}), m, m, m, m>
constexpr

Definition at line 2258 of file tensor.hpp.

◆ operator*() [10/16]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( real_t a,
const dual< value_type, gradient_type > & b ) -> dual<decltype(a * b.value), decltype(a * b.gradient)>
constexpr

multiplication of a dual number and a non-dual number

Definition at line 154 of file dual.hpp.

◆ operator*() [11/16]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( S scale,
const isotropic_tensor< T, m, m > & I ) -> isotropic_tensor<decltype(S {} * T{}), m, m>
constexpr

Definition at line 2048 of file tensor.hpp.

◆ operator*() [12/16]

template<typename S , typename T , int... n, typename = typename std::enable_if<std::is_arithmetic<S>::value || is_dual_number<S>::value>::type>
MFEM_HOST_DEVICE auto mfem::future::operator* ( S scale,
const tensor< T, n... > & A ) -> tensor<decltype(S {} * T{}), n...>

multiply a tensor by a scalar value

Template Parameters
Sthe scalar value type. Must be arithmetic (e.g. float, real_t, int) or a dual number
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]scaleThe scaling factor
[in]AThe tensor to be scaled

Definition at line 540 of file tensor.hpp.

◆ operator*() [13/16]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator* ( S scale,
isotropic_tensor< T, m, m, m, m > I ) -> isotropic_tensor<decltype(S {} * T{}), m, m, m, m>
constexpr

Definition at line 2250 of file tensor.hpp.

◆ operator*() [14/16]

template<typename T >
MFEM_HOST_DEVICE constexpr zero mfem::future::operator* ( T ,
zero  )
constexpr

the product zero with something else is also zero

Definition at line 261 of file tensor.hpp.

◆ operator*() [15/16]

template<typename T >
MFEM_HOST_DEVICE constexpr zero mfem::future::operator* ( zero ,
T  )
constexpr

the product zero with something else is also zero

Definition at line 254 of file tensor.hpp.

◆ operator*() [16/16]

MFEM_HOST_DEVICE constexpr zero mfem::future::operator* ( zero ,
zero  )
constexpr

the product of two zeros is zero

Definition at line 250 of file tensor.hpp.

◆ operator+() [1/12]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto mfem::future::operator+ ( const isotropic_tensor< S, m, m > & I,
const tensor< T, m, m > & A ) -> tensor<decltype(S {} + T{}), m, m>

Definition at line 2080 of file tensor.hpp.

◆ operator+() [2/12]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator+ ( const isotropic_tensor< S, m, m > & I1,
const isotropic_tensor< T, m, m > & I2 ) -> isotropic_tensor<decltype(S {} + T{}), m, m>
constexpr

Definition at line 2064 of file tensor.hpp.

◆ operator+() [3/12]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto mfem::future::operator+ ( const tensor< S, m, m > & A,
const isotropic_tensor< T, m, m > & I ) -> tensor<decltype(S {} + T{}), m, m>

Definition at line 2096 of file tensor.hpp.

◆ operator+() [4/12]

template<typename S , typename T , int... n>
MFEM_HOST_DEVICE auto mfem::future::operator+ ( const tensor< S, n... > & A,
const tensor< T, n... > & B ) -> tensor<decltype(S {} + T{}), n...>

return the sum of two tensors

Template Parameters
Sthe underlying type of the lefthand argument
Tthe underlying type of the righthand argument
nintegers describing the tensor shape
Parameters
[in]AThe lefthand operand
[in]BThe righthand operand

Definition at line 479 of file tensor.hpp.

◆ operator+() [5/12]

template<typename... S, typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator+ ( const tuple< S... > & x,
const tuple< T... > & y )
constexpr

return a tuple of values defined by elementwise sum of x and y

Template Parameters
Sthe types stored in the tuple x
Tthe types stored in the tuple y
Parameters
xa tuple of values
ya tuple of values

Definition at line 414 of file tuple.hpp.

◆ operator+() [6/12]

template<typename other_type , typename value_type , typename gradient_type , typename = typename std::enable_if< std::is_arithmetic<other_type>::value || is_dual_number<other_type>::value>::type>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator+ ( dual< value_type, gradient_type > a,
other_type b ) -> dual<value_type, gradient_type>
constexpr

addition of a dual number and a non-dual number

Definition at line 74 of file dual.hpp.

◆ operator+() [7/12]

template<typename value_type_a , typename gradient_type_a , typename value_type_b , typename gradient_type_b >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator+ ( dual< value_type_a, gradient_type_a > a,
dual< value_type_b, gradient_type_b > b ) -> dual<decltype(a.value + b.value), decltype(a.gradient + b.gradient)>
constexpr

addition of two dual numbers

Definition at line 103 of file dual.hpp.

◆ operator+() [8/12]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator+ ( isotropic_tensor< S, m, m, m, m > I1,
isotropic_tensor< T, m, m, m, m > I2 ) -> isotropic_tensor<decltype(S {} + T{}), m, m, m, m>
constexpr

Definition at line 2266 of file tensor.hpp.

◆ operator+() [9/12]

template<typename other_type , typename value_type , typename gradient_type , typename = typename std::enable_if< std::is_arithmetic<other_type>::value || is_dual_number<other_type>::value>::type>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator+ ( other_type a,
dual< value_type, gradient_type > b ) -> dual<value_type, gradient_type>
constexpr

addition of a dual number and a non-dual number

Definition at line 94 of file dual.hpp.

◆ operator+() [10/12]

template<typename T >
MFEM_HOST_DEVICE constexpr T mfem::future::operator+ ( T other,
zero  )
constexpr

the sum of zero with something non-zero just returns the other value

Definition at line 220 of file tensor.hpp.

◆ operator+() [11/12]

template<typename T >
MFEM_HOST_DEVICE constexpr T mfem::future::operator+ ( zero ,
T other )
constexpr

the sum of zero with something non-zero just returns the other value

Definition at line 213 of file tensor.hpp.

◆ operator+() [12/12]

MFEM_HOST_DEVICE constexpr zero mfem::future::operator+ ( zero ,
zero  )
constexpr

the sum of two zeros is zero

Definition at line 209 of file tensor.hpp.

◆ operator+=() [1/9]

gradient_type MFEM_HOST_DEVICE dual< value_type, gradient_type > & mfem::future::operator+= ( dual< value_type, gradient_type > & a,
const dual< value_type, gradient_type > & b )

Definition at line 243 of file dual.hpp.

◆ operator+=() [2/9]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > & mfem::future::operator+= ( dual< value_type, gradient_type > & a,
real_t b )

compound assignment (+) for dual numbers with real_t righthand side

Definition at line 263 of file dual.hpp.

◆ operator+=() [3/9]

template<typename S , typename T , int... n>
MFEM_HOST_DEVICE tensor< S, n... > & mfem::future::operator+= ( tensor< S, n... > & A,
const tensor< T, n... > & B )

compound assignment (+) on tensors

Template Parameters
Sthe underlying type of the tensor (lefthand) argument
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]AThe lefthand tensor
[in]BThe righthand tensor

Definition at line 626 of file tensor.hpp.

◆ operator+=() [4/9]

template<typename T >
MFEM_HOST_DEVICE tensor< T > & mfem::future::operator+= ( tensor< T > & A,
const T & B )

compound assignment (+) on tensors

Template Parameters
Tthe underlying type of the tensor argument
Parameters
[in]AThe lefthand tensor
[in]BThe righthand tensor

Definition at line 643 of file tensor.hpp.

◆ operator+=() [5/9]

template<typename T >
MFEM_HOST_DEVICE tensor< T, 1 > & mfem::future::operator+= ( tensor< T, 1 > & A,
const T & B )

compound assignment (+) on tensors

Template Parameters
Tthe underlying type of the tensor argument
Parameters
[in]AThe lefthand tensor
[in]BThe righthand tensor

Definition at line 655 of file tensor.hpp.

◆ operator+=() [6/9]

template<typename T >
MFEM_HOST_DEVICE tensor< T, 1, 1 > & mfem::future::operator+= ( tensor< T, 1, 1 > & A,
const T & B )

compound assignment (+) on tensors

Template Parameters
Tthe underlying type of the tensor argument
Parameters
[in]AThe lefthand tensor
[in]BThe righthand tensor

Definition at line 667 of file tensor.hpp.

◆ operator+=() [7/9]

template<typename T , int... n>
MFEM_HOST_DEVICE tensor< T, n... > & mfem::future::operator+= ( tensor< T, n... > & A,
zero  )

compound assignment (+) between a tensor and zero (no-op)

Template Parameters
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]AThe lefthand tensor

Definition at line 679 of file tensor.hpp.

◆ operator+=() [8/9]

template<typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator+= ( tuple< T... > & x,
const tuple< T... > & y )
constexpr

add values contained in y, to the tuple x

Template Parameters
Tthe types stored in the tuples x and y
Parameters
xa tuple of values
ya tuple of values

Definition at line 445 of file tuple.hpp.

◆ operator+=() [9/9]

MFEM_HOST_DEVICE constexpr zero mfem::future::operator+= ( zero ,
zero  )
constexpr

zero plus zero is `zero

Definition at line 274 of file tensor.hpp.

◆ operator-() [1/16]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto mfem::future::operator- ( const isotropic_tensor< S, m, m > & I,
const tensor< T, m, m > & A ) -> tensor<decltype(S {} - T{}), m, m>

Definition at line 2112 of file tensor.hpp.

◆ operator-() [2/16]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator- ( const isotropic_tensor< S, m, m > & I1,
const isotropic_tensor< T, m, m > & I2 ) -> isotropic_tensor<decltype(S {} - T{}), m, m>
constexpr

Definition at line 2072 of file tensor.hpp.

◆ operator-() [3/16]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE auto mfem::future::operator- ( const tensor< S, m, m > & A,
const isotropic_tensor< T, m, m > & I ) -> tensor<decltype(S {} - T{}), m, m>

Definition at line 2128 of file tensor.hpp.

◆ operator-() [4/16]

template<typename S , typename T , int... n>
MFEM_HOST_DEVICE auto mfem::future::operator- ( const tensor< S, n... > & A,
const tensor< T, n... > & B ) -> tensor<decltype(S {} + T{}), n...>

return the difference of two tensors

Template Parameters
Sthe underlying type of the lefthand argument
Tthe underlying type of the righthand argument
nintegers describing the tensor shape
Parameters
[in]AThe lefthand operand
[in]BThe righthand operand

Definition at line 517 of file tensor.hpp.

◆ operator-() [5/16]

template<typename T , int... n>
MFEM_HOST_DEVICE tensor< T, n... > mfem::future::operator- ( const tensor< T, n... > & A)

return the unary negation of a tensor

Template Parameters
Tthe underlying type of the righthand argument
nintegers describing the tensor shape
Parameters
[in]AThe tensor to negate

Definition at line 498 of file tensor.hpp.

◆ operator-() [6/16]

template<typename... S, typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator- ( const tuple< S... > & x,
const tuple< T... > & y )
constexpr

return a tuple of values defined by elementwise difference of x and y

Template Parameters
Sthe types stored in the tuple x
Tthe types stored in the tuple y
Parameters
xa tuple of values
ya tuple of values

Definition at line 508 of file tuple.hpp.

◆ operator-() [7/16]

template<typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator- ( const tuple< T... > & x)
constexpr

return a tuple of values defined by applying the unary minus operator to each element of x

Template Parameters
Tthe types stored in the tuple y
Parameters
xa tuple of values

Definition at line 537 of file tuple.hpp.

◆ operator-() [8/16]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator- ( dual< value_type, gradient_type > a,
real_t b ) -> dual<value_type, gradient_type>
constexpr

subtraction of a non-dual number from a dual number

Definition at line 120 of file dual.hpp.

◆ operator-() [9/16]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator- ( dual< value_type, gradient_type > x) -> dual<value_type, gradient_type>
constexpr

unary negation of a dual number

Definition at line 112 of file dual.hpp.

◆ operator-() [10/16]

template<typename value_type_a , typename gradient_type_a , typename value_type_b , typename gradient_type_b >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator- ( dual< value_type_a, gradient_type_a > a,
dual< value_type_b, gradient_type_b > b ) -> dual<decltype(a.value - b.value), decltype(a.gradient - b.gradient)>
constexpr

subtraction of two dual numbers

Definition at line 137 of file dual.hpp.

◆ operator-() [11/16]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator- ( isotropic_tensor< S, m, m, m, m > I1,
isotropic_tensor< T, m, m, m, m > I2 ) -> isotropic_tensor<decltype(S {} - T{}), m, m, m, m>
constexpr

Definition at line 2274 of file tensor.hpp.

◆ operator-() [12/16]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator- ( real_t a,
dual< value_type, gradient_type > b ) -> dual<value_type, gradient_type>
constexpr

subtraction of a dual number from a non-dual number

Definition at line 128 of file dual.hpp.

◆ operator-() [13/16]

template<typename T >
MFEM_HOST_DEVICE constexpr T mfem::future::operator- ( T other,
zero  )
constexpr

the difference of something else with zero is the other thing itself

Definition at line 242 of file tensor.hpp.

◆ operator-() [14/16]

MFEM_HOST_DEVICE constexpr zero mfem::future::operator- ( zero )
constexpr

the unary negation of zero is zero

Definition at line 228 of file tensor.hpp.

◆ operator-() [15/16]

template<typename T >
MFEM_HOST_DEVICE constexpr T mfem::future::operator- ( zero ,
T other )
constexpr

the difference of zero with something else is the unary negation of the other thing

Definition at line 235 of file tensor.hpp.

◆ operator-() [16/16]

MFEM_HOST_DEVICE constexpr zero mfem::future::operator- ( zero ,
zero  )
constexpr

the difference of two zeros is zero

Definition at line 231 of file tensor.hpp.

◆ operator-=() [1/6]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > & mfem::future::operator-= ( dual< value_type, gradient_type > & a,
const dual< value_type, gradient_type > & b )

compound assignment (-) for dual numbers

Definition at line 253 of file dual.hpp.

◆ operator-=() [2/6]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > & mfem::future::operator-= ( dual< value_type, gradient_type > & a,
real_t b )

compound assignment (-) for dual numbers with real_t righthand side

Definition at line 272 of file dual.hpp.

◆ operator-=() [3/6]

template<typename S , typename T , int... n>
MFEM_HOST_DEVICE tensor< S, n... > & mfem::future::operator-= ( tensor< S, n... > & A,
const tensor< T, n... > & B )

compound assignment (-) on tensors

Template Parameters
Sthe underlying type of the tensor (lefthand) argument
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]AThe lefthand tensor
[in]BThe righthand tensor

Definition at line 693 of file tensor.hpp.

◆ operator-=() [4/6]

template<typename T , int... n>
MFEM_HOST_DEVICE constexpr tensor< T, n... > & mfem::future::operator-= ( tensor< T, n... > & A,
zero  )
constexpr

compound assignment (-) between a tensor and zero (no-op)

Template Parameters
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]AThe lefthand tensor

Definition at line 709 of file tensor.hpp.

◆ operator-=() [5/6]

template<typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator-= ( tuple< T... > & x,
const tuple< T... > & y )
constexpr

add values contained in y, to the tuple x

Template Parameters
Tthe types stored in the tuples x and y
Parameters
xa tuple of values
ya tuple of values

Definition at line 475 of file tuple.hpp.

◆ operator-=() [6/6]

MFEM_HOST_DEVICE constexpr zero mfem::future::operator-= ( zero ,
zero  )
constexpr

zero minus zero is `zero

Definition at line 277 of file tensor.hpp.

◆ operator/() [1/9]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator/ ( const dual< value_type, gradient_type > & a,
real_t b ) -> dual<decltype(a.value / b), decltype(a.gradient / b)>
constexpr

division of a dual number by a non-dual number

Definition at line 173 of file dual.hpp.

◆ operator/() [2/9]

template<typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator/ ( const real_t a,
const tuple< T... > & x )
constexpr

return a tuple of values defined by division of a by the elements of x

Template Parameters
Tthe types stored in the tuple x
Parameters
athe numerator
xa tuple of denominator values

Definition at line 616 of file tuple.hpp.

◆ operator/() [3/9]

template<typename S , typename T , int... n, typename = typename std::enable_if<std::is_arithmetic<S>::value || is_dual_number<S>::value>::type>
MFEM_HOST_DEVICE auto mfem::future::operator/ ( const tensor< T, n... > & A,
S scale ) -> tensor<decltype(T {} * S{}), n...>

divide a tensor by a scalar

Template Parameters
Sthe scalar value type. Must be arithmetic (e.g. float, real_t, int) or a dual number
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]AThe tensor of numerators
[in]scaleThe denominator

Definition at line 606 of file tensor.hpp.

◆ operator/() [4/9]

template<typename... S, typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator/ ( const tuple< S... > & x,
const tuple< T... > & y )
constexpr

return a tuple of values defined by elementwise division of x by y

Template Parameters
Sthe types stored in the tuple x
Tthe types stored in the tuple y
Parameters
xa tuple of values
ya tuple of values

Definition at line 569 of file tuple.hpp.

◆ operator/() [5/9]

template<typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::operator/ ( const tuple< T... > & x,
const real_t a )
constexpr

return a tuple of values defined by elementwise division of x by a

Template Parameters
Tthe types stored in the tuple y
Parameters
xa tuple of numerator values
aa denominator

Definition at line 629 of file tuple.hpp.

◆ operator/() [6/9]

template<typename value_type_a , typename gradient_type_a , typename value_type_b , typename gradient_type_b >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator/ ( dual< value_type_a, gradient_type_a > a,
dual< value_type_b, gradient_type_b > b ) -> dual<decltype(a.value / b.value), decltype((a.gradient / b.value) - (a.value * b.gradient) / (b.value * b.value))>
constexpr

division of two dual numbers

Definition at line 191 of file dual.hpp.

◆ operator/() [7/9]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::operator/ ( real_t a,
const dual< value_type, gradient_type > & b ) -> dual<decltype(a / b.value), decltype(-(a / (b.value * b.value)) * b.gradient)>
constexpr

division of a non-dual number by a dual number

Definition at line 181 of file dual.hpp.

◆ operator/() [8/9]

template<typename S , typename T , int... n, typename = typename std::enable_if<std::is_arithmetic<S>::value || is_dual_number<S>::value>::type>
MFEM_HOST_DEVICE auto mfem::future::operator/ ( S scale,
const tensor< T, n... > & A ) -> tensor<decltype(S {} * T{}), n...>

divide a scalar by each element in a tensor

Template Parameters
Sthe scalar value type. Must be arithmetic (e.g. float, real_t, int) or a dual number
Tthe underlying type of the tensor (righthand) argument
nintegers describing the tensor shape
Parameters
[in]scaleThe numerator
[in]AThe tensor of denominators

Definition at line 584 of file tensor.hpp.

◆ operator/() [9/9]

template<typename T >
MFEM_HOST_DEVICE constexpr zero mfem::future::operator/ ( zero ,
T  )
constexpr

zero divided by something is zero

Definition at line 268 of file tensor.hpp.

◆ operator<<() [1/3]

template<typename T , int... n>
std::ostream & mfem::future::operator<< ( std::ostream & os,
const tensor< T, n... > & A )

recursively serialize the entries in a tensor to an output stream. Output format uses braces and comma separators to mimic C syntax for multidimensional array initialization.

Parameters
[in]osThe stream to work with standard output streams
[in]AThe tensor to write out

Definition at line 1855 of file tensor.hpp.

◆ operator<<() [2/3]

template<typename value_type , typename gradient_type , int... n>
std::ostream & mfem::future::operator<< ( std::ostream & os,
dual< value_type, gradient_type > A )

overload of operator<< for dual to work with work with standard output streams

Definition at line 412 of file dual.hpp.

◆ operator<<() [3/3]

template<typename... T>
auto & mfem::future::operator<< ( std::ostream & out,
const tuple< T... > & A )

print a tuple of values

Template Parameters
Tthe types stored in the tuple
Parameters
outthe ostream to write the output to
Athe tuple of values

Definition at line 751 of file tuple.hpp.

◆ outer() [1/11]

template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n > mfem::future::outer ( const tensor< S, m > & A,
const tensor< T, n > & B )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where both arguments are vectors

Definition at line 825 of file tensor.hpp.

◆ outer() [2/11]

template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n, p > mfem::future::outer ( const tensor< S, m > & A,
const tensor< T, n, p > & B )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where the left argument is a 1st order tensor, and the right argument is a 2nd order tensor

Definition at line 889 of file tensor.hpp.

◆ outer() [3/11]

template<typename S , typename T , int m>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m > mfem::future::outer ( const tensor< S, m > & A,
T B )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where the left argument is a tensor, and the right argument is a scalar

Definition at line 767 of file tensor.hpp.

◆ outer() [4/11]

template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n, p > mfem::future::outer ( const tensor< S, m, n > & A,
const tensor< T, p > & B )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where the left argument is a 2nd order tensor, and the right argument is a first order tensor

Definition at line 866 of file tensor.hpp.

◆ outer() [5/11]

template<typename S , typename T , int m, int n, int p, int q>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n, p, q > mfem::future::outer ( const tensor< S, m, n > & A,
const tensor< T, p, q > & B )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where both arguments are second order tensors

Definition at line 911 of file tensor.hpp.

◆ outer() [6/11]

template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n > mfem::future::outer ( const tensor< S, m, n > & A,
T B )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where the left argument is a 2nd order tensor, and the right argument is a scalar

Definition at line 845 of file tensor.hpp.

◆ outer() [7/11]

template<typename T , int n>
MFEM_HOST_DEVICE zero mfem::future::outer ( const tensor< T, n > & ,
zero  )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where the left argument is a tensor, and the right argument is zero

Definition at line 794 of file tensor.hpp.

◆ outer() [8/11]

template<typename S , typename T , int m, int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n > mfem::future::outer ( S A,
const tensor< T, m, n > & B )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where the left argument is a scalar, and the right argument is a tensor

Definition at line 805 of file tensor.hpp.

◆ outer() [9/11]

template<typename S , typename T >
MFEM_HOST_DEVICE auto mfem::future::outer ( S A,
T B ) -> decltype(A * B)

compute the outer product of two tensors

Template Parameters
Sthe type of the lefthand argument
Tthe type of the righthand argument
Parameters
[in]AThe lefthand argument
[in]BThe righthand argument
Note
this overload implements the special case where both arguments are scalars

Definition at line 724 of file tensor.hpp.

◆ outer() [10/11]

template<typename S , typename T , int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), n > mfem::future::outer ( S A,
tensor< T, n > B )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where the left argument is a scalar, and the right argument is a tensor

Definition at line 750 of file tensor.hpp.

◆ outer() [11/11]

template<typename T , int n>
MFEM_HOST_DEVICE zero mfem::future::outer ( zero ,
const tensor< T, n > &  )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
this overload implements the case where the left argument is zero, and the right argument is a tensor

Definition at line 784 of file tensor.hpp.

◆ plus_equals_helper()

template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr void mfem::future::plus_equals_helper ( tuple< T... > & x,
const tuple< T... > & y,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the += operator of tuples.

Template Parameters
Tthe types stored in the tuples x and y
iinteger sequence used to index the tuples
Parameters
xtuple of values to be incremented
ytuple of increment values

Definition at line 431 of file tuple.hpp.

◆ plus_helper()

template<typename... S, typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::plus_helper ( const tuple< S... > & x,
const tuple< T... > & y,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the + operator of tuples.

Template Parameters
Sthe types stored in the tuple x
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
ytuple of values
Returns
the returned tuple sum

Definition at line 399 of file tuple.hpp.

◆ pow() [1/4]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::pow ( dual< value_type, gradient_type > a,
dual< value_type, gradient_type > b )

implementation of a (dual) raised to the b (dual) power

Definition at line 374 of file dual.hpp.

◆ pow() [2/4]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::pow ( dual< value_type, gradient_type > a,
real_t b )

implementation of a (dual) raised to the b (non-dual) power

Definition at line 403 of file dual.hpp.

◆ pow() [3/4]

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::pow ( real_t a,
dual< value_type, gradient_type > b )

implementation of a (non-dual) raised to the b (dual) power

Definition at line 385 of file dual.hpp.

◆ pow() [4/4]

template<typename value_type >
MFEM_HOST_DEVICE value_type mfem::future::pow ( value_type a,
value_type b )

implementation of a (non-dual) raised to the b (non-dual) power

Definition at line 395 of file dual.hpp.

◆ pretty_print() [1/4]

template<typename T >
void mfem::future::pretty_print ( const mfem::Array< T > & v)

Pretty print an mfem::Array to out.

T has to have an overloaded operator<<

Formatted s.t. the output is [v0, v1, ..., vn] which is compatible with numpy syntax.

Parameters
vvector of vectors to print

Definition at line 285 of file util.hpp.

◆ pretty_print() [2/4]

void mfem::future::pretty_print ( const mfem::Vector & v)
inline

Pretty print an mfem::Vector to out.

Formatted s.t. the output is [v0, v1, ..., vn] which is compatible with numpy syntax.

Parameters
vvector of vectors to print

Definition at line 262 of file util.hpp.

◆ pretty_print() [3/4]

template<typename K , typename T , std::size_t N>
void mfem::future::pretty_print ( const std::unordered_map< K, std::array< T, N > > & map)

Pretty prints an unordered map of std::array to out.

Useful for printing the output of make_dependency_map

Parameters
mapunordered map to print
Template Parameters
Ttype of array elements
Nsize of array

Definition at line 307 of file util.hpp.

◆ pretty_print() [4/4]

void mfem::future::pretty_print ( std::ostream & out,
const mfem::DenseMatrix & A )
inline

Pretty print an mfem::DenseMatrix to out.

Formatted s.t. the output is [[v00, v01, ..., v0n], [v10, v11, ..., v1n], ..., vmn]] which is compatible with numpy syntax.

Parameters
outostream to print to
Amfem::DenseMatrix to print

Definition at line 214 of file util.hpp.

◆ pretty_print_mpi()

void mfem::future::pretty_print_mpi ( const mfem::Vector & v)
inline

Pretty print an mfem::Vector with MPI rank.

Parameters
vvector to print

Definition at line 400 of file util.hpp.

◆ print_helper()

template<typename... T, std::size_t... i>
auto & mfem::future::print_helper ( std::ostream & out,
const tuple< T... > & A,
std::integer_sequence< size_t, i... >  )

helper used to implement printing a tuple of values

Template Parameters
Tthe types stored in the tuple
ia list of indices used to access each element of the tuple
Parameters
outthe ostream to write the output to
Athe tuple of values

Definition at line 735 of file tuple.hpp.

◆ print_mpi_root()

void mfem::future::print_mpi_root ( const std::string & msg)
inline

Definition at line 330 of file util.hpp.

◆ print_mpi_sync()

void mfem::future::print_mpi_sync ( const std::string & msg)
inline

print with MPI rank synchronization

Parameters
msgMessage to print

Definition at line 344 of file util.hpp.

◆ print_shared_memory_info()

template<typename shmem_info_t >
void mfem::future::print_shared_memory_info ( shmem_info_t & shmem_info)

Definition at line 1720 of file util.hpp.

◆ print_tuple()

template<typename... Args>
void mfem::future::print_tuple ( const std::tuple< Args... > & t)

Definition at line 196 of file util.hpp.

◆ print_tuple_impl()

template<typename Tuple , std::size_t... Is>
void mfem::future::print_tuple_impl ( const Tuple & t,
std::index_sequence< Is... >  )

Definition at line 187 of file util.hpp.

◆ process_derivative_from_native_dual() [1/3]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_derivative_from_native_dual ( DeviceTensor< 1, T > & r,
const dual< T, T > & x )
inline

Definition at line 186 of file qfunction_transform.hpp.

◆ process_derivative_from_native_dual() [2/3]

template<typename T , int n>
MFEM_HOST_DEVICE void mfem::future::process_derivative_from_native_dual ( DeviceTensor< 1, T > & r,
const tensor< dual< T, T >, n > & x )
inline

Definition at line 174 of file qfunction_transform.hpp.

◆ process_derivative_from_native_dual() [3/3]

template<typename T , int n, int m>
MFEM_HOST_DEVICE void mfem::future::process_derivative_from_native_dual ( DeviceTensor< 1, T > & r,
const tensor< dual< T, T >, n, m > & x )
inline

Definition at line 159 of file qfunction_transform.hpp.

◆ process_qf_arg() [1/15]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1 > & u,
const DeviceTensor< 1 > & v,
dual< T, T > & arg )
inline

Definition at line 63 of file qfunction_transform.hpp.

◆ process_qf_arg() [2/15]

template<typename T , int n>
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1 > & u,
const DeviceTensor< 1 > & v,
tensor< dual< T, T >, n > & arg )
inline

Definition at line 74 of file qfunction_transform.hpp.

◆ process_qf_arg() [3/15]

template<typename T , int n, int m>
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1 > & u,
const DeviceTensor< 1 > & v,
tensor< dual< T, T >, n, m > & arg )
inline

Definition at line 88 of file qfunction_transform.hpp.

◆ process_qf_arg() [4/15]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1 > & u,
dual< T, T > & arg )
inline

Definition at line 54 of file qfunction_transform.hpp.

◆ process_qf_arg() [5/15]

template<typename T , int n, int m>
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1 > & u,
tensor< dual< T, T >, n, m > & arg )
inline

Definition at line 39 of file qfunction_transform.hpp.

◆ process_qf_arg() [6/15]

template<typename T , int n>
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1 > & u,
tensor< T, n > & arg )
inline

Definition at line 221 of file qfunction_transform.hpp.

◆ process_qf_arg() [7/15]

template<typename T , int n, int m>
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1 > & u,
tensor< T, n, m > & arg )
inline

Definition at line 233 of file qfunction_transform.hpp.

◆ process_qf_arg() [8/15]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1, T > & u,
const DeviceTensor< 1, T > & v,
T & arg )

Definition at line 29 of file qfunction_transform.hpp.

◆ process_qf_arg() [9/15]

template<typename T , int n, int m>
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1, T > & u,
const DeviceTensor< 1, T > & v,
tensor< T, n, m > & arg )
inline

Definition at line 332 of file qfunction_transform.hpp.

◆ process_qf_arg() [10/15]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1, T > & u,
T & arg )
inline

Definition at line 203 of file qfunction_transform.hpp.

◆ process_qf_arg() [11/15]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 1, T > & u,
tensor< T > & arg )
inline

Definition at line 212 of file qfunction_transform.hpp.

◆ process_qf_arg() [12/15]

template<typename arg_type >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 2 > & u,
arg_type & arg,
int qp )
inline

Definition at line 248 of file qfunction_transform.hpp.

◆ process_qf_arg() [13/15]

template<typename arg_type >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const DeviceTensor< 2 > & u,
const DeviceTensor< 2 > & v,
arg_type & arg,
const int & qp )
inline

Definition at line 132 of file qfunction_transform.hpp.

◆ process_qf_arg() [14/15]

template<typename T0 , typename T1 , typename T2 >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const T0 & ,
const T1 & ,
T2 &  )

Definition at line 21 of file qfunction_transform.hpp.

◆ process_qf_arg() [15/15]

template<typename T0 , typename T1 >
MFEM_HOST_DEVICE void mfem::future::process_qf_arg ( const T0 & ,
T1 &  )
inline

Definition at line 195 of file qfunction_transform.hpp.

◆ process_qf_args() [1/2]

template<size_t num_fields, typename qf_args >
MFEM_HOST_DEVICE void mfem::future::process_qf_args ( const std::array< DeviceTensor< 2 >, num_fields > & u,
const std::array< DeviceTensor< 2 >, num_fields > & v,
qf_args & args,
const int & qp )
inline

Definition at line 145 of file qfunction_transform.hpp.

◆ process_qf_args() [2/2]

template<size_t num_fields, typename qf_args >
MFEM_HOST_DEVICE void mfem::future::process_qf_args ( const std::array< DeviceTensor< 2 >, num_fields > & u,
qf_args & args,
const int & qp )
inline

Definition at line 256 of file qfunction_transform.hpp.

◆ process_qf_result() [1/8]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_qf_result ( DeviceTensor< 1 > & r,
const dual< T, T > & x )
inline

Definition at line 287 of file qfunction_transform.hpp.

◆ process_qf_result() [2/8]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_qf_result ( DeviceTensor< 1, T > & r,
const T & x )
inline

Definition at line 278 of file qfunction_transform.hpp.

◆ process_qf_result() [3/8]

template<typename T , int n>
MFEM_HOST_DEVICE void mfem::future::process_qf_result ( DeviceTensor< 1, T > & r,
const tensor< dual< T, T >, n > & x )
inline

Definition at line 105 of file qfunction_transform.hpp.

◆ process_qf_result() [4/8]

template<typename T , int n, int m>
MFEM_HOST_DEVICE void mfem::future::process_qf_result ( DeviceTensor< 1, T > & r,
const tensor< dual< T, T >, n, m > & x )
inline

Definition at line 117 of file qfunction_transform.hpp.

◆ process_qf_result() [5/8]

template<typename T >
MFEM_HOST_DEVICE void mfem::future::process_qf_result ( DeviceTensor< 1, T > & r,
const tensor< T > & x )
inline

Definition at line 296 of file qfunction_transform.hpp.

◆ process_qf_result() [6/8]

template<typename T , int n>
MFEM_HOST_DEVICE void mfem::future::process_qf_result ( DeviceTensor< 1, T > & r,
const tensor< T, n > & x )
inline

Definition at line 305 of file qfunction_transform.hpp.

◆ process_qf_result() [7/8]

template<typename T , int n, int m>
MFEM_HOST_DEVICE void mfem::future::process_qf_result ( DeviceTensor< 1, T > & r,
const tensor< T, n, m > & x )
inline

Definition at line 317 of file qfunction_transform.hpp.

◆ process_qf_result() [8/8]

template<typename T0 , typename T1 >
MFEM_HOST_DEVICE Vector mfem::future::process_qf_result ( T0 ,
T1  )
inline

Definition at line 269 of file qfunction_transform.hpp.

◆ prolongation() [1/3]

void mfem::future::prolongation ( const FieldDescriptor field,
const Vector & x,
Vector & field_l )
inline

Apply the prolongation operator to a field.

Parameters
fieldthe field descriptor.
xthe input vector in tdofs.
field_lthe output vector in vdofs.

Definition at line 1087 of file util.hpp.

◆ prolongation() [2/3]

template<std::size_t N, std::size_t M>
void mfem::future::prolongation ( const std::array< FieldDescriptor, N > fields,
const Vector & x,
std::array< Vector, M > & fields_l )

Apply the prolongation operator to a vector of fields.

x is a long vector containing the data for all fields on tdofs and fields contains the information about each individual field to retrieve it's corresponding prolongation.

Parameters
fieldsthe array of field descriptors.
xthe input vector in tdofs.
fields_lthe array of output vectors in vdofs.
Template Parameters
Nthe number of fields.
Mthe number of output fields.

Definition at line 1106 of file util.hpp.

◆ prolongation() [3/3]

void mfem::future::prolongation ( const std::vector< FieldDescriptor > fields,
const Vector & x,
std::vector< Vector > & fields_l )
inline

Apply the prolongation operator to a vector of fields.

x is a long vector containing the data for all fields on tdofs and fields contains the information about each individual field to retrieve it's corresponding prolongation.

Parameters
fieldsthe array of field descriptors.
xthe input vector in tdofs.
fields_lthe array of output vectors in vdofs.

Definition at line 1134 of file util.hpp.

◆ qfunction_wrapper()

template<typename func_t , typename... arg_ts>
MFEM_HOST_DEVICE auto mfem::future::qfunction_wrapper ( const func_t & f,
arg_ts &&... args )
inline

Definition at line 540 of file qfunction_apply.hpp.

◆ restriction() [1/2]

template<typename entity_t >
void mfem::future::restriction ( const FieldDescriptor u,
const Vector & u_l,
Vector & field_e,
ElementDofOrdering ordering )

Apply the restriction operator to a field.

Parameters
uthe field descriptor.
u_lthe input vector in vdofs.
field_ethe output vector in edofs.
orderingthe element dof ordering.
Template Parameters
entity_tthe entity type (see Entity).

Definition at line 1218 of file util.hpp.

◆ restriction() [2/2]

template<typename entity_t >
void mfem::future::restriction ( const std::vector< FieldDescriptor > u,
const std::vector< Vector > & u_l,
std::vector< Vector > & fields_e,
ElementDofOrdering ordering,
const int offset = 0 )

Apply the restriction operator to a vector of fields.

Parameters
uthe vector of field descriptors.
u_lthe vector of input vectors in vdofs.
fields_ethe vector of output vectors in edofs.
orderingthe element dof ordering.
offsetthe array index offset to start writing in fields_e.
Template Parameters
entity_tthe entity type (see Entity).

Definition at line 1240 of file util.hpp.

◆ set_zero() [1/2]

template<std::size_t n>
MFEM_HOST_DEVICE void mfem::future::set_zero ( DeviceTensor< n > & u)
inline

Definition at line 2126 of file util.hpp.

◆ set_zero() [2/2]

template<std::size_t N>
MFEM_HOST_DEVICE void mfem::future::set_zero ( std::array< DeviceTensor< 2 >, N > & v)
inline

Definition at line 2111 of file util.hpp.

◆ sin()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::sin ( dual< value_type, gradient_type > a)

implementation of sine for dual numbers

Definition at line 305 of file dual.hpp.

◆ sinh()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::sinh ( dual< value_type, gradient_type > a)

implementation of sinh for dual numbers

Definition at line 314 of file dual.hpp.

◆ sqnorm() [1/3]

template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::sqnorm ( const isotropic_tensor< T, m, m > & I) -> T
constexpr

Definition at line 2206 of file tensor.hpp.

◆ sqnorm() [2/3]

template<typename T , int m>
MFEM_HOST_DEVICE T mfem::future::sqnorm ( const tensor< T, m > & A)

Returns the squared Frobenius norm of the tensor.

Parameters
[in]AThe tensor to obtain the squared norm from

Definition at line 1236 of file tensor.hpp.

◆ sqnorm() [3/3]

template<typename T , int m, int n>
MFEM_HOST_DEVICE T mfem::future::sqnorm ( const tensor< T, m, n > & A)

Returns the squared Frobenius norm of the tensor.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 1251 of file tensor.hpp.

◆ sqrt()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::sqrt ( dual< value_type, gradient_type > x)

implementation of square root for dual numbers

Definition at line 288 of file dual.hpp.

◆ sym() [1/2]

template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::sym ( const isotropic_tensor< T, m, m > & I) -> isotropic_tensor<T, m, m>
constexpr

Definition at line 2170 of file tensor.hpp.

◆ sym() [2/2]

template<typename T , int n>
MFEM_HOST_DEVICE tensor< T, n, n > mfem::future::sym ( const tensor< T, n, n > & A)

Returns the symmetric part of a square matrix.

Parameters
[in]AThe matrix to obtain the symmetric part of
Returns
(1/2) * (A + A^T)

Definition at line 1333 of file tensor.hpp.

◆ SymmetricIdentity()

template<int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::SymmetricIdentity ( ) -> isotropic_tensor<real_t, m, m, m, m>
constexpr

Definition at line 2238 of file tensor.hpp.

◆ tan()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE dual< value_type, gradient_type > mfem::future::tan ( dual< value_type, gradient_type > a)

implementation of tan for dual numbers

Definition at line 341 of file dual.hpp.

◆ to_array()

template<typename... Ts>
auto mfem::future::to_array ( const std::tuple< Ts... > & tuple)
constexpr

Definition at line 42 of file util.hpp.

◆ tr() [1/2]

template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::tr ( const isotropic_tensor< T, m, m > & I) -> decltype(T {} * m)
constexpr

Definition at line 2182 of file tensor.hpp.

◆ tr() [2/2]

template<typename T , int n>
MFEM_HOST_DEVICE T mfem::future::tr ( const tensor< T, n, n > & A)

Returns the trace of a square matrix.

Parameters
[in]AThe matrix to compute the trace of
Returns
The sum of the elements on the main diagonal

Definition at line 1317 of file tensor.hpp.

◆ transpose() [1/2]

template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::transpose ( const isotropic_tensor< T, m, m > & I) -> isotropic_tensor<T, m, m>
constexpr

Definition at line 2188 of file tensor.hpp.

◆ transpose() [2/2]

template<typename T , int m, int n>
MFEM_HOST_DEVICE tensor< T, n, m > mfem::future::transpose ( const tensor< T, m, n > & A)

Returns the transpose of the matrix.

Parameters
[in]AThe matrix to obtain the transpose of

Definition at line 1388 of file tensor.hpp.

◆ tuple()

template<typename... T>
MFEM_HOST_DEVICE mfem::future::tuple ( T... ) -> tuple< T... >

Class template argument deduction rule for tuples.

Template Parameters
TThe variadic template parameter for tuple types

◆ type()

template<int i, typename... T>
MFEM_HOST_DEVICE constexpr auto mfem::future::type ( const tuple< T... > & values)
constexpr

a function intended to be used for extracting the ith type from a tuple.

Note
type<i>(my_tuple) returns a value, whereas get<i>(my_tuple) returns a reference
Template Parameters
ithe index of the tuple to query
Tthe types stored in the tuple
Parameters
valuesthe tuple of values
Returns
a copy of the ith entry of the input

Definition at line 347 of file tuple.hpp.

◆ unary_minus_helper()

template<typename... T, int... i>
MFEM_HOST_DEVICE constexpr auto mfem::future::unary_minus_helper ( const tuple< T... > & x,
std::integer_sequence< int, i... >  )
constexpr

A helper function for the - operator of tuples.

Template Parameters
Tthe types stored in the tuple y
iThe integer sequence to i
Parameters
xtuple of values
Returns
the returned tuple difference

Definition at line 525 of file tuple.hpp.

◆ unpack_shmem() [1/2]

template<typename shared_mem_info_t , std::size_t num_inputs, std::size_t num_outputs, std::size_t num_fields>
MFEM_HOST_DEVICE auto mfem::future::unpack_shmem ( void * shmem,
const shared_mem_info_t & shmem_info,
const std::array< DofToQuadMap, num_inputs > & input_dtq_maps,
const std::array< DofToQuadMap, num_outputs > & output_dtq_maps,
const std::array< DeviceTensor< 2 >, num_fields > & wrapped_fields_e,
const DeviceTensor< 2 > & wrapped_direction_e,
const int & num_qp,
const int & e )
inline

Definition at line 2016 of file util.hpp.

◆ unpack_shmem() [2/2]

template<typename shared_mem_info_t , std::size_t num_inputs, std::size_t num_outputs, std::size_t num_fields>
MFEM_HOST_DEVICE auto mfem::future::unpack_shmem ( void * shmem,
const shared_mem_info_t & shmem_info,
const std::array< DofToQuadMap, num_inputs > & input_dtq_maps,
const std::array< DofToQuadMap, num_outputs > & output_dtq_maps,
const std::array< DeviceTensor< 2 >, num_fields > & wrapped_fields_e,
const int & num_qp,
const int & e )
inline

Definition at line 1953 of file util.hpp.

◆ weight()

template<typename T , int n, int m>
MFEM_HOST_DEVICE T mfem::future::weight ( const tensor< T, n, m > & A)

Definition at line 1275 of file tensor.hpp.

◆ wrap_fields()

template<std::size_t num_fields>
std::array< DeviceTensor< 2 >, num_fields > mfem::future::wrap_fields ( std::vector< Vector > & fields,
std::array< int, num_fields > & field_sizes,
const int & num_entities )

Wraps plain data in DeviceTensors for fields.

Parameters
fieldsarray of field data
field_sizesfor each field, number of values stored for each entity
num_entitiesnumber of entities (elements, faces, etc) in mesh
Template Parameters
num_fieldsnumber of fields
Returns
array of field data wrapped in DeviceTensors

Definition at line 2187 of file util.hpp.

◆ wrap_input_memory()

template<typename input_t , std::size_t... i>
std::array< DeviceTensor< 3 >, sizeof...(i)> mfem::future::wrap_input_memory ( std::array< Vector, sizeof...(i)> & input_qp_mem,
int num_qp,
int num_entities,
const input_t & inputs,
std::index_sequence< i... >  )

Wrap input memory for a given set of inputs.

Definition at line 1495 of file util.hpp.