11 Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 9, 1>
18 for (
int k = 0;
k < gradi.rows(); ++
k)
20 res += gradi.row(
k).dot(gradj.row(
k)) * data.
da(
k);
23 for (
int k = 0;
k < gradi.rows(); ++
k)
29 return Eigen::Matrix<double, 1, 1>::Constant(res);
34 Eigen::Matrix<double, 1, 1> result;
35 assert(pt.size() == 1);
36 Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1>
val(
size());
37 for (
int d = 0; d <
size(); ++d)
40 const double tmp =
k_(
val, 0, 0);
41 result(0) = pt(0).getHessian().trace() + tmp * tmp * pt(0).getValue();
52 Eigen::Matrix<AutodiffScalarGrad, Eigen::Dynamic, 1, 0, 3, 1> res(1);
54 Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1>
val(
size());
56 const double tmp =
k_(
val, 0, 0);
59 res(0) = -0.25 * utils::bessy0(tmp * r);
61 res(0) = 0.25 * cos(tmp * r) / (M_PI * r);
70 std::map<std::string, ParamFunc> res;
72 return this->
k_(p, t, e);
std::vector< AssemblyValues > basis_values
void add_multimaterial(const int index, const json ¶ms, const std::string &unit_type)
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
VectorNd compute_rhs(const AutodiffHessianPt &pt) const override
GenericMatParam k() const
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 9, 1 > assemble(const LinearAssemblerData &data) const override
local assembly function that defines the bilinear form (LHS) computes and returns a single local stif...
Eigen::Matrix< AutodiffScalarGrad, Eigen::Dynamic, 1, 0, 3, 1 > kernel(const int dim, const AutodiffGradPt &rvect, const AutodiffScalarGrad &r) const override
std::map< std::string, ParamFunc > parameters() const override
const ElementAssemblyValues & vals
stores the evaluation for that element
const QuadratureVector & da
contains both the quadrature weight and the change of metric in the integral
const int i
first local order
const int j
second local order
Eigen::Matrix< AutodiffScalarHessian, Eigen::Dynamic, 1, 0, 3, 1 > AutodiffHessianPt
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > VectorNd
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd
Eigen::Matrix< AutodiffScalarGrad, Eigen::Dynamic, 1, 0, 3, 1 > AutodiffGradPt
Automatic differentiation scalar with first-order derivatives.