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_BiCGStab_L_Cmplx.h
Go to the documentation of this file.
1
14
#ifndef SOLVER_BICGSTAB_L_CMPLX_INCLUDED
15
#define SOLVER_BICGSTAB_L_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_BiCGStab_L_Cmplx
:
virtual
public
Parameters
25
{
26
public
:
27
Parameters_Solver_BiCGStab_L_Cmplx
();
28
};
29
//- end
30
32
45
class
Solver_BiCGStab_L_Cmplx
:
public
Solver
46
{
47
private
:
48
Fopr
*
m_fopr
;
49
50
int
m_N_L
;
51
double
m_Tol_L
;
52
53
int
m_Niter
;
54
double
m_Stop_cond
;
55
56
std::valarray<Field>
u
,
r
;
57
58
Field
s
,
x
,
r_init
,
v_tmp
;
59
dcomplex
rho_p
,
alpha_p
,
omega_p
;
60
61
public
:
62
Solver_BiCGStab_L_Cmplx
(
Fopr
*fopr)
63
:
Solver
(),
m_fopr
(fopr) {}
64
65
~Solver_BiCGStab_L_Cmplx
() {}
66
67
void
set_parameters
(
const
Parameters
& params);
68
69
void
set_parameters
(
const
int
Niter,
const
double
Stop_cond);
70
void
set_parameters_L
(
const
int
N_L);
71
72
void
solve
(
Field
& solution,
const
Field
& source,
73
int
& Nconv,
double
& diff);
74
75
Fopr
*
get_fopr
() {
return
m_fopr
; }
76
77
private
:
78
void
reset_field
(
const
Field
&);
79
80
void
solve_init
(
const
Field
&,
double
&);
81
void
solve_step
(
double
&);
82
83
void
innerprod_c
(
double
& prod_r,
double
& prod_i,
84
const
Field
& v,
const
Field
& w);
85
86
void
mult_c
(
Field
& v,
87
const
Field
& w,
88
const
double
& prod_r,
const
double
& prod_i);
89
90
int
index_ij
(
int
i,
int
j)
91
{
92
return
i +
m_N_L
* j;
93
}
94
};
95
#endif
src
Solver
solver_BiCGStab_L_Cmplx.h
Generated on Tue Jul 23 2013 10:48:49 for Bridge++ by
1.8.3.1