18#ifndef LIBMESH_KOKKOS_STORAGE_H
19#define LIBMESH_KOKKOS_STORAGE_H
36#include "libmesh/kokkos_linalg_base.h"
38#include "libmesh/libmesh_common.h"
39#include "libmesh/libmesh_device.h"
40#include "libmesh/type_tensor.h"
41#include "libmesh/type_vector.h"
55template <
typename VectorType,
typename ViewType>
57VectorType
load_vector(
const ViewType & view,
const unsigned int i)
66template <
typename ViewType,
typename VectorType>
68void store_vector(
const ViewType & view,
const unsigned int i,
const VectorType & v)
72 for (
unsigned int d = 0; d < LIBMESH_DIM; ++d)
85template <
typename TensorType,
typename ViewType>
87TensorType
load_tensor(
const ViewType & view,
const unsigned int i)
96template <
typename ViewType,
typename TensorType>
98void store_tensor(
const ViewType & view,
const unsigned int i,
const TensorType & T)
102 for (
unsigned int row = 0;
row < LIBMESH_DIM; ++
row)
103 for (
unsigned int col = 0; col < LIBMESH_DIM; ++col)
LIBMESH_DEVICE_INLINE vector_ref< typename std::remove_reference< ViewType >::type > make_vector_ref(ViewType &&view, const unsigned int index)
LIBMESH_DEVICE_INLINE void store_vector(const ViewType &view, const unsigned int i, const VectorType &v)
Copies the components of the vector v into entry i of the vector view view, overwriting whatever that...
LIBMESH_DEVICE_INLINE VectorType load_vector(const ViewType &view, const unsigned int i)
LIBMESH_DEVICE_INLINE auto 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 > >
LIBMESH_DEVICE_INLINE tensor_ref< typename std::remove_reference< ViewType >::type > make_tensor_ref(ViewType &&view, const unsigned int index)
LIBMESH_DEVICE_INLINE TensorType load_tensor(const ViewType &view, const unsigned int i)
LIBMESH_DEVICE_INLINE void store_tensor(const ViewType &view, const unsigned int i, const TensorType &T)
Copies the components of the tensor T into entry i of the tensor view view, overwriting whatever that...