Chi-Tech
linear_solver_context.h
Go to the documentation of this file.
1
#ifndef CHITECH_LINEAR_SOLVER_CONTEXT_H
2
#define CHITECH_LINEAR_SOLVER_CONTEXT_H
3
4
namespace
chi_math
5
{
6
enum class
ResidualScaleType
7
{
8
NONE = 0,
9
RHS_NORM
= 1,
10
RHS_PRECONDITIONED_NORM
= 2,
11
CUSTOM_SCALE
= 3
12
};
13
template
<
class
MatType,
class
VecType>
14
struct
LinearSolverContext
15
{
16
double
rhs_norm
= 0.0;
17
double
rhs_preconditioned_norm
= 0.0;
18
double
custom_residual_scale
= 1.0;
19
ResidualScaleType
residual_scale_type
=
ResidualScaleType::NONE
;
20
21
virtual
int
MatrixAction
(MatType& matrix, VecType& vector, VecType& action)
22
{
return
0;}
23
24
virtual
~LinearSolverContext
() =
default
;
25
};
26
}
//namespace chi_math
27
28
#endif
//CHITECH_LINEAR_SOLVER_CONTEXT_H
chi_math
Definition:
chi_runtime.h:42
chi_math::ResidualScaleType
ResidualScaleType
Definition:
linear_solver_context.h:7
chi_math::ResidualScaleType::RHS_NORM
@ RHS_NORM
chi_math::ResidualScaleType::RHS_PRECONDITIONED_NORM
@ RHS_PRECONDITIONED_NORM
chi_math::ResidualScaleType::NONE
@ NONE
chi_math::ResidualScaleType::CUSTOM_SCALE
@ CUSTOM_SCALE
chi_math::LinearSolverContext
Definition:
linear_solver_context.h:15
chi_math::LinearSolverContext::rhs_norm
double rhs_norm
Definition:
linear_solver_context.h:16
chi_math::LinearSolverContext::residual_scale_type
ResidualScaleType residual_scale_type
Definition:
linear_solver_context.h:19
chi_math::LinearSolverContext::custom_residual_scale
double custom_residual_scale
Definition:
linear_solver_context.h:18
chi_math::LinearSolverContext::MatrixAction
virtual int MatrixAction(MatType &matrix, VecType &vector, VecType &action)
Definition:
linear_solver_context.h:21
chi_math::LinearSolverContext::rhs_preconditioned_norm
double rhs_preconditioned_norm
Definition:
linear_solver_context.h:17
chi_math::LinearSolverContext::~LinearSolverContext
virtual ~LinearSolverContext()=default
framework
math
LinearSolver
linear_solver_context.h
Generated by
1.9.3