FirstOrderPartialTestTrial.hpp 1.64 KB
Newer Older
1
2
3
4
#pragma once

#include <type_traits>

5
#include <dune/amdis/assembler/FirstOrderTestPartialTrial.hpp>
6
7
8

namespace AMDiS
{
9
10
11
12
13
  /**
   * \addtogroup operators
   * @{
   **/

14
15
16
17
  namespace tag
  {
    struct partialtest_trial
    {
18
      std::size_t comp;
19
20
21
22
    };
  }


23
24
25
26
  /// first-order operator \f$ \langle\partial_i\psi, c\,\phi\rangle \f$
  template <class GridFct, class QuadCreator>
  class GridFunctionOperator<tag::partialtest_trial, GridFct, QuadCreator>
      : public GridFunctionOperator<tag::test_partialtrial, GridFct, QuadCreator>
27
  {
28
    using Transposed = GridFunctionOperator<tag::test_partialtrial, GridFct, QuadCreator>;
29
30

  public:
31
32
    GridFunctionOperator(tag::partialtest_trial tag, GridFct const& expr, QuadCreator const& quadCreator)
      : Transposed(tag::test_partialtrial{tag.comp}, expr, quadCreator)
33
34
35
36
37
38
39
40
41
42
43
44
    {}

    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)
    {
45
      auto elementMatrixTransposed = trans(elementMatrix);
46
      Transposed::calculateElementMatrix(
47
        context, quad, elementMatrixTransposed, colNode, rowNode, flagSameFE, flagSameNode);
48
49
50
    }
  };

51
52
  /** @} **/

53
} // end namespace AMDiS