Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*- chemreac.util.analysis ----------------------
Functions to analyze numierc output from integration.
"""
print_function, unicode_literals)
""" Returns linear estimated error bounds from numerical integration
Parameters ========== y : array_like Output from integration (before back-transformation is applied) rtol : float Relative tolerance atol : float Absolute tolerance logy : bool Is y from a run with logarithmic concentration? scale_err : float scale estimated error bounds (useful for testing)
Returns ======= Array of shape (2, len(y)) with rows corresponding to lower and upper bounds around y.
.. note:: Assumes maximum mangitude of error be: \ :math:`\\boldsymbol{e}_{max} = \|\\boldsymbol{y} \ \\cdot \\mathrm{rtol}\| + \\mathrm{atol}` """ else:
si=0, **kwargs): """ Convenience function wrapping :func:`solver_linear_error`
Parameters ---------- integration: Integration instance """ solver_linear_error( integration.yout[ti, bi, si], integration.info['rtol'], atol_i, integration.rd.logy, **kwargs), 'concentration')
""" Suggests an appropriate initial time, useful when logy==True and logt==True, If suggested t0 > 1, 1 is returned.
Parameters ========== rd: ReactionDiffusion instance System at hand y0: sequence initial values max_f: float upper bound of absolute value for largest element in for the inital step. """ else: |