SystemPreconditionerFactory.hpp
Go to the documentation of this file.
1/*
2 Copyright Equinor ASA 2026
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef OPM_SYSTEMPRECONDITIONERFACTORY_HEADER_INCLUDED
20#define OPM_SYSTEMPRECONDITIONERFACTORY_HEADER_INCLUDED
21
25
26#include <dune/istl/operators.hh>
27#include <dune/istl/paamg/pinfo.hh>
28
29namespace Opm
30{
31
32template <class Operator, class Comm, typename>
33struct StandardPreconditioners;
34
35template<typename Scalar>
36using SystemSeqOp = Dune::MatrixAdapter<SystemMatrix<Scalar>, SystemVector<Scalar>, SystemVector<Scalar>>;
37
38#if HAVE_MPI
40 const Dune::JacComm&>;
41template<typename Scalar>
42using SystemParOp = Dune::OverlappingSchwarzOperator<SystemMatrix<Scalar>, SystemVector<Scalar>,
44#endif
45
46
47template <>
48struct StandardPreconditioners<SystemSeqOp<double>, Dune::Amg::SequentialInformation, void>
49{
50 static void add();
51};
52
53#if FLOW_INSTANTIATE_FLOAT
54template <>
55struct StandardPreconditioners<SystemSeqOp<float>, Dune::Amg::SequentialInformation, void>
56{
57 static void add();
58};
59#endif
60
61#if HAVE_MPI
62template <>
63struct StandardPreconditioners<SystemParOp<double>, Dune::Amg::SequentialInformation, void>
64{
65 static void add();
66};
67
68template <>
70{
71 static void add();
72};
73
74#if FLOW_INSTANTIATE_FLOAT
75template <>
76struct StandardPreconditioners<SystemParOp<float>, Dune::Amg::SequentialInformation, void>
77{
78 static void add();
79};
80
81template <>
82struct StandardPreconditioners<SystemParOp<float>, SystemComm, void>
83{
84 static void add();
85};
86
87#endif
88#endif
89
90} // namespace Opm
91
92#endif // OPM_SYSTEMPRECONDITIONERFACTORY_HEADER_INCLUDED
Definition: MultiComm.hpp:75
Definition: MultiComm.hpp:120
Definition: fvbaseprimaryvariables.hh:161
Definition: blackoilbioeffectsmodules.hh:45
Dune::MultiTypeBlockVector< ResVector< Scalar >, WellVector< Scalar > > SystemVector
Definition: SystemTypes.hpp:59
Dune::OverlappingSchwarzOperator< SystemMatrix< Scalar >, SystemVector< Scalar >, SystemVector< Scalar >, SystemComm > SystemParOp
Definition: SystemPreconditionerFactory.hpp:43
Dune::MatrixAdapter< SystemMatrix< Scalar >, SystemVector< Scalar >, SystemVector< Scalar > > SystemSeqOp
Definition: SystemPreconditionerFactory.hpp:36
Dune::MultiCommunicator< const Dune::OwnerOverlapCopyCommunication< int, int > &, const Dune::JacComm & > SystemComm
Definition: SystemPreconditionerFactory.hpp:40
Definition: StandardPreconditioners_mpi.hpp:139
static void add()
Definition: StandardPreconditioners_mpi.hpp:140