Opm::Accelerator::rocalutionSolverBackend< block_size > Class Template Reference

#include <rocalutionSolverBackend.hpp>

Inheritance diagram for Opm::Accelerator::rocalutionSolverBackend< block_size >:
Inheritance graph

Public Member Functions

 rocalutionSolverBackend (int linear_solver_verbosity, int maxit, double tolerance)
 
 ~rocalutionSolverBackend ()
 Destroy a rocalutionSolver, and free memory. More...
 
SolverStatus solve_system (std::shared_ptr< BlockedMatrix > matrix, double *b, std::shared_ptr< BlockedMatrix > jacMatrix, WellContributions &wellContribs, BdaResult &res) override
 
void get_result (double *x) override
 

Detailed Description

template<unsigned int block_size>
class Opm::Accelerator::rocalutionSolverBackend< block_size >

This class implements a rocalution based linear solver solver on GPU It uses ilu0-bicgstab

Constructor & Destructor Documentation

◆ rocalutionSolverBackend()

template<unsigned int block_size>
Opm::Accelerator::rocalutionSolverBackend< block_size >::rocalutionSolverBackend ( int  linear_solver_verbosity,
int  maxit,
double  tolerance 
)

Construct a rocalutionSolver also initialize rocalution library and rocalution variables

Parameters
[in]linear_solver_verbosityverbosity of rocalutionSolver
[in]maxitmaximum number of iterations for rocalutionSolver
[in]tolerancerequired relative tolerance for rocalutionSolver

◆ ~rocalutionSolverBackend()

template<unsigned int block_size>
Opm::Accelerator::rocalutionSolverBackend< block_size >::~rocalutionSolverBackend ( )

Destroy a rocalutionSolver, and free memory.

Member Function Documentation

◆ get_result()

template<unsigned int block_size>
void Opm::Accelerator::rocalutionSolverBackend< block_size >::get_result ( double *  x)
overridevirtual

Get result after linear solve, and peform postprocessing if necessary

Parameters
[in,out]xresulting x vector, caller must guarantee that x points to a valid array

Implements Opm::Accelerator::BdaSolver< block_size >.

◆ solve_system()

template<unsigned int block_size>
SolverStatus Opm::Accelerator::rocalutionSolverBackend< block_size >::solve_system ( std::shared_ptr< BlockedMatrix matrix,
double *  b,
std::shared_ptr< BlockedMatrix jacMatrix,
WellContributions wellContribs,
BdaResult res 
)
overridevirtual

Solve linear system, A*x = b, matrix A must be in blocked-CSR format

Parameters
[in]matrixmatrix A
[in]binput vector, contains N values
[in]jacMatrixmatrix for preconditioner
[in]wellContribsWellContributions, to apply them separately, instead of adding them to matrix A
[in,out]ressummary of solver result
Returns
status code

Implements Opm::Accelerator::BdaSolver< block_size >.


The documentation for this class was generated from the following file: