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
models.BaseSecondOrderSystem Class Referenceabstract

Base class for all KerMor second-order dynamical systems. More...

Detailed Description

Base class for all KerMor second-order dynamical systems.

To setup custom second-order dynamical systems, inherit from this class.

Author
Daniel Wirtz
Date
2010-03-17

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 18 of file BaseSecondOrderSystem.m.

Public Member Functions

 BaseSecondOrderSystem (models.BaseFullModel model)
 Creates a new base dynamical system class instance. More...
 
function rsys = getReducedSystemInstance (models.ReducedModel rmodel)
 Creates a reduced system given the current system and the reduced model. More...
 
function  prepareSimulation (colvec< double > mu,integer inputidx)
 
function
dx_xdot_c = 
ODEFun (double t, x_xdot_c)
 The state space vector is composed of x: Original state space of second order model xdot: Substituted variable x'=y for first order transformation c: Algebraic constraint variables. More...
 
function J = getJacobian (double t, x_xdot_c)
 Computes the global jacobian of the current RHS system. More...
 
function  updateSparsityPattern ()
 The state space vector (NumTotalDofs) is composed of x: Original state space of second order model, NumStateDofs xdot: Substituted variable x'=y for first order transformation #NumDerivativeDoFs c: Algebraic constraint variables NumAlgebraicDofs. More...
 
function
x_xdot_c0 = 
getX0 (colvec< double > mu)
 Compiles the global x0 vector of the global dof vector. More...
 
function MgetMassMatrix ()
 
- Public Member Functions inherited from models.BaseFirstOrderSystem
 BaseFirstOrderSystem (models.BaseFullModel model)
 Creates a new base dynamical system class instance. More...
 
function rsys = getReducedSystemInstance (models.ReducedModel rmodel)
 Creates a reduced system given the current system and the reduced model. More...
 
function  setConfig (mu, inputidx)
 Sets the dynamical system's configuration. More...
 
function  prepareSimulation (colvec< double > mu,integer inputidx)
 
function dx = ODEFun (double t,colvec< double > x)
 Debug variant for single evaluation. Commented in function above. More...
 
function y = computeOutput (matrix< double > x,colvec< double > mu)
 Computes the output \(y(t) = C(t,\mu)Sx(t)\) from a given state result vector \(x(t)\), using the system's time and current mu (if given). More...
 
function  updateSparsityPattern ()
 
function J = getJacobian (double t, xc)
 Computes the global jacobian of the current system. More...
 
function matrix
< double > x0
getX0 (rowvec< double > mu)
 Gets the initial state variable at \(t=0\). More...
 
function MgetMassMatrix ()
 For first order systems, only algebraic constraints need to be catered for. More...
 
function ModelParam p = addParam (char name, default, varargin)
 Adds a parameter with the given values to the parameter collection of the current dynamical system. More...
 
function pidx = getParamIndexFromName (paramname)
 Gets the index within the parameter vector \(\mu\) for a given parameter name. More...
 
function pt = getParamInfo (colvec< double > mu)
 
function  plotInputs (pm)
 
- 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 Attributes

dscomponents.LinearCoreFun D
 The damping matrix of the second order system. More...
 
 NumDerivativeDofs
 
 DerivativeDirichletPosInStateDofs
 A logical column vector containing true at the locations of explicit derivative dirichlet conditions. The vector must have the same size as NumStateDofs. More...
 
- Public Attributes inherited from models.BaseFirstOrderSystem
dscomponents.ACoreFun f
 The core f function from the dynamical system. More...
 
dscomponents.LinearCoreFun A = "[]"
 Represents a linear or affine-linear component of the dynamical system. More...
 
dscomponents.AInputConv B = "[]"
 The input conversion. More...
 
dscomponents.LinearOutputConv C
 The output conversion Defaults to an LinearOutputConv instance using a 1-matrix, which just forwards the state variables and supports projection. More...
 
