My Project
|
This class serves to duplicate the functionality of the MultisegmentWell A MultisegmentWell uses C, D and B and performs y -= (C^T * (D^-1 * (B*x))) B and C are matrices, with M rows and N columns, where N is the size of the matrix. More...
#include <MultisegmentWellContribution.hpp>
Public Types | |
using | UMFPackIndex = SuiteSparse_long |
Public Member Functions | |
MultisegmentWellContribution (unsigned int dim, unsigned int dim_wells, unsigned int Mb, std::vector< Scalar > &Bvalues, std::vector< unsigned int > &BcolIndices, std::vector< unsigned int > &BrowPointers, unsigned int DnumBlocks, Scalar *Dvalues, UMFPackIndex *DcolPointers, UMFPackIndex *DrowIndices, std::vector< Scalar > &Cvalues) | |
Create a new MultisegmentWellContribution Matrices C and B are passed in Blocked CSR, matrix D in CSC The variables representing C, B and D will go out of scope when MultisegmentWell::addWellContribution() ends. | |
~MultisegmentWellContribution () | |
Destroy a MultisegmentWellContribution, and free memory. | |
void | apply (Scalar *h_x, Scalar *h_y) |
Apply the MultisegmentWellContribution on CPU performs y -= (C^T * (D^-1 * (B*x))) for MultisegmentWell. | |
This class serves to duplicate the functionality of the MultisegmentWell A MultisegmentWell uses C, D and B and performs y -= (C^T * (D^-1 * (B*x))) B and C are matrices, with M rows and N columns, where N is the size of the matrix.
They contain blocks of MultisegmentWell::numEq by MultisegmentWell::numWellEq. D is a MxM matrix, the square blocks have size MultisegmentWell::numWellEq. B*x and D*B*x are a vector with M*numWellEq doubles C*D*B*x is a vector with N*numEq doubles.
Opm::MultisegmentWellContribution< Scalar >::MultisegmentWellContribution | ( | unsigned int | dim, |
unsigned int | dim_wells, | ||
unsigned int | Mb, | ||
std::vector< Scalar > & | Bvalues, | ||
std::vector< unsigned int > & | BcolIndices, | ||
std::vector< unsigned int > & | BrowPointers, | ||
unsigned int | DnumBlocks, | ||
Scalar * | Dvalues, | ||
UMFPackIndex * | DcolPointers, | ||
UMFPackIndex * | DrowIndices, | ||
std::vector< Scalar > & | Cvalues ) |
Create a new MultisegmentWellContribution Matrices C and B are passed in Blocked CSR, matrix D in CSC The variables representing C, B and D will go out of scope when MultisegmentWell::addWellContribution() ends.
[in] | dim | size of blocks in blockvectors x and y, equal to MultisegmentWell::numEq |
[in] | dim_wells | size of blocks of C, B and D, equal to MultisegmentWell::numWellEq |
[in] | Mb | number of blockrows in C, B and D |
[in] | Bvalues | nonzero values of matrix B |
[in] | BcolIndices | columnindices of blocks of matrix B |
[in] | BrowPointers | rowpointers of matrix B |
[in] | DnumBlocks | number of blocks in D |
[in] | Dvalues | nonzero values of matrix D |
[in] | DcolPointers | columnpointers of matrix D |
[in] | DrowIndices | rowindices of matrix D |
[in] | Cvalues | nonzero values of matrix C |
void Opm::MultisegmentWellContribution< Scalar >::apply | ( | Scalar * | h_x, |
Scalar * | h_y ) |
Apply the MultisegmentWellContribution on CPU performs y -= (C^T * (D^-1 * (B*x))) for MultisegmentWell.
[in] | h_x | vector x, must be on CPU |
[in,out] | h_y | vector y, must be on CPU |