|
My Project
|
Public Member Functions | |
| void | setOpenCLEnv (cl::Context *context_, cl::CommandQueue *queue_) |
| void | setReordering (int *toOrder, bool reorder) |
| Since the rows of the matrix are reordered, the columnindices of the matrixdata is incorrect Those indices need to be mapped via toOrder. More... | |
| void | apply_stdwells (cl::Buffer d_x, cl::Buffer d_y, cl::Buffer d_toOrder) |
| void | apply_mswells (cl::Buffer d_x, cl::Buffer d_y) |
| void | apply (cl::Buffer d_x, cl::Buffer d_y, cl::Buffer d_toOrder) |
Public Member Functions inherited from Opm::WellContributions | |
| unsigned int | getNumWells () |
| void | addNumBlocks (unsigned int numBlocks) |
| Indicate how large the next StandardWell is, this function cannot be called after alloc() is called. More... | |
| void | alloc () |
| Allocate memory for the StandardWells. | |
| virtual | ~WellContributions ()=default |
| Empty destructor. | |
| void | setBlockSize (unsigned int dim, unsigned int dim_wells) |
| Indicate how large the blocks of the StandardWell (C and B) are. More... | |
| void | setVectorSize (unsigned N) |
| Set size of vector that the wells are applied to. More... | |
| void | addMatrix (MatrixType type, int *colIndices, double *values, unsigned int val_size) |
| Store a matrix in this object, in blocked csr format, can only be called after alloc() is called. More... | |
| void | addMultisegmentWellContribution (unsigned int dim, unsigned int dim_wells, unsigned int Mb, std::vector< double > &Bvalues, std::vector< unsigned int > &BcolIndices, std::vector< unsigned int > &BrowPointers, unsigned int DnumBlocks, double *Dvalues, UMFPackIndex *DcolPointers, UMFPackIndex *DrowIndices, std::vector< double > &Cvalues) |
| Add a MultisegmentWellContribution, actually creates an object on heap that is destroyed in the destructor Matrices C and B are passed in Blocked CSR, matrix D in CSC. More... | |
Protected Member Functions | |
| void | APIalloc () override |
| Allocate memory for the StandardWells. More... | |
| void | APIaddMatrix (MatrixType type, int *colIndices, double *values, unsigned int val_size) override |
| Api specific upload of matrix. More... | |
| virtual void | APIalloc () |
| API specific allocation. More... | |
| virtual void | APIaddMatrix (MatrixType, int *, double *, unsigned int) |
| Api specific upload of matrix. More... | |
Protected Attributes | |
| cl::Context * | context |
| cl::CommandQueue * | queue |
| std::vector< cl::Event > | events |
| std::unique_ptr< cl::Buffer > | d_Cnnzs_ocl |
| std::unique_ptr< cl::Buffer > | d_Dnnzs_ocl |
| std::unique_ptr< cl::Buffer > | d_Bnnzs_ocl |
| std::unique_ptr< cl::Buffer > | d_Ccols_ocl |
| std::unique_ptr< cl::Buffer > | d_Bcols_ocl |
| std::unique_ptr< cl::Buffer > | d_val_pointers_ocl |
| bool | reorder = false |
| int * | h_toOrder = nullptr |
| std::vector< double > | h_x |
| std::vector< double > | h_y |
Protected Attributes inherited from Opm::WellContributions | |
| bool | allocated = false |
| unsigned int | N |
| unsigned int | dim |
| unsigned int | dim_wells |
| unsigned int | num_blocks = 0 |
| unsigned int | num_std_wells = 0 |
| unsigned int | num_ms_wells = 0 |
| unsigned int | num_blocks_so_far = 0 |
| unsigned int | num_std_wells_so_far = 0 |
| std::vector< unsigned int > | val_pointers |
| std::vector< std::unique_ptr< MultisegmentWellContribution > > | multisegments |
Additional Inherited Members | |
Public Types inherited from Opm::WellContributions | |
| enum class | MatrixType { C , D , B } |
| StandardWell has C, D and B matrices that need to be copied. | |
| using | UMFPackIndex = int |
Static Public Member Functions inherited from Opm::WellContributions | |
| static std::unique_ptr< WellContributions > | create (const std::string &accelerator_mode, bool useWellConn) |
|
overrideprotectedvirtual |
Api specific upload of matrix.
Reimplemented from Opm::WellContributions.
|
overrideprotectedvirtual |
Allocate memory for the StandardWells.
Reimplemented from Opm::WellContributions.
| void Opm::WellContributionsOCL::setReordering | ( | int * | toOrder, |
| bool | reorder | ||
| ) |
Since the rows of the matrix are reordered, the columnindices of the matrixdata is incorrect Those indices need to be mapped via toOrder.
| [in] | toOrder | array with mappings |
| [in] | reorder | whether reordering is actually used or not |