dscomponents.AInitialValue x0 = "[]"
 Function handle to initial state evaluation. More...
 
dscomponents.AMassMatrix M = "[]"
 The system's mass matrix. More...
 
dscomponents.ACoreFun g = "[]"
 The system's algebraic constraints function. More...
 
 Inputs = {""}
 The system's possible input functions. A cell array of function handles, each taking a time argument t. More...
 
 Params = data.ModelParam.empty
 The parameters usable for the dynamical system. More...
 
integer DependentParamIndices = -1
 Indices of the parameter vector that are effectively used in the system's core function. More...
 
double MaxTimestep = "[]"
 The maximum timestep allowed for any ODE solvers. More...
 
colvec StateScaling = 1
 The scaling for the state vectors. More...
 
 SparsityPattern
 The global sparsity pattern for the entire RHS. More...
 
 mu = "[]"
 The current parameter \(\mu\) for simulations, [] is none used. More...
 
 u = "[]"
 The current input function \(u(t)\) as function handle, [] if none used. More...
 
 inputidx = "[]"
 The current inputindex of the function \(u(t)\). More...
 
 NumStateDofs = "[]"
 
 NumAlgebraicDofs = 0
 
 NumTotalDofs = "[]"
 
 InputCount
 The number of inputs available. More...
 
 ParamCount
 The number of the system's parameters. More...
 
 Model
 The Model this System is attached to. More...
 
- 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...
 

Protected Member Functions

function  updateDimensions ()
 
function  validateModel (models.BaseFullModel model)
 Validates if the model to be set is a valid BaseModel at least. Extracting this function out of the setter enables subclasses to further restrict the objects that may be passed, as is being done in models.ReducedSystem, for example. More...
 
function val = getDerivativeInitialValues (unused1)
 Computes the derivative initial values. More...
 
virtual function val = getDerivativeDirichletValues (double t)
 Computes the derivative dirichlet values dependent on the current time. More...
 
- Protected Member Functions inherited from models.BaseFirstOrderSystem
function  updateDimensions ()
 
function ad_ic = getAlgebraicDofsInitialConditions ()
 The default is to return all zeros. More...
 
function  validateModel (models.BaseFullModel model)
 Validates if the model to be set is a valid BaseModel at least. Extracting this function out of the setter enables subclasses to further restrict the objects that may be passed, as is being done in models.ReducedSystem, for example. More...
 
- 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)
 

Protected Attributes

 JDX
 Pre-Computed pattern for dx-part. More...
 

Additional Inherited Members

- 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)
 

Constructor & Destructor Documentation

models.BaseSecondOrderSystem.BaseSecondOrderSystem ( models.BaseFullModel  model)

Creates a new base dynamical system class instance.

Parameters
modelA KerMor full model

Definition at line 86 of file BaseSecondOrderSystem.m.

References DPCMObject.registerProps().

Here is the call graph for this function:

Member Function Documentation

function val = models.BaseSecondOrderSystem.getDerivativeDirichletValues ( double  t)
protectedpure virtual

Computes the derivative dirichlet values dependent on the current time.

The logical field DerivativeDirichletPosInStateDofs indicates the positions of those values within the StateDofs.

The default behaviour is doing nothing (just return []); this function will only be called if NumStateDofs and NumDerivativeDofs differ.

See Also
ODEFun DerivativeDirichletPosInStateDofs
Parameters
tThe current time(s) \(t \in [0, T]\)

Implemented in models.muscle.System, models.beam.DynLinTimoshenkoSystem, and models.ReducedSecondOrderSystem.

Referenced by ODEFun().

Here is the caller graph for this function:

function val = models.BaseSecondOrderSystem.getDerivativeInitialValues (   unused1)
protected

Computes the derivative initial values.

The default behaviour is zero everywhere. Override in subclasses to provide different values.

See Also
NumDerivativeDofs
Parameters
unused1Marked as "~" in original m-file.

