KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CoreFun2D.m
Go to the documentation of this file.
1 namespace models{
2 namespace pcd{
3 
4 
5 /* (Autoinserted by mtoc++)
6  * This source code has been filtered by the mtoc++ executable,
7  * which generates code that can be processed by the doxygen documentation tool.
8  *
9  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
10  * Except for the comments, the function bodies of your M-file functions are untouched.
11  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
12  * attached source files that are highly readable by humans.
13  *
14  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
15  * the correct locations in the source code browser.
16  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
17  */
18 
19 class CoreFun2D
20  :public models.pcd.BaseCoreFun {
44  private:
45 
46  nodes;
47 
48 
49  hlp;
50 
51 
52  idxmat;
53 
54 
55  public:
56 
57 
58  CoreFun2D(dynsys) {
59  this = this@models.pcd.BaseCoreFun(dynsys);
60  }
61 
62 
63  function copy = clone() {
64  copy = models.pcd.CoreFun2D(this.System);
65 
66  /* Call superclass method */
67  copy = clone@models.pcd.BaseCoreFun(this, copy);
68 
69  copy.nodes= this.nodes;
70  copy.hlp= this.hlp;
71  copy.idxmat= this.idxmat;
72  }
82  function newSysDimension() {
83  s = this.System;
84  n = prod(s.Dims);
85  this.nodes= n;
86  this.hlp.d1= s.Dims(1);
87  this.hlp.d2= s.Dims(2);
88 
89  this.idxmat= zeros(s.Dims(1),s.Dims(2));
90  this.idxmat(:) = 1:this.nodes;
91 
92  /* Can use the unscaled h and original Omega for computation of
93  * ranges & distances from middle */
94  this.hlp.hs= s.hs;
95  a = s.Omega;
96  this.hlp.xr= a(1,2)-a(1,1); /* xrange */
97 
98  this.hlp.yr= a(2,2)-a(2,1); /* yrange */
99 
100  this.hlp.xd= abs(((1:this.hlp.d1)-1)*this.System.h-.5*this.hlp.xr)^t; /* x distances from middle */
101 
102  this.hlp.yd= abs(((1:this.hlp.d2)-1)*this.System.h-.5*this.hlp.yr)^t; /* y distances from middle */
103 
104 
105  /* Add x_a dependencies
106  * 1=x_a, 2=y_a, 3=x_i {, y_i} */
107  i = [(1:n)" ; (1:n) "; (1:n)^t];
108  j = (1:3*n)^t;
109  /* Add y_a dependencies
110  * 1=x_a, 2=y_a {, x_i}, 3=y_i */
111  i = [i; (n+1:2*n)" ; (n+1:2*n) "; (n+1:2*n)^t];
112  j = [j; (1:2*n)" ; (3*n+1:4*n) "];
113  /* Add x_i dependencies
114  * {x_a,} 1=y_a, 2=x_i {, y_i} */
115  i = [i; (2*n+1:3*n)" ; (2*n+1:3*n) "];
116  j = [j; (n+1:3*n)^t];
117  /* Add y_i dependencies
118  * 1=x_a, {y_a, x_i}, 2=y_i */
119  i = [i; (3*n+1:4*n)" ; (3*n+1:4*n) "];
120  j = [j; (1:n)" ; (3*n+1:4*n) "];
121  this.xDim= 4*n;
122  this.fDim= 4*n;
123  this.JSparsityPattern= sparse(i,j,ones(length(i),1),this.fDim,this.xDim);
124  }
131  function fx = evaluate(colvec<double> x,double t) {
132 
133  /* If this has been projected, restore full size and compute values. */
134  if ~isempty(this.V)
135  x = this.V*x;
136  end
137 
138  /* Allocate result vector */
139  fx = zeros(size(x));
140 
141  m = this.nodes;
142  mu = this.mu;
143 
144  /* Compute activation fun values (it's set up in scaled times!) */
145  ud = this.activationFun(t,mu);
146  rc = this.System.ReacCoeff;
147 
148  /* Extract single functions */
149  xa = x(1:m);
150  xan = xa.^mu(4);
151  ya = x(m+1:2*m);
152  xi = x(2*m+1:3*m);
153  yi = x(3*m+1:end);
154 
155  rb = zeros(m,1);
156 
157  /* % Top & Bottom
158  * bottom */
159  pos = this.hlp.xd <= this.hlp.xr*mu(1)/2;
160  idx = this.idxmat(pos,1);
161  rb(idx) = (xi(idx)*mu(2)*ud);
162  /* top */
163  pos = this.hlp.xd <= this.hlp.xr*mu(1)/2;
164  idx = this.idxmat(pos,end);
165  rb(idx) = rb(idx) + (xi(idx)*mu(2)*ud);
166 
167  /* % Left & Right
168  * right */
169  pos = this.hlp.yd <= this.hlp.yr*mu(1)/2;
170  idx = this.idxmat(end,pos);
171  rb(idx) = rb(idx) + (xi(idx)*mu(2)*ud);
172  /* left */
173  pos = this.hlp.yd <= this.hlp.yr*mu(1)/2;
174  idx = this.idxmat(1,pos);
175  rb(idx) = rb(idx) + (xi(idx)*mu(2)*ud);
176 
177  /* x_a */
178  fx(1:m) = rc(1)*xi.*ya - rc(3)*xa + rb/this.hlp.hs;
179  /* y_a */
180  fx(m+1:2*m) = rc(2)*yi.*xan - rc(4)*ya;
181  /* x_i */
182  fx(2*m+1:3*m) = -rc(1)*xi.*ya - rc(5)*xi + rc(7) - rb/this.hlp.hs;
183  /* y_i */
184  fx(3*m+1:end) = -rc(2)*yi.*xan - rc(6)*yi + rc(8);
185 
186 
187  /* If this has been projected, project back to reduced space */
188  if ~isempty(this.W)
189  fx = this.W^t*fx;
190  end
191  }
192 
193 
194  function fx = evaluateMulti(colvec<double> x,double t,colvec<double> mu) {
195 
196  /* If this has been projected, restore full size and compute values. */
197  if ~isempty(this.V)
198  x = this.V*x;
199  end
200 
201  /* Allocate result vector */
202  fx = zeros(size(x));
203 
204  m = this.nodes;
205 
206  /* Compute activation fun values (it's set up in scaled times!) */
207  ud = this.activationFun(t,mu);
208  rc = this.System.ReacCoeff;
209 
210  /* Extract single functions */
211  xa = x(1:m,:);
212  xan = xa.^mu(4,:);
213  ya = x(m+1:2*m,:);
214  xi = x(2*m+1:3*m,:);
215  yi = x(3*m+1:end,:);
216 
217  /* Compile boundary conditions */
218  nd = size(x,2);
219  rb = zeros(m,nd);
220 
221  /* % Top & Bottom */
222  xd = repmat(this.hlp.xd,1,nd); /* y distances
223  * bottom */
224 
225  pos = bsxfun(@lt,xd,this.hlp.xr*mu(1,:)/2);
226  idx = this.idxmat(:,1);
227  rb(idx,:) = pos .* (bsxfun(@times,xi(idx,:),mu(2,:).*ud));
228  /* top */
229  pos = bsxfun(@lt,xd,this.hlp.xr*mu(1,:)/2);
230  idx = this.idxmat(:,end);
231  rb(idx,:) = rb(idx,:) + pos .* (bsxfun(@times,xi(idx,:),mu(2,:).*ud));
232 
233  /* % Left & Right */
234  yd = repmat(this.hlp.yd,1,nd);
235  /* right */
236  pos = bsxfun(@lt,yd,this.hlp.yr*mu(1,:)/2);
237  idx = this.idxmat(end,:);
238  rb(idx,:) = rb(idx,:) + pos .* (bsxfun(@times,xi(idx,:),mu(2,:).*ud));
239  /* left */
240  pos = bsxfun(@lt,yd,this.hlp.yr*mu(1,:)/2);
241  idx = this.idxmat(1,:);
242  rb(idx,:) = rb(idx,:) + pos .* (bsxfun(@times,xi(idx,:),mu(2,:).*ud));
243 
244  /* Ca-8 */
245  fx(1:m,:) = rc(1)*xi.*ya - xa*rc(3) + rb/this.hlp.hs;
246  /* Ca-3 */
247  fx(m+1:2*m,:) = rc(2)*yi.*xan - ya*rc(4);
248  /* Pro-Ca-8 */
249  fx(2*m+1:3*m,:) = -rc(1)*xi.*ya - rc(5)*xi + rc(7) - rb/this.hlp.hs;
250  /* Pro-Ca-3 */
251  fx(3*m+1:end,:) = -rc(2)*yi.*xan - rc(6)*yi + rc(8);
252 
253  /* If this has been projected, project back to reduced space */
254  if ~isempty(this.W)
255  fx = this.W^t*fx;
256  end
257  }
258 
259 
260  function J = getStateJacobian(colvec<double> x,double t) {
261 
262  /* If this has been projected, restore full size and compute values. */
263  if ~isempty(this.V)
264  x = this.V*x;
265  end
266 
267  n = this.nodes;
268  mu = this.mu;
269  rc = this.System.ReacCoeff;
270 
271  /* Boundary stuff */
272  bottom = this.idxmat(this.hlp.xd <= this.hlp.xr*mu(1)/2,1);
273  top = this.idxmat(this.hlp.xd <= this.hlp.xr*mu(1)/2,end);
274  right = this.idxmat(end,this.hlp.yd <= this.hlp.yr*mu(1)/2);
275  left = this.idxmat(1,this.hlp.yd <= this.hlp.yr*mu(1)/2);
276  rbxi = zeros(n,1);
277  u = this.activationFun(t);
278  rbxi(bottom) = mu(2)*u;
279  rbxi(top) = mu(2)*u;
280  rbxi(right) = mu(2)*u;
281  rbxi(left) = mu(2)*u;
282  rbxi = rbxi/this.hlp.hs;
283 
284  /* % x_a part
285  * 1=x_a, 2=y_a, 3=x_i {, y_i} */
286  i = [(1:n)" ; (1:n) "; (1:n)^t];
287  j = (1:3*n)^t;
288  s = [-ones(n,1)*rc(3); ... /* dx_a/x_a = -mu3 */
289 
290  rc(1)*x(2*n+1:3*n);... /* dx_a/y_a = mu1*x_i */
291 
292  rc(1)*x(n+1:2*n) + rbxi]; /* dx_a/x_i + rbxi
293  *% y_a part
294  * 1=x_a, 2=y_a {, x_i}, 3=y_i */
295 
296  i = [i; (n+1:2*n)" ; (n+1:2*n) "; (n+1:2*n)^t];
297  j = [j; (1:2*n)" ; (3*n+1:4*n) "];
298  hlp1 = mu(4)*rc(2)*x(3*n+1:end).*x(1:n).^(mu(4)-1);
299  hlp2 = rc(2)*x(1:n).^mu(4);
300  s = [s; hlp1; ... /* dy_a/x_a = n*mu2*y_i*x_a^(n-1) */
301 
302  -ones(n,1)*rc(4);... /* dy_a/y_a = -mu4 */
303 
304  hlp2]; /* dy_a/y_i = mu2 * x_a^n */
305 
306 
307  /* % x_i part
308  * {x_a,} 1=y_a, 2=x_i {, y_i} */
309  i = [i; (2*n+1:3*n)" ; (2*n+1:3*n) "];
310  j = [j; (n+1:3*n)^t];
311  s = [s; -rc(1)*x(2*n+1:3*n);... /* dx_i/y_a = -mu1*x_i */
312 
313  -rc(1)*x(n+1:2*n)-rc(5)-rbxi]; /* dx_i/x_i = -mu1*y_a -mu5 -rbxi */
314 
315 
316  /* % y_i part
317  * 1=x_a, {y_a, x_i}, 2=y_i */
318  i = [i; (3*n+1:4*n)" ; (3*n+1:4*n) "];
319  j = [j; (1:n)" ; (3*n+1:4*n) "];
320  s = [s; -hlp1; ... /* dy_i/x_a = -n*mu2*y_i*x_a^(n-1) */
321 
322  -hlp2-rc(6)]; /* dy_i/y_i = -mu2 * x_a^n-mu6 */
323 
324 
325  n = this.fDim;
326  if ~isempty(this.V)
327  n = size(this.V,1);
328  end
329  m = this.xDim;
330  if ~isempty(this.W)
331  n = size(this.W,1);
332  end
333  J = sparse(i,j,s,n,m);
334  }
335 
336 
337  protected:
338 
339  function fxj = evaluateComponents(pts,ends,unused1,unused2,X,double t) {
340  fxj = this.evaluateComponentsMulti(pts, ends, [], [], X, t, this.mu);
341  }
342 
343 
344  function fxj = evaluateComponentsMulti(rowvec<integer> pts,rowvec<integer> ends,unused1,unused2,matrix<double> X,double t,matrix<double> mu) {
345  m = this.nodes;
346  nd = size(X,2);
347  fxj = zeros(length(pts),nd);
348  rc = this.System.ReacCoeff;
349  if nd > 1
350  bottom = bsxfun(@lt,this.hlp.xd,this.hlp.xr*mu(1,:)/2);
351  top = bsxfun(@lt,this.hlp.xd,this.hlp.xr*mu(1,:)/2);
352  right = bsxfun(@lt,this.hlp.yd,this.hlp.yr*mu(1,:)/2);
353  left = bsxfun(@lt,this.hlp.yd,this.hlp.yr*mu(1,:)/2);
354  else
355  bottom = this.hlp.xd <= this.hlp.xr*mu(1,:)/2;
356  top = this.hlp.xd <= this.hlp.xr*mu(1,:)/2;
357  right = this.hlp.yd <= this.hlp.yr*mu(1,:)/2;
358  left = this.hlp.yd <= this.hlp.yr*mu(1,:)/2;
359  end
360  /* Get matrix indices */
361  J2 = mod(pts,m);
362  J2(J2==0) = m;
363 
364  /* [row2, col2] = ind2sub([this.hlp.d1 this.hlp.d2],J2);
365  * ind2sub direct replacement! */
366  row = rem(J2-1, this.hlp.d1)+1;
367  col = (J2-row)/this.hlp.d1+1;
368  u = this.activationFun(t, mu);
369  for idx=1:length(pts)
370  j = pts(idx);
371  if idx == 1
372  st = 0;
373  else
374  st = ends(idx-1);
375  end
376  /* Select the elements of x that are effectively used in f */
377  xidx = (st+1):ends(idx);
378  x = X(xidx,:);
379 
380  /* X_a */
381  if j <= m
382  /* 1=x_a, 2=y_a, 3=x_i {, y_i}
383  * rc(1)*xi.*ya - rc(3)*xa + rb; */
384  fj = rc(1)*x(3,:).*x(2,:) - rc(3)*x(1,:);
385 
386  /* Boundary conditions
387  * Bottom */
388  if col(idx) == 1
389  fj = fj + bottom(row(idx),:) .* (x(3,:).*mu(2,:).*u/this.hlp.hs);
390  end
391  /* Top */
392  if col(idx) == this.hlp.d2
393  fj = fj + top(row(idx),:) .* (x(3,:).*mu(2,:).*u/this.hlp.hs);
394  end
395  /* Right */
396  if row(idx) == this.hlp.d1
397  fj = fj + right(col(idx),:) .* (x(3,:).*mu(2,:).*u/this.hlp.hs);
398  end
399  /* Left */
400  if row(idx) == 1
401  fj = fj + left(col(idx),:) .* (x(3,:).*mu(2,:).*u/this.hlp.hs);
402  end
403 
404  /* Y_a */
405  elseif m < j && j <= 2*m
406  /* 1=x_a, 2=y_a {, x_i}, 3=y_i
407  * rc(2)*yi.*xa^mu4 - rc(4)*ya; */
408  fj = rc(2)*x(3,:).*x(1,:).^mu(4,:) - rc(4)*x(2,:);
409 
410  /* X_i */
411  elseif 2*m < j && j <= 3*m
412  /* {x_a,} 1=y_a, 2=x_i {, y_i}
413  * -rc(1)*xi.*ya - rc(5)*xi + rc(7) - rb; */
414  fj = -rc(1)*x(2,:).*x(1,:) - rc(5)*x(2,:) + rc(7);
415 
416  /* Boundary conditions
417  * Bottom */
418  if col(idx) == 1
419  fj = fj - bottom(row(idx),:) .* (x(2,:).*mu(2,:).*u/this.hlp.hs);
420  end
421  /* Top */
422  if col(idx) == this.hlp.d2
423  fj = fj - top(row(idx),:) .* (x(2,:).*mu(2,:).*u/this.hlp.hs);
424  end
425  /* Right */
426  if row(idx) == this.hlp.d1
427  fj = fj - right(col(idx),:) .* (x(2,:).*mu(2,:).*u/this.hlp.hs);
428  end
429  /* Left */
430  if row(idx) == 1
431  fj = fj - left(col(idx),:) .* (x(2,:).*mu(2,:).*u/this.hlp.hs);
432  end
433 
434  /* Y_i */
435  else
436  /* 1=x_a, {y_a, x_i}, 2=y_i
437  * -rc(2)*yi.*xa^mu4 - rc(6)*yi + rc(8); */
438  fj = -rc(2)*x(2,:).*x(1,:).^mu(4,:) - rc(6)*x(2,:) + rc(8);
439  end
440  fxj(idx,:) = fj;
441  end
442  }
466  error(" Activation fun not yet implemented correctly ");
467  m = this.nodes;
468  rc = this.System.ReacCoeff;
469  nd = size(X,2);
470 
471  /* % Boundary stuff
472  * Get matrix indices of points */
473  pts2 = mod(pts,m);
474  pts2(pts2==0) = m;
475  row = rem(pts2-1, this.hlp.d1)+1;
476  col = (pts2-row)/this.hlp.d1+1;
477  if nd > 1
478  bottom = bsxfun(@lt,this.hlp.xd,this.hlp.xr*mu(1)/2);
479  top = bsxfun(@lt,this.hlp.xd,this.hlp.xr*mu(1)/2);
480  right = bsxfun(@lt,this.hlp.yd,this.hlp.yr*mu(1)/2);
481  left = bsxfun(@lt,this.hlp.yd,this.hlp.yr*mu(1)/2);
482  else
483  bottom = this.hlp.xd <= this.hlp.xr*mu(1)/2;
484  top = this.hlp.xd <= this.hlp.xr*mu(1)/2;
485  right = this.hlp.yd <= this.hlp.yr*mu(1)/2;
486  left = this.hlp.yd <= this.hlp.yr*mu(1)/2;
487  end
488 
489  /* % Derivative info per point */
490  der = false(size(X,1),1);
491  der(deriv) = true;
492 
493  /* % Main loop */
494  dfx = zeros(size(deriv,1),nd);
495  curpos = 1;
496  for idx=1:length(pts)
497  i = pts(idx);
498  if idx == 1
499  st = 0;
500  else
501  st = ends(idx-1);
502  end
503  /* Select the elements of x that are effectively used in f */
504  elem = (st+1):ends(idx);
505  x = X(elem,:);
506  d = der(elem);
507 
508  /* X_a */
509  if i <= m
510  /* 1=x_a, 2=y_a, 3=x_i {, y_i} */
511  if d(1) /* dx_a/x_a = -mu3 */
512 
513  dfx(curpos,:) = -rc(3);
514  curpos = curpos + 1;
515  end
516  if d(2) /* dx_a/y_a = mu1*x_i */
517 
518  dfx(curpos,:) = rc(1)*x(3,:);
519  curpos = curpos + 1;
520  end
521  if d(3) /* dx_a/x_i = mu1*y_a + rb' */
522 
523  dfx(curpos,:) = rc(1)*x(2,:);
524  if col(idx) == 1 /* Bottom */
525 
526  dfx(curpos,:) = dfx(curpos,:) + bottom(row(idx),:) .* mu(2,:)/this.hlp.hs;
527  end
528  if col(idx) == this.hlp.d2 /* Top */
529 
530  dfx(curpos,:) = dfx(curpos,:) + top(row(idx),:) .* mu(2,:)/this.hlp.hs;
531  end
532  if row(idx) == this.hlp.d1 /* Right */
533 
534  dfx(curpos,:) = dfx(curpos,:) + right(col(idx),:) .* mu(2,:)/this.hlp.hs;
535  end
536  if row(idx) == 1 /* Left */
537 
538  dfx(curpos,:) = dfx(curpos,:) + left(col(idx),:) .* mu(2,:)/this.hlp.hs;
539  end
540  curpos = curpos + 1;
541  end
542 
543  /* Y_a */
544  elseif m < i && i <= 2*m
545  /* 1=x_a, 2=y_a {, x_i}, 3=y_i */
546  if d(1) /* dy_a/x_a = n*mu2*y_i*x_a^(n-1) */
547 
548  dfx(curpos,:) = mu(4,:)*rc(2)*x(3,:).*x(1,:).^(mu(4,:)-1);
549  curpos = curpos + 1;
550  end
551  if d(2) /* dy_a/y_a = -mu4 */
552 
553  dfx(curpos,:) = -rc(4);
554  curpos = curpos + 1;
555  end
556  if d(3) /* dx_a/x_a = -mu3 */
557 
558  dfx(curpos,:) = rc(2)*x(1,:).^mu(4,:);
559  curpos = curpos + 1;
560  end
561 
562  /* X_i */
563  elseif 2*m < i && i <= 3*m
564  /* {x_a,} 1=y_a, 2=x_i {, y_i} */
565  if d(1) /* dx_i/y_a = -mu1*x_i */
566 
567  dfx(curpos,:) = -rc(1)*x(2,:);
568  curpos = curpos + 1;
569  end
570  if d(2) /* dx_i/x_i = -mu1*y_a -mu5 -rbxi */
571 
572  dfx(curpos,:) = -rc(1)*x(1,:)-rc(5);
573  /* Boundary conditions */
574  if col(idx) == 1 /* Bottom */
575 
576  dfx(curpos,:) = dfx(curpos,:) - bottom(row(idx),:) .* mu(2,:)/this.hlp.hs;
577  end
578  if col(idx) == this.hlp.d2 /* Top */
579 
580  dfx(curpos,:) = dfx(curpos,:) - top(row(idx),:) .* mu(2,:)/this.hlp.hs;
581  end
582  if row(idx) == this.hlp.d1 /* Right */
583 
584  dfx(curpos,:) = dfx(curpos,:) - right(col(idx),:) .* mu(2,:)/this.hlp.hs;
585  end
586  if row(idx) == 1 /* Left */
587 
588  dfx(curpos,:) = dfx(curpos,:) - left(col(idx),:) .* mu(2,:)/this.hlp.hs;
589  end
590  curpos = curpos + 1;
591  end
592 
593  /* Y_i */
594  else
595  /* 1=x_a, {y_a, x_i}, 2=y_i */
596  if d(1) /* dy_i/x_a = -n*mu2*y_i*x_a^(n-1) */
597 
598  dfx(curpos,:) = -mu(4,:)*rc(2)*x(2,:).*x(1,:).^(mu(4,:)-1);
599  curpos = curpos + 1;
600  end
601  if d(2) /* dy_i/y_i = -mu2 * x_a^n-mu6 */
602 
603  dfx(curpos,:) = -rc(2)*x(1,:).^mu(4,:) - rc(6);
604  curpos = curpos + 1;
605  end
606  end
607  end
608  }
632  protected: /* ( Static, Sealed ) */
633 
634  static function obj = loadobj(obj) {
635  if ~isa(obj, " models.pcd.CoreFun2D ")
636  from = obj;
637  s = [];
638  if isfield(from," sys ")
639  s = from.sys;
640  end
641  obj = models.pcd.CoreFun2D(s);
642  obj.nodes= from.nodes;
643  obj.hlp= from.hlp;
644  obj.idxmat= from.idxmat;
645  obj = loadobj@models.pcd.BaseCoreFun(obj, from);
646  else
647  obj = loadobj@models.pcd.BaseCoreFun(obj);
648  end
649  }
650 
651 
652 };
653 }
654 }
655 
656 
657 
integer fDim
The current output dimension of the function.
Definition: ACoreFun.m:171
function J = getStateJacobian(colvec< double > x,double t)
Definition: CoreFun2D.m:260
function fxj = evaluateComponents(pts, ends, unused1, unused2, X,double t)
Definition: CoreFun2D.m:339
integer xDim
The current state space dimension of the function's argument .
Definition: ACoreFun.m:151
function dfx = evaluateComponentPartialDerivatives(rowvec< integer > pts,rowvec< integer > ends, unused1,rowvec< integer > deriv, unused2,colvec< double > X, unused3,colvec< double > mu, unused4)
See dscomponents.ACompEvalCoreFun for more details.
Definition: CoreFun2D.m:465
models.BaseFirstOrderSystem System
The system associated with the current ACoreFun.
Definition: ACoreFun.m:193
V
The matrix of the biorthogonal pair .
Definition: AProjectable.m:61
colvec< double > mu
The current model parameter mu for evaluations. Will not be persisted as only valid for runtime durin...
Definition: ACoreFun.m:208
static function obj = loadobj(obj)
Definition: CoreFun2D.m:634
#define X(i, j)
function copy = clone()
System already copied in constructor (see below)
Definition: CoreFun2D.m:63
sparse< logical > JSparsityPattern
Sparsity pattern for the jacobian matrix.
Definition: ACoreFun.m:127
function newSysDimension()
Create diffusion matrix.
Definition: CoreFun2D.m:82
function f = activationFun(double t,colvec< double > mu)
Definition: BaseCoreFun.m:190
function fx = evaluateMulti(colvec< double > x,double t,colvec< double > mu)
Definition: CoreFun2D.m:194
W
The matrix of the biorthogonal pair .
Definition: AProjectable.m:72
function fxj = evaluateComponentsMulti(rowvec< integer > pts,rowvec< integer > ends, unused1, unused2,matrix< double > X,double t,matrix< double > mu)
The vector embedding results from the fixed ordering of the full 4*m-vector into the components x_a...
Definition: CoreFun2D.m:344
function fx = evaluate(colvec< double > x,double t)
Definition: CoreFun2D.m:131
The core nonlinear function of the PCD model.
Definition: CoreFun2D.m:19