FirstOrderGradTestTrial.hpp 1.28 KB
Newer Older
1
2
3
4
#pragma once

#include <type_traits>

5
#include <amdis/localoperators/FirstOrderTestGradTrial.hpp>
6
7
8

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

14
15
16
  namespace tag
  {
    struct gradtest_trial {};
17
    struct grad_test {};
18
19
20
  }


21
  /// first-order operator \f$ \langle\nabla\psi, \mathbf{b}\,\phi\rangle \f$
22
23
24
25
  template <class LocalContext, class GridFct>
  class GridFunctionOperator<tag::gradtest_trial, LocalContext, GridFct>
      : public GridFunctionOperatorTransposed<GridFunctionOperator<tag::gradtest_trial, LocalContext, GridFct>,
                                              GridFunctionOperator<tag::test_gradtrial, LocalContext, GridFct>>
26
  {
27
    using Self = GridFunctionOperator;
28
    using Transposed = GridFunctionOperator<tag::test_gradtrial, LocalContext, GridFct>;
29
    using Super = GridFunctionOperatorTransposed<Self, Transposed>;
30
31

  public:
32
33
    GridFunctionOperator(tag::gradtest_trial, GridFct const& expr)
      : Super(tag::test_gradtrial{}, expr)
34
35
36
    {}
  };

37
38
39
40
41
42
43
44

  /// Create a first-order term with derivative on trial-function
  template <class Expr, class... QuadratureArgs>
  auto fot(Expr&& expr, tag::grad_test, QuadratureArgs&&... args)
  {
    return makeOperator(tag::gradtest_trial{}, FWD(expr), FWD(args)...);
  }

45
46
  /** @} **/

47
} // end namespace AMDiS