5 #include <amdis/GridFunctionOperator.hpp> 6 #include <amdis/common/StaticSize.hpp> 27 template <
class CG,
class RN,
class CN,
class Quad,
class LocalFct,
class Mat>
28 void assemble(CG
const& contextGeo, RN
const& rowNode, CN
const& colNode,
29 Quad
const& quad, LocalFct
const& localFct, Mat& elementMatrix)
const 31 static_assert(static_size_v<typename LocalFct::Range> == CG::dow,
32 "Expression must be of vector type." );
33 static_assert(RN::isLeaf && CN::isPower,
34 "RN must be Leaf-Node and CN must be a Power-Node.");
36 static const std::size_t CHILDREN = CN::CHILDREN;
37 static_assert(CHILDREN == CG::dow);
39 std::size_t rowSize = rowNode.size();
40 std::size_t colSize = colNode.child(0).size();
42 for (
auto const& qp : quad) {
44 auto&& local = contextGeo.local(qp.position());
47 const auto factor = contextGeo.integrationElement(qp.position()) * qp.weight();
48 const auto b = localFct(local);
50 auto const& rowShapeValues = rowNode.localBasisValuesAt(local);
51 auto const& colShapeValues = colNode.child(0).localBasisValuesAt(local);
53 for (std::size_t i = 0; i < rowSize; ++i) {
54 const auto local_i = rowNode.localIndex(i);
56 for (std::size_t j = 0; j < colSize; ++j) {
57 const auto value = b * (factor * rowShapeValues[i] * colShapeValues[j]);
59 for (std::size_t k = 0; k < CHILDREN; ++k) {
60 const auto local_kj = colNode.child(k).localIndex(j);
61 elementMatrix[local_i][local_kj] += at(value,k);
72 static constexpr
int degree = 0;
zero-order operator
Definition: ZeroOrderTestTrialvec.hpp:22
Definition: AdaptBase.hpp:6
Definition: ZeroOrderTestTrialvec.hpp:17
Registry to specify a tag for each implementation type.
Definition: GridFunctionOperator.hpp:204