ExtraSmoothers.hpp
Go to the documentation of this file.
1#ifndef OPM_EXTRASMOOTHERS_HPP
2#define OPM_EXTRASMOOTHERS_HPP
3
4#include "DILU.hpp"
5
6namespace Dune
7{
8 template <class M, class X, class Y>
9 class MultithreadDILU;
10
11namespace Amg
12{
16 template <class M, class X, class Y>
17 struct ConstructionTraits<MultithreadDILU<M, X, Y>> {
18 using Arguments = DefaultConstructionArgs<MultithreadDILU<M, X, Y>>;
19
20#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
21 static inline std::shared_ptr<MultithreadDILU<M, X, Y>> construct(Arguments& args) {
22 return std::make_shared<MultithreadDILU<M, X, Y>>(args.getMatrix());
23 }
24
25#else
27 return new MultithreadDILU<M, X, Y>(args.getMatrix());
28 }
29
31 delete dilu;
32 }
33#endif
34 };
35
36} // namespace Amg
37} // namespace Dune
38#endif // OPM_EXTRASMOOTHERS_HPP
The OpenMP thread parallelized DILU preconditioner.
Definition: DILU.hpp:53
Definition: SupportsFaceTag.hpp:27
static MultithreadDILU< M, X, Y > * construct(Arguments &args)
Definition: ExtraSmoothers.hpp:26
static void deconstruct(MultithreadDILU< M, X, Y > *dilu)
Definition: ExtraSmoothers.hpp:30
DefaultConstructionArgs< MultithreadDILU< M, X, Y > > Arguments
Definition: ExtraSmoothers.hpp:18