Opm::WellModelMatrixAdapter< M, X, Y, overlapping > Class Template Reference

Adapter to combine a matrix and another linear operator into a combined linear operator. More...

#include <WellOperators.hpp>

Inheritance diagram for Opm::WellModelMatrixAdapter< M, X, Y, overlapping >:
Inheritance graph

Public Types

typedef M matrix_type
 
typedef X domain_type
 
typedef Y range_type
 
typedef X::field_type field_type
 
using PressureMatrix = Dune::BCRSMatrix< Opm::MatrixBlock< double, 1, 1 > >
 
typedef Dune::OwnerOverlapCopyCommunication< int, int > communication_type
 

Public Member Functions

Dune::SolverCategory::Category category () const override
 
 WellModelMatrixAdapter (const M &A, const Opm::LinearOperatorExtra< X, Y > &wellOper, const std::shared_ptr< communication_type > &comm=std::shared_ptr< communication_type >())
 constructor: just store a reference to a matrix More...
 
virtual void apply (const X &x, Y &y) const override
 
virtual void applyscaleadd (field_type alpha, const X &x, Y &y) const override
 
virtual const matrix_typegetmat () const override
 
void addWellPressureEquations (PressureMatrix &jacobian, const X &weights, const bool use_well_weights) const
 
void addWellPressureEquationsStruct (PressureMatrix &jacobian) const
 
int getNumberOfExtraEquations () const
 

Protected Attributes

const matrix_typeA_
 
const Opm::LinearOperatorExtra< X, Y > & wellOper_
 
std::shared_ptr< communication_typecomm_
 

Detailed Description

template<class M, class X, class Y, bool overlapping>
class Opm::WellModelMatrixAdapter< M, X, Y, overlapping >

Adapter to combine a matrix and another linear operator into a combined linear operator.

Adapts a matrix A plus another linear operator W (typically from wells) to the assembled linear operator interface by returning S from getmat() and making apply() and applyscaleadd() apply both A and W to the input vector. In addition this is a parallel-aware adapter, that does not require the W operator to be parallel, but makes it into one by making the proper projections.

Member Typedef Documentation

◆ communication_type

template<class M , class X , class Y , bool overlapping>
typedef Dune::OwnerOverlapCopyCommunication<int,int> Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::communication_type

◆ domain_type

template<class M , class X , class Y , bool overlapping>
typedef X Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::domain_type

◆ field_type

template<class M , class X , class Y , bool overlapping>
typedef X::field_type Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::field_type

◆ matrix_type

template<class M , class X , class Y , bool overlapping>
typedef M Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::matrix_type

◆ PressureMatrix

template<class M , class X , class Y , bool overlapping>
using Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::PressureMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1> >

◆ range_type

template<class M , class X , class Y , bool overlapping>
typedef Y Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::range_type

Constructor & Destructor Documentation

◆ WellModelMatrixAdapter()

template<class M , class X , class Y , bool overlapping>
Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::WellModelMatrixAdapter ( const M &  A,
const Opm::LinearOperatorExtra< X, Y > &  wellOper,
const std::shared_ptr< communication_type > &  comm = std::shared_ptr< communication_type >() 
)
inline

constructor: just store a reference to a matrix

Member Function Documentation

◆ addWellPressureEquations()

template<class M , class X , class Y , bool overlapping>
void Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::addWellPressureEquations ( PressureMatrix jacobian,
const X &  weights,
const bool  use_well_weights 
) const
inline

◆ addWellPressureEquationsStruct()

template<class M , class X , class Y , bool overlapping>
void Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::addWellPressureEquationsStruct ( PressureMatrix jacobian) const
inline

◆ apply()

◆ applyscaleadd()

◆ category()

template<class M , class X , class Y , bool overlapping>
Dune::SolverCategory::Category Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::category ( ) const
inlineoverride

◆ getmat()

template<class M , class X , class Y , bool overlapping>
virtual const matrix_type & Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::getmat ( ) const
inlineoverridevirtual

◆ getNumberOfExtraEquations()

template<class M , class X , class Y , bool overlapping>
int Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::getNumberOfExtraEquations ( ) const
inline

Member Data Documentation

◆ A_

◆ comm_

template<class M , class X , class Y , bool overlapping>
std::shared_ptr< communication_type > Opm::WellModelMatrixAdapter< M, X, Y, overlapping >::comm_
protected

◆ wellOper_


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