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
PointerOutputConv.m
Go to the documentation of this file.
1 namespace dscomponents{
2 
3 
4 /* (Autoinserted by mtoc++)
5  * This source code has been filtered by the mtoc++ executable,
6  * which generates code that can be processed by the doxygen documentation tool.
7  *
8  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
9  * Except for the comments, the function bodies of your M-file functions are untouched.
10  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
11  * attached source files that are highly readable by humans.
12  *
13  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
14  * the correct locations in the source code browser.
15  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
16  */
17 
19  :public dscomponents.AOutputConv {
36  private:
37 
38  Target;
39 
40 
41  public:
42 
43  PointerOutputConv(funPtr,time_dependent) {
44  if ~isa(funPtr," function_handle ")
45  error(" Argument funPtr must be a function handle. ");
46  elseif nargin(funPtr) ~= 2
47  error(" funPtr nargin must equal two (= t,mu). ");
48  end
49  this.Target= funPtr;
50  /* only set if given. Default value see AOutputConv */
51  if nargin == 2
52  this.TimeDependent= time_dependent;
53  end
54  }
65  function B = evaluate(double t,colvec<double> mu) {
66  B = this.Target(t,mu);
67  }
78  function proj = project(V,W) {
79  newfun = @(t,mu)this.Target(t,mu) * V;
80  proj = dscomponents.PointerOutputConv(newfun, this.TimeDependent);
81  /* Dont store V,W due to hard drive space saving (not really needed here, V will be
82  * stored in function handle anyways)
83  *proj = project@general.AProjectable(this, V, W, proj); */
84  }
96 };
97 }
98 
99 
100 
101 
102 
PointerOutputConv(funPtr, time_dependent)
Creates a new wrapper for a core function handle.
function proj = project(V, W)
Projects the core function into the reduced space. Creates a new PointerOutputConv and computes ...
POINTEROUTPUTCONV Allows for input converters provided by function handles.
function B = evaluate(double t,colvec< double > mu)
Evaluates the core function at t,mu.
V
The matrix of the biorthogonal pair .
Definition: AProjectable.m:61
logical TimeDependent
Flag whether the output converter actually depends on a time variable. Implemented for speed reasons ...
Definition: AOutputConv.m:44
W
The matrix of the biorthogonal pair .
Definition: AProjectable.m:72
BASEOUTPUTCONV Base class for output conversion "C". For simpler output conversions, it will be convenient to simply use the Pointer versions and pass the target function. For more complex output calculations which require local setup for example subclass this class and implement the evaluate method.
Definition: AOutputConv.m:18