ISTLSolverRuntimeOptionProxy selects the appropriate ISTLSolver runtime based on CLI options.
More...
#include <ISTLSolverRuntimeOptionProxy.hpp>
|
| | ISTLSolverRuntimeOptionProxy (const Simulator &simulator, const FlowLinearSolverParameters ¶meters, bool forceSerial=false) |
| | Construct a system solver.
|
| | ISTLSolverRuntimeOptionProxy (const Simulator &simulator) |
| | Construct a system solver.
|
| void | eraseMatrix () override |
| | Signals that the memory for the matrix internally in the solver could be erased.
|
| void | setActiveSolver (int num) override |
| | Set the active solver by its index.
|
| int | numAvailableSolvers () const override |
| | Get the number of available solvers.
|
| void | prepare (const SparseMatrixAdapter &M, Vector &b) override |
| | Prepare the solver with the given sparse matrix and right-hand side vector.
|
| void | prepare (const Matrix &M, Vector &b) override |
| | Prepare the solver with the given matrix and right-hand side vector.
|
| void | setResidual (Vector &b) override |
| | Set the residual vector.
|
| void | getResidual (Vector &b) const override |
| | Get the residual vector.
|
| void | setMatrix (const SparseMatrixAdapter &M) override |
| | Set the matrix for the solver.
|
| bool | solve (Vector &x) override |
| | Solve the system of equations Ax = b.
|
| int | iterations () const override |
| | Get the number of iterations used in the last solve.
|
| const CommunicationType * | comm () const override |
| | Get the communication object used by the solver.
|
| int | getSolveCount () const override |
| | Get the count of how many times the solver has been called.
|
|
|
static void | registerParameters () |
template<class TypeTag>
class Opm::ISTLSolverRuntimeOptionProxy< TypeTag >
ISTLSolverRuntimeOptionProxy selects the appropriate ISTLSolver runtime based on CLI options.
◆ ISTLSolverRuntimeOptionProxy() [1/2]
Construct a system solver.
- Parameters
-
| [in] | simulator | The opm-models simulator object |
| [in] | parameters | Explicit parameters for solver setup, do not read them from command line parameters. |
| [in] | forceSerial | If true, will set up a serial linear solver only, local to the current rank, instead of creating a parallel (MPI distributed) linear solver. |
◆ ISTLSolverRuntimeOptionProxy() [2/2]
Construct a system solver.
- Parameters
-
| [in] | simulator | The opm-models simulator object |
◆ comm()
Get the communication object used by the solver.
This method returns a pointer to the communication object used by the solver.
- Returns
- A pointer to the communication object.
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ eraseMatrix()
Signals that the memory for the matrix internally in the solver could be erased.
- Note
- This call could be ignored by the solver, but it is a hint that the solver does not need the matrix anymore.
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ getResidual()
Get the residual vector.
This method retrieves the current residual vector from the solver.
- Parameters
-
| b | The vector to store the residual. |
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ getSolveCount()
Get the count of how many times the solver has been called.
This method returns the number of times the solve() method has been called.
- Returns
- The count of solve calls.
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ iterations()
Get the number of iterations used in the last solve.
This method returns the number of iterations that the solver performed during the last call to solve().
- Returns
- The number of iterations.
- Note
- This value is only valid after a call to solve().
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ numAvailableSolvers()
◆ prepare() [1/2]
Prepare the solver with the given matrix and right-hand side vector.
This method initializes the solver with the provided matrix and vector, preparing it for solving the system of equations.
- Parameters
-
| M | The matrix representing the system of equations. |
| b | The right-hand side vector. |
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ prepare() [2/2]
Prepare the solver with the given sparse matrix and right-hand side vector.
This method initializes the solver with the provided sparse matrix and vector, preparing it for solving the system of equations.
- Parameters
-
| M | The sparse matrix representing the system of equations. |
| b | The right-hand side vector. |
- Note
- This method should be called in addition to setResidual() and setMatrix() before calling solve().
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ setActiveSolver()
Set the active solver by its index.
- Parameters
-
| num | The index of the solver to set as active. |
- Note
- The index corresponds to the order in which solvers are registered.
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ setMatrix()
Set the matrix for the solver.
This method sets the matrix that the solver will use to solve the system of equations.
- Parameters
-
| M | The sparse matrix adapter containing the matrix data. |
- Note
- This method should be called in addition to prepare() and setResidual() before calling solve().
Implements Opm::AbstractISTLSolver< TypeTag >.
◆ setResidual()
◆ solve()
Solve the system of equations Ax = b.
This method solves the linear system represented by the matrix A and the right-hand side vector b, storing the solution in vector x.
- Parameters
-
| x | The vector to store the solution. |
- Returns
- true if the solver converged, false otherwise.
Before this function is called, the following function calls should have been made:
Implements Opm::AbstractISTLSolver< TypeTag >.
The documentation for this class was generated from the following files: