MFEM v4.9.0
Finite element discretization library
Loading...
Searching...
No Matches
tensor.hpp File Reference

Implementation of the tensor class. More...

Go to the source code of this file.

Classes

struct  mfem::future::tensor< T >
 
struct  mfem::future::tensor< T, n0 >
 
struct  mfem::future::tensor< T, 0 >
 
struct  mfem::future::tensor< T, n0, n1 >
 
struct  mfem::future::tensor< T, 0, n1 >
 
struct  mfem::future::tensor< T, n0, n1, n2 >
 
struct  mfem::future::tensor< T, n0, n1, n2, n3 >
 
struct  mfem::future::tensor< T, n0, n1, n2, n3, n4 >
 
struct  mfem::future::zero
 A sentinel struct for eliding no-op tensor operations. More...
 
struct  mfem::future::is_zero< T >
 checks if a type is zero More...
 
struct  mfem::future::is_zero< zero >
 
struct  mfem::future::always_false< n >
 
struct  mfem::future::isotropic_tensor< T, n >
 
struct  mfem::future::isotropic_tensor< T, m, m >
 
struct  mfem::future::isotropic_tensor< T, 3, 3, 3 >
 
struct  mfem::future::isotropic_tensor< T, m, m, m, m >
 

Namespaces

namespace  mfem
 
namespace  mfem::future
 

Typedefs

template<typename T , int n1, int n2 = 1>
using mfem::future::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 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
 

Functions

MFEM_HOST_DEVICE constexpr zero mfem::future::operator+ (zero, zero)
 the sum of two zeros is zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr T mfem::future::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 mfem::future::operator+ (T other, zero)
 the sum of zero with something non-zero just returns the other value
 
MFEM_HOST_DEVICE constexpr zero mfem::future::operator- (zero)
 the unary negation of zero is zero
 
MFEM_HOST_DEVICE constexpr zero mfem::future::operator- (zero, zero)
 the difference of two zeros is zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr T mfem::future::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 mfem::future::operator- (T other, zero)
 the difference of something else with zero is the other thing itself
 
MFEM_HOST_DEVICE constexpr zero mfem::future::operator* (zero, zero)
 the product of two zeros is zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr zero mfem::future::operator* (zero, T)
 the product zero with something else is also zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr zero mfem::future::operator* (T, zero)
 the product zero with something else is also zero
 
template<typename T >
MFEM_HOST_DEVICE constexpr zero mfem::future::operator/ (zero, T)
 zero divided by something is zero
 
MFEM_HOST_DEVICE constexpr zero mfem::future::operator+= (zero, zero)
 zero plus zero is `zero
 
MFEM_HOST_DEVICE constexpr zero mfem::future::operator-= (zero, zero)
 zero minus zero is `zero
 
template<int i>
MFEM_HOST_DEVICE zeromfem::future::get (zero &x)
 let zero be accessed like a tuple
 
template<typename T >
MFEM_HOST_DEVICE zero mfem::future::dot (const T &, zero)
 the dot product of anything with zero is zero
 
template<typename T >
MFEM_HOST_DEVICE zero mfem::future::dot (zero, const T &)
 the dot product of anything with zero is zero
 
template<typename lambda_type >
MFEM_HOST_DEVICE constexpr auto mfem::future::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 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<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<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<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<typename T , int m, int n>
MFEM_HOST_DEVICE tensor< T, n > mfem::future::get_col (tensor< T, m, n > A, int j)
 
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.
 
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<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<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<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<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<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<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<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<typename T >
MFEM_HOST_DEVICE tensor< T > & mfem::future::operator+= (tensor< T > &A, const T &B)
 compound assignment (+) on tensors
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 1 > & mfem::future::operator+= (tensor< T, 1 > &A, const T &B)
 compound assignment (+) on tensors
 
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<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<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<typename T , int... n>
MFEM_HOST_DEVICE constexpr tensor< T, n... > & mfem::future::operator-= (tensor< T, n... > &A, zero)
 compound assignment (-) between a tensor and zero (no-op)
 
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<typename T , int n, int m>
MFEM_HOST_DEVICE tensor< T, n+m > mfem::future::flatten (tensor< T, n, m > A)
 
template<typename S , typename T , int n>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), n > mfem::future::outer (S A, tensor< T, n > B)
 
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)
 
template<typename T , int n>
MFEM_HOST_DEVICE zero mfem::future::outer (zero, const tensor< T, n > &)
 
