template<typename TypeSystem>
MaxRatioError class
Error estimator using max diff/ max scale.
Template parameters | |
---|---|
TypeSystem | Type class of SpaceHub |
Contents
Constructors, destructors, conversion operators
- MaxRatioError(Scalar atol, Scalar rtol)
- Construct a new Max Ratio Error object.
- SPACEHUB_READ_ACCESSOR(Scalar, atol, atol_)
- Absolute error tolerance.
- SPACEHUB_READ_ACCESSOR(Scalar, rtol, rtol_)
- Relative error tolerance.
Public functions
- void set_atol(Scalar)
- Set the absolute error tolerance.
- void set_rtol(Scalar)
- Set the relative error tolerance.
-
template<typename Array1, typename Array2>auto error(Array1 const& scale, Array2 const& diff) -> Scalar
- Estimate the error.
-
template<typename Array1, typename Array2, typename Array3>auto error(Array1 const& scale, Array2 const& y1, Array3 const& y1_prime) -> Scalar
- Estimate the error.
Function documentation
template<typename TypeSystem>
hub:: ode:: MaxRatioError<TypeSystem>:: MaxRatioError(Scalar atol,
Scalar rtol)
Construct a new Max Ratio Error object.
Parameters | |
---|---|
atol | Absolute error tolerance |
rtol | Relative error tolerance |
template<typename TypeSystem>
template<typename Array1, typename Array2>
Scalar hub:: ode:: MaxRatioError<TypeSystem>:: error(Array1 const& scale,
Array2 const& diff)
Estimate the error.
Template parameters | |
---|---|
Array1 | Scalar array type. |
Array2 | Scalar array type. |
Parameters | |
scale | Scale used for normalization. The error ~ |diff|/|scale|. |
diff | Difference between two results that need convergence check. |
Returns | Scalar |
template<typename TypeSystem>
template<typename Array1, typename Array2, typename Array3>
Scalar hub:: ode:: MaxRatioError<TypeSystem>:: error(Array1 const& scale,
Array2 const& y1,
Array3 const& y1_prime)
Estimate the error.
Template parameters | |
---|---|
Array1 | Scalar array type |
Array2 | Scalar array type |
Array3 | Scalar array type |
Parameters | |
scale | Scale used for normalization. The error ~ |y1-y1`|/|scale|. |
y1 | One of the results needs convergence check. |
y1_prime | The other results needs convergence check. |
Returns | Scalar |