5#include <amdis/GridFunctionOperator.hpp>
6#include <amdis/common/StaticSize.hpp>
27 template <
class CG,
class Node,
class Quad,
class LocalFct,
class Vec>
28 void assemble(CG
const& contextGeo, Node
const& node, Quad
const& quad,
29 LocalFct
const& localFct, Vec& elementVector)
const
31 static_assert(static_size_v<typename LocalFct::Range> == CG::dow,
32 "Expression must be of vector type." );
33 static_assert(Node::isPower,
34 "Operator can be applied to Power-Nodes only.");
36 assert(node.degree() == CG::dow);
38 std::size_t size = node.child(0).size();
40 for (
auto const& qp : quad) {
42 auto&& local = contextGeo.coordinateInElement(qp.position());
45 const auto factor = contextGeo.integrationElement(qp.position()) * qp.weight();
46 const auto exprValue = localFct(local);
48 auto const& shapeValues = node.child(0).localBasisValuesAt(local);
50 for (std::size_t i = 0; i < size; ++i) {
51 const auto value = exprValue * (factor * shapeValues[i]);
52 for (std::size_t k = 0; k < node.degree(); ++k) {
53 const auto local_ki = node.child(k).localIndex(i);
54 elementVector[local_ki] += at(value,k);
64 static constexpr int degree = 0;
zero-order vector-operator
Definition: ZeroOrderTestvec.hpp:23
Registry to specify a tag for each implementation type.
Definition: GridFunctionOperator.hpp:216
Definition: ZeroOrderTestvec.hpp:17