template<typename T , int n>
MFEM_HOST_DEVICE zero mfem::future::outer (const tensor< T, n > &, zero)
 
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)
 
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)
 
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)
 
template<typename S , typename T , int m, int n, int p>
MFEM_HOST_DEVICE tensor< decltype(S{} *T{}), m, n, pmfem::future::outer (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, pmfem::future::outer (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 > mfem::future::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 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<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<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 >
 
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 >
 
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 >
 
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<typename T , int m>
MFEM_HOST_DEVICE auto mfem::future::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 mfem::future::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 mfem::future::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 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<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 >
 
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{})
 
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)
 
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.
 
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.
 
template<typename T , int... n>
MFEM_HOST_DEVICE T mfem::future::norm (const tensor< T, n... > &A)
 Returns the Frobenius norm of the tensor.
 
template<typename T , int n, int m>
MFEM_HOST_DEVICE T mfem::future::weight (const tensor< T, n, m > &A)
 
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,.
 
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.
 
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.
 
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)
 
template<int dim>
MFEM_HOST_DEVICE tensor< real_t, dim, dimmfem::future::IdentityMatrix ()
 Obtains the identity matrix of the specified dimension.
 
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.
 
template<typename T >
MFEM_HOST_DEVICE T mfem::future::det (const tensor< T, 1, 1 > &A)
 Returns the determinant of a matrix.
 
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.
 
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.
 
template<typename T >
MFEM_HOST_DEVICE std::tuple< tensor< T, 1 >, tensor< T, 1, 1 > > mfem::future::eig (tensor< T, 1, 1 > &A)
 
template<typename T >
MFEM_HOST_DEVICE std::tuple< tensor< T, 2 >, tensor< T, 2, 2 > > mfem::future::eig (tensor< T, 2, 2 > &A)
 
template<typename T >
MFEM_HOST_DEVICE void mfem::future::GetScalingFactor (const T &d_max, T &mult)
 
template<typename T >
MFEM_HOST_DEVICE T mfem::future::calcsv (const tensor< T, 1, 1 > A, const int i)
 
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.
 
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.
 
MFEM_HOST_DEVICE bool mfem::future::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 mfem::future::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 > 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.
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 1, 1 > mfem::future::inv (const tensor< T, 1, 1 > &A)
 Inverts a matrix.
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 2, 2 > mfem::future::inv (const tensor< T, 2, 2 > &A)
 
template<typename T >
MFEM_HOST_DEVICE tensor< T, 3, 3 > mfem::future::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 mfem::future::inv (const tensor< T, n, n > &A)
 
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)
 
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.
 
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
 
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.
 
MFEM_HOST_DEVICE zero mfem::future::get_gradient (real_t)
 Retrieves the gradient component of a real_t (which is nothing)
 
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)
 
MFEM_HOST_DEVICE zero mfem::future::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 mfem::future::chain_rule (const zero, const T)
 
template<typename T >
MFEM_HOST_DEVICE zero mfem::future::chain_rule (const T, const zero)
 
MFEM_HOST_DEVICE real_t mfem::future::chain_rule (const real_t df_dx, const real_t dx)
 
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)
 
template<int m>
MFEM_HOST_DEVICE constexpr isotropic_tensor< real_t, m, m > mfem::future::IsotropicIdentity ()
 
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 >
 
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 >
 
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 >
 
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 >
 
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 >
 
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 >
 
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 >
 
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 >
 
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... >
 
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... >
 
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{})
 
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 >
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::antisym (const isotropic_tensor< T, m, m > &) -> zero
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::tr (const isotropic_tensor< T, m, m > &I) -> decltype(T {} *m)
 
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 >
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::det (const isotropic_tensor< T, m, m > &I) -> T
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::norm (const isotropic_tensor< T, m, m > &I) -> T
 
template<typename T , int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::sqnorm (const isotropic_tensor< T, m, m > &I) -> T
 
template<int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::SymmetricIdentity () -> isotropic_tensor< real_t, m, m, m, m >
 
template<int m>
MFEM_HOST_DEVICE constexpr auto mfem::future::AntisymmetricIdentity () -> isotropic_tensor< real_t, m, m, m, m >
 
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 >
 
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 >
 
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 >
 
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 >
 
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 >
 

Detailed Description

Implementation of the tensor class.

Definition in file tensor.hpp.