Definition at line 331 of file BaseSecondOrderSystem.m.

References NumDerivativeDofs.

Referenced by getX0().

Here is the caller graph for this function:

function J = models.BaseSecondOrderSystem.getJacobian ( double  t,
  x_xdot_c 
)
function M = models.BaseSecondOrderSystem.getMassMatrix ( )
function rsys = models.BaseSecondOrderSystem.getReducedSystemInstance ( models.ReducedModel  rmodel)

Creates a reduced system given the current system and the reduced model.

Override this method in subclasses (with call to parent) if custom behaviour of your system is required prior/posterior to reduced model computation.

Parameters
rmodelA KerMor reduced model

Definition at line 100 of file BaseSecondOrderSystem.m.

function x_xdot_c0 = models.BaseSecondOrderSystem.getX0 ( colvec< double mu)

Compiles the global x0 vector of the global dof vector.

Parameters
muThe currently used parameter \(\vmu\). Set to \([]\) if not used.

Definition at line 258 of file BaseSecondOrderSystem.m.

References getDerivativeInitialValues(), NumDerivativeDofs, models.BaseFirstOrderSystem.NumStateDofs, and models.BaseFirstOrderSystem.NumTotalDofs.

Referenced by models.muscle.Model.plotGeometrySetup(), and models.muscle.Dynamics.test_Jacobian().

Here is the call graph for this function:

Here is the caller graph for this function:

function dx_xdot_c = models.BaseSecondOrderSystem.ODEFun ( double  t,
  x_xdot_c 
)

The state space vector is composed of x: Original state space of second order model xdot: Substituted variable x'=y for first order transformation c: Algebraic constraint variables.

Parameters
tThe current time(s) \(t \in [0, T]\)

Definition at line 127 of file BaseSecondOrderSystem.m.

References models.BaseFirstOrderSystem.A, models.BaseFirstOrderSystem.B, D, DerivativeDirichletPosInStateDofs, dscomponents.AInputConv.evaluate(), dscomponents.LinearCoreFun.evaluate(), dscomponents.ACoreFun.evaluate(), models.BaseFirstOrderSystem.f, models.BaseFirstOrderSystem.g, getDerivativeDirichletValues(), models.BaseFirstOrderSystem.inputidx, models.BaseFirstOrderSystem.mu, NumDerivativeDofs, models.BaseFirstOrderSystem.NumStateDofs, and models.BaseFirstOrderSystem.u.

Here is the call graph for this function:

function models.BaseSecondOrderSystem.prepareSimulation ( colvec< double mu,
integer  inputidx 
)

Definition at line 117 of file BaseSecondOrderSystem.m.

References D, and dscomponents.ACoreFun.prepareSimulation().

Here is the call graph for this function:

function models.BaseSecondOrderSystem.updateSparsityPattern ( )
function models.BaseSecondOrderSystem.validateModel ( models.BaseFullModel  model)
protected

Validates if the model to be set is a valid BaseModel at least. Extracting this function out of the setter enables subclasses to further restrict the objects that may be passed, as is being done in models.ReducedSystem, for example.

Parameters
modelA KerMor full model

Definition at line 314 of file BaseSecondOrderSystem.m.

Member Data Documentation

models.BaseSecondOrderSystem.DerivativeDirichletPosInStateDofs

A logical column vector containing true at the locations of explicit derivative dirichlet conditions. The vector must have the same size as NumStateDofs.

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

Definition at line 59 of file BaseSecondOrderSystem.m.

Referenced by models.muscle.System.computeDirichletBC(), models.ReducedSecondOrderSystem.getJacobian(), ODEFun(), and updateSparsityPattern().

models.BaseSecondOrderSystem.JDX
protected

Pre-Computed pattern for dx-part.

Definition at line 76 of file BaseSecondOrderSystem.m.

Referenced by getJacobian(), and updateSparsityPattern().


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