5 #include <amdis/GridFunctionOperator.hpp> 6 #include <amdis/Output.hpp> 7 #include <amdis/common/StaticSize.hpp> 8 #include <amdis/utility/LocalToGlobalAdapter.hpp> 32 template <
class LC,
class Gr
idFct>
39 static_assert( static_size_v<typename GridFct::Range> == 1,
"Expression must be of scalar type." );
47 template <
class CG,
class RN,
class CN,
class Mat>
48 void getElementMatrix(CG
const& contextGeo, RN
const& rowNode, CN
const& colNode, Mat& elementMatrix)
50 static_assert(RN::isLeaf && CN::isLeaf,
51 "Operator can be applied to Leaf-Nodes only.");
53 auto const& quad = this->getQuadratureRule(contextGeo.type(), rowNode, colNode);
55 std::size_t rowSize = rowNode.size();
56 std::size_t colSize = colNode.size();
59 for (
auto const& qp : quad) {
61 decltype(
auto) local = contextGeo.local(qp.position());
64 auto factor = contextGeo.integrationElement(qp.position()) * qp.weight();
65 factor *= Super::coefficient(local);
68 auto const& shapeValues = rowNode.localBasisValuesAt(local);
71 auto const& colPartial = colLocalBasis.partialsAt(local, comp_);
73 for (std::size_t j = 0; j < colSize; ++j) {
74 const auto local_j = colNode.localIndex(j);
75 const auto value = factor * colPartial[j];
76 for (std::size_t i = 0; i < rowSize; ++i) {
77 const auto local_i = rowNode.localIndex(i);
78 elementMatrix[local_i][local_j] += value * shapeValues[i];
90 template <
class Expr,
class... QuadratureArgs>
auto makeOperator(Tag tag, Expr &&expr, QuadratureArgs &&... args)
Store tag and expression into a PreGridFunctionOperator to create a GridFunctionOperator.
Definition: GridFunctionOperator.hpp:220
Convert a simple (scalar) local basis into a global basis.
Definition: LocalToGlobalAdapter.hpp:64
Definition: FirstOrderTestPartialTrial.hpp:24
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
Definition: FirstOrderTestPartialTrial.hpp:19
auto fot(Expr &&expr, tag::grad_test, QuadratureArgs &&... args)
Create a first-order term with derivative on trial-function.
Definition: FirstOrderGradTestTrial.hpp:40
The main implementation of an CRTP-base class for operators using a grid-function coefficient to be u...
Definition: GridFunctionOperator.hpp:39