Bridge++
Ver. 1.1.x
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
solver_GMRES_m_Cmplx.h
Go to the documentation of this file.
1
14
#ifndef SOLVER_GMRES_m_CMPLX_INCLUDED
15
#define SOLVER_GMRES_m_CMPLX_INCLUDED
16
17
#include "
solver.h
"
18
#include "
bridge_complex.h
"
19
20
#include "
bridgeIO.h
"
21
using
Bridge::vout
;
22
23
//- parameters class
24
class
Parameters_Solver_GMRES_m_Cmplx
:
virtual
public
Parameters
25
{
26
public
:
27
Parameters_Solver_GMRES_m_Cmplx
();
28
};
29
//- end
30
32
44
class
Solver_GMRES_m_Cmplx
:
public
Solver
45
{
46
private
:
47
48
Fopr
*
m_fopr
;
49
int
m_Niter
;
50
double
m_Stop_cond
;
51
52
int
m_N_M
;
53
54
std::valarray<Field>
v
;
55
56
Field
s
,
r
,
x
,
v_tmp
;
57
double
beta_p
;
58
59
public
:
60
61
Solver_GMRES_m_Cmplx
(
Fopr
*fopr)
62
:
Solver
(),
m_fopr
(fopr) {}
63
64
~Solver_GMRES_m_Cmplx
() {}
65
66
void
set_parameters
(
const
Parameters
& params);
67
68
void
set_parameters
(
const
int
Niter,
const
double
Stop_cond);
69
void
set_parameters_GMRES_m
(
const
int
N_M);
70
71
void
solve
(
Field
& solution,
const
Field
& source,
72
int
& Nconv,
double
& diff);
73
74
Fopr
*
get_fopr
() {
return
m_fopr
; }
75
76
private
:
77
78
void
reset_field
(
const
Field
&);
79
80
void
solve_init
(
const
Field
&,
double
&);
81
void
solve_step
(
const
Field
&,
double
&);
82
83
void
innerprod_c
(
double
& prod_r,
double
& prod_i,
84
const
Field
&
v
,
const
Field
& w);
85
86
void
min_J
(std::valarray<dcomplex>& y,
87
std::valarray<dcomplex>& h);
88
89
void
mult_c
(
Field
&
v
,
90
const
Field
& w,
91
const
double
& prod_r,
const
double
& prod_i);
92
93
int
index_ij
(
int
i,
int
j)
94
{
95
return
i + (
m_N_M
+ 1) * j;
96
}
97
};
98
#endif
src
Solver
solver_GMRES_m_Cmplx.h
Generated on Tue Jul 23 2013 10:48:49 for Bridge++ by
1.8.3.1