AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
GridFunctionOperatorTransposed.hpp
1#pragma once
2
3#include <amdis/common/Transposed.hpp>
4
5namespace AMDiS
6{
7 template <class Transposed>
8 class GridFunctionLocalOperatorTransposed;
9
12 template <class Transposed>
14 {
15 public:
16 GridFunctionOperatorTransposed(Transposed const& transposedOp)
17 : transposedOp_(transposedOp)
18 {}
19
20 template <class GridView>
21 void update(GridView const& gv)
22 {
23 transposedOp_.update(gv);
24 }
25
26 friend auto localOperator(GridFunctionOperatorTransposed const& op)
27 {
28 return GridFunctionLocalOperatorTransposed{localOperator(op.transposedOp_)};
29 }
30
31 private:
32 Transposed transposedOp_;
33 };
34
35
36 template <class Transposed>
38 {
39 public:
40 GridFunctionLocalOperatorTransposed(Transposed const& transposedLop)
41 : transposedLop_(transposedLop)
42 {}
43
45 template <class Element>
46 void bind(Element const& element)
47 {
48 transposedLop_.bind(element);
49 }
50
52 void unbind()
53 {
54 transposedLop_.unbind();
55 }
56
58
64 template <class CG, class RN, class CN, class Mat>
65 void assemble(CG const& contextGeometry, RN const& rowNode, CN const& colNode,
66 Mat& elementMatrix) const
67 {
68 auto elementMatrixT = transposed(elementMatrix);
69 transposedLop_.assemble(contextGeometry, colNode, rowNode, elementMatrixT);
70 }
71
72 private:
73 Transposed transposedLop_;
74 };
75
76} // end namespace AMDiS
Definition: GridFunctionOperatorTransposed.hpp:38
void bind(Element const &element)
Redirects the bind call top the transposed operator.
Definition: GridFunctionOperatorTransposed.hpp:46
void assemble(CG const &contextGeometry, RN const &rowNode, CN const &colNode, Mat &elementMatrix) const
Apply the assembling to the transposed elementMatrix with interchanged row-/colNode.
Definition: GridFunctionOperatorTransposed.hpp:65
void unbind()
Redirects the unbind call top the transposed operator.
Definition: GridFunctionOperatorTransposed.hpp:52
The transposed operator, implemented in terms of its transposed by calling assemble with inverted arg...
Definition: GridFunctionOperatorTransposed.hpp:14