dune-istl
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
istl
solvercategory.hh
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4
// vi: set et ts=4 sw=2 sts=2:
5
#ifndef DUNE_ISTL_SOLVERCATEGORY_HH
6
#define DUNE_ISTL_SOLVERCATEGORY_HH
7
8
#include <dune/common/exceptions.hh>
9
10
11
namespace
Dune
{
12
17
21
struct
SolverCategory
22
{
23
enum
Category
{
25
sequential
,
27
nonoverlapping
,
29
overlapping
30
};
31
33
template
<
typename
OP>
34
static
Category
category
(
const
OP& op,
decltype
(op.category())* =
nullptr
)
35
{
36
return
op.category();
37
}
38
39
#ifndef DOXYGEN
40
// template<typename OP>
41
// static Category category(const OP& op, decltype(op.getSolverCategory())* = nullptr)
42
// {
43
// return op.getSolverCategory();
44
// }
45
46
template
<
typename
OP>
47
static
Category
category
(
const
OP& op,
decltype
(op.category)* =
nullptr
)
48
{
49
return
OP::category;
50
}
51
#endif
52
};
53
54
class
InvalidSolverCategory
:
public
InvalidStateException{};
55
57
58
}
// end namespace
59
60
#endif
Dune
Definition
allocator.hh:11
Dune::SolverCategory
Categories for the solvers.
Definition
solvercategory.hh:22
Dune::SolverCategory::Category
Category
Definition
solvercategory.hh:23
Dune::SolverCategory::sequential
@ sequential
Category for sequential solvers.
Definition
solvercategory.hh:25
Dune::SolverCategory::nonoverlapping
@ nonoverlapping
Category for non-overlapping solvers.
Definition
solvercategory.hh:27
Dune::SolverCategory::overlapping
@ overlapping
Category for overlapping solvers.
Definition
solvercategory.hh:29
Dune::SolverCategory::category
static Category category(const OP &op, decltype(op.category()) *=nullptr)
Helperfunction to extract the solver category either from an enum, or from the newly introduced virtu...
Definition
solvercategory.hh:34
Dune::InvalidSolverCategory
Definition
solvercategory.hh:54
Generated by
1.17.0