FirstOrderPartialTestTrial.hpp 1.42 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once

#include <type_traits>

#include <dune/amdis/operators/FirstOrderTestPartialTrial.hpp>

namespace AMDiS
{
  namespace tag
  {
    struct partialtest_trial
    {
      int comp;
    };
  }


  // first-order operator <d_i(psi), c*phi>
  template <class Expr>
  class ExpressionOperator<tag::partialtest_trial, Expr>
      : public ExpressionOperator<tag::test_partialtrial, Expr>
  {
    using Transposed = ExpressionOperator<tag::test_partialtrial, Expr>;

  public:
    ExpressionOperator(tag::partialtest_trial tag, Expr const& expr)
      : Transposed(tag::test_partialtrial{tag.comp}, expr)
    {}

    template <class Context, class QuadratureRule,
              class ElementMatrix, class RowNode, class ColNode, bool sameFE, bool sameNode>
    void calculateElementMatrix(Context const& context,
                                QuadratureRule const& quad,
                                ElementMatrix& elementMatrix,
                                RowNode const& rowNode,
                                ColNode const& colNode,
                                std::integral_constant<bool, sameFE> flagSameFE,
                                std::integral_constant<bool, sameNode> flagSameNode)
    {
40
      auto elementMatrixTransposed = trans(elementMatrix);
41
      Transposed::calculateElementMatrix(
42
        context, quad, elementMatrixTransposed, colNode, rowNode, flagSameFE, flagSameNode);
43
44
45
46
    }
  };

} // end namespace AMDiS