Mercurial > forge
changeset 10426:ab8b5e456b94 octave-forge
bug fix in newton solver
author | cdf |
---|---|
date | Mon, 11 Jun 2012 07:29:39 +0000 |
parents | e6ede11be5cf |
children | 15dfa07fbf01 |
files | extra/secs1d/inst/secs1d_dd_newton.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/extra/secs1d/inst/secs1d_dd_newton.m Sat Jun 09 15:38:32 2012 +0000 +++ b/extra/secs1d/inst/secs1d_dd_newton.m Mon Jun 11 07:29:39 2012 +0000 @@ -128,12 +128,12 @@ A21 = - bim1a_laplacian (x, un .* nm, 1); A22 = bim1a_advection_diffusion (x, un, 1, 1, V) + bim1a_reaction (x, 1, p .* fact); A23 = bim1a_reaction (x, 1, n .* fact); - R2 = A22 * n + bim1a_rhs (x, 1, (p .* n - theta .^ 2) .* fact); + R2 = A22 * n + bim1a_rhs (x, 1, (- theta .^ 2) .* fact); A31 = bim1a_laplacian (x, up .* pm, 1); A32 = bim1a_reaction (x, 1, p .* fact); A33 = bim1a_advection_diffusion (x, up, 1, 1, -V) + bim1a_reaction (x, 1, n .* fact); - R3 = A33 * p + bim1a_rhs (x, 1, (p .* n - theta .^ 2) .* fact); + R3 = A33 * p + bim1a_rhs (x, 1, (- theta .^ 2) .* fact); res = [R1(2:end-1); R2(2:end-1); R3(2:end-1)];