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
general.AffParamMatrix Class Reference

General time/parameter-affine matrix. More...

Detailed Description

General time/parameter-affine matrix.

Represents a linear combination of matrices \(A_i\) with scalar parameter and/or time dependent coefficient functions \(\theta_i\) of the form \(\sum\limits_{i=0}^Q \theta_i(t,\mu)A_i\).

Some default operators (minus, mtimes, ctranspose) have been implemented to work on instances of this type. This enables very easy notation and increases readability when used.

Change in 0.6:
(Daniel Wirtz, 2012-05-24) Added automatic guessing of time dependency via evaluation of the coefficient functions after building them, using 0 and Inf times (with a 100-dim ones parameter vector)
New in 0.6:
(Daniel Wirtz, 2012-02-02) New property AffParamMatrix.TimeDependent which is to be used in order to indicate to KerMor if the affine time/parametric matrix is truly time-dependent.
New in 0.6:
(Daniel Wirtz, 2012-02-01)
  • Implementing the project method here directly as doing so outside requires access to the interior of the AffParamMatrix (see dscomponents.AffLinCoreFun)
  • Bugfix for transposition: formerly casted to wrong size dimensions.
New in 0.6:
(Daniel Wirtz, 2011-12-09) Added a new method AffParamMatrix.getMatrix (mainly for debug reasons)
Change in 0.6:
(Daniel Wirtz, 2011-11-30)
  • Fixed a bug that has been introduced when introducing the faster implementation. Multiplication from left or right with a matrix caused an error as the resulting size was not computed correctly.
  • Also included a check for correct types as e.g. the return type for multiplication of two real different subclasses of AffParamMatrix is not well defined.
  • Added checks for the correct dimensions for standard operations. Scalar values are treated seperately.
Change in 0.5:
(Daniel Wirtz, 2011-07-05) Renamed this class to AffParamMatrix and renamed the evaluate function to compose.
Change in 0.4:
(Syed Ammar, 2011-05-06) Implemented Setters for the class properties

This class is part of the framework

KerMor - Model Order Reduction using Kernels
Todo:
  • implement/override other arithmetic operations
  • add string for coeff method header '@(t,mu)'

Definition at line 18 of file AffParamMatrix.m.

Public Member Functions

function M = compose (t, mu)
 Composes the affine-linear combination of matrices for given time \(t\) and parameter \(\mu\). More...
 
function c = evalCoeffFun (double t,colvec< double > mu)
 
function copy = clone (copy)
 Creates a copy of this affine parametric matrix. More...
 
function  addMatrix (coeff_fun, mat)
 Adds a matrix with corresponding coefficient function to the affine parametric matrix. More...
 
function pr = mtimes (B)
 Implements the default multiplication method. More...
 
function diff = minus (B)
 Implements the default substraction method. More...
 
function transp = ctranspose ()
 Implements the transposition for affine parametric matrices. More...
 
function
dotprod = 
times (B)
 
function M = getMatrix (idx)
 Returns the \(i\)-th matrix of the AffParamMatrix. More...
 
function general.AffParamMatrix
target = 
project (matrix< double > V,matrix< double > W,general.AffParamMatrix target)
 Projects the affine parametric matrix using \(V\) and \(W\). More...
 
function [ n ,
m ] = 
size (dim)
 Implementation of ABlockedData.size. More...
 
function  clear ()
 
