Linearizes TPSA equations and generates system matrix and residual for linear solver.
More...
#include <tpsalinearizer.hpp>
|
|
| TpsaLinearizer () |
| | Constructor.
|
| void | init (Simulator &simulator) |
| | Initialize the linearizer.
|
| void | eraseMatrix () |
| | Causes the Jacobian matrix to be recreated from scratch before the next iteration.
|
|
void | finalize () |
| | Finalize creation of Jacobian matrix and make ready for linear solver.
|
| template<class SubDomainType> |
| void | resetSystem_ (const SubDomainType &domain) |
| | Initializing and/or reset residual and Jacobian.
|
|
void | linearize () |
| | Linearize the non-linear system.
|
| void | linearizeDomain () |
| | Linearize the non-linear system for the spatial domain.
|
| template<class SubDomainType> |
| void | linearizeDomain (const SubDomainType &domain) |
| | Linearize the non-linear system for the spatial domain.
|
|
void | linearizeAuxiliaryEquations () |
| | Linearize auxillary equation.
|
| void | setResAndJacobi (VectorBlock &res, MatrixBlock &bMat, const ADVectorBlock &resid) const |
| | Extract local residuals and sub-block Jacobians from locally computed AD residual.
|
|
void | updateBoundaryConditionData () |
| | Update boundary condition information.
|
| const SparseMatrixAdapter & | jacobian () const |
| | Get Jacobian matrix.
|
| SparseMatrixAdapter & | jacobian () |
| | Get Jacobian matrix.
|
| const GlobalEqVector & | residual () const |
| | Get residual vector.
|
| GlobalEqVector & | residual () |
| | Get residual vector.
|
| const LinearizationType & | getLinearizationType () const |
| | Get linearization type.
|
| std::map< unsigned, Constraints > | constraintsMap () const |
| | Get constraints map.
|
| void | setLinearizationType (LinearizationType linearizationType) |
| | Set linearization type.
|
template<class TypeTag>
class Opm::TpsaLinearizer< TypeTag >
Linearizes TPSA equations and generates system matrix and residual for linear solver.
◆ constraintsMap()
Get constraints map.
- Returns
- Constraints map
- Note
- No constraints implemented in TPSA
◆ eraseMatrix()
Causes the Jacobian matrix to be recreated from scratch before the next iteration.
This method is usually called if the sparsity pattern has changed for some reason. (e.g. by modifications of the grid or changes of the auxiliary equations.)
◆ getLinearizationType()
Get linearization type.
- Returns
- Reference to the linearization object
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).
◆ init()
Initialize the linearizer.
- Parameters
-
At this point we can assume that all objects in the simulator have been allocated. We cannot assume that they are fully initialized, though.
◆ jacobian() [1/2]
Get Jacobian matrix.
- Returns
- Reference to (sparse) Jacobian matrix object
◆ jacobian() [2/2]
Get Jacobian matrix.
- Returns
- Reference to (sparse) Jacobian matrix object
◆ linearizeDomain() [1/2]
Linearize the non-linear system for the spatial domain.
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>
Linearize the non-linear system for the spatial domain.
- Parameters
-
| domain | (Sub-)domain to linearize |
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.
◆ resetSystem_()
template<class TypeTag>
template<class SubDomainType>
Initializing and/or reset residual and Jacobian.
- Parameters
-
| domain | (Sub-)domain to reset |
◆ residual() [1/2]
Get residual vector.
- Returns
- Reference to the residual
◆ residual() [2/2]
Get residual vector.
- Returns
- Reference to the residual
◆ setLinearizationType()
Set linearization type.
- Parameters
-
| linearizationType | Linearization object |
◆ setResAndJacobi()
template<class TypeTag>
| void Opm::TpsaLinearizer< TypeTag >::setResAndJacobi |
( |
VectorBlock & | res, |
|
|
MatrixBlock & | bMat, |
|
|
const ADVectorBlock & | resid ) const |
|
inline |
Extract local residuals and sub-block Jacobians from locally computed AD residual.
- Parameters
-
| res | Residual to set |
| bMat | Block matrix from Jacobian to set |
| resid | Computed AD residual |
The documentation for this class was generated from the following file: