Dune Core Modules (2.6.0)

solvercategory.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_ISTL_SOLVERCATEGORY_HH
4#define DUNE_ISTL_SOLVERCATEGORY_HH
5
7
8
9namespace Dune {
10
20 {
21 enum Category {
28 };
29
31 template<typename OP>
32 static Category category(const OP& op, decltype(op.category())* = nullptr)
33 {
34 return op.category();
35 }
36
37#ifndef DOXYGEN
38 template<typename OP>
39 static Category category(const OP& op, decltype(op.getSolverCategory())* = nullptr)
40 {
41 return op.getSolverCategory();
42 }
43
44 template<typename OP>
45 static Category category(const OP& op, decltype(op.category)* = nullptr)
46 {
47 return OP::category;
48 }
49#endif
50 };
51
52 class InvalidSolverCategory : public InvalidStateException{};
53
56} // end namespace
57
58#endif
A few common exception classes.
Dune namespace.
Definition: alignedallocator.hh:10
Categories for the solvers.
Definition: solvercategory.hh:20
Category
Definition: solvercategory.hh:21
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23
@ nonoverlapping
Category for non-overlapping solvers.
Definition: solvercategory.hh:25
@ overlapping
Category for overlapping solvers.
Definition: solvercategory.hh:27
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:32
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 26, 23:30, 2024)