5 #include <amdis/GridFunctionOperator.hpp> 6 #include <amdis/common/StaticSize.hpp> 22 template <
class LC,
class Gr
idFct>
30 static_assert( static_size_v<typename GridFct::Range> == dow,
"Expression must be of vector type." );
37 template <
class CG,
class Node,
class Vec>
38 void getElementVector(CG
const& contextGeo, Node
const& node, Vec& elementVector)
40 static_assert(Node::isPower,
41 "Operator can be applied to Power-Nodes only.");
43 static const std::size_t CHILDREN = Node::CHILDREN;
45 auto const& quad = this->getQuadratureRule(contextGeo.type(), node);
46 std::size_t size = node.child(0).size();
48 for (
auto const& qp : quad) {
50 auto&& local = contextGeo.local(qp.position());
53 const auto factor = contextGeo.integrationElement(qp.position()) * qp.weight();
54 const auto exprValue = Super::coefficient(local);
56 auto const& shapeValues = node.child(0).localBasisValuesAt(local);
58 for (std::size_t i = 0; i < size; ++i) {
59 const auto value = exprValue * (factor * shapeValues[i]);
60 for (std::size_t k = 0; k < CHILDREN; ++k) {
61 const auto local_ki = node.child(k).localIndex(i);
62 elementVector[local_ki] += at(value,k);
The base-template for GridFunctionOperators.
Definition: GridFunctionOperator.hpp:242
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
Wrapper class for element and geometry.
Definition: ContextGeometry.hpp:43
Definition: ZeroOrderTestvec.hpp:17
The main implementation of an CRTP-base class for operators using a grid-function coefficient to be u...
Definition: GridFunctionOperator.hpp:39