- Public Member Functions inherited from general.AProjectable
function handle target = project (matrix< double > V,matrix< double > W,handle target)
 Returns a NEW INSTANCE of the projected object that does not rely on data of the old one via references (everything must be copied to ensure separability of reduced(=projected) versions and full versions, unless. More...
 
function copy = clone (copy)
 The interface method with returns a copy of the current class instance. More...
 

Public Attributes

integer N = 0
 The number of affine matrices / size of the linear combination. More...
 
 Matrices = "[]"
 The matrices for the affine function. More...
 
string funStr = {""}
 The function strings defining \(\theta_i(t,\mu)\) for the affine-linear combination of the matrices. More...
 
- Public Attributes inherited from general.AProjectable
 V
 The \(V\) matrix of the biorthogonal pair \(V,W\). More...
 
 W
 The \(W\) matrix of the biorthogonal pair \(V,W\). More...
 
- Public Attributes inherited from handle
 addlistener
 Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More...
 
 notify
 Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More...
 
 delete
 Handle object destructor method that is called when the object's lifecycle ends. More...
 
 disp
 Handle object disp method which is called by the display method. See the MATLAB disp function. More...
 
 display
 Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More...
 
 findobj
 Finds objects matching the specified conditions from the input array of handle objects. More...
 
 findprop
 Returns a meta.property objects associated with the specified property name. More...
 
 fields
 Returns a cell array of string containing the names of public properties. More...
 
 fieldnames
 Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More...
 
 isvalid
 Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More...
 
 eq
 Relational functions example. See details for more information. More...
 
 transpose
 Transposes the elements of the handle object array. More...
 
 permute
 Rearranges the dimensions of the handle object array. See the MATLAB permute function. More...
 
 reshape
 hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More...
 
 sort
 ort the handle objects in any array in ascending or descending order. More...
 

Protected Attributes

handle cfun = "[]"
 coefficient function handle as specified by funStr More...
 
rowvec< integerdims
 dimension of the matrices More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from general.AProjectable
static function obj = loadobj (obj, from)
 

Member Function Documentation

function general.AffParamMatrix.addMatrix (   coeff_fun,
  mat 
)

Adds a matrix with corresponding coefficient function to the affine parametric matrix.

TODO: allow function handle arguments!

Parameters
coeff_funA string describing the \(i\)-th coefficient function's evaluation as if entered into a function handle interior or a function. By convention, the passed arguments are named t and mu. For example, one would pass (t+1)/mu(1)) as coeff_fun string if the function was to be '@(t,mu)(t+1)/mu(1))'
matThe corresponding matrix \(A_i\)

Definition at line 200 of file AffParamMatrix.m.

References dims, funStr, Matrices, N, and size().

Here is the call graph for this function:

function general.AffParamMatrix.clear ( )

Definition at line 458 of file AffParamMatrix.m.

References cfun, dims, funStr, Matrices, and N.

function copy = general.AffParamMatrix.clone (   copy)
virtual

Creates a copy of this affine parametric matrix.

Parameters
copyThe subclass instance where to copy the local properties to
Generated fields of copy:

Implements ICloneable.

Definition at line 177 of file AffParamMatrix.m.

References cfun, dims, funStr, Matrices, and N.

Referenced by ctranspose(), and project().

Here is the caller graph for this function:

function M = general.AffParamMatrix.compose (   t,
  mu 
)

Composes the affine-linear combination of matrices for given time \(t\) and parameter \(\mu\).

Parameters
tThe current time \(t\)
muThe current parameter vector \(\mu\)
Return values
MThe sum \(M(t,\mu) = \sum\limits_{i=0}^Q\theta_i(t,\mu)A_i\)

Definition at line 153 of file AffParamMatrix.m.

References cfun, dims, Matrices, N, and handle.reshape.

Referenced by dscomponents.AffLinOutputConv.evaluate(), dscomponents.AffLinInputConv.evaluate(), dscomponents.AffLinCoreFun.evaluate(), dscomponents.AffLinCoreFun.evaluateMulti(), dscomponents.AffLinCoreFun.getStateJacobian(), dscomponents.AffLinInputConv.prepareSimulation(), and dscomponents.AffLinCoreFun.prepareSimulation().

Here is the caller graph for this function:

function transp = general.AffParamMatrix.ctranspose ( )

Implements the transposition for affine parametric matrices.

Generated fields of transp:

Definition at line 348 of file AffParamMatrix.m.

References clone(), getMatrix(), N, handle.reshape, and t.

Here is the call graph for this function:

function c = general.AffParamMatrix.evalCoeffFun ( double  t,
colvec< double mu 
)

