ttim.invlapnumba ================ .. py:module:: ttim.invlapnumba Functions --------- .. autoapisummary:: ttim.invlapnumba.invlap ttim.invlapnumba.compute_laplace_parameters_numba ttim.invlapnumba.invlaptest ttim.invlapnumba.invlapcomp ttim.invlapnumba.invlapgen Module Contents --------------- .. py:function:: invlap(t, tmax, fp, M, alpha=1e-10, tol=1e-09) Inverse Laplace tansform with algorithm of De Hoog, Knight and Stokes. :param t: times for which inverse is computed :type t: array :param tmax: maximum time :type tmax: float :param fp: Laplace transformed solution :type fp: complex array :param M: number of terms (number of values of fp) :type M: integer :param alpha: is chosen based on the desired accuracy (assuming the rightmost singularity is 0), and tol=10α is the desired tolerance :type alpha: is the real part of the rightmost pole or singularity, which :returns: * **result** (*array*) -- time domain solution for specified times * *Reference* * *---------* * *de Hoog, F., J. Knight, A. Stokes (1982). An improved method for* * *numerical inversion of Laplace transforms. SIAM Journal of Scientific* * **and Statistical Computing 3** (*357-366, http://dx.doi.org/10.1137/0903022*) * **https** (*//bitbucket.org/klkuhlm/invlap/src/default/invlap.py*) .. !! processed by numpydoc !! .. py:function:: compute_laplace_parameters_numba(tmax, M=20, alpha=1e-10, tol=1e-09) .. py:function:: invlaptest() .. py:function:: invlapcomp(time, pot, npint, M, tintervals, enumber, etstart, ebc, nlayers) Compute time domain solution for given laplace domain solution. :param time: times for which time domain solution is computed, must start at 0 :type time: array, must be ordered :param pot: :type pot: array of laplace domain solution conform the ttim shape :param npint: number of p values per interval (=2M + 1) :type npint: int :param M: order of the approximation :type M: int :param tintervals: :type tintervals: time intervals :param enumber: :type enumber: array with number of element :param etstart: :type etstart: array with starting time of bc in element :param ebc: :type ebc: array with boundary condition value of element :param nlayers: number of layers :type nlayers: integer or None (default) .. rubric:: Notes enumber, etstart, and ebc are used because numba cannot deal with a list of arrays of different lengths (makes sense, actually) :returns: * *pot[naq, ntimes] if layers=None,* * *otherwise pot[len(layers) ,ntimes]* * *t must be ordered* .. !! processed by numpydoc !! .. py:function:: invlapgen(time, pot, M, tintervals, tstart, ebc) Compute time domain solution for given Laplace domain solution. :param time: times for which time domain solution is computed, must start at 0 :type time: array, must be ordered :param pot: :type pot: 1D array of laplace domain solution of length nint * (2M + 1) :param M: :type M: int order of the approximation (i.e., (2M + 1) p values per interval) :param tintervals: :type tintervals: 1D array of time intervals, length nint + 1 :param tstart: :type tstart: 1D array with starting times of bc in element, length nstart :param ebc: :type ebc: 1D array with change in boundary condition value, length nstart .. rubric:: Notes ebc is the difference with the previous value :rtype: rv[ntimes] .. !! processed by numpydoc !!