13#include "libmesh/int_range.h"
14#include "metaphysicl/raw_type.h"
15#include "metaphysicl/metaphysicl_version.h"
21template <
typename V,
typename D,
bool asd>
29template <
typename V,
typename D,
bool asd>
37template <
typename V,
typename D,
bool asd>
41#if METAPHYSICL_MAJOR_VERSION < 2
44 return MetaPhysicL::sqrt(a);
48template <
typename V,
typename D,
bool asd>
52#if METAPHYSICL_MAJOR_VERSION < 2
55 return MetaPhysicL::abs(a);
63#include "libmesh/ignore_warnings.h"
65#include "libmesh/restore_warnings.h"
71template <
typename T,
int M,
int N,
int O,
int M2,
int N2>
72struct RawType<
Eigen::Matrix<T, M, N, O, M2, N2>>
74 typedef Eigen::Matrix<typename RawType<T>::value_type, M, N, O, M2, N2>
value_type;
78 return value_type::NullaryExpr([&in](Eigen::Index i) {
return raw_value(in(i)); });
83template <
typename T,
int Options,
int MaxSize>
84struct RawType<
Eigen::Matrix<T, -1, 1, Options, MaxSize, 1>>
86 typedef Eigen::Matrix<typename RawType<T>::value_type, -1, 1, Options, MaxSize, 1>
value_type;
109template <
typename V,
typename D,
bool asd>
122 RequireInitialization = 1,
129template <
typename BinaryOp,
typename V,
typename D,
bool asd>
130struct ScalarBinaryOpTraits<Real,
MetaPhysicL::DualNumber<V, D, asd>, BinaryOp>
134template <
typename BinaryOp,
typename V,
typename D,
bool asd>
135struct ScalarBinaryOpTraits<
MetaPhysicL::DualNumber<V, D, asd>, Real, BinaryOp>
146template <
typename T,
int M,
int N,
int O,
int M2,
int N2>
149 typedef typename Eigen::Matrix<typename ADType<T>::type, M, N, O, M2, N2>
type;
157EIGEN_DEVICE_FUNC
inline long double
164EIGEN_DEVICE_FUNC
inline double
171EIGEN_DEVICE_FUNC
inline long
178EIGEN_DEVICE_FUNC
inline int
198 Vectorizable =
false,
202 NumberOfRegisters = 1,
215template <
typename Index,
typename DataMapper,
bool ConjugateLhs,
bool ConjugateRhs>
216struct gebp_kernel<
ADReal,
ADReal, Index, DataMapper, 1, 1, ConjugateLhs, ConjugateRhs>
231 if (rows == 0 || cols == 0 || depth == 0)
241 for (Index i = 0; i < rows; ++i)
242 for (Index j = 0; j < cols; ++j)
244 const ADReal * A = blockA + i * strideA + offsetA;
245 const ADReal *
B = blockB + j * strideB + offsetB;
248 for (Index k = 0; k < depth; k++)
250 res(i, j) += acc1 * alpha;
DualNumber< Real, DNDerivativeType, true > ADReal
ResScalar LhsPacket4Packing
bool isinf_impl(const MetaPhysicL::DualNumber< V, D, asd > &a)
MetaPhysicL::DualNumber< V, D, asd > sqrt(const MetaPhysicL::DualNumber< V, D, asd > &a)
EIGEN_DEVICE_FUNC int cast< ADReal, int >(const ADReal &x)
EIGEN_DEVICE_FUNC double cast< ADReal, double >(const ADReal &x)
bool isnan_impl(const MetaPhysicL::DualNumber< V, D, asd > &a)
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
EIGEN_DEVICE_FUNC long double cast< ADReal, long double >(const ADReal &x)
EIGEN_DEVICE_FUNC long cast< ADReal, long >(const ADReal &x)
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
IntRange< T > make_range(T beg, T end)
EIGEN_DONT_INLINE void operator()(const DataMapper &res, const ADReal *blockA, const ADReal *blockB, Index rows, Index depth, Index cols, const ADReal &alpha, Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0)
Eigen::Matrix< typename ADType< T >::type, M, N, O, M2, N2 > type