implementations.problem_classes.Auzinger_implicit module¶
- class auzinger(newton_maxiter=1e-12, newton_tol=100)[source]¶
Bases:
ptype
This class implements the Auzinger equation [1] as initial value problem. The system of two ordinary differential equations (ODEs) is given by
\[\frac{d y_1 (t)}{dt} = -y_2 (t) + y_1 (t) (1 - y^2_1 (t) - y^2_2 (t)),\]\[\frac{d y_2 (t)}{dt} = y_1 (t) + 3 y_2 (t) (1 - y^2_1 (t) - y^2_2 (t))\]with initial condition \((y_1(t), y_2(t))^T = (1, 0)^T\) for \(t \in [0, 10]\). The exact solution of this problem is
\[(y_1(t), y_2(t))^T = (\cos(t), \sin(t))^T.\]- newton_maxiter¶
Maximum number of iterations for Newton’s method.
- Type:
int, optional
- newton_tol¶
Tolerance for Newton’s method to terminate.
- Type:
float, optional
References
- dtype_f¶
alias of
mesh
- dtype_u¶
alias of
mesh
- eval_f(u, t)[source]¶
Routine to compute the right-hand side of the problem for both components simultaneously.
- Parameters:
u (dtype_u) – Current values of the numerical solution.
t (float) – Current time of the numerical solution is computed (not used here).
- Returns:
f – The right-hand side of the problem (contains two components).
- Return type:
dtype_f
- solve_system(rhs, dt, u0, t)[source]¶
Simple Newton solver for the nonlinear system.
- Parameters:
rhs (dtype_f) – Right-hand side for the nonlinear system.
dt (float) – Abbrev. for the node-to-node stepsize (or any other factor required).
u0 (dtype_u) – Initial guess for the iterative solver.
t (float) – Current time (e.g. for time-dependent BCs.)
- Returns:
u – The solution as mesh.
- Return type:
dtype_u