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

Public Types

using VectorBlockWellType = Dune::FieldVector< Scalar, numWellEq >
 
using BVectorWell = Dune::BlockVector< VectorBlockWellType >
 
using VectorBlockType = Dune::FieldVector< Scalar, numEq >
 
using BVector = Dune::BlockVector< VectorBlockType >
 
using DiagMatrixBlockWellType = Dune::FieldMatrix< Scalar, numWellEq, numWellEq >
 
using DiagMatWell = Dune::BCRSMatrix< DiagMatrixBlockWellType >
 
using OffDiagMatrixBlockWellType = Dune::FieldMatrix< Scalar, numWellEq, numEq >
 
using OffDiagMatWell = Dune::BCRSMatrix< OffDiagMatrixBlockWellType >
 

Public Member Functions

 MultisegmentWellEquations (const MultisegmentWellGeneric< Scalar > &well)
 
void init (const int num_cells, const int numPerfs, const std::vector< int > &cells, const std::vector< std::vector< int > > &segment_inlets, const std::vector< std::vector< int > > &segment_perforations)
 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 createSolver ()
 Compute the LU-decomposition of D matrix.
 
BVectorWell solve () const
 Apply inverted D matrix to residual and return result.
 
void recoverSolutionWell (const BVector &x, BVectorWell &xw) const
 Recover well solution.
 
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, const WellInterfaceGeneric &well, const int seg_pressure_var_ind, const WellState &well_state) const
 Extract CPR pressure matrix.
 
const BVectorWell & residual () const
 Returns a const reference to the residual.
 

Friends

class MultisegmentWellEquationAccess< Scalar, numWellEq, numEq >
 

Member Function Documentation

◆ init()

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

Setup sparsity pattern for the matrices.

Parameters
num_cellsTotal number of cells
numPerfsNumber of perforations
cellsCell indices for perforations
segment_inletsCell indices for segment inlets
segment_perforationsCell indices for segment perforations

◆ recoverSolutionWell()

template<class Scalar , int numWellEq, int numEq>
void Opm::MultisegmentWellEquations< Scalar, numWellEq, 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: