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
BurgersSys_A.m
Go to the documentation of this file.
1 namespace models{
2 namespace burgers{
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 
39  public:
40 
41 
42  public:
43 
45  this = this@models.BaseFirstOrderSystem(model);
46 
47  /* Set core function */
48  this.f= models.burgers.BurgersF_NoA(this);
49 
50  this.addParam(" v ", .5," Range ", [0, 1], " Desired ", 100);
51  }
52 
53 
54  function newDim() {
55  this.updateDimensions;
56  }
57 
58 
59  protected:
60 
61  function updateDimensions() {
62  m = this.Model;
63  xs = linspace(m.Omega(1), m.Omega(2), m.Dimension+2)^t;
64  f = @(x)exp(-(15.*(x-.5)).^2);
65  x = xs(2:m.Dimension+1);
66  x0 = f(x)-f(0);
67  this.x0= dscomponents.ConstInitialValue(x0);
68 
69  n = m.Dimension;
70  dx = (m.Omega(2) - m.Omega(1))/(n+1);
71  e = ones(n,1);
72  d2 = e/(dx^2);
73 
74  a = dscomponents.AffLinCoreFun(this);
75  a.addMatrix(" mu(1) ",spdiags([d2 -2*d2 d2], -1:1, n, n));
76  this.A= a;
77 
78  this.NumStateDofs= n;
79 
80  this.f.newDim;
81 
82  updateDimensions@models.BaseFirstOrderSystem(this);
83  }
84 
85 
86 
87 };
88 }
89 }
90 
BurgersSys_A(models.BaseFullModel model)
Definition: BurgersSys_A.m:44
The base class for any KerMor detailed model.
Definition: BaseFullModel.m:18
Model
The Model this System is attached to.
dscomponents.AInitialValue x0
Function handle to initial state evaluation.
dscomponents.ACoreFun f
The core f function from the dynamical system.
function ModelParam p = addParam(char name, default, varargin)
Adds a parameter with the given values to the parameter collection of the current dynamical system...
Base class for all KerMor first-order dynamical systems.
dscomponents.LinearCoreFun A
Represents a linear or affine-linear component of the dynamical system.