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

#include <type_traits>

5
#include <amdis/localoperators/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

    struct partial_test
    {
      std::size_t comp;
    };
25
26
27
  }


28
  /// first-order operator \f$ \langle\partial_i\psi, c\,\phi\rangle \f$
29
30
31
32
  template <class LocalContext, class GridFct>
  class GridFunctionOperator<tag::partialtest_trial, LocalContext, GridFct>
      : public GridFunctionOperatorTransposed<GridFunctionOperator<tag::partialtest_trial, LocalContext, GridFct>,
                                              GridFunctionOperator<tag::test_partialtrial, LocalContext, GridFct>>
33
  {
34
    using Self = GridFunctionOperator;
35
    using Transposed = GridFunctionOperator<tag::test_partialtrial, LocalContext, GridFct>;
36
    using Super = GridFunctionOperatorTransposed<Self, Transposed>;
37
38

  public:
39
40
    GridFunctionOperator(tag::partialtest_trial tag, GridFct const& expr)
      : Super(tag::test_partialtrial{tag.comp}, expr)
41
42
43
    {}
  };

44
45
46
47
48
49
50
51

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

52
53
  /** @} **/

54
} // end namespace AMDiS