|
My Project
|
This class implements an ilu0-bicgstab solver on FPGA. More...
#include <FPGASolverBackend.hpp>
Public Member Functions | |
| FpgaSolverBackend (std::string fpga_bitstream, int linear_solver_verbosity, int maxit, double tolerance, ILUReorder opencl_ilu_reorder) | |
| Construct an fpgaSolver. More... | |
| ~FpgaSolverBackend () | |
| Destroy an fpgaSolver, and free memory. | |
| SolverStatus | solve_system (std::shared_ptr< BlockedMatrix > matrix, double *b, std::shared_ptr< BlockedMatrix > jacMatrix, WellContributions &wellContribs, BdaResult &res) override |
| Solve linear system, A*x = b, matrix A must be in blocked-CSR format. More... | |
| void | get_result (double *x) override |
| Get result after linear solve, and peform postprocessing if necessary. More... | |
Public Member Functions inherited from Opm::Accelerator::BdaSolver< block_size > | |
| BdaSolver (int linear_solver_verbosity, int max_it, double tolerance_) | |
| Construct a BdaSolver, can be cusparseSolver, openclSolver, fpgaSolver. More... | |
| BdaSolver (int linear_solver_verbosity, int max_it, double tolerance_, unsigned int deviceID_) | |
| BdaSolver (int linear_solver_verbosity, int max_it, double tolerance_, unsigned int platformID_, unsigned int deviceID_) | |
| BdaSolver (std::string fpga_bitstream, int linear_solver_verbosity, int max_it, double tolerance_) | |
| virtual | ~BdaSolver () |
| Define virtual destructor, so that the derivedclass destructor will be called. | |
| virtual SolverStatus | solve_system (std::shared_ptr< BlockedMatrix > matrix, double *b, std::shared_ptr< BlockedMatrix > jacMatrix, WellContributions &wellContribs, BdaResult &res)=0 |
| Define as pure virtual functions, so derivedclass must implement them. More... | |
| virtual void | get_result (double *x)=0 |
Additional Inherited Members | |
Protected Attributes inherited from Opm::Accelerator::BdaSolver< block_size > | |
| int | verbosity = 0 |
| int | maxit = 200 |
| double | tolerance = 1e-2 |
| std::string | bitstream |
| int | N |
| int | Nb |
| int | nnz |
| int | nnzb |
| unsigned int | platformID = 0 |
| unsigned int | deviceID = 0 |
| bool | initialized = false |
This class implements an ilu0-bicgstab solver on FPGA.
| Opm::Accelerator::FpgaSolverBackend< block_size >::FpgaSolverBackend | ( | std::string | fpga_bitstream, |
| int | linear_solver_verbosity, | ||
| int | maxit, | ||
| double | tolerance, | ||
| ILUReorder | opencl_ilu_reorder | ||
| ) |
Construct an fpgaSolver.
| [in] | fpga_bitstream | FPGA bitstream file name |
| [in] | linear_solver_verbosity | verbosity of fpgaSolver |
| [in] | maxit | maximum number of iterations for fpgaSolver |
| [in] | tolerance | required relative tolerance for fpgaSolver |
| [in] | opencl_ilu_reorder | select either level_scheduling or graph_coloring, see ILUReorder.hpp for explanation |
|
overridevirtual |
Get result after linear solve, and peform postprocessing if necessary.
| [in,out] | x | resulting x vector, caller must guarantee that x points to a valid array |
Implements Opm::Accelerator::BdaSolver< block_size >.
|
overridevirtual |
Solve linear system, A*x = b, matrix A must be in blocked-CSR format.
| [in] | matrix | matrix A |
| [in] | b | input vector, contains N values |
| [in] | jacMatrix | matrix for preconditioner |
| [in] | wellContribs | WellContributions, not used in FPGA solver because it requires them already added to matrix A |
| [in,out] | res | summary of solver result |
Implements Opm::Accelerator::BdaSolver< block_size >.