42 template <
class CG,
class RN,
class CN,
class Quad,
class LocalFct,
class Mat>
43 void assemble(CG
const& contextGeo, RN
const& rowNode, CN
const& colNode,
44 Quad
const& quad, LocalFct
const& localFct, Mat& elementMatrix)
const
46 static_assert(static_size_v<typename LocalFct::Range> == 1,
47 "Expression must be of scalar type.");
48 static_assert(Dune::TypeTree::Concept::LeafTreeNode<RN> && Dune::TypeTree::Concept::LeafTreeNode<CN>,
49 "Operator can be applied to Leaf-Nodes only.");
51 std::size_t rowSize = rowNode.size();
52 std::size_t colSize = colNode.size();
55 for (
auto const& qp : quad) {
57 decltype(
auto) local = contextGeo.coordinateInElement(qp.position());
60 auto factor = contextGeo.integrationElement(qp.position()) * qp.weight();
61 factor *= localFct(local);
64 auto const& shapeValues = rowNode.localBasisValuesAt(local);
67 auto const& colPartial = colLocalBasis.
partialsAt(local, comp_);
69 for (std::size_t j = 0; j < colSize; ++j) {
70 const auto local_j = colNode.localIndex(j);
71 const auto value = factor * colPartial[j];
72 for (std::size_t i = 0; i < rowSize; ++i) {
73 const auto local_i = rowNode.localIndex(i);
74 elementMatrix[local_i][local_j] += value * shapeValues[i];
auto fot(Expr &&expr, tag::grad_test, int quadOrder=-1)
Create a first-order term with derivative on trial-function.
Definition FirstOrderGradTestTrial.hpp:33
auto makeOperator(Tag const &tag, Expr &&expr, int gridFctDeg=-1)
Definition GridFunctionOperator.hpp:235