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
CubicToLinear.m
Go to the documentation of this file.
1 namespace general{
2 namespace functions{
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 
29  public:
30 
31  M;
32 
34 
35 
36  public:
37 
39  if nargin < 2
40  M = 100;
41  if nargin < 1
42  lam0 = 2;
43  end
44  end
45  this.lam0= lam0;
46  this.M= M;
47  }
48 
49 
50  function [fhandle , dfhandle ] = getFunction() {
51  m = this.M;
52  l = this.lam0;
53  a = m/(l-1)^2;
54  fl = a*(l.^3/3-l.^2+l-1/3);
55  fhandle = @(t)(t>=1 & t<l).*a.*(t.^3/3-t.^2+t-1/3) + (t>=l).*(fl + (t-l)*m);
56  dfhandle = @(t)(t>=1 & t<l).*a.*(t.^2-2*t+1) + (t>=l)*m;
57  }
58 
59 
60  function str = getConfigStr() {
61  str = sprintf(" lam0: %g, M: %g ",this.lam0,this.M);
62  }
63 
64 
65  function pm = plot(varargin) {
66  varargin = [[" R ",[1 1.2*this.lam0]] varargin];
67 
68  i.addParamValue('R',0);
69  i.parse(varargin[:]);
70  res = i.Results;
71  pm = plot@general.functions.AFunGen(this, varargin[:]);
72  if (res.R(2) > this.lam0)
73  mc = metaclass(this);
74  for k = 1:length(pm.Figures)
75  if ishandle(pm.Figures(k)) && strcmpi(get(pm.Figures(k)," Tag "),...
76  strrep(mc.Name," . "," _ "))
77  f = this.getFunction;
78  ax = get(pm.Figures(k)," Children ");
79  hold(ax(1)," on ");
80  plot(ax(1),this.lam0,f(this.lam0)," rx "," MarkerSize ",16);
81  break;
82  end
83  end
84  end
85  }
86 
87 
88  public: /* ( Static ) */
89 
90  static function qfungen = fromLinearizedMarkert(mfungen) {
91  mfun = mfungen.getFunction;
92  m = mfungen.max_modulus;
93  t0 = 2*mfungen.t0;
94  ft0 = mfun(t0);
95  l0 = 2*(t0-ft0/m)-1;
96  qfungen = general.functions.CubicToLinear(l0,m);
97  }
98 
99 
100  static function res = test_CubicToLinear() {
101  f = general.functions.CubicToLinear;
102  f.plot;
103  f = general.functions.CubicToLinear(4,5e6);
104  f.plot;
105  res = true;
106  }
107 
108 
109 
110 };
111 }
112 }
113 
114 
115 
static function res = test_CubicToLinear()
static function qfungen = fromLinearizedMarkert(mfungen)
Definition: CubicToLinear.m:90
function pm = plot(varargin)
Definition: CubicToLinear.m:65
* fl(l)
A variable number of input arguments.
AFUNGEN Summary of this class goes here Detailed explanation goes here.
Definition: AFunGen.m:19
Returns the modified markert law functions for the OVERALL energy density funcion derivative w...
Definition: CubicToLinear.m:19
function [ fhandle , dfhandle ] = getFunction()
Definition: CubicToLinear.m:50