init
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
function [P, Sw, Cs, Cb, Pwf] = intADI2(p, sw, cs, cb, pwf)
|
||||
n = length(p);
|
||||
npwf = length(pwf);
|
||||
Jp = cell(1,5);
|
||||
Jsw = cell(1,5);
|
||||
Jcs = cell(1,5);
|
||||
Jcb = cell(1,5);
|
||||
Jpwf = cell(1,5);
|
||||
|
||||
Jp{1} = sparse(1:n, 1:n, ones(n,1), n, n);
|
||||
Jp{2} = sparse(n,n);
|
||||
Jp{3} = sparse(n,n);
|
||||
Jp{4} = sparse(n,n);
|
||||
Jp{5} = sparse(n,npwf);
|
||||
|
||||
Jsw{1} = sparse(n,n);
|
||||
Jsw{2} = sparse(1:n, 1:n, ones(n,1), n, n);
|
||||
Jsw{3} = sparse(n,n);
|
||||
Jsw{4} = sparse(n,n);
|
||||
Jsw{5} = sparse(n,npwf);
|
||||
|
||||
Jcs{1} = sparse(n,n);
|
||||
Jcs{2} = sparse(n,n);
|
||||
Jcs{3} = sparse(1:n, 1:n, ones(n,1), n, n);
|
||||
Jcs{4} = sparse(n,n);
|
||||
Jcs{5} = sparse(n,npwf);
|
||||
|
||||
Jcb{1} = sparse(n,n);
|
||||
Jcb{2} = sparse(n,n);
|
||||
Jcb{3} = sparse(n,n);
|
||||
Jcb{4} = sparse(1:n, 1:n, ones(n,1), n, n);
|
||||
Jcb{5} = sparse(n,npwf);
|
||||
|
||||
Jpwf{1} = sparse(npwf,n);
|
||||
Jpwf{2} = sparse(npwf,n);
|
||||
Jpwf{3} = sparse(npwf,n);
|
||||
Jpwf{4} = sparse(npwf,n);
|
||||
Jpwf{5} = sparse(1:npwf, 1:npwf, ones(npwf,1), npwf, npwf);
|
||||
|
||||
P = ADI(p, Jp);
|
||||
Sw = ADI(sw, Jsw);
|
||||
Cs = ADI(cs, Jcs);
|
||||
Cb = ADI(cb, Jcb);
|
||||
Pwf = ADI(pwf, Jpwf);
|
||||
Reference in New Issue
Block a user