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

#include <fvbaselinearizer.hh>

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

template<class TypeTag>
class Opm::FvBaseLinearizer< 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.

Constructor & Destructor Documentation

◆ FvBaseLinearizer()

template<class TypeTag >
Opm::FvBaseLinearizer< TypeTag >::FvBaseLinearizer ( )
inline

◆ ~FvBaseLinearizer()

template<class TypeTag >
Opm::FvBaseLinearizer< TypeTag >::~FvBaseLinearizer ( )
inline

Member Function Documentation

◆ constraintsMap()

template<class TypeTag >
const std::map< unsigned, Constraints > & Opm::FvBaseLinearizer< 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::FvBaseLinearizer< 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.)

Referenced by Opm::FvBaseLinearizer< TypeTag >::init().

◆ finalize()

template<class TypeTag >
void Opm::FvBaseLinearizer< TypeTag >::finalize ( )
inline

◆ getFloresInfo()

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

Return constant reference to the floresInfo.

(This object has been only implemented for the tpfalinearizer.)

◆ getFlowsInfo()

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

Return constant reference to the flowsInfo.

(This object has been only implemented for the tpfalinearizer.)

◆ getLinearizationType()

template<class TypeTag >
const LinearizationType & Opm::FvBaseLinearizer< TypeTag >::getLinearizationType ( ) const
inline

◆ init()

template<class TypeTag >
void Opm::FvBaseLinearizer< 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.

References Opm::FvBaseLinearizer< TypeTag >::eraseMatrix(), and Opm::Simulator< TypeTag >::gridView().

◆ jacobian() [1/2]

template<class TypeTag >
SparseMatrixAdapter & Opm::FvBaseLinearizer< TypeTag >::jacobian ( )
inline

◆ jacobian() [2/2]

template<class TypeTag >
const SparseMatrixAdapter & Opm::FvBaseLinearizer< TypeTag >::jacobian ( ) const
inline

Return constant reference to global Jacobian matrix backend.

◆ linearize()

template<class TypeTag >
void Opm::FvBaseLinearizer< 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.

References Opm::FvBaseLinearizer< TypeTag >::linearizeAuxiliaryEquations(), and Opm::FvBaseLinearizer< TypeTag >::linearizeDomain().

◆ linearizeAuxiliaryEquations()

template<class TypeTag >
void Opm::FvBaseLinearizer< TypeTag >::linearizeAuxiliaryEquations ( )
inline

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

References Opm::Simulator< TypeTag >::gridView(), and Opm::FvBaseLinearizer< TypeTag >::linearizeAuxiliaryEquations().

Referenced by Opm::FvBaseLinearizer< TypeTag >::linearize(), and Opm::FvBaseLinearizer< TypeTag >::linearizeAuxiliaryEquations().

◆ linearizeDomain() [1/2]

template<class TypeTag >
void Opm::FvBaseLinearizer< 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.

References Opm::FvBaseLinearizer< TypeTag >::linearizeDomain().

Referenced by Opm::FvBaseLinearizer< TypeTag >::linearize(), and Opm::FvBaseLinearizer< TypeTag >::linearizeDomain().

◆ linearizeDomain() [2/2]

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

◆ registerParameters()

template<class TypeTag >
static void Opm::FvBaseLinearizer< TypeTag >::registerParameters ( )
inlinestatic

Register all run-time parameters for the Jacobian linearizer.

◆ resetSystem_()

◆ residual() [1/2]

template<class TypeTag >
GlobalEqVector & Opm::FvBaseLinearizer< TypeTag >::residual ( )
inline

◆ residual() [2/2]

template<class TypeTag >
const GlobalEqVector & Opm::FvBaseLinearizer< TypeTag >::residual ( ) const
inline

Return constant reference to global residual vector.

◆ setLinearizationType()

template<class TypeTag >
void Opm::FvBaseLinearizer< TypeTag >::setLinearizationType ( LinearizationType  linearizationType)
inline

◆ updateBoundaryConditionData()

template<class TypeTag >
void Opm::FvBaseLinearizer< TypeTag >::updateBoundaryConditionData ( )
inline

◆ updateDiscretizationParameters()

template<class TypeTag >
void Opm::FvBaseLinearizer< TypeTag >::updateDiscretizationParameters ( )
inline

◆ updateFlowsInfo()

template<class TypeTag >
void Opm::FvBaseLinearizer< TypeTag >::updateFlowsInfo ( )
inline

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