|
|
using | SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter> |
|
using | Vector = GetPropType<TypeTag, Properties::GlobalEqVector> |
|
using | Simulator = GetPropType<TypeTag, Properties::Simulator> |
|
using | ElementMapper = GetPropType<TypeTag, Properties::ElementMapper> |
|
using | Matrix = typename SparseMatrixAdapter::IstlMatrix |
|
using | ThreadManager = GetPropType<TypeTag, Properties::ThreadManager> |
|
using | GridView = GetPropType<TypeTag, Properties::GridView> |
|
using | ElementContext = GetPropType<TypeTag, Properties::ElementContext> |
|
using | ElementChunksType = Opm::ElementChunks<GridView, Dune::Partitions::All> |
|
using | real_type = typename Vector::field_type |
|
using | GPUMatrix = Opm::gpuistl::GpuSparseMatrixWrapper<real_type> |
|
using | GPUVector = Opm::gpuistl::GpuVector<real_type> |
|
using | GPUVectorInt = Opm::gpuistl::GpuVector<int> |
|
using | CommunicationType = Dune::Communication<int> |
|
using | SolverType = Opm::gpuistl::detail::FlexibleSolverWrapper<GPUMatrix, GPUVector, CommunicationType> |
|
using | CommunicationType = Dune::Communication<int> |
|
using | SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter> |
|
using | Vector = GetPropType<TypeTag, Properties::GlobalEqVector> |
|
using | Matrix = typename SparseMatrixAdapter::IstlMatrix |
|
| | ISTLSolverGPUISTL (const Simulator &simulator, const FlowLinearSolverParameters ¶meters, bool forceSerial=false) |
| | Construct a system solver.
|
| | ISTLSolverGPUISTL (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 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 &) override |
| | Set the residual vector.
|
| void | getResidual (Vector &b) const override |
| | Get the residual vector.
|
| void | setMatrix (const SparseMatrixAdapter &) override |
| | Set the matrix for the solver.
|
| bool | solve (Vector &x) override |
| | Solve the system of linear equations Ax = b.
|
| int | iterations () const override |
| const CommunicationType * | comm () const override |
| | Get the communication object used by the solver.
|
| bool | isParallel () const |
| | Check if we are running in parallel mode.
|
| int | getSolveCount () const override |
| | Get the count of how many times the solver has been called.
|
template<class TypeTag>
class Opm::gpuistl::ISTLSolverGPUISTL< TypeTag >
ISTL solver for GPU using the GPU ISTL backend.
This class implements the AbstractISTLSolver interface and provides methods to prepare the solver, set and get residuals, solve the system, and manage communication.
- Template Parameters
-
| TypeTag | The type tag for the properties used in this solver. |
- Note
- This solver takes CPU matrices and vectors, but uses GPU matrices and vectors internally for computations.
Solve the system of linear 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, prepare() should have been called with a valid matrix and right-hand side vector.
Implements Opm::AbstractISTLSolver< TypeTag >.