My Project
Loading...
Searching...
No Matches
Opm::StandardWellEquations< Scalar, numEq > Class Template Reference

Public Types

using VectorBlockWellType = Dune::DynamicVector< Scalar >
 
using BVectorWell = Dune::BlockVector< VectorBlockWellType >
 
using DiagMatrixBlockWellType = Dune::DynamicMatrix< Scalar >
 
using DiagMatWell = Dune::BCRSMatrix< DiagMatrixBlockWellType >
 
using OffDiagMatrixBlockWellType = Dune::DynamicMatrix< Scalar >
 
using OffDiagMatWell = Dune::BCRSMatrix< OffDiagMatrixBlockWellType >
 
using BVector = Dune::BlockVector< Dune::FieldVector< Scalar, numEq > >
 

Public Member Functions

 StandardWellEquations (const ParallelWellInfo &parallel_well_info)
 
void init (const int num_cells, const int numWellEq, const int numPerfs, const std::vector< int > &cells)
 Setup sparsity pattern for the matrices.
 
void clear ()
 Set all coefficients to 0.
 
void apply (const BVector &x, BVector &Ax) const
 Apply linear operator to vector.
 
void apply (BVector &r) const
 Apply linear operator to vector.
 
void solve (BVectorWell &dx_well) const
 Apply inverted D matrix to residual and store in vector.
 
void invert ()
 Invert D matrix.
 
void recoverSolutionWell (const BVector &x, BVectorWell &xw) const
 Recover well solution.
 
void extract (const int numStaticWellEq, WellContributions &wellContribs) const
 Add the matrices of this well to the WellContributions object.
 
template<class SparseMatrixAdapter >
void extract (SparseMatrixAdapter &jacobian) const
 Add the matrices of this well to the sparse matrix adapter.
 
template<class PressureMatrix >
void extractCPRPressureMatrix (PressureMatrix &jacobian, const BVector &weights, const int pressureVarIndex, const bool use_well_weights, const WellInterfaceGeneric &well, const int bhp_var_index, const WellState &well_state) const
 Extract CPR pressure matrix.
 
unsigned int getNumBlocks () const
 Get the number of blocks of the C and B matrices.
 
void sumDistributed (Parallel::Communication comm)
 Sum with off-process contribution.
 
const BVectorWell & residual () const
 Returns a const reference to the residual.
 

Friends

class StandardWellEquationAccess< Scalar, numEq >
 

Member Function Documentation

◆ init()

template<class Scalar , int numEq>
void Opm::StandardWellEquations< Scalar, numEq >::init ( const int  num_cells,
const int  numWellEq,
const int  numPerfs,
const std::vector< int > &  cells 
)

Setup sparsity pattern for the matrices.

Parameters
num_cellsTotal number of cells
numWellEqNumber of well equations
numPerfsNumber of perforations
cellsCell indices for perforations

◆ recoverSolutionWell()

template<class Scalar , int numEq>
void Opm::StandardWellEquations< Scalar, numEq >::recoverSolutionWell ( const BVector &  x,
BVectorWell &  xw 
) const

Recover well solution.

xw = inv(D)*(rw - C*x)


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