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
Base.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 Base
20  :public handle {
39  protected:
40 
41  M1;
42 
43 
44  public:
45 
47  fm = rm.FullModel;
48  if ~isempty(fm.Approx)
49  /* Get full d x N coeff matrix of approx function */
50  Ma = fm.Approx.Expansion.Ma;
51  else
52  /* Get full d x N coeff matrix of core function */
53  Ma = fm.System.f.Expansion.Ma;
54  end
55 
56  /* Perform any offline computations/preparations
57  * Only prepare matrices if projection is used */
58  if ~isempty(rm.V)
59  /* Compute projection part matrices, without creating a
60  * d x d matrix (too big!) */
61  M = Ma - rm.V*(rm.W^t*Ma);
62  hlp = M^t*(rm.G*M);
63  /* Check if matrix needs to be made symmetric */
64  if any(any(abs(hlp-hlp^t) > 1e-5))
65  hlp = (hlp + hlp^t)/2;
66  warning(" KerMor:errorest "," M1 matrix not sufficiently symmetric, updating (M+M "" )/2 ");
67  end
68  this.M1= hlp;
69 
70  this.inputOfflineComputations(rm, M);
71  clear M;
72  else
73  /* No projection means no projection error! */
74  n = size(Ma,2);
75  this.M1= zeros(n,n);
76  end
77  }
91  public: /* ( Abstract ) */
92 
93  virtual function a = getAlpha(colvec phi,double ut,double t,colvec mu) = 0;
110  virtual function inputOfflineComputations(models.BaseFullModel model,matrix M) = 0;
124 };
125 }
126 }
127 
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
A matlab matrix.
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
Matlab's base handle class (documentation generation substitute)
virtual function inputOfflineComputations(models.BaseFullModel model,matrix M)
Performs the offline stage for the error estimators regarding the inputs.
models.BaseFirstOrderSystem System
The system associated with the current ACoreFun.
Definition: ACoreFun.m:193
A matlab column vector.
Base(models.ReducedModel rm)
Obtain the correct snapshots Standard case: the approx function is a kernel expansion. it can also be that the system's core function is already a kernel expansion.
Definition: Base.m:46
approx.BaseApprox Approx
The approximation method for the CoreFunction.
dscomponents.ACoreFun f
The core f function from the dynamical system.
virtual function a = getAlpha(colvec phi,double ut,double t,colvec mu)
Computes the value of the error estimator.
Base:
Definition: Base.m:19