D:/demona/2.0/manual/doc/2-31set/matlab/cont.m File Reference
Go to the source code of this file.
Functions/Subroutines |
| * | norm (f0)%delta |
| | if (norm(f0)<=tol) disp('Newton converged') break end end s = zeros(N/unk,1) |
| | v (i) |
| | subplot (1, 2, 1) contourf(S') |
| | subplot (1, 2, 2) contourf(V') |
| | disp ('maximum temperature:')%max(x)%pause disp('re = myFp(x,n) |
| | delta (133:134) reOld |
| | x (133:134) f0 |
| | surf (X') |
| | delta (67)%%lambdaOld |
| | x (67)%%%%f0 |
Variables |
| clear all clc | n = 65 |
| global lambda global unk global re | lambda = 0.1 |
| | re = 1000 |
| | unk = 2 |
| | N = n*n*unk |
| | maxNewton = 10 |
| | tol = 1e-5 |
| | maxit = 1000 |
initial guess for the solution
vector | x = zeros(N,1) |
| | f0 = myF(x,n) |
| | initial_norm |
| for | i |
| | Jac = myJac(x,n) |
| | delta = gmres(Jac,-f0,min(100,N),tol,min(1000,N)) |
| | v = zeros(N/unk,1) |
| end | S = reshape(s,n,n) |
| | V = reshape(v,n,n) |
Function Documentation
| disp |
( |
'maximum temperature:' |
|
) |
= myFp(x,n) |
| if |
( |
norm(f0)<= |
tol |
) |
= zeros(N/unk,1) |
Variable Documentation
Initial value:
Definition at line 29 of file cont.m.
Definition at line 9 of file cont.m.
Definition at line 3 of file cont.m.
| initial guess for the solution vector x = zeros(N,1) |