libMesh
Loading...
Searching...
No Matches
Namespaces | Functions
kokkos_tensor_ops.h File Reference

Go to the source code of this file.

Namespaces

namespace  libMesh
 The libMesh namespace provides an interface to certain functionality in the library.
 
namespace  libMesh::Kokkos
 
namespace  libMesh::Kokkos::detail
 

Functions

template<typename ResultTensor >
LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::tensor_identity (const unsigned int dim=LIBMESH_DIM)
 
template<typename ResultTensor = void, typename TensorLike >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::copy_tensor (const TensorLike &T_in) -> std::conditional_t< std::is_void< ResultTensor >::value, tensor_semantic_type_t< TensorLike >, ResultTensor >
 
template<typename TensorLike >
LIBMESH_DEVICE_INLINE TensorLike::value_type libMesh::Kokkos::detail::leading_determinant (const TensorLike &T_in, const unsigned int dim=LIBMESH_DIM)
 
template<typename ResultTensor , typename LeftVector , typename RightVector >
LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::outer_product (const LeftVector &left, const RightVector &right)
 
template<typename ResultTensor , typename TensorLike >
LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::inverse (const TensorLike &T_in, const unsigned int dim=LIBMESH_DIM)
 
template<typename ResultTensor , typename TensorLike >
LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::transpose (const TensorLike &T_in)
 
template<typename ResultTensor , typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::multiply_tensors (const LeftTensor &left, const RightTensor &right)
 
template<typename ResultVector , typename TensorLike >
LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::row (const TensorLike &T_in, const unsigned int row_index)
 
template<typename ResultVector , typename TensorLike >
LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::column (const TensorLike &T_in, const unsigned int col_index)
 
template<typename ResultVector , typename TensorLike , typename VectorLike >
LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::multiply_tensor_vector (const TensorLike &T_in, const VectorLike &v)
 
template<typename ResultVector , typename VectorLike , typename TensorLike >
LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::multiply_vector_tensor (const VectorLike &v, const TensorLike &T_in)
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::assign_tensor_components (LeftTensor &left, const RightTensor &right)
 Componentwise copy: left = right.
 
template<typename TensorLike , typename Scalar >
LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::fill_tensor_components (TensorLike &T_in, const Scalar &value)
 Sets every component of T_in to value.
 
template<typename LeftTensor , typename RightTensor , typename Scalar >
LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::update_tensor_components (LeftTensor &left, const RightTensor &right, const Scalar &factor)
 Componentwise axpy-style update: left += factor * right.
 
template<typename OutputTensor , typename InputTensor , typename TransformOp >
LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::transform_tensor_components (OutputTensor &out, const InputTensor &in, const TransformOp &op)
 Componentwise transform: out(i,j) = op(in(i,j)).
 
template<typename ResultTensor , typename TensorLike , typename TransformOp >
LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::transformed_tensor (const TensorLike &T_in, const TransformOp &op)
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE bool libMesh::Kokkos::detail::tensor_equal_impl (const LeftTensor &left, const RightTensor &right)
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::detail::tensor_contract (const LeftTensor &left, const RightTensor &right)
 
template<typename TensorLike >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::detail::tensor_trace (const TensorLike &T_in)
 
template<typename LeftTensor , typename RightTensor , typename std::enable_if< is_tensor_like_v< LeftTensor > &&is_tensor_like_v< RightTensor >, int >::type = 0>
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::contract (const LeftTensor &left, const RightTensor &right)
 
template<typename ResultTensor = void, typename LeftVector , typename RightVector >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::outer_product (const LeftVector &left, const RightVector &right) -> std::enable_if_t< is_vector_like_v< LeftVector > &&is_vector_like_v< RightVector >, std::conditional_t< std::is_void< ResultTensor >::value, libMesh::TypeTensor< typename LeftVector::value_type >, ResultTensor > >
 
template<typename ResultTensor = void, typename TensorLike >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::transpose (const TensorLike &T_in) -> std::enable_if_t< is_tensor_like_v< TensorLike >, std::conditional_t< std::is_void< ResultTensor >::value, tensor_semantic_type_t< TensorLike >, ResultTensor > >
 
template<typename TensorLike >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::det (const TensorLike &T_in) -> std::enable_if_t< is_tensor_like_v< TensorLike >, decltype(T_in.det())>
 
template<typename ResultTensor = void, typename TensorLike >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::inverse (const TensorLike &T_in, const unsigned int dim=LIBMESH_DIM) -> std::enable_if_t< is_tensor_like_v< TensorLike >, std::conditional_t< std::is_void< ResultTensor >::value, tensor_semantic_type_t< TensorLike >, ResultTensor > >
 
template<typename ResultVector = void, typename TensorLike >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::row (const TensorLike &T_in, const unsigned int i) -> std::enable_if_t< is_tensor_like_v< TensorLike >, std::conditional_t< std::is_void< ResultVector >::value, libMesh::TypeVector< typename TensorLike::value_type >, ResultVector > >
 
