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
dscomponents.AffLinCoreFun Class Reference

Simple affine-linear core function "f" for a dynamical system. More...

Detailed Description

Simple affine-linear core function "f" for a dynamical system.

Simply wraps an affine-linear function into the ACoreFun interface to enable use of simple affine-linear functions as core function. At projection, each summand matrix is base changed into the basis given by V.

Author
Daniel Wirtz
Date
15.03.2010
Change in 0.6:
(Daniel Wirtz, 2012-02-02) Removed the former offset term \(b\) as it can be modeled via the input source \(B(t,\mu)u(t)\) with constant \(u \equiv 1\).
New in 0.6:
(Daniel Wirtz, 2011) Added an optional offset term \(b\) to the AffLinCoreFun to enable affine-linear affine-parametric core functions.
Change in 0.5:
(Daniel Wirtz, 2011-07-07) Updated this class to use the new general.AffParamMatrix class inside.

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 18 of file AffLinCoreFun.m.

Public Member Functions

 AffLinCoreFun (sys)
 Creates a new instance of the AffLinCoreFun. More...
 
function fx = evaluate (colvec< double > x,double t)
 Evaluates affine-linear core function by matrix-vector multiplication. More...
 
function fx = evaluateMulti (colvec< double > x,double t,colvec< double > mu)
 
function  prepareSimulation (colvec< double > mu)
 
function fx = evaluateCoreFun ()
 This method will never be called as evaluate is overridden directly for performance. this is possible as AffLinCoreFuns have both CustomProjection and MultiArgumentEvaluations. More...
 
function J = getStateJacobian (unused1,double t)
 Overrides the default jacobian finite difference implementation. Jacobian of linear operator is the operator itself, i.e. in this case the linear combination of the matrices. More...
 
function c = getGlobalLipschitz (double t,colvec< double > mu)
 Implementation of the interface method from IGlobalLipschitz. More...
 
function proj = project (V, W)
 
function  addMatrix (string coeff_fcn,matrix< double > mat)
 Adds a new matrix to the affine-linear core function. More...
 
function prod = mtimes (other)
 Implements the default multiplication method. More...
 
function diff = minus (other)
 Implements the default subtraction method. More...
 
function sum = plus (other)
 Implements the default addition method. More...
 
function transp = ctranspose ()
 Implements the default transposition method. More...
 
function copy = clone ()
 
- Public Member Functions inherited from dscomponents.ACoreFun
 ACoreFun (sys)
 
function  setSystem (sys)
 
function target = project (V, W, target)
 Sets the protected \(\vV,\vW\) matrices that can be utilized on core function evaluations after projection. More...
 
