monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
src
equation
equation.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
{
6
7
template
<
typename
MATRIX,
typename
T>
8
T
solver::solver<MATRIX, T>::get_residual
(
vector<T>
&x) {
9
switch
(resid_method) {
10
case
0:
11
return
blas::nrm2
(x);
12
break
;
13
default
:
14
throw
std::runtime_error(
"error vector size is not same"
);
15
break
;
16
}
17
}
18
19
template
double
20
solver::solver<matrix::Dense<double>
,
double
>::get_residual(
vector<double>
&x);
21
template
float
22
solver::solver<matrix::Dense<float>
,
float
>::get_residual(
vector<float>
&x);
23
24
template
double
25
solver::solver<matrix::CRS<double>
,
double
>::get_residual(
vector<double>
&x);
26
template
float
27
28
solver::solver<matrix::CRS<float>
,
float
>::get_residual(
vector<float>
&x);
29
template
double
30
solver::solver<matrix::LinearOperator<double>
,
double
>::get_residual(
31
vector<double>
&x);
32
template
float
33
solver::solver<matrix::LinearOperator<float>
,
float
>::get_residual(
34
vector<float>
&x);
35
}
// namespace monolish
monolish::blas::nrm2
void nrm2(const vector< double > &x, double &ans)
nrm2: ||x||_2
Definition:
vector_blas.cpp:1080
monolish::solver::solver::get_residual
Float get_residual(vector< Float > &x)
Definition:
equation.cpp:8
monolish::solver::solver
solver base class
Definition:
monolish_solver.hpp:33
monolish
Definition:
monolish_matrix_blas.hpp:9
monolish::vector
vector class
Definition:
monolish_coo.hpp:25
Generated by
1.8.17