FirstOrderGradTestTrialvec.hpp 1.59 KB
Newer Older
1
2
3
4
#pragma once

#include <type_traits>

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

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

14
15
16
17
18
19
  namespace tag
  {
    struct gradtest_trialvec {};
  }


20
21
22
23
  /// first-order operator \f$ \langle\nabla\psi, c\,\Phi\rangle \f$
  template <class GridFct, class QuadCreator>
  class GridFunctionOperator<tag::gradtest_trialvec, GridFct, QuadCreator>
      : public GridFunctionOperator<tag::testvec_gradtrial, GridFct, QuadCreator>
24
  {
25
    using Transposed = GridFunctionOperator<tag::testvec_gradtrial, GridFct, QuadCreator>;
26
27

  public:
28
29
    GridFunctionOperator(tag::gradtest_trialvec, GridFct const& expr, QuadCreator const& quadCreator)
      : Transposed(tag::testvec_gradtrial{}, expr, quadCreator)
30
31
32
33
34
35
36
37
38
39
40
41
    {}

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

48
49
  /** @} **/

50
} // end namespace AMDiS