|
My Project
|
BdaBridge acts as interface between opm-simulators with the BdaSolvers. More...
#include <BdaBridge.hpp>
Public Member Functions | |
| BdaBridge (std::string accelerator_mode, std::string fpga_bitstream, int linear_solver_verbosity, int maxit, double tolerance, unsigned int platformID, unsigned int deviceID, std::string opencl_ilu_reorder, std::string linsolver) | |
| Construct a BdaBridge. More... | |
| void | solve_system (BridgeMatrix *bridgeMat, BridgeMatrix *jacMat, int numJacobiBlocks, BridgeVector &b, WellContributions &wellContribs, InverseOperatorResult &result) |
| Solve linear system, A*x = b. More... | |
| void | get_result (BridgeVector &x) |
| Get the resulting x vector. More... | |
| bool | getUseGpu () |
| Return whether the BdaBridge will use the GPU or not return whether the BdaBridge will use the GPU or not. | |
| void | initWellContributions (WellContributions &wellContribs, unsigned N) |
| Initialize the WellContributions object with opencl context and queue those must be set before calling BlackOilWellModel::getWellContributions() in ISTL. More... | |
| bool | getUseFpga () |
| Return whether the BdaBridge will use the FPGA or not return whether the BdaBridge will use the FPGA or not. | |
| std::string | getAccleratorName () |
| Return the selected accelerator mode, this is input via the command-line. | |
Static Public Member Functions | |
| static void | copySparsityPatternFromISTL (const BridgeMatrix &mat, std::vector< int > &h_rows, std::vector< int > &h_cols) |
| Store sparsity pattern into vectors. More... | |
BdaBridge acts as interface between opm-simulators with the BdaSolvers.
| Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >::BdaBridge | ( | std::string | accelerator_mode, |
| std::string | fpga_bitstream, | ||
| int | linear_solver_verbosity, | ||
| int | maxit, | ||
| double | tolerance, | ||
| unsigned int | platformID, | ||
| unsigned int | deviceID, | ||
| std::string | opencl_ilu_reorder, | ||
| std::string | linsolver | ||
| ) |
Construct a BdaBridge.
| [in] | accelerator_mode | to select if an accelerated solver is used, is passed via command-line: '–accelerator-mode=[none|cusparse|opencl|fpga]' |
| [in] | fpga_bitstream | FPGA programming bitstream file name, is passed via command-line: '–fpga-bitstream=[<filename>]' |
| [in] | linear_solver_verbosity | verbosity of BdaSolver |
| [in] | maxit | maximum number of iterations for BdaSolver |
| [in] | tolerance | required relative tolerance for BdaSolver |
| [in] | platformID | the OpenCL platform ID to be used |
| [in] | deviceID | the device ID to be used by the cusparse- and openclSolvers, too high values could cause runtime errors |
| [in] | opencl_ilu_reorder | select either level_scheduling or graph_coloring, see ILUReorder.hpp for explanation |
| [in] | linsolver | copy of cmdline argument –linear-solver |
|
static |
Store sparsity pattern into vectors.
| [in] | mat | input matrix, probably BCRSMatrix |
| [out] | h_rows | rowpointers |
| [out] | h_cols | columnindices |
| void Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >::get_result | ( | BridgeVector & | x | ) |
Get the resulting x vector.
| [in,out] | x | vector x, should be of type Dune::BlockVector |
| void Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >::initWellContributions | ( | WellContributions & | wellContribs, |
| unsigned | N | ||
| ) |
Initialize the WellContributions object with opencl context and queue those must be set before calling BlackOilWellModel::getWellContributions() in ISTL.
| [in] | wellContribs | container to hold all WellContributions |
| [in] | N | number of rows in scalar vector that wellContribs will be applied on |
| void Opm::BdaBridge< BridgeMatrix, BridgeVector, block_size >::solve_system | ( | BridgeMatrix * | bridgeMat, |
| BridgeMatrix * | jacMat, | ||
| int | numJacobiBlocks, | ||
| BridgeVector & | b, | ||
| WellContributions & | wellContribs, | ||
| InverseOperatorResult & | result | ||
| ) |
Solve linear system, A*x = b.
| [in] | bridgeMat | matrix A, should be of type Dune::BCRSMatrix |
| [in] | jacMat | matrix A, but modified for the preconditioner, should be of type Dune::BCRSMatrix |
| [in] | numJacobiBlocks | number of jacobi blocks in jacMat |
| [in] | b | vector b, should be of type Dune::BlockVector |
| [in] | wellContribs | contains all WellContributions, to apply them separately, instead of adding them to matrix A |
| [in,out] | result | summary of solver result |