Traits.hpp 726 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include <type_traits>

#include <petscmat.h>
#include <petscvec.h>

#include <dune/grid/common/partitionset.hh>
#include <amdis/linearalgebra/petsc/Communication.hpp>

namespace AMDiS
{
  /** Traits class for a linear solver for the system AX=B using an FE space described by a dune-functions Basis
   *  Contains typedefs specific to the PETSc backend.
   */
  template <class Basis, class T = double>
  struct BackendTraits
  {
Praetorius, Simon's avatar
Praetorius, Simon committed
19
    static_assert(std::is_same<T,PetscScalar>::value, "");
20
21
22
23
24
25
26
27
28

    using Mat = ::Mat;
    using Vec = ::Vec;
    using CoefficientType = PetscScalar;
    using Comm = DistributedCommunication<Basis>;
    using PartitionSet = Dune::Partitions::Interior;
  };

} // end namespace AMDiS