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 assert(colNode.degree() == CG::dow);
38 std::size_t rowSize = rowNode.size();
39 std::size_t colSize = colNode.child(0).size();
41 for (
auto const& qp : quad) {
43 auto&& local = contextGeo.coordinateInElement(qp.position());
46 const auto factor = contextGeo.integrationElement(qp.position()) * qp.weight();
47 const auto b = localFct(local);
49 auto const& rowShapeValues = rowNode.localBasisValuesAt(local);
50 auto const& colShapeValues = colNode.child(0).localBasisValuesAt(local);
52 for (std::size_t i = 0; i < rowSize; ++i) {
53 const auto local_i = rowNode.localIndex(i);
55 for (std::size_t j = 0; j < colSize; ++j) {
56 const auto value = b * (factor * rowShapeValues[i] * colShapeValues[j]);
58 for (std::size_t k = 0; k < colNode.degree(); ++k) {
59 const auto local_kj = colNode.child(k).localIndex(j);
60 elementMatrix[local_i][local_kj] += at(value,k);
71 static constexpr int degree = 0;
zero-order operator
Definition: ZeroOrderTestTrialvec.hpp:23
Registry to specify a tag for each implementation type.
Definition: GridFunctionOperator.hpp:216
Definition: ZeroOrderTestTrialvec.hpp:17