30 static_assert(always_false<T>,
"Specialize SerialAccess for this type.");
34#define SERIAL_ACCESS_SCALAR(type) \
36 struct SerialAccess<type> \
38 static type * data(type & obj) { return &obj; } \
39 static constexpr std::size_t size(type &) { return 1u; } \
40 static constexpr std::size_t size() { return 1u; } \
49#define SERIAL_ACCESS_CONST_SIZE(type, dataptr, sizeval) \
50 template <typename T> \
51 struct SerialAccess<type<T>> \
53 static auto * data(type<T> & obj) { return dataptr; } \
54 static constexpr std::size_t size(type<T> &) { return sizeval; } \
55 static constexpr std::size_t size() { return sizeval; } \
68#define SERIAL_ACCESS_DYNAMIC_SIZE(type, dataptr, sizeval) \
69 template <typename T> \
70 struct SerialAccess<type<T>> \
72 static auto * data(type<T> & obj) { return dataptr; } \
73 static constexpr std::size_t size(type<T> & obj) { return sizeval; } \
105 typedef typename std::conditional<std::is_const_v<T>,
const R,
R>::type
V;
157template <
typename... Ts>
162 static constexpr std::size_t
size =
sizeof...(Ts);
166template <
template <
typename,
int>
class L,
int I,
typename T,
typename... Ts,
typename... As>
170 L<T, I>::apply(args...);
171 if constexpr (
sizeof...(Ts) > 0)
176template <
template <
typename,
int>
class L,
typename... Ts,
typename... As>
DualNumber< Real, DNDerivativeType, true > ADReal
bool operator==(const iterator &j) const
const iterator & operator++()
bool operator!=(const iterator &j) const
SerialAccessRange(T &obj)
std::conditional< std::is_const_v< T >, constR, R >::type V
Value type with the correct constness.
SerialAccessValueTypeHelper< typenamestd::remove_const< T >::type >::value_type R
Value type of the components of T.
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.
RankTwoTensorTempl is designed to handle the Stress or Strain Tensor for a fully anisotropic material...
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
SERIAL_ACCESS_DYNAMIC_SIZE(DenseVector, &obj(0u), obj.size())
void typeLoopInternal(TypeList< T, Ts... >, As... args)
Type loop.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
void typeLoop(TypeList< Ts... >, As... args)
Type loop.
SERIAL_ACCESS_SCALAR(Real)
SerialAccessRange< T > serialAccess(T &obj)
SERIAL_ACCESS_CONST_SIZE(libMesh::VectorValue, &obj(0u), Moose::dim)
Value type helper (necessary for any type that does not have a value_type member or where value_type ...
Serial access requires object data to be stored contiguously.
Helper structure to hold a list of types.
static constexpr std::size_t size
std::tuple< Ts... > Tuple
std::tuple< Ts *... > PointerTuple