59 this =
this@models.pcd.BaseCoreFun(dynsys);
65 copy = models.pcd.CoreFun1D(this.
System);
68 copy =
clone@models.pcd.BaseCoreFun(
this, copy);
69 copy.nodes= this.nodes;
77 i = [(1:n)
" ; (1:n) "; (1:n)^
t];
81 i = [i; (n+1:2*n)
" ; (n+1:2*n) "; (n+1:2*n)^
t];
82 j = [j; (1:2*n)
" ; (3*n+1:4*n) "];
85 i = [i; (2*n+1:3*n)
" ; (2*n+1:3*n) "];
89 i = [i; (3*n+1:4*n)
" ; (3*n+1:4*n) "];
90 j = [j; (1:n)
" ; (3*n+1:4*n) "];
116 rb(end) = xi(end)*
mu(9)/this.
System.hs;
119 fx(1:m) =
mu(1)*xi.*ya -
mu(3)*xa + rb;
120 fx(m+1:2*m) =
mu(2)*yi.*xan -
mu(4)*ya;
121 fx(2*m+1:3*m) = -
mu(1)*xi.*ya -
mu(5)*xi +
mu(7) - rb;
122 fx(3*m+1:end) = -
mu(2)*yi.*xan -
mu(6)*yi +
mu(8);
140 mu = [repmat(this.
System.ReacCoeff,1,size(mu,2));
mu];
149 rb = zeros(m,size(xi,2));
150 rb(end,:) = (xi(end,:).*
mu(9,:))/this.
System.hs;
152 fx(1:m,:) = bsxfun(@times,xi.*ya,mu(1,:)) - bsxfun(@times,xa,
mu(3,:)) + rb;
153 fx(m+1:2*m,:) = bsxfun(@times,yi.*xan,mu(2,:)) - bsxfun(@times,ya,
mu(4,:));
154 fx(2*m+1:3*m,:) = -bsxfun(@times,xi.*ya,mu(1,:)) - bsxfun(@times,xi,
mu(5,:)) + bsxfun(@times,ones(size(xi)),
mu(7,:)) - rb;
155 fx(3*m+1:end,:) = -bsxfun(@times,yi.*xan,mu(2,:)) - bsxfun(@times,yi,
mu(6,:)) + bsxfun(@times,ones(size(xi)),
mu(8,:));
179 fxj = zeros(length(pts),size(X,2));
181 mu = [repmat(s.ReacCoeff,1,size(mu,2));
mu];
182 for idx=1:length(pts)
190 xidx = (st+1):ends(idx);
197 fj =
mu(1,:).*x(3,:).*x(2,:) -
mu(3,:).*x(1,:);
200 fj = fj + x(3,:).*
mu(9,:)/s.hs;
204 elseif m < j && j <= 2*m
207 fj =
mu(2,:).*x(3,:).*x(1,:).^n -
mu(4,:).*x(2,:);
210 elseif 2*m < j && j <= 3*m
213 fj = -
mu(1,:).*x(2,:).*x(1,:) -
mu(5,:).*x(2,:) +
mu(7,:);
216 fj = fj - x(2,:).*
mu(9,:)/s.hs;
223 fj = -
mu(2,:).*x(2,:).*x(1,:).^n -
mu(6,:).*x(2,:) +
mu(8,:);
The core nonlinear function of the PCD model.
integer fDim
The current output dimension of the function.
function fx = evaluate(colvec< double > x, unused1)
Allocate result vector.
function newSysDimension()
logical TimeDependent
Flag that indicates if the ACoreFun is (truly) time-dependent.
Model
The Model this System is attached to.
function fxj = evaluateComponents(pts, ends, unused1, unused2, X, unused3)
integer xDim
The current state space dimension of the function's argument .
models.BaseFirstOrderSystem System
The system associated with the current ACoreFun.
colvec< double > mu
The current model parameter mu for evaluations. Will not be persisted as only valid for runtime durin...
sparse< logical > JSparsityPattern
Sparsity pattern for the jacobian matrix.
function fxj = evaluateComponentsMulti(rowvec< integer > pts,rowvec< integer > ends, unused1, unused2,matrix< double > X, unused3,matrix< double > mu)
The vector embedding results from the fixed ordering of the full 4*m-vector into the components x_a...
function fx = evaluateMulti(colvec< double > x, unused1,colvec< double > mu)
Allocate result vector.