Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Static Protected Member Functions |
Protected Attributes |
List of all members
Opm::FvBaseFdLocalLinearizer< TypeTag > Class Template Reference Calculates the Jacobian of the local residual for finite volume spatial discretizations using a finite difference method. More...
Detailed Descriptiontemplate<class TypeTag> class Opm::FvBaseFdLocalLinearizer< TypeTag > Calculates the Jacobian of the local residual for finite volume spatial discretizations using a finite difference method. The local Jacobian for a given context is defined as the derivatives of the residuals of all degrees of freedom featured by the stencil with regard to the primary variables of the stencil's "primary" degrees of freedom. This class implements numeric differentiation using finite difference methods, i.e. forward or backward differences (2nd order), or central differences (3rd order). The method used is determined by the "NumericDifferenceMethod" property:
Here, is the residual function for all equations, is the value of a sub-control volume's primary variable at the evaluation point and is a small scalar value larger than 0. Constructor & Destructor Documentation◆ FvBaseFdLocalLinearizer()
template<class TypeTag >
◆ ~FvBaseFdLocalLinearizer()
template<class TypeTag >
Member Function Documentation◆ asImp_() [1/2]
template<class TypeTag >
◆ asImp_() [2/2]
template<class TypeTag >
◆ baseEpsilon()
template<class TypeTag >
Returns the unweighted epsilon value used to calculate the local derivatives. Referenced by Opm::FvBaseFdLocalLinearizer< TypeTag >::numericEpsilon(). ◆ evalPartialDerivative_()
template<class TypeTag >
Compute the partial derivatives of a context's residual functions. This method can be overwritten by the implementation if a better scheme than numerical differentiation is available. The default implementation of this method uses numeric differentiation, i.e. forward or backward differences (2nd order), or central differences (3rd order). The method used is determined by the "NumericDifferenceMethod" property:
Here, is the residual function for all equations, is the value of a sub-control volume's primary variable at the evaluation point and is a small value larger than 0.
References Opm::FvBaseFdLocalLinearizer< TypeTag >::asImp_(), Opm::FvBaseFdLocalLinearizer< TypeTag >::derivResidual_, Opm::FvBaseFdLocalLinearizer< TypeTag >::localResidual_, Opm::FvBaseFdLocalLinearizer< TypeTag >::numericDifferenceMethod_(), and Opm::FvBaseFdLocalLinearizer< TypeTag >::residual_. ◆ init()
template<class TypeTag >
Initialize the local Jacobian object. At this point we can assume that everything has been allocated, although some objects may not yet be completely initialized.
References Opm::FvBaseFdLocalLinearizer< TypeTag >::internalElemContext_, and Opm::FvBaseFdLocalLinearizer< TypeTag >::simulatorPtr_. ◆ jacobian()
template<class TypeTag >
Returns the local Jacobian matrix of the residual of a sub-control volume.
References Opm::FvBaseFdLocalLinearizer< TypeTag >::jacobian_. ◆ linearize() [1/2]
template<class TypeTag >
Compute an element's local Jacobian matrix and evaluate its residual. The local Jacobian for a given context is defined as the derivatives of the residuals of all degrees of freedom featured by the stencil with regard to the primary variables of the stencil's "primary" degrees of freedom. Adding the local Jacobians for all elements in the grid will give the global Jacobian 'grad f(x)'.
References Opm::FvBaseFdLocalLinearizer< TypeTag >::internalElemContext_, and Opm::FvBaseFdLocalLinearizer< TypeTag >::linearize(). Referenced by Opm::FvBaseFdLocalLinearizer< TypeTag >::linearize(). ◆ linearize() [2/2]
template<class TypeTag >
Compute an element's local Jacobian matrix and evaluate its residual. The local Jacobian for a given context is defined as the derivatives of the residuals of all degrees of freedom featured by the stencil with regard to the primary variables of the stencil's "primary" degrees of freedom. Adding the local Jacobians for all elements in the grid will give the global Jacobian 'grad f(x)'. After calling this method the ElementContext is in an undefined state, so do not use it anymore!
References Opm::FvBaseFdLocalLinearizer< TypeTag >::asImp_(), Opm::FvBaseFdLocalLinearizer< TypeTag >::localResidual_, Opm::FvBaseFdLocalLinearizer< TypeTag >::model_(), Opm::FvBaseFdLocalLinearizer< TypeTag >::reset_(), Opm::FvBaseFdLocalLinearizer< TypeTag >::residual_, Opm::FvBaseFdLocalLinearizer< TypeTag >::resize_(), and Opm::FvBaseFdLocalLinearizer< TypeTag >::updateLocalJacobian_(). ◆ localResidual() [1/2]
template<class TypeTag >
Return reference to the local residual. References Opm::FvBaseFdLocalLinearizer< TypeTag >::localResidual_. ◆ localResidual() [2/2]
template<class TypeTag >
Return reference to the local residual. References Opm::FvBaseFdLocalLinearizer< TypeTag >::localResidual_. ◆ model_()
template<class TypeTag >
References Opm::FvBaseFdLocalLinearizer< TypeTag >::simulatorPtr_. Referenced by Opm::FvBaseFdLocalLinearizer< TypeTag >::linearize(). ◆ numericDifferenceMethod_()
template<class TypeTag >
Returns the numeric difference method which is applied. Referenced by Opm::FvBaseFdLocalLinearizer< TypeTag >::evalPartialDerivative_(). ◆ numericEpsilon()
template<class TypeTag >
Returns the epsilon value which is added and removed from the current solution.
References Opm::FvBaseFdLocalLinearizer< TypeTag >::baseEpsilon(). ◆ problem_()
template<class TypeTag >
◆ registerParameters()
template<class TypeTag >
Register all run-time parameters for the local jacobian. ◆ reset_()
template<class TypeTag >
Reset the all relevant internal attributes to 0. References Opm::FvBaseFdLocalLinearizer< TypeTag >::jacobian_, and Opm::FvBaseFdLocalLinearizer< TypeTag >::residual_. Referenced by Opm::FvBaseFdLocalLinearizer< TypeTag >::linearize(). ◆ residual()
template<class TypeTag >
Returns the local residual of a sub-control volume.
References Opm::FvBaseFdLocalLinearizer< TypeTag >::residual_. ◆ resize_()
template<class TypeTag >
Resize all internal attributes to the size of the element. References Opm::FvBaseFdLocalLinearizer< TypeTag >::derivResidual_, Opm::FvBaseFdLocalLinearizer< TypeTag >::jacobian_, and Opm::FvBaseFdLocalLinearizer< TypeTag >::residual_. Referenced by Opm::FvBaseFdLocalLinearizer< TypeTag >::linearize(). ◆ simulator_()
template<class TypeTag >
◆ updateLocalJacobian_()
template<class TypeTag >
Updates the current local Jacobian matrix with the partial derivatives of all equations for primary variable 'pvIdx' at the degree of freedom associated with 'focusDofIdx'. References Opm::FvBaseFdLocalLinearizer< TypeTag >::derivResidual_, and Opm::FvBaseFdLocalLinearizer< TypeTag >::jacobian_. Referenced by Opm::FvBaseFdLocalLinearizer< TypeTag >::linearize(). Member Data Documentation◆ derivResidual_
template<class TypeTag >
◆ internalElemContext_
template<class TypeTag >
◆ jacobian_
template<class TypeTag >
◆ localResidual_
template<class TypeTag >
◆ modelPtr_
template<class TypeTag >
◆ residual_
template<class TypeTag >
◆ simulatorPtr_
template<class TypeTag >
The documentation for this class was generated from the following file: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||