Definition at line 172 of file AffParamMatrix.m.

References cfun.

function M = general.AffParamMatrix.getMatrix (   idx)

Returns the \(i\)-th matrix of the AffParamMatrix.

Parameters
idxThe index \(i\)
Return values
MThe \(i\)-th matrix of the AffParamMatrix

Definition at line 380 of file AffParamMatrix.m.

References dims, Matrices, N, and handle.reshape.

Referenced by ctranspose(), dscomponents.AffLinOutputConv.project(), and project().

Here is the caller graph for this function:

function diff = general.AffParamMatrix.minus (   B)

Implements the default substraction method.

So far only works for the case of identical coefficient functions, as more sophisticated differences for different coefficient functions and combination sizes are not used yet.

Required fields of B:
Generated fields of diff:

Definition at line 303 of file AffParamMatrix.m.

References all(), and size().

Here is the call graph for this function:

function pr = general.AffParamMatrix.mtimes (   B)

Implements the default multiplication method.

Required fields of B:
Generated fields of pr:

Definition at line 235 of file AffParamMatrix.m.

References all(), handle.reshape, and size().

Here is the call graph for this function:

function general.AffParamMatrix target = general.AffParamMatrix.project ( matrix< double V,
matrix< double W,
general.AffParamMatrix  target 
)

Projects the affine parametric matrix using \(V\) and \(W\).

Set either \(V\) or \(W\) to one if single-sided projection is desired.

Parameters
VThe first projection matrix for "reconstruction"
WThe second projection matrix for "projection"
targetIf clone was called for a subclass, the new subclass instance Default: []
Required fields of target:
Generated fields of target:

Definition at line 396 of file AffParamMatrix.m.

References clone(), getMatrix(), N, handle.reshape, size(), and t.

Here is the call graph for this function:

function [ n , m ] = general.AffParamMatrix.size (   dim)

Implementation of ABlockedData.size.

Definition at line 437 of file AffParamMatrix.m.

References dims.

Referenced by dscomponents.AffLinCoreFun.addMatrix(), addMatrix(), dscomponents.AffLinCoreFun.evaluateMulti(), minus(), mtimes(), dscomponents.AffLinOutputConv.project(), and project().

Here is the caller graph for this function:

function dotprod = general.AffParamMatrix.times (   B)

Definition at line 368 of file AffParamMatrix.m.

Member Data Documentation

general.AffParamMatrix.cfun = "[]"
protected

coefficient function handle as specified by funStr

See Also
buildCoeffFun
Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Protected
Matlab documentation of property attributes.
Default: "[]"

Definition at line 121 of file AffParamMatrix.m.

Referenced by dscomponents.AffLinCoreFun.addMatrix(), clear(), clone(), compose(), evalCoeffFun(), and dscomponents.AffLinCoreFun.getGlobalLipschitz().

general.AffParamMatrix.dims
protected

dimension of the matrices

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Protected
Matlab documentation of property attributes.

Definition at line 137 of file AffParamMatrix.m.

Referenced by addMatrix(), clear(), clone(), compose(), getMatrix(), and size().

general.AffParamMatrix.funStr = {""}

The function strings defining \(\theta_i(t,\mu)\) for the affine-linear combination of the matrices.

cell array of

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.
Default: {""}

Definition at line 104 of file AffParamMatrix.m.

Referenced by addMatrix(), clear(), and clone().

general.AffParamMatrix.Matrices = "[]"

The matrices for the affine function.

Property class critical:
Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.
Default: "[]"

Definition at line 89 of file AffParamMatrix.m.

Referenced by addMatrix(), clear(), clone(), compose(), and getMatrix().

general.AffParamMatrix.N = 0

The number of affine matrices / size of the linear combination.

Default: 0

Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 76 of file AffParamMatrix.m.

Referenced by addMatrix(), clear(), clone(), compose(), ctranspose(), getMatrix(), dscomponents.AffLinOutputConv.project(), and project().


The documentation for this class was generated from the following file: