5#include <amdis/GridFunctionOperator.hpp>
6#include <amdis/common/StaticSize.hpp>
26 template <
class CG,
class Node,
class Quad,
class LocalFct,
class Vec>
27 void assemble(CG
const& contextGeo, Node
const& node, Quad
const& quad,
28 LocalFct
const& localFct, Vec& elementVector)
const
30 static_assert(static_size_v<typename LocalFct::Range> == 1,
31 "Expression must be of scalar type." );
32 static_assert(Node::isLeaf,
33 "Operator can be applied to Leaf-Nodes only");
35 std::size_t size = node.size();
37 for (
auto const& qp : quad) {
39 auto&& local = contextGeo.coordinateInElement(qp.position());
42 auto factor = contextGeo.integrationElement(qp.position()) * qp.weight();
43 factor *= localFct(local);
45 auto const& shapeValues = node.localBasisValuesAt(local);
46 for (std::size_t i = 0; i < size; ++i) {
47 const auto local_i = node.localIndex(i);
48 elementVector[local_i] += factor * shapeValues[i];
57 static constexpr int degree = 0;
zero-order vector-operator
Definition: ZeroOrderTest.hpp:22
Registry to specify a tag for each implementation type.
Definition: GridFunctionOperator.hpp:216
Definition: ZeroOrderTest.hpp:17