8#ifndef model_TrialGrad_H_
9#define model_TrialGrad_H_
37 constexpr static int rows=TrialFunctionType::dim*T::rows;
38 constexpr static int cols=T::cols;
42 const std::shared_ptr<T>
op;
44 explicit TrialGrad(std::shared_ptr<T> exp) :
op(std::move(exp))
48 throw std::invalid_argument(
"Null FEM expression operand.");
55 return op->sfmGrad(ele,bary);
65 template<
class T, std::enable_if_t<std::is_base_of_v<TrialExpressionBase<T>,T>,
int> = 0>
66 auto grad(
const std::shared_ptr<T>&
x)
68 return std::make_shared<TrialGrad<T>>(
x);
TrialGrad(std::shared_ptr< T > exp)
const auto & field() const
static constexpr int cols
static constexpr int dofPerElement
TypeTraits< TrialFunctionType >::ElementType ElementType
Eigen::Matrix< double, rows, 1 > EvalMatrixType
MobileTrialType::TrialFunctionType TrialFunctionType
ShapeFunctionMatrixType sfm(const ElementType &ele, const BaryType &bary) const
TypeTraits< TrialFunctionType >::BaryType BaryType
static constexpr int rows
const std::shared_ptr< MobileTrialType > op
Eigen::Matrix< double, rows, dofPerElement > ShapeFunctionMatrixType
auto grad(const std::shared_ptr< T > &x)
TrialExpressionBase()=default