Loading...
Searching...
No Matches
Opm::MultisegmentWellContribution< Scalar > Class Template Reference

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.

## Detailed Description

template<class Scalar>
class Opm::MultisegmentWellContribution< Scalar >

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.

## Constructor & Destructor Documentation

## MultisegmentWellContribution()

template<class Scalar>

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.

Parameters

  [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

## Member Function Documentation

## apply()

template<class Scalar>

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.

Parameters

  [in] | h_x | vector x, must be on CPU
  [in,out] | h_y | vector y, must be on CPU

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

- opm/simulators/linalg/gpubridge/MultisegmentWellContribution.hpp
- opm/simulators/linalg/gpubridge/MultisegmentWellContribution.cpp