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
QuadToLinear.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/2/(l-1);
54  fl = a*l*l-2*a*l+a;
55  fhandle = @(t)(t>=1 & t<l).*a.*(t.*t-2*t+1) + (t>=l).*(fl + (t-l)*m);
56  dfhandle = @(t)(t>=1 & t<l).*a.*(2*t-2) + (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 plot(range,varargin) {
66  if nargin < 2
67  range = [1 1.2*this.lam0];
68  end
69  plot@general.functions.AFunGen(this, range, varargin[:]);
70  if (range(2) > this.lam0)
71  f = this.getFunction;
72  ax = get(gcf," Children ");
73  ax = ax(2); /* second one is the left one - hope this is reproducible */
74 
75  hold(ax," on ");
76  plot(ax,this.lam0,f(this.lam0)," rx "," MarkerSize ",16);
77  end
78  }
79 
80 
81  public: /* ( Static ) */
82 
83  static function qfungen = fromLinearizedMarkert(mfungen) {
84  mfun = mfungen.getFunction;
85  m = mfungen.max_modulus;
86  t0 = 2*mfungen.t0;
87  ft0 = mfun(t0);
88  l0 = 2*(t0-ft0/m)-1;
89  qfungen = general.functions.QuadToLinear(l0,m);
90  }
91 
92 
93 
94 };
95 }
96 }
97 
98 
99 
function [ fhandle , dfhandle ] = getFunction()
Definition: QuadToLinear.m:50
Returns the modified markert law functions for the OVERALL energy density funcion derivative w...
Definition: QuadToLinear.m:19
* fl(l)
A variable number of input arguments.
function str = getConfigStr()
Definition: QuadToLinear.m:60
AFUNGEN Summary of this class goes here Detailed explanation goes here.
Definition: AFunGen.m:19
static function qfungen = fromLinearizedMarkert(mfungen)
Definition: QuadToLinear.m:83
function plot(range, varargin)
Definition: QuadToLinear.m:65