template<typename ResultVector = void, typename TensorLike >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::column (const TensorLike &T_in, const unsigned int i) -> std::enable_if_t< is_tensor_like_v< TensorLike >, std::conditional_t< std::is_void< ResultVector >::value, libMesh::TypeVector< typename TensorLike::value_type >, ResultVector > >
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator+= (LeftTensor &left, const RightTensor &right) -> std::enable_if_t< is_tensor_like_v< LeftTensor > &&is_tensor_like_v< RightTensor > &&(is_tensor_ref_v< LeftTensor >||is_tensor_ref_v< RightTensor >), LeftTensor & >
 Adds right to left in place; when left is a ref, the update writes through to the underlying storage.
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator-= (LeftTensor &left, const RightTensor &right) -> std::enable_if_t< is_tensor_like_v< LeftTensor > &&is_tensor_like_v< RightTensor > &&(is_tensor_ref_v< LeftTensor >||is_tensor_ref_v< RightTensor >), LeftTensor & >
 Subtracts right from left in place.
 
template<typename TensorLike >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator- (const TensorLike &T_in) -> std::enable_if_t< is_tensor_like_v< TensorLike > &&is_tensor_ref_v< TensorLike >, tensor_semantic_type_t< TensorLike > >
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator+ (const LeftTensor &left, const RightTensor &right) -> std::enable_if_t< is_tensor_like_v< LeftTensor > &&is_tensor_like_v< RightTensor > &&(is_tensor_ref_v< LeftTensor >||is_tensor_ref_v< RightTensor >), tensor_semantic_type_t< LeftTensor > >
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator- (const LeftTensor &left, const RightTensor &right) -> std::enable_if_t< is_tensor_like_v< LeftTensor > &&is_tensor_like_v< RightTensor > &&(is_tensor_ref_v< LeftTensor >||is_tensor_ref_v< RightTensor >), tensor_semantic_type_t< LeftTensor > >
 
template<typename Scalar , typename TensorLike , typename std::enable_if<!is_vector_like_v< Scalar > &&!is_tensor_like_v< Scalar > &&is_tensor_like_v< TensorLike > &&is_tensor_ref_v< TensorLike >, int >::type = 0>
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator* (const Scalar &alpha, const TensorLike &T_in)
 
template<typename TensorLike , typename Scalar , typename std::enable_if< is_tensor_like_v< TensorLike > &&is_tensor_ref_v< TensorLike > &&!is_vector_like_v< Scalar > &&!is_tensor_like_v< Scalar >, int >::type = 0>
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator* (const TensorLike &T_in, const Scalar &alpha)
 
template<typename TensorLike , typename Scalar >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator/ (const TensorLike &T_in, const Scalar &alpha) -> std::enable_if_t< is_tensor_like_v< TensorLike > &&is_tensor_ref_v< TensorLike > &&!is_vector_like_v< Scalar > &&!is_tensor_like_v< Scalar >, tensor_semantic_type_t< TensorLike > >
 
template<typename LeftTensor , typename RightTensor , typename std::enable_if< is_tensor_like_v< LeftTensor > &&is_tensor_like_v< RightTensor > &&(is_tensor_ref_v< LeftTensor >||is_tensor_ref_v< RightTensor >), int >::type = 0>
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator* (const LeftTensor &left, const RightTensor &right)
 
template<typename TensorLike , typename VectorLike , typename std::enable_if< is_tensor_like_v< TensorLike > &&is_vector_like_v< VectorLike > &&(is_tensor_ref_v< TensorLike >||is_vector_ref_v< VectorLike >), int >::type = 0>
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator* (const TensorLike &T_in, const VectorLike &v)
 
template<typename VectorLike , typename TensorLike , typename std::enable_if< is_vector_like_v< VectorLike > &&is_tensor_like_v< TensorLike > &&(is_vector_ref_v< VectorLike >||is_tensor_ref_v< TensorLike >), int >::type = 0>
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator* (const VectorLike &v, const TensorLike &T_in)
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator== (const LeftTensor &left, const RightTensor &right) -> std::enable_if_t< is_tensor_like_v< LeftTensor > &&is_tensor_like_v< RightTensor > &&(is_tensor_ref_v< LeftTensor >||is_tensor_ref_v< RightTensor >), bool >
 
template<typename LeftTensor , typename RightTensor >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator!= (const LeftTensor &left, const RightTensor &right) -> std::enable_if_t< is_tensor_like_v< LeftTensor > &&is_tensor_like_v< RightTensor > &&(is_tensor_ref_v< LeftTensor >||is_tensor_ref_v< RightTensor >), bool >
 
template<typename LeftTensor , typename Scalar >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator*= (LeftTensor &left, const Scalar &alpha) -> std::enable_if_t< is_tensor_like_v< LeftTensor > &&is_tensor_ref_v< LeftTensor > &&!is_vector_like_v< Scalar > &&!is_tensor_like_v< Scalar >, LeftTensor & >
 Scales left by alpha in place.
 
template<typename LeftTensor , typename Scalar >
LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::operator/= (LeftTensor &left, const Scalar &alpha) -> std::enable_if_t< is_tensor_like_v< LeftTensor > &&is_tensor_ref_v< LeftTensor > &&!is_vector_like_v< Scalar > &&!is_tensor_like_v< Scalar >, LeftTensor & >
 Divides left by alpha in place.