Mercurial > forge
changeset 11996:5de6b07d0495 octave-forge
better computation of underrelaxation factors
author | cdf |
---|---|
date | Tue, 30 Jul 2013 16:33:52 +0000 |
parents | 70e89480d40f |
children | e42d3999df8f |
files | extra/secs1d/inst/secs3d_coupled_circuit_newton.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/extra/secs1d/inst/secs3d_coupled_circuit_newton.m Tue Jul 30 12:37:17 2013 +0000 +++ b/extra/secs1d/inst/secs3d_coupled_circuit_newton.m Tue Jul 30 16:33:52 2013 +0000 @@ -91,13 +91,13 @@ tkn = 1; where = (n1 + dn <= 0); if (any (where)) - tkn = .9 * min (n1 ./ abs (dn)); + tkn = .9 * min (n1(where) ./ abs (dn(where))); endif tkp = 1; where = (p1 + dp <= 0); if (any (where)) - tkp = .9 * min (p1 ./ abs (dp)); + tkp = .9 * min (p1(where) ./ abs (dp(where))); endif tk = min ([tkv, tkn, tkp]);