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
LinearCoreFun.m
Go to the documentation of this file.
1 namespace dscomponents{
2 
3 
4 /* (Autoinserted by mtoc++)
5  * This source code has been filtered by the mtoc++ executable,
6  * which generates code that can be processed by the doxygen documentation tool.
7  *
8  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
9  * Except for the comments, the function bodies of your M-file functions are untouched.
10  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
11  * attached source files that are highly readable by humans.
12  *
13  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
14  * the correct locations in the source code browser.
15  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
16  */
17 
19  :public dscomponents.ACoreFun {
28  public:
29 
30  A;
41  public:
42 
44  this = this@dscomponents.ACoreFun([]);
45  if nargin > 0
46  this.A= A;
47  /* If not set here, subclasses must take care to set xDim
48  * whenever A changes. */
49  this.fDim= size(A,1);
50  this.xDim= size(A,2);
51  /* Compute sparsity pattern */
52  if issparse(A)
53  this.JSparsityPattern= A ~= 0;
54  end
55  end
56  this.CustomProjection= true;
57  this.TimeDependent= false;
58  }
66  function projected = project(V,W,projected) {
67  if nargin < 4
68  projected = this.clone;
69  end
70  projected.A= W^t*(this.A*V);
71  }
72 
73 
74  function copy = clone() {
75  copy = clone@dscomponents.ACoreFun(this, dscomponents.LinearCoreFun);
76  copy.A= this.A;
77  }
78 
79 
80  function fx = evaluate(colvec<double> x,unused1,unused2) {
81  fx = this.A*x;
82  }
83 
84 
85  function fx = evaluateMulti(colvec<double> x,unused1,unused2) {
86  fx = this.A*x;
87  }
88 
89 
90  function fx = evaluateCoreFun() {
91  error(" This method should never be called. ");
92  }
103  function J = getStateJacobian(unused1,unused2,unused3) {
104  J = this.A;
105  }
106 
107 
108  function prod = mtimes(other) {
109  if isa(this," dscomponents.LinearCoreFun ")
110  if isa(other," dscomponents.LinearCoreFun ")
111  prod = dscomponents.LinearCoreFun(this.A * other.A);
112  else
113  prod = dscomponents.LinearCoreFun(this.A * other);
114  end
115  elseif isa(other," dscomponents.LinearCoreFun ")
116  prod = dscomponents.LinearCoreFun(this * other.A);
117  end
118  }
119 
120 
121  function diff = minus(other) {
122  diff = dscomponents.LinearCoreFun(this.A - other.A);
123  }
124 
125 
126  function diff = plus(other) {
127  diff = dscomponents.LinearCoreFun(this.A + other.A);
128  }
129 
130 
131  function transp = ctranspose() {
132  transp = dscomponents.LinearCoreFun(this.A^t);
133  }
134 
135 
136 };
137 }
138 
139 
140 
function transp = ctranspose()
function J = getStateJacobian(unused1, unused2, unused3)
integer fDim
The current output dimension of the function.
Definition: ACoreFun.m:171
CustomProjection
Set this property if the projection process is customized by overriding the default project method...
Definition: ACoreFun.m:108
function copy = clone()
Definition: LinearCoreFun.m:74
logical TimeDependent
Flag that indicates if the ACoreFun is (truly) time-dependent.
Definition: ACoreFun.m:84
function projected = project(V, W, projected)
Definition: LinearCoreFun.m:66
LinearCoreFun(A)
No system reference needed for constant linear core fun.
Definition: LinearCoreFun.m:43
Basic interface for all dynamical system's core functions Inherits the AProjectable interface...
Definition: ACoreFun.m:18
function fx = evaluate(colvec< double > x, unused1, unused2)
Definition: LinearCoreFun.m:80
integer xDim
The current state space dimension of the function's argument .
Definition: ACoreFun.m:151
function diff = plus(other)
V
The matrix of the biorthogonal pair .
Definition: AProjectable.m:61
Linear core function for state space models (no time or parameter)
Definition: LinearCoreFun.m:18
function prod = mtimes(other)
A
The systems core function matrix.
Definition: LinearCoreFun.m:30
sparse< logical > JSparsityPattern
Sparsity pattern for the jacobian matrix.
Definition: ACoreFun.m:127
function fx = evaluateMulti(colvec< double > x, unused1, unused2)
Definition: LinearCoreFun.m:85
function diff = minus(other)
W
The matrix of the biorthogonal pair .
Definition: AProjectable.m:72
function fx = evaluateCoreFun()
This method will never be called as evaluate is overridden directly for performance. this is possible as LinearCoreFuns have both CustomProjection and MultiArgumentEvaluations.
Definition: LinearCoreFun.m:90