

The end points and the interior points # are handled separately. dudt = dydt dvdt = dydt # Compute du/dt and dv/dt. empty_like ( y ) # Just like u and v are views of the interleaved vectors # in y, dudt and dvdt are views of the interleaved output # vectors in dydt. u = y v = y # dydt is the return value of this function. We define # views of u and v by slicing y. """ # The vectors u and v are interleaved in y. The ODEs are derived using the method of lines. Implements the system of differential equations.įirst, we define the functions for the source and reactionĭef grayscott1d ( y, t, f, k, Du, Dv, dx ): """ Differential equations for the 1-D Gray-Scott equations. With that decision made, we can write the function that If the samples are equally-spaced and the number of samples available

ode - Integrate ODE using VODE and ZVODE routines. odeint - General integration of ordinary differential equations. Interface to numerical integrators of ODE systems. See the special module's orthogonal polynomials (special) for Gaussian quadrature roots and weights for other weighting factors and regions.

romb - Use Romberg Integration to compute integral from - (2**k + 1) evenly-spaced samples. simpson - Use Simpson's rule to compute integral from samples. cumulative_trapezoid - Use trapezoidal rule to cumulatively compute integral. trapezoid - Use trapezoidal rule to compute integral. Methods for Integrating Functions given fixed samples. romberg - Integrate func using Romberg integration. quadrature - Integrate with given tolerance using Gaussian quadrature. fixed_quad - Integrate func(x) using Gaussian quadrature of order n. tplquad - General purpose triple integration. dblquad - General purpose double integration. help ( integrate ) Methods for Integrating Functions given function object.
