|
libMesh
|
Classes | |
| struct | divide_value |
| struct | negate_value |
| Componentwise transform functors, shared by the vector helpers here and the tensor helpers in kokkos_tensor_ops.h. More... | |
| struct | scale_value |
Typedefs | |
| template<typename T > | |
| using | remove_cvref_t = typename std::remove_cv< typename std::remove_reference< T >::type >::type |
Strips reference and const/volatile qualifiers from T, turning e.g. | |
| template<typename ViewType > | |
| using | vector_view_value_t = remove_cvref_t< decltype(std::declval< ViewType & >()(0, 0))> |
| The plain component type stored by a vector view. | |
| template<typename ViewType > | |
| using | tensor_view_value_t = remove_cvref_t< decltype(std::declval< ViewType & >()(0, 0, 0))> |
| The plain component type stored by a tensor view, recovered from an (entry, row, column) indexing expression the same way vector_view_value_t is from its (entry, component) expression. | |
Functions | |
| template<typename TensorLike > | |
| LIBMESH_DEVICE_INLINE TensorLike::value_type | leading_determinant (const TensorLike &T_in, const unsigned int dim=LIBMESH_DIM) |
| template<typename ResultTensor , typename LeftVector , typename RightVector > | |
| LIBMESH_DEVICE_INLINE ResultTensor | outer_product (const LeftVector &left, const RightVector &right) |
| template<typename ResultTensor , typename TensorLike > | |
| LIBMESH_DEVICE_INLINE ResultTensor | inverse (const TensorLike &T_in, const unsigned int dim=LIBMESH_DIM) |
| template<typename ResultTensor , typename TensorLike > | |
| LIBMESH_DEVICE_INLINE ResultTensor | transpose (const TensorLike &T_in) |
| template<typename ResultTensor , typename LeftTensor , typename RightTensor > | |
| LIBMESH_DEVICE_INLINE ResultTensor | multiply_tensors (const LeftTensor &left, const RightTensor &right) |
| template<typename ResultVector , typename TensorLike > | |
| LIBMESH_DEVICE_INLINE ResultVector | row (const TensorLike &T_in, const unsigned int row_index) |
| template<typename ResultVector , typename TensorLike > | |
| LIBMESH_DEVICE_INLINE ResultVector | column (const TensorLike &T_in, const unsigned int col_index) |
| template<typename ResultVector , typename TensorLike , typename VectorLike > | |
| LIBMESH_DEVICE_INLINE ResultVector | multiply_tensor_vector (const TensorLike &T_in, const VectorLike &v) |
| template<typename ResultVector , typename VectorLike , typename TensorLike > | |
| LIBMESH_DEVICE_INLINE ResultVector | multiply_vector_tensor (const VectorLike &v, const TensorLike &T_in) |
| template<typename LeftTensor , typename RightTensor > | |
| LIBMESH_DEVICE_INLINE void | assign_tensor_components (LeftTensor &left, const RightTensor &right) |
| Componentwise copy: left = right. | |
| template<typename TensorLike , typename Scalar > | |
| LIBMESH_DEVICE_INLINE void | 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 | 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 | 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 | transformed_tensor (const TensorLike &T_in, const TransformOp &op) |
| template<typename LeftTensor , typename RightTensor > | |
| LIBMESH_DEVICE_INLINE bool | tensor_equal_impl (const LeftTensor &left, const RightTensor &right) |
| template<typename LeftTensor , typename RightTensor > | |
| LIBMESH_DEVICE_INLINE auto | tensor_contract (const LeftTensor &left, const RightTensor &right) |
| template<typename TensorLike > | |
| LIBMESH_DEVICE_INLINE auto | tensor_trace (const TensorLike &T_in) |
| template<typename LeftVector , typename RightVector > | |
| LIBMESH_DEVICE_INLINE void | assign_vector_components (LeftVector &left, const RightVector &right) |
| Componentwise copy: left = right. | |
| template<typename VectorLike , typename Scalar > | |
| LIBMESH_DEVICE_INLINE void | fill_vector_components (VectorLike &v, const Scalar &value) |
Sets every component of v to value. | |
| template<typename LeftVector , typename RightVector , typename Scalar > | |
| LIBMESH_DEVICE_INLINE void | update_vector_components (LeftVector &left, const RightVector &right, const Scalar &factor) |
| Componentwise axpy-style update: left += factor * right. | |
| template<typename OutputVector , typename InputVector , typename TransformOp > | |
| LIBMESH_DEVICE_INLINE void | transform_vector_components (OutputVector &out, const InputVector &in, const TransformOp &op) |
| Componentwise transform: out(i) = op(in(i)). | |
| template<typename ResultVector , typename VectorLike , typename TransformOp > | |
| LIBMESH_DEVICE_INLINE ResultVector | transformed_vector (const VectorLike &v, const TransformOp &op) |
| template<typename LeftVector , typename RightVector > | |
| LIBMESH_DEVICE_INLINE bool | vector_equal_impl (const LeftVector &left, const RightVector &right) |
| using libMesh::Kokkos::detail::remove_cvref_t = typedef typename std::remove_cv<typename std::remove_reference<T>::type>::type |
Strips reference and const/volatile qualifiers from T, turning e.g.
const Real& into plain Real. Equivalent of C++20's std::remove_cvref_t, hand-rolled while we only require C++17 support.
Definition at line 70 of file kokkos_linalg_base.h.
| using libMesh::Kokkos::detail::tensor_view_value_t = typedef remove_cvref_t<decltype(std::declval<ViewType &>()(0, 0, 0))> |
The plain component type stored by a tensor view, recovered from an (entry, row, column) indexing expression the same way vector_view_value_t is from its (entry, component) expression.
Definition at line 91 of file kokkos_linalg_base.h.
| using libMesh::Kokkos::detail::vector_view_value_t = typedef remove_cvref_t<decltype(std::declval<ViewType &>()(0, 0))> |
The plain component type stored by a vector view.
Indexing a view at an (entry, component) pair yields a reference into the view's memory (e.g. Real& , or const Real& for a view of const data), so this strips the reference and any cv-qualifiers to recover the value type itself - the type needed to declare accumulators, make zeros like value_type(0), or materialize owning results.
Definition at line 82 of file kokkos_linalg_base.h.
| LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::assign_tensor_components | ( | LeftTensor & | left, |
| const RightTensor & | right | ||
| ) |
Componentwise copy: left = right.
Definition at line 351 of file kokkos_tensor_ops.h.
References row().
Referenced by libMesh::Kokkos::tensor_ref< ViewType >::assign().
| LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::assign_vector_components | ( | LeftVector & | left, |
| const RightVector & | right | ||
| ) |
Componentwise copy: left = right.
Definition at line 87 of file kokkos_vector_ops.h.
Referenced by libMesh::Kokkos::vector_ref< ViewType >::assign().
| LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::column | ( | const TensorLike & | T_in, |
| const unsigned int | col_index | ||
| ) |
col_index of T_in as an owning ResultVector. Definition at line 289 of file kokkos_tensor_ops.h.
References libMesh::out.
| LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::fill_tensor_components | ( | TensorLike & | T_in, |
| const Scalar & | value | ||
| ) |
Sets every component of T_in to value.
Definition at line 363 of file kokkos_tensor_ops.h.
Referenced by libMesh::Kokkos::tensor_ref< ViewType >::zero().
| LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::fill_vector_components | ( | VectorLike & | v, |
| const Scalar & | value | ||
| ) |
Sets every component of v to value.
Definition at line 98 of file kokkos_vector_ops.h.
References value.
Referenced by libMesh::Kokkos::vector_ref< ViewType >::zero().
| LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::inverse | ( | const TensorLike & | T_in, |
| const unsigned int | dim = LIBMESH_DIM |
||
| ) |
dim x dim block of T_in as an owning ResultTensor, computed from the closed-form adjugate for dim <= 3. Components outside the leading block are zero. Definition at line 170 of file kokkos_tensor_ops.h.
References libMesh::Kokkos::det(), dim, leading_determinant(), libMesh::libmesh_ignore(), and libMesh::out.
| LIBMESH_DEVICE_INLINE TensorLike::value_type libMesh::Kokkos::detail::leading_determinant | ( | const TensorLike & | T_in, |
| const unsigned int | dim = LIBMESH_DIM |
||
| ) |
dim x dim block of T_in, expanded in closed form for dim <= 3. A 0x0 determinant is 1 by convention. Definition at line 109 of file kokkos_tensor_ops.h.
References dim, and libMesh::libmesh_ignore().
Referenced by libMesh::Kokkos::tensor_ref< ViewType >::det(), and inverse().
| LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::multiply_tensor_vector | ( | const TensorLike & | T_in, |
| const VectorLike & | v | ||
| ) |
ResultVector. Definition at line 308 of file kokkos_tensor_ops.h.
References libMesh::out, row(), and value.
| LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::multiply_tensors | ( | const LeftTensor & | left, |
| const RightTensor & | right | ||
| ) |
ResultTensor. Definition at line 250 of file kokkos_tensor_ops.h.
References libMesh::out, row(), and value.
| LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::multiply_vector_tensor | ( | const VectorLike & | v, |
| const TensorLike & | T_in | ||
| ) |
ResultVector. Definition at line 330 of file kokkos_tensor_ops.h.
References libMesh::out, row(), and value.
| LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::outer_product | ( | const LeftVector & | left, |
| const RightVector & | right | ||
| ) |
ResultTensor, conjugating the right operand as the host-side outer_product() free function in type_tensor.h does. Definition at line 151 of file kokkos_tensor_ops.h.
References libMesh::libmesh_conj(), libMesh::out, and row().
| LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::row | ( | const TensorLike & | T_in, |
| const unsigned int | row_index | ||
| ) |
row_index of T_in as an owning ResultVector. Definition at line 272 of file kokkos_tensor_ops.h.
References libMesh::out.
Referenced by assign_tensor_components(), fill_tensor_components(), multiply_tensor_vector(), multiply_tensors(), multiply_vector_tensor(), outer_product(), tensor_contract(), tensor_equal_impl(), transform_tensor_components(), transpose(), and update_tensor_components().
| LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::detail::tensor_contract | ( | const LeftTensor & | left, |
| const RightTensor & | right | ||
| ) |
left with right. Definition at line 432 of file kokkos_tensor_ops.h.
References row().
Referenced by libMesh::Kokkos::contract().
| LIBMESH_DEVICE_INLINE bool libMesh::Kokkos::detail::tensor_equal_impl | ( | const LeftTensor & | left, |
| const RightTensor & | right | ||
| ) |
true if left and right agree exactly in every component, false otherwise. Definition at line 414 of file kokkos_tensor_ops.h.
References row().
Referenced by libMesh::Kokkos::operator==().
| LIBMESH_DEVICE_INLINE auto libMesh::Kokkos::detail::tensor_trace | ( | const TensorLike & | T_in | ) |
T_in. Definition at line 454 of file kokkos_tensor_ops.h.
Referenced by libMesh::Kokkos::tensor_ref< ViewType >::tr().
| 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)).
out and in may alias, as they do in the compound assignment operators below.
Definition at line 388 of file kokkos_tensor_ops.h.
References libMesh::out, and row().
Referenced by libMesh::Kokkos::operator*=(), libMesh::Kokkos::operator/=(), and transformed_tensor().
| LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::transform_vector_components | ( | OutputVector & | out, |
| const InputVector & | in, | ||
| const TransformOp & | op | ||
| ) |
Componentwise transform: out(i) = op(in(i)).
out and in may alias, as they do in the compound assignment operators below.
Definition at line 121 of file kokkos_vector_ops.h.
References libMesh::out.
Referenced by libMesh::Kokkos::operator*=(), libMesh::Kokkos::operator/=(), and transformed_vector().
| LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::transformed_tensor | ( | const TensorLike & | T_in, |
| const TransformOp & | op | ||
| ) |
ResultTensor with components op(T_in(i,j)). Definition at line 400 of file kokkos_tensor_ops.h.
References libMesh::out, and transform_tensor_components().
| LIBMESH_DEVICE_INLINE ResultVector libMesh::Kokkos::detail::transformed_vector | ( | const VectorLike & | v, |
| const TransformOp & | op | ||
| ) |
ResultVector with components op(v(i)). Definition at line 132 of file kokkos_vector_ops.h.
References libMesh::out, and transform_vector_components().
| LIBMESH_DEVICE_INLINE ResultTensor libMesh::Kokkos::detail::transpose | ( | const TensorLike & | T_in | ) |
T_in as an owning ResultTensor. Definition at line 230 of file kokkos_tensor_ops.h.
References libMesh::out, and row().
| 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.
Definition at line 375 of file kokkos_tensor_ops.h.
References row().
Referenced by libMesh::Kokkos::tensor_ref< ViewType >::add_scaled(), libMesh::Kokkos::operator+=(), libMesh::Kokkos::operator-=(), and libMesh::Kokkos::tensor_ref< ViewType >::subtract_scaled().
| LIBMESH_DEVICE_INLINE void libMesh::Kokkos::detail::update_vector_components | ( | LeftVector & | left, |
| const RightVector & | right, | ||
| const Scalar & | factor | ||
| ) |
Componentwise axpy-style update: left += factor * right.
Definition at line 109 of file kokkos_vector_ops.h.
Referenced by libMesh::Kokkos::vector_ref< ViewType >::add_scaled(), libMesh::Kokkos::operator+=(), libMesh::Kokkos::operator-=(), and libMesh::Kokkos::vector_ref< ViewType >::subtract_scaled().
| LIBMESH_DEVICE_INLINE bool libMesh::Kokkos::detail::vector_equal_impl | ( | const LeftVector & | left, |
| const RightVector & | right | ||
| ) |
true if left and right agree exactly in every component, false otherwise. Definition at line 146 of file kokkos_vector_ops.h.
Referenced by libMesh::Kokkos::operator==().