Common.hpp 999 Bytes
Newer Older
Praetorius, Simon's avatar
Praetorius, Simon committed
1
2
3
#pragma once

#include <cstddef>
4
5
#include <memory>
#include <string>
Praetorius, Simon's avatar
Praetorius, Simon committed
6
7
8
9
10
11

namespace AMDiS
{
  template <class T>
  struct Triplet
  {
12
    std::size_t row, col;
Praetorius, Simon's avatar
Praetorius, Simon committed
13
14
15
    T value;
  };

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  template <class Basis>
  class DefaultCommunication
  {
  public:
    static std::unique_ptr<DefaultCommunication> create(Basis const& basis, std::string const& prefix)
    {
      DUNE_UNUSED_PARAMETER(basis);
      DUNE_UNUSED_PARAMETER(prefix);
      return std::make_unique<DefaultCommunication>();
    }
  };

  /** Base traits class for a linear solver for the system AX=B using an FE space described by a
   *  dune-functions Basis. This defines the general interface typedefs, all implementations are
   *  required to provide the typedefs listed here, by e.g. inheriting from this.
   */
  template <class A, class X, class B, class Basis>
  class SolverTraitsBase
  {
  public:
    using Mat = A;
    using Sol = X;
    using Rhs = B;
    using Comm = DefaultCommunication<Basis>;
  };

Praetorius, Simon's avatar
Praetorius, Simon committed
42
} // end namespace AMDiS