odespy.problems_pde

class odespy.problems_pde.Diffusion1D(I, L, U_L, U_R, n, a, x=None, jac_format='banded', f77=False, I_vectorized=True)[source]

Bases: odespy.problems.Problem

Classical 1D diffusion equation:

rac{partial u}{partial t} = a rac{partial^2 u}{partial x^2}

with initial condition \(u(x,0)=I(x)\) and boundary condtions \(u(0,t)=U_L(t), u(L,t)=U_R(t)\).

\[\begin{split}u_0' &= u_1 u_1' &= \mu (1-u_0^2)u_1 - u_0\end{split}\]

with a Jacobian

\[\begin{split}\left(egin{array}{cc} 0 & 1\ -2\mu u_0 - 1 & \mu (1-u_0^2) \end{array}\end{split}\]

ight)

Methods

default_parameters() Compute suitable time_points, atol/rtol, etc.
f(u, t)
get_initial_condition() Return vector of initial conditions.
jac(u, t)
jac_banded(u, t)
str_f_f77() Return f(u,t) as Fortran source code string.
str_jac_f77_fadau5() Return f(u,t) as Fortran source code string.
str_jac_f77_lsode_dense() Return Fortran source for dense Jacobian matrix in LSODE format.
terminate(u, t, step_number) Default terminate function, always returning False.
u_exact(t) Implementation of the exact solution.
verify(u, t[, atol, rtol]) Return True if u at time points t coincides with an exact
__init__(I, L, U_L, U_R, n, a, x=None, jac_format='banded', f77=False, I_vectorized=True)[source]
__module__ = 'odespy.problems_pde'
f(u, t)[source]
jac(u, t)[source]
jac_banded(u, t)[source]
str_f_f77()[source]

Return f(u,t) as Fortran source code string.

str_jac_f77_fadau5()[source]

Return f(u,t) as Fortran source code string.

str_jac_f77_lsode_dense()[source]

Return Fortran source for dense Jacobian matrix in LSODE format.