mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Made the solve() methods const.
This commit is contained in:
parent
8f8baa62c8
commit
e52cae02ac
@ -35,7 +35,7 @@ namespace Opm
|
|||||||
LinearSolverInterface::LinearSolverReport
|
LinearSolverInterface::LinearSolverReport
|
||||||
LinearSolverInterface::solve(const CSRMatrix* A,
|
LinearSolverInterface::solve(const CSRMatrix* A,
|
||||||
const double* rhs,
|
const double* rhs,
|
||||||
double* solution)
|
double* solution) const
|
||||||
{
|
{
|
||||||
return solve(A->m, A->nnz, A->ia, A->ja, A->sa, rhs, solution);
|
return solve(A->m, A->nnz, A->ia, A->ja, A->sa, rhs, solution);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ namespace Opm
|
|||||||
/// Note: this method is a convenience method that calls the virtual solve() method.
|
/// Note: this method is a convenience method that calls the virtual solve() method.
|
||||||
LinearSolverReport solve(const CSRMatrix* A,
|
LinearSolverReport solve(const CSRMatrix* A,
|
||||||
const double* rhs,
|
const double* rhs,
|
||||||
double* solution);
|
double* solution) const;
|
||||||
|
|
||||||
/// Solve a linear system, with a matrix given in compressed sparse row format.
|
/// Solve a linear system, with a matrix given in compressed sparse row format.
|
||||||
/// \param[in] size # of rows in matrix
|
/// \param[in] size # of rows in matrix
|
||||||
@ -69,7 +69,7 @@ namespace Opm
|
|||||||
const int* ja,
|
const int* ja,
|
||||||
const double* sa,
|
const double* sa,
|
||||||
const double* rhs,
|
const double* rhs,
|
||||||
double* solution) = 0;
|
double* solution) const = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ namespace Opm
|
|||||||
const int* ja,
|
const int* ja,
|
||||||
const double* sa,
|
const double* sa,
|
||||||
const double* rhs,
|
const double* rhs,
|
||||||
double* solution)
|
double* solution) const
|
||||||
{
|
{
|
||||||
// Build Istl structures from input.
|
// Build Istl structures from input.
|
||||||
// System matrix
|
// System matrix
|
||||||
|
@ -70,7 +70,7 @@ namespace Opm
|
|||||||
const int* ja,
|
const int* ja,
|
||||||
const double* sa,
|
const double* sa,
|
||||||
const double* rhs,
|
const double* rhs,
|
||||||
double* solution);
|
double* solution) const;
|
||||||
private:
|
private:
|
||||||
double linsolver_residual_tolerance_;
|
double linsolver_residual_tolerance_;
|
||||||
int linsolver_verbosity_;
|
int linsolver_verbosity_;
|
||||||
|
@ -45,7 +45,7 @@ namespace Opm
|
|||||||
const int* ja,
|
const int* ja,
|
||||||
const double* sa,
|
const double* sa,
|
||||||
const double* rhs,
|
const double* rhs,
|
||||||
double* solution)
|
double* solution) const
|
||||||
{
|
{
|
||||||
CSRMatrix A = {
|
CSRMatrix A = {
|
||||||
size,
|
size,
|
||||||
|
@ -76,7 +76,7 @@ namespace Opm
|
|||||||
const int* ja,
|
const int* ja,
|
||||||
const double* sa,
|
const double* sa,
|
||||||
const double* rhs,
|
const double* rhs,
|
||||||
double* solution);
|
double* solution) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user