My Project
Loading...
Searching...
No Matches
Opm::TpfaLinearizer< TypeTag > Class Template Reference

The common code for the linearizers of non-linear systems of equations. More...

#include <tpfalinearizer.hh>

Public Member Functions

void init (Simulator &simulator)
 Initialize the linearizer.
 
void eraseMatrix ()
 Causes the Jacobian matrix to be recreated from scratch before the next iteration.
 
void linearize ()
 Linearize the full system of non-linear equations.
 
void linearizeDomain ()
 Linearize the part of the non-linear system of equations that is associated with the spatial domain.
 
template<class SubDomainType >
void linearizeDomain (const SubDomainType &domain)
 Linearize the part of the non-linear system of equations that is associated with a part of the spatial domain.
 
void finalize ()
 
void linearizeAuxiliaryEquations ()
 Linearize the part of the non-linear system of equations that is associated with the spatial domain.
 
const SparseMatrixAdapter & jacobian () const
 Return constant reference to global Jacobian matrix backend.
 
SparseMatrixAdapter & jacobian ()
 
const GlobalEqVector & residual () const
 Return constant reference to global residual vector.
 
GlobalEqVector & residual ()
 
void setLinearizationType (LinearizationType linearizationType)
 
const LinearizationTypegetLinearizationType () const
 
const autogetFlowsInfo () const
 Return constant reference to the flowsInfo.
 
const autogetFloresInfo () const
 Return constant reference to the floresInfo.
 
const autogetVelocityInfo () const
 Return constant reference to the velocityInfo.
 
void updateDiscretizationParameters ()
 
void updateBoundaryConditionData ()
 
const std::map< unsigned, Constraints > constraintsMap () const
 Returns the map of constraint degrees of freedom.
 
template<class SubDomainType >
void resetSystem_ (const SubDomainType &domain)
 
void setResAndJacobi (VectorBlock &res, MatrixBlock &bMat, const ADVectorBlock &resid) const
 
void updateFlowsInfo ()
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters for the Jacobian linearizer.
 

Detailed Description

template<class TypeTag>
class Opm::TpfaLinearizer< TypeTag >

The common code for the linearizers of non-linear systems of equations.

This class assumes that these system of equations to be linearized are stemming from models that use an finite volume scheme for spatial discretization and an Euler scheme for time discretization.

Member Function Documentation

◆ constraintsMap()

template<class TypeTag >
const std::map< unsigned, Constraints > Opm::TpfaLinearizer< TypeTag >::constraintsMap ( ) const
inline

Returns the map of constraint degrees of freedom.

(This object is only non-empty if the EnableConstraints property is true.)

◆ eraseMatrix()

template<class TypeTag >
void Opm::TpfaLinearizer< TypeTag >::eraseMatrix ( )
inline

Causes the Jacobian matrix to be recreated from scratch before the next iteration.

This method is usally called if the sparsity pattern has changed for some reason. (e.g. by modifications of the grid or changes of the auxiliary equations.)

◆ getFloresInfo()

template<class TypeTag >
const auto & Opm::TpfaLinearizer< TypeTag >::getFloresInfo ( ) const
inline

Return constant reference to the floresInfo.

(This object is only non-empty if the FLORES keyword is true.)

◆ getFlowsInfo()

template<class TypeTag >
const auto & Opm::TpfaLinearizer< TypeTag >::getFlowsInfo ( ) const
inline

Return constant reference to the flowsInfo.

(This object is only non-empty if the FLOWS keyword is true.)

◆ getVelocityInfo()

template<class TypeTag >
const auto & Opm::TpfaLinearizer< TypeTag >::getVelocityInfo ( ) const
inline

Return constant reference to the velocityInfo.

(This object is only non-empty if the DISPERC keyword is true.)

◆ init()

template<class TypeTag >
void Opm::TpfaLinearizer< TypeTag >::init ( Simulator simulator)
inline

Initialize the linearizer.

At this point we can assume that all objects in the simulator have been allocated. We cannot assume that they are fully initialized, though.

◆ linearize()

template<class TypeTag >
void Opm::TpfaLinearizer< TypeTag >::linearize ( )
inline

Linearize the full system of non-linear equations.

The linearizationType() controls the scheme used and the focus time index. The default is fully implicit scheme, and focus index equal to 0, i.e. current time (end of step).

This linearizes the spatial domain and all auxiliary equations.

◆ linearizeDomain() [1/2]

template<class TypeTag >
void Opm::TpfaLinearizer< TypeTag >::linearizeDomain ( )
inline

Linearize the part of the non-linear system of equations that is associated with the spatial domain.

That means that the global Jacobian of the residual is assembled and the residual is evaluated for the current solution.

The current state of affairs (esp. the previous and the current solutions) is represented by the model object.

◆ linearizeDomain() [2/2]

template<class TypeTag >
template<class SubDomainType >
void Opm::TpfaLinearizer< TypeTag >::linearizeDomain ( const SubDomainType domain)
inline

Linearize the part of the non-linear system of equations that is associated with a part of the spatial domain.

That means that the Jacobian of the residual is assembled and the residual is evaluated for the current solution, on the domain passed in as argument.

The current state of affairs (esp. the previous and the current solutions) is represented by the model object.


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