function fx = evaluate (x, t)
 Evaluates the f-approximation. Depending on a possible projection and the CustomProjection-property the function either calls the inner evaluation directly which assumes \(f = f^r(z)\) or projects the reduced state variable z into the original space and evaluates the function there, so via \(f = V'f(Vz)\). More...
 
function fx = evaluateMulti (colvec< double > x,double t,colvec< double > mu)
 Evaluates this function on multiple locations and maybe multiple times and parameters. More...
 
function  prepareSimulation (colvec< double > mu)
 A method that allows parameter-dependent computations to be performed before a simulation using this parameter starts. More...
 
function J = getStateJacobian (x, t)
 Default implementation of jacobian matrix evaluation via finite differences. More...
 
function J = getStateJacobianImpl (colvec< double > x,double t)
 Default implementation of state jacobians. uses finite differences. More...
 
function copy = clone (copy)
 The interface method with returns a copy of the current class instance. More...
 
function [ matrix< double > J ,
dx ] = 
getStateJacobianFD (x, t,rowvec< integer > partidx)
 Implementation of jacobian matrix evaluation via finite differences. More...
 
virtual function fx = evaluateCoreFun (colvec< double > x,double t)
 Actual method used to evaluate the dynamical sytems' core function. More...
 
function res = test_MultiArgEval (mudim)
 Convenience function that tests if a custom MultiArgumentEvaluation works as if called with single arguments. More...
 
function logical res = test_Jacobian (matrix< double > xa,rowvec< double > ta,matrix< double > mua)
 Tests the custom provided jacobian matrix against the default finite difference computed one. More...
 
- Public Member Functions inherited from KerMorObject
 KerMorObject ()
 Constructs a new KerMor object. More...
 
function  display ()
 disp(object2str(this)); More...
 
function bool = eq (B)
 Checks equality of two KerMor objects. More...
 
function bool = ne (B)
 Checks if two KerMorObjects are different. More...
 
function cn = getClassName ()
 Returns the simple class name of this object without packages. More...
 
- Public Member Functions inherited from DPCMObject
 DPCMObject ()
 Creates a new DPCM object. More...
 
 DPCMObject ()
 
- 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 Member Functions inherited from general.AffParamMatrix
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 Attributes

char CoeffClass = ""
 Export setting. Java class name for JKerMor model export. More...
 
- Public Attributes inherited from dscomponents.ACoreFun
logical TimeDependent = true
 Flag that indicates if the ACoreFun is (truly) time-dependent. More...
 
 CustomProjection = false
 Set this property if the projection process is customized by overriding the default project method. More...
 
sparse< logicalJSparsityPattern = "[]"
 Sparsity pattern for the jacobian matrix. More...
 
integer xDim = "[]"
 The current state space dimension of the function's argument \(x\). More...
 
integer fDim = "[]"
 The current output dimension of the function. More...
 
models.BaseFirstOrderSystem System
 The system associated with the current ACoreFun. More...
 
colvec< doublemu = "[]"
 The current model parameter mu for evaluations. Will not be persisted as only valid for runtime during simulations. More...
 
 Vcache
 
 Wcache
 
- Public Attributes inherited from DPCMObject
 WorkspaceVariableName = ""
 The workspace variable name of this class. Optional. More...
 
 ID = "[]"
 An ID that allows to uniquely identify this DPCMObject (at least within the current MatLab session/context). More...
 
 PropertiesChanged = "[]"
 The Dictionary containing all the property settings as key/value pairs. 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...
 
- 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 general.AffParamMatrix
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...
 

Additional Inherited Members

- Protected Member Functions inherited from KerMorObject
function  checkType (obj, type)
 Object typechecker. More...
 
- Protected Member Functions inherited from DPCMObject
function  registerProps (varargin)
 Call this method at any class that defines DPCM observed properties. More...
 
function  registerProps (varargin)
 
- Static Protected Member Functions inherited from dscomponents.ACoreFun
static function obj = loadobj (obj, from)
 
- Static Protected Member Functions inherited from DPCMObject
static function obj = loadobj (obj, from)
 Re-register any registered change listeners! More...
 
static function obj = loadobj (obj, from)
 
- Static Protected Member Functions inherited from general.AProjectable
static function obj = loadobj (obj, from)
 
- Protected Attributes inherited from general.AffParamMatrix
handle cfun = "[]"
 coefficient function handle as specified by funStr More...
 
rowvec< integerdims
 dimension of the matrices More...
 

Constructor & Destructor Documentation

dscomponents.AffLinCoreFun.AffLinCoreFun (   sys)

Creates a new instance of the AffLinCoreFun.

Definition at line 83 of file AffLinCoreFun.m.

References dscomponents.ACoreFun.CustomProjection, and dscomponents.ACoreFun.TimeDependent.

Member Function Documentation

function dscomponents.AffLinCoreFun.addMatrix ( string  coeff_fcn,
matrix< double mat 
)

Adds a new matrix to the affine-linear core function.

See Also
general.AffParramMatrix
Parameters
coeff_fcnA 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.
matThe corresponding matrix \(A_i\)

Definition at line 196 of file AffLinCoreFun.m.

References all(), KerMor.App(), general.AffParamMatrix.cfun, dscomponents.ACoreFun.fDim, dscomponents.ACoreFun.JSparsityPattern, dscomponents.ACoreFun.mu, general.AffParamMatrix.size(), dscomponents.ACoreFun.TimeDependent, and dscomponents.ACoreFun.xDim.

Here is the call graph for this function:

function copy = dscomponents.AffLinCoreFun.clone ( )

Definition at line 305 of file AffLinCoreFun.m.

References CoeffClass, and dscomponents.ACoreFun.System.

Referenced by project().

Here is the caller graph for this function:

function transp = dscomponents.AffLinCoreFun.ctranspose ( )

Implements the default transposition method.

Definition at line 276 of file AffLinCoreFun.m.

function fx = dscomponents.AffLinCoreFun.evaluate ( colvec< double x,
double  t 
)

Evaluates affine-linear core function by matrix-vector multiplication.

Parameters
xThe state variable vector \(\vx(t)\)
tThe current time(s) \(t \in [0, T]\)

Definition at line 97 of file AffLinCoreFun.m.

References general.AffParamMatrix.compose(), dscomponents.ACoreFun.mu, and dscomponents.ACoreFun.TimeDependent.

Here is the call graph for this function:

function fx = dscomponents.AffLinCoreFun.evaluateCoreFun ( )

This method will never be called as evaluate is overridden directly for performance. this is possible as AffLinCoreFuns have both CustomProjection and MultiArgumentEvaluations.

Definition at line 137 of file AffLinCoreFun.m.

function fx = dscomponents.AffLinCoreFun.evaluateMulti ( colvec< double x,
double  t,
colvec< double mu 
)

Definition at line 115 of file AffLinCoreFun.m.

References general.AffParamMatrix.compose(), k, dscomponents.ACoreFun.mu, general.AffParamMatrix.size(), t, and dscomponents.ACoreFun.TimeDependent.

Here is the call graph for this function:

function c = dscomponents.AffLinCoreFun.getGlobalLipschitz ( double  t,
colvec< double mu 
)
virtual

Implementation of the interface method from IGlobalLipschitz.

Parameters
tThe current time(s) \(t \in [0, T]\)
muThe currently used parameter \(\vmu\). Set to \([]\) if not used.

Implements dscomponents.IGlobalLipschitz.

Definition at line 169 of file AffLinCoreFun.m.

References general.AffParamMatrix.cfun.

function J = dscomponents.AffLinCoreFun.getStateJacobian (   unused1,
double  t 
)

Overrides the default jacobian finite difference implementation. Jacobian of linear operator is the operator itself, i.e. in this case the linear combination of the matrices.

Parameters
unused1Marked as "~" in original m-file.
tThe current time(s) \(t \in [0, T]\)

Definition at line 150 of file AffLinCoreFun.m.

References general.AffParamMatrix.compose(), dscomponents.ACoreFun.mu, and dscomponents.ACoreFun.TimeDependent.

Here is the call graph for this function:

function diff = dscomponents.AffLinCoreFun.minus (   other)

Implements the default subtraction method.

Definition at line 252 of file AffLinCoreFun.m.

function prod = dscomponents.AffLinCoreFun.mtimes (   other)

Implements the default multiplication method.

Definition at line 240 of file AffLinCoreFun.m.

function sum = dscomponents.AffLinCoreFun.plus (   other)

Implements the default addition method.

Definition at line 264 of file AffLinCoreFun.m.

function dscomponents.AffLinCoreFun.prepareSimulation ( colvec< double mu)

Definition at line 128 of file AffLinCoreFun.m.

References general.AffParamMatrix.compose().

Here is the call graph for this function:

function proj = dscomponents.AffLinCoreFun.project (   V,
  W 
)

Definition at line 188 of file AffLinCoreFun.m.

References clone().

Here is the call graph for this function:

Member Data Documentation

dscomponents.AffLinCoreFun.CoeffClass = ""

Export setting. Java class name for JKerMor model export.

Set this value to the class inside your JKerMor source that implements the IAffineCoefficients interface for this core function.

In order for this to work the coefficient functions must equal the AffParamMatrix' coefficient functions both mathematically and in the order of entry.

Property class data:
Set only if the model is intended for JKerMor export.

Default: '

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.

Definition at line 52 of file AffLinCoreFun.m.

Referenced by clone().


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