Opm::BaseAuxiliaryModule< TypeTag > Class Template Referenceabstract

Base class for specifying auxiliary equations. More...

#include <baseauxiliarymodule.hh>

Public Member Functions

virtual ~BaseAuxiliaryModule ()
 
virtual unsigned numDofs () const =0
 Returns the number of additional degrees of freedom required for the auxiliary module. More...
 
void setDofOffset (int value)
 Set the offset in the global system of equations for the first degree of freedom of this auxiliary module. More...
 
int dofOffset ()
 Return the offset in the global system of equations for the first degree of freedom of this auxiliary module. More...
 
int localToGlobalDof (unsigned localDofIdx) const
 Given a degree of freedom relative to the current auxiliary equation, return the corresponding index in the global system of equations. More...
 
virtual void addNeighbors (std::vector< NeighborSet > &neighbors) const =0
 Specify the additional neighboring correlations caused by the auxiliary module. More...
 
virtual void applyInitial ()=0
 Set the initial condition of the auxiliary module in the solution vector. More...
 
virtual void linearize (SparseMatrixAdapter &matrix, GlobalEqVector &residual)=0
 Linearize the auxiliary equation. More...
 
virtual void postSolve (GlobalEqVector &)
 This method is called after the linear solver has been called but before the solution is updated for the next iteration. More...
 

Protected Types

using NeighborSet = std::set< unsigned >
 

Detailed Description

template<class TypeTag>
class Opm::BaseAuxiliaryModule< TypeTag >

Base class for specifying auxiliary equations.

For example, these equations can be wells, non-neighboring connections, interfaces between model domains, etc.

Member Typedef Documentation

◆ NeighborSet

template<class TypeTag >
using Opm::BaseAuxiliaryModule< TypeTag >::NeighborSet = std::set<unsigned>
protected

Constructor & Destructor Documentation

◆ ~BaseAuxiliaryModule()

template<class TypeTag >
virtual Opm::BaseAuxiliaryModule< TypeTag >::~BaseAuxiliaryModule ( )
inlinevirtual

Member Function Documentation

◆ addNeighbors()

template<class TypeTag >
virtual void Opm::BaseAuxiliaryModule< TypeTag >::addNeighbors ( std::vector< NeighborSet > &  neighbors) const
pure virtual

Specify the additional neighboring correlations caused by the auxiliary module.

◆ applyInitial()

template<class TypeTag >
virtual void Opm::BaseAuxiliaryModule< TypeTag >::applyInitial ( )
pure virtual

Set the initial condition of the auxiliary module in the solution vector.

Referenced by Opm::FvBaseDiscretization< TypeTag >::addAuxiliaryModule().

◆ dofOffset()

template<class TypeTag >
int Opm::BaseAuxiliaryModule< TypeTag >::dofOffset ( )
inline

Return the offset in the global system of equations for the first degree of freedom of this auxiliary module.

◆ linearize()

template<class TypeTag >
virtual void Opm::BaseAuxiliaryModule< TypeTag >::linearize ( SparseMatrixAdapter &  matrix,
GlobalEqVector &  residual 
)
pure virtual

Linearize the auxiliary equation.

◆ localToGlobalDof()

template<class TypeTag >
int Opm::BaseAuxiliaryModule< TypeTag >::localToGlobalDof ( unsigned  localDofIdx) const
inline

Given a degree of freedom relative to the current auxiliary equation, return the corresponding index in the global system of equations.

References Opm::BaseAuxiliaryModule< TypeTag >::numDofs().

◆ numDofs()

template<class TypeTag >
virtual unsigned Opm::BaseAuxiliaryModule< TypeTag >::numDofs ( ) const
pure virtual

Returns the number of additional degrees of freedom required for the auxiliary module.

Referenced by Opm::BaseAuxiliaryModule< TypeTag >::localToGlobalDof().

◆ postSolve()

template<class TypeTag >
virtual void Opm::BaseAuxiliaryModule< TypeTag >::postSolve ( GlobalEqVector &  )
inlinevirtual

This method is called after the linear solver has been called but before the solution is updated for the next iteration.

It is intended to implement stuff like Schur complements.

◆ setDofOffset()

template<class TypeTag >
void Opm::BaseAuxiliaryModule< TypeTag >::setDofOffset ( int  value)
inline

Set the offset in the global system of equations for the first degree of freedom of this auxiliary module.

Referenced by Opm::FvBaseDiscretization< TypeTag >::addAuxiliaryModule().


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