Pseudo-transient continuation
Newton's method converges fast once it is close to the answer, but a bad step far from it can throw the iteration off course. Pseudo-transient continuation (PTC) adds damping when the residual grows and removes it as the residual falls. It's on by default.
The step
A plain Newton step solves
A PTC step adds a diagonal term,
where puts on each equation's own unknown: boundary-layer equation of a station on unknown of that station, and the coupling equation on . Large gives back plain Newton. Small shortens the step towards , a cautious move down the residual. The converged answer, , doesn't depend on , so PTC changes the path, not the destination.
How τ changes
After each step, Scirocco compares the residual with the previous one, :
- If the residual fell (), grows by , at most by a
factor of
tau_grow_clamp. - If it didn't, shrinks by , at most by a factor of
tau_shrink_clamp. - always stays between
tau_minandtau_max.
It starts at tau_init = 1e6, which is effectively plain Newton. On an
easy case PTC never engages.
What it does in practice
PTC is a safeguard, not a speed-up. On this difficult start it never engages, and both variants take the same 14 steps:
- PTC (default), 14 steps
- Plain Newton, 14 steps
Show data
| Newton iteration | ‖R‖ |
|---|---|
| 0 | 2.09e+0 |
| 1 | 1.34e+0 |
| 2 | 7.87e-1 |
| 3 | 9.22e-1 |
| 4 | 6.03e-1 |
| 5 | 7.04e-1 |
| 6 | 2.49e-1 |
| 7 | 2.25e-1 |
| 8 | 1.33e-1 |
| 9 | 6.47e-2 |
| 10 | 1.09e-1 |
| 11 | 3.07e-2 |
| 12 | 3.12e-4 |
| 13 | 7.64e-8 |
| 14 | 1.41e-13 |
| Newton iteration | ‖R‖ |
|---|---|
| 0 | 2.09e+0 |
| 1 | 1.34e+0 |
| 2 | 7.87e-1 |
| 3 | 9.22e-1 |
| 4 | 6.03e-1 |
| 5 | 7.04e-1 |
| 6 | 2.49e-1 |
| 7 | 2.25e-1 |
| 8 | 1.33e-1 |
| 9 | 6.46e-2 |
| 10 | 1.09e-1 |
| 11 | 3.07e-2 |
| 12 | 3.12e-4 |
| 13 | 7.58e-8 |
| 14 | 4.58e-14 |
Its real value is on starts where an undamped step would diverge, such as the odd shapes an optimizer tries along the way.
Tuning
| Symptom | Try |
|---|---|
| Diverges in the first one or two steps | Start damped: param.tau_init = 1e2 |
| Residual oscillates between two levels | Slow the return to Newton: param.tau_grow_clamp = 2.0 |
| Still falling when it hits the iteration limit | Raise param.niglob |
| You want a plain-Newton baseline | param.use_ptc = false |
All fields are listed under Solver parameters.
Gradients aren't affected
The adjoint uses the plain Jacobian at the converged state, without the term. If PTC and plain Newton reach the same solution, they give the same gradients.