You are here:
Concepts
>
Concepts Web
>
Class documentation
Class documentation of Concepts
Loading...
Searching...
No Matches
operator
cgFabric.hh
Go to the documentation of this file.
1
6
#ifndef CGfabric_hh
7
#define CGfabric_hh
8
9
#if __GNUC__ == 2
10
# include <float.h>
11
# define EPS DBL_EPSILON
12
#else
13
# include <limits>
14
# define EPS std::numeric_limits<double>::epsilon()
15
#endif
16
#include "
cg.hh
"
17
#include "
solverFabric.hh
"
18
19
namespace
concepts
{
20
21
// ************************************************************** CGFabric **
22
26
template
<
typename
F>
27
class
CGFabric
:
public
SolverFabric
<F> {
28
public
:
36
CGFabric
(
Real
maxeps
= EPS,
int
maxit
= 0,
bool
relres
=
false
,
37
bool
throwing
=
true
)
38
: maxeps_(
maxeps
), maxit_(
maxit
), relres_(
relres
), throwing_(
throwing
) {}
39
virtual
Operator<F>
*
operator()
(
Operator<F>
& matrix) {
40
return
new
CG<F>
(matrix, maxeps_, maxit_, relres_, throwing_);
41
}
42
Operator<F>
*
operator()
() {
return
NULL
; }
43
protected
:
44
virtual
std::ostream&
info
(std::ostream&
os
)
const
{
45
return
os
<<
concepts::typeOf
(*
this
)<<
"(maxeps = "
<< maxeps_ <<
", maxit = "
46
<< maxit_ <<
", relres = "
<< relres_ <<
')'
;
47
}
48
private
:
50
Real
maxeps_;
52
int
maxit_;
54
bool
relres_;
58
bool
throwing_;
59
};
60
61
}
// concepts
62
63
#endif
// CGfabric_hh
cg.hh
concepts::CGFabric
Definition
cgFabric.hh:27
concepts::CGFabric::CGFabric
CGFabric(Real maxeps=EPS, int maxit=0, bool relres=false, bool throwing=true)
Definition
cgFabric.hh:36
concepts::CGFabric::info
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Definition
cgFabric.hh:44
concepts::CGFabric::operator()
Operator< F > * operator()()
Definition
cgFabric.hh:42
concepts::Operator
Definition
compositions.hh:42
concepts::SolverFabric
Definition
solverFabric.hh:22
concepts
Definition
pml_formula.h:16
concepts::typeOf
std::string typeOf(const T &t)
Definition
output.hh:43
concepts::Real
double Real
Definition
typedefs.hh:39
concepts::makeSet
Set< F > makeSet(uint n, const F &first,...)
Definition
set.hh:320
solverFabric.hh
Generated on Wed Sep 13 2023 21:06:22 for Concepts by
1.9.8