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
ConstMassMatrix.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.AMassMatrix {
38  public:
39 
40  M;
41 
42 
43  private:
44 
45  l;
46 
47  u;
48 
49  q;
50 
51  p;
52 
53 
54  public:
55 
56 
58  this = this@dscomponents.AMassMatrix(varargin[:]);
59  if nargin > 0
60  this.M= M;
61  this.TimeDependent= false;
62  if issparse(M)
63  [this.l, this.u, this.q, this.p] = lu(M);
64  else
65  [this.l, this.u] = lu(M);
66  this.q= [];
67  this.p= [];
68  end
69  /* Compute sparsity pattern straight away */
70  [i, j] = find(M);
71  s = size(M,1);
72  if issparse(M) || length(i) < numel(M)
73  this.SparsityPattern= sparse(i,j,ones(size(i)),s,s);
74  end
75  end
76  }
77 
78 
79  function M = evaluate(unused1,unused2) {
80  M = this.M;
81  }
82 
83 
84  function [L , U , q , p ] = getLU(unused1,unused2) {
85  L = this.l;
86  U = this.u;
87  q = this.q;
88  p = this.p;
89  }
90 
91 
92  function projected = project(V,W) {
93  algdims_correctedoffset = [];
94  if ~isempty(this.AlgebraicEquationDims)
95  nalgdims = length(this.AlgebraicEquationDims);
96  algdims_correctedoffset = size(V,2)-nalgdims+1:size(V,2);
97  end
98  projected = dscomponents.ConstMassMatrix(W^t*(this.M*V),algdims_correctedoffset);
99  /* Dont store V,W due to hard drive space saving (not really needed here)
100  *projected = project@general.AProjectable(this, V, W, projected); */
101  }
102 
103 
104  function copy = clone() {
105  copy = clone@dscomponents.AMassMatrix(this, ...
106  dscomponents.ConstMassMatrix);
107  copy.l= this.l;
108  copy.u= this.u;
109  copy.q= this.q;
110  copy.p= this.p;
111  copy.M= this.M;
112  }
113 
114 
115 
116 };
117 }
118 
function M = evaluate(unused1, unused2)
function projected = project(V, W)
logical TimeDependent
Flag that indicates time-dependency of the Mass Matrix.
Definition: AMassMatrix.m:42
A variable number of input arguments.
V
The matrix of the biorthogonal pair .
Definition: AProjectable.m:61
sparsematrix SparsityPattern
The sparsity pattern for the mass matrix.
Definition: AMassMatrix.m:57
function [ L , U , q , p ] = getLU(unused1, unused2)
W
The matrix of the biorthogonal pair .
Definition: AProjectable.m:72