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 RN,
class CN,
class Mat>
38 void getElementMatrix(CG
const& contextGeo, RN
const& rowNode, CN
const& colNode, Mat& elementMatrix)
40 static_assert(RN::isLeaf && CN::isPower,
41 "RN must be Leaf-Node and CN must be a Power-Node.");
43 static const std::size_t CHILDREN = CN::CHILDREN;
44 static_assert( static_size_v<typename GridFct::Range> == CHILDREN,
"" );
46 auto const& quad = this->getQuadratureRule(contextGeo.type(), rowNode, colNode);
47 std::size_t rowSize = rowNode.size();
48 std::size_t colSize = colNode.child(0).size();
50 for (
auto const& qp : quad) {
52 auto&& local = contextGeo.local(qp.position());
55 const auto factor = contextGeo.integrationElement(qp.position()) * qp.weight();
56 const auto b = Super::coefficient(local);
58 auto const& rowShapeValues = rowNode.localBasisValuesAt(local);
59 auto const& colShapeValues = colNode.child(0).localBasisValuesAt(local);
61 for (std::size_t i = 0; i < rowSize; ++i) {
62 const auto local_i = rowNode.localIndex(i);
64 for (std::size_t j = 0; j < colSize; ++j) {
65 const auto value = b * (factor * rowShapeValues[i] * colShapeValues[j]);
67 for (std::size_t k = 0; k < CHILDREN; ++k) {
68 const auto local_kj = colNode.child(k).localIndex(j);
69 elementMatrix[local_i][local_kj] += 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: ZeroOrderTestTrialvec.hpp:17
The main implementation of an CRTP-base class for operators using a grid-function coefficient to be u...
Definition: GridFunctionOperator.hpp:39