monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
src
equation
precond.cpp
Go to the documentation of this file.
1
#include "../../include/monolish_blas.hpp"
2
#include "../../include/monolish_equation.hpp"
3
#include "../internal/monolish_internal.hpp"
4
5
namespace
monolish
{
7
// solver set precond /////////////////////////////////
9
template
<
typename
MATRIX,
typename
T>
10
template
<
class
PRECOND>
11
void
solver::solver<MATRIX, T>::set_create_precond
(PRECOND &p) {
12
Logger
&logger =
Logger::get_instance
();
13
logger.
util_in
(
monolish_func
);
14
precond.create_precond =
15
std::bind(&PRECOND::create_precond, &p, std::placeholders::_1);
16
logger.
util_out
();
17
}
18
19
// none
20
template
void
solver::solver<matrix::Dense<double>
,
double
>::set_create_precond(
21
equation::none
<
matrix::Dense<double>
,
double
> &p);
22
template
void
solver::solver<matrix::Dense<float>
,
float
>::set_create_precond(
23
equation::none
<
matrix::Dense<float>
,
float
> &p);
24
25
template
void
solver::solver<matrix::CRS<double>
,
double
>::set_create_precond(
26
equation::none
<
matrix::CRS<double>
,
double
> &p);
27
template
void
solver::solver<matrix::CRS<float>
,
float
>::set_create_precond(
28
equation::none
<
matrix::CRS<float>
,
float
> &p);
29
30
template
void
31
solver::solver<matrix::LinearOperator<double>
,
double
>::set_create_precond(
32
equation::none
<
matrix::LinearOperator<double>
,
double
> &p);
33
template
void
34
solver::solver<matrix::LinearOperator<float>
,
float
>::set_create_precond(
35
equation::none
<
matrix::LinearOperator<float>
,
float
> &p);
36
37
// jacobi
38
template
void
solver::solver<matrix::Dense<double>
,
double
>::set_create_precond(
39
equation::Jacobi
<
matrix::Dense<double>
,
double
> &p);
40
template
void
solver::solver<matrix::Dense<float>
,
float
>::set_create_precond(
41
equation::Jacobi
<
matrix::Dense<float>
,
float
> &p);
42
43
template
void
solver::solver<matrix::CRS<double>
,
double
>::set_create_precond(
44
equation::Jacobi
<
matrix::CRS<double>
,
double
> &p);
45
template
void
solver::solver<matrix::CRS<float>
,
float
>::set_create_precond(
46
equation::Jacobi
<
matrix::CRS<float>
,
float
> &p);
47
49
template
<
typename
MATRIX,
typename
T>
50
template
<
class
PRECOND>
51
void
solver::solver<MATRIX, T>::set_apply_precond
(PRECOND &p) {
52
Logger
&logger =
Logger::get_instance
();
53
logger.
util_in
(
monolish_func
);
54
precond.apply_precond =
55
std::bind(&PRECOND::apply_precond, &p, std::placeholders::_1,
56
std::placeholders::_2);
57
logger.
util_out
();
58
}
59
// none
60
template
void
solver::solver<matrix::Dense<double>
,
double
>::set_apply_precond(
61
equation::none
<
matrix::Dense<double>
,
double
> &p);
62
template
void
solver::solver<matrix::Dense<float>
,
float
>::set_apply_precond(
63
equation::none
<
matrix::Dense<float>
,
float
> &p);
64
65
template
void
solver::solver<matrix::CRS<double>
,
double
>::set_apply_precond(
66
equation::none
<
matrix::CRS<double>
,
double
> &p);
67
template
void
solver::solver<matrix::CRS<float>
,
float
>::set_apply_precond(
68
equation::none
<
matrix::CRS<float>
,
float
> &p);
69
70
template
void
71
solver::solver<matrix::LinearOperator<double>
,
double
>::set_apply_precond(
72
equation::none
<
matrix::LinearOperator<double>
,
double
> &p);
73
template
void
74
solver::solver<matrix::LinearOperator<float>
,
float
>::set_apply_precond(
75
equation::none
<
matrix::LinearOperator<float>
,
float
> &p);
76
77
// jacobi
78
template
void
solver::solver<matrix::Dense<double>
,
double
>::set_apply_precond(
79
equation::Jacobi
<
matrix::Dense<double>
,
double
> &p);
80
template
void
solver::solver<matrix::Dense<float>
,
float
>::set_apply_precond(
81
equation::Jacobi
<
matrix::Dense<float>
,
float
> &p);
82
83
template
void
solver::solver<matrix::CRS<double>
,
double
>::set_apply_precond(
84
equation::Jacobi
<
matrix::CRS<double>
,
double
> &p);
85
template
void
solver::solver<matrix::CRS<float>
,
float
>::set_apply_precond(
86
equation::Jacobi
<
matrix::CRS<float>
,
float
> &p);
87
}
// namespace monolish
monolish::matrix::LinearOperator
Linear Operator imitating Matrix.
Definition:
monolish_coo.hpp:30
monolish_func
#define monolish_func
Definition:
monolish_logger.hpp:9
monolish::solver::solver::set_apply_precond
void set_apply_precond(PRECOND &p)
set precondition apply fucntion
Definition:
precond.cpp:51
monolish::Logger
logger class (singleton, for developper class)
Definition:
monolish_logger.hpp:19
monolish::matrix::Dense
Dense format Matrix.
Definition:
monolish_coo.hpp:28
monolish::Logger::util_out
void util_out()
Definition:
logger_utils.cpp:123
monolish::solver::solver
solver base class
Definition:
monolish_solver.hpp:33
monolish::Logger::util_in
void util_in(const std::string func_name)
Definition:
logger_utils.cpp:113
monolish
Definition:
monolish_matrix_blas.hpp:9
monolish::solver::solver::set_create_precond
void set_create_precond(PRECOND &p)
set precondition create fucntion
Definition:
precond.cpp:11
monolish::equation::none
none solver class(nothing to do)
Definition:
monolish_equation.hpp:31
monolish::equation::Jacobi
Jacobi solver class.
Definition:
monolish_equation.hpp:159
monolish::Logger::get_instance
static Logger & get_instance()
Definition:
monolish_logger.hpp:42
monolish::matrix::CRS
Compressed Row Storage (CRS) format Matrix.
Definition:
monolish_coo.hpp:29
Generated by
1.8.17