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
Constant.m
Go to the documentation of this file.
1 namespace error{
2 namespace alpha{
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 Constant
20  :public error.alpha.Base {
37  private:
38 
39  M2 = "[]";
40 
41  M3 = "[]";
42 
43 
44  public:
45 
46 
48  this = this@error.alpha.Base(model);
49  }
50 
51 
53  fm = rm.FullModel;
54  if ~isempty(fm.System.B)
55  try
56  B = fm.System.B.evaluate([],[]);
57  catch ME/* #ok */
58 
59  B = fm.System.B.evaluate(0,rm.getRandomParam);
60  warning(" Some:Id "," Error estimator for current system will not work correctly! (B is not linear and mu-independent! ");
61  end
62 
63  if ~isempty(rm.V)
64  B2 = B - rm.V*(rm.W^t*B);
65  this.M2= M^t*(rm.G*B2);
66  this.M3= B2^t*(rm.G*B2);
67  clear B2;
68  else
69  n = size(this.M1,2);
70  b = size(B,2);
71  this.M2= zeros(n,b);
72  this.M3= zeros(b,b);
73  end
74  end
75  }
89  function a = getAlpha(colvec phi,double ut,double t,colvec mu) {
90  a = phi*this.M1*phi^t;
91  if ~isempty(ut) /* An input function u is set */
92 
93  a = a + phi*this.M2*ut + ut^t*this.M3*ut;
94  end
95  a = sqrt(abs(a));
96  /* a = sqrt(max(a,0)); */
97  }
112 };
113 }
114 }
115 
function a = getAlpha(colvec phi,double ut,double t,colvec mu)
Computes the alpha term for the error estimator.
Definition: Constant.m:89
Constant: Constant alpha terms.
Definition: Constant.m:19
The base class for any KerMor detailed model.
Definition: BaseFullModel.m:18
models.BaseFullModel FullModel
The full model this reduced model was created from.
Definition: ReducedModel.m:53
models.BaseFirstOrderSystem System
The actual dynamical system used in the model.
Definition: BaseModel.m:102
dscomponents.AInputConv B
The input conversion.
matrix< double > G
The custom scalar product matrix .
Definition: BaseModel.m:132
The KerMor reduced model class.
Definition: ReducedModel.m:18
matrix< double > V
The matrix that has been used for projection.
Definition: ReducedModel.m:72
matrix< double > W
The biorthogonal matrix for V, i.e. .
Definition: ReducedModel.m:85
A matlab column vector.
virtual function B = evaluate(colvec< double > mu)
Template method that evaluates the input conversion matrix at the current time and [optional] param...
Constant(models.BaseFullModel model)
Definition: Constant.m:47
Base:
Definition: Base.m:19
function matrix< double > mu = getRandomParam(integer num,integer seed)
Gets a random parameter sample from the system's parameter domain P.
Definition: BaseModel.m:763
function inputOfflineComputations(models.ReducedModel rm,matrix< double > M)
Performs the offline stage for the error estimators regarding the inputs.
Definition: Constant.m:52