Bridge++
Ver. 2.0.2
solver_CGNR.h
Go to the documentation of this file.
1
14
#ifndef SOLVER_CGNR_INCLUDED
15
#define SOLVER_CGNR_INCLUDED
16
17
#include "
solver_CG.h
"
18
20
35
class
Solver_CGNR
:
public
Solver_CG
36
{
37
private
:
38
Field
m_b2
;
39
40
public
:
41
static
const
std::string
class_name
;
42
43
Solver_CGNR
(
Fopr
*fopr)
44
:
Solver_CG
(fopr) {}
45
46
Solver_CGNR
(
Fopr
*fopr,
const
Parameters
& params)
47
:
Solver_CG
(fopr, params)
48
{
49
// set_parameters delegate to Solver_CG.
50
}
51
52
~Solver_CGNR
() {}
53
54
void
set_parameters
(
const
Parameters
& params);
55
56
void
get_parameters
(
Parameters
& params)
const
;
57
58
void
solve
(
Field
& solution,
const
Field
& source,
int
& Nconv,
double
& diff);
59
60
Fopr
*
get_fopr
() {
return
this->
Solver_CG::get_fopr
(); }
61
62
double
flop_count
();
63
64
#ifdef USE_FACTORY
65
private
:
66
static
Solver
*create_object(
Fopr
*fopr)
67
{
68
return
new
Solver_CGNR
(fopr);
69
}
70
71
static
Solver
*create_object_with_params(
Fopr
*fopr,
const
Parameters
& params)
72
{
73
return
new
Solver_CGNR
(fopr, params);
74
}
75
76
public
:
77
static
bool
register_factory()
78
{
79
bool
init =
true
;
80
init &= Solver::Factory::Register(
"CGNR"
, create_object);
81
init &= Solver::Factory_params::Register(
"CGNR"
, create_object_with_params);
82
return
init;
83
}
84
#endif
85
};
86
#endif
Solver_CGNR::flop_count
double flop_count()
Definition:
solver_CGNR.cpp:92
AFopr< Field >
Parameters
Class for parameters.
Definition:
parameters.h:46
Solver_CGNR::solve
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
Definition:
solver_CGNR.cpp:40
Solver_CGNR::~Solver_CGNR
~Solver_CGNR()
Definition:
solver_CGNR.h:52
Solver_CGNR::Solver_CGNR
Solver_CGNR(Fopr *fopr, const Parameters ¶ms)
Definition:
solver_CGNR.h:46
Solver_CGNR::class_name
static const std::string class_name
Definition:
solver_CGNR.h:41
Solver
Base class for linear solver class family.
Definition:
solver.h:36
Solver_CGNR::get_parameters
void get_parameters(Parameters ¶ms) const
Definition:
solver_CGNR.cpp:33
Solver_CG::get_fopr
Fopr * get_fopr()
Definition:
solver_CG.h:91
Solver_CGNR::m_b2
Field m_b2
Definition:
solver_CGNR.h:38
Solver_CGNR
CGNR solver.
Definition:
solver_CGNR.h:35
Solver_CGNR::set_parameters
void set_parameters(const Parameters ¶ms)
Definition:
solver_CGNR.cpp:26
solver_CG.h
Solver_CG
Standard Conjugate Gradient solver algorithm.
Definition:
solver_CG.h:38
Solver_CGNR::get_fopr
Fopr * get_fopr()
Definition:
solver_CGNR.h:60
Field
Container of Field-type object.
Definition:
field.h:46
Solver_CGNR::Solver_CGNR
Solver_CGNR(Fopr *fopr)
Definition:
solver_CGNR.h:43
src
lib
Solver
solver_CGNR.h
Generated on Sat Feb 10 2024 14:20:00 for Bridge++ by
1.8.17