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
solvers.BaseSolver Class Referenceabstract

Base class for all KerMor ODE solvers. More...

Detailed Description

Base class for all KerMor ODE solvers.

Simply defines an interfaces for a solve function and provides common ODE solver properties.

New in 0.5:
(Daniel Wirtz, 2011-10-16) Added a new property RealTimeMode. If set to true, the solver will issue StepPerformed events on each integration timestep instead of collecting the results in a column matrix.
New in 0.3:
(Daniel Wirtz, 2011-04-21) Integrated this class to the property default value changed supervision system Property classes and levels. This class now inherits from KerMorObject and has an extended constructor registering any user-relevant properties using KerMorObject.registerProps.
Todo:
Write tests for solvers.

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 18 of file BaseSolver.m.

Public Member Functions

 BaseSolver ()
 
virtual function [
rowvec t ,
matrix x ] = 
solve (odefun,rowvec t,colvec x0)
 The abstract solve function for the ODE solver. 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 ()
 

Static Public Member Functions

static function res = test_SolverSpeedTest ()
 

Public Attributes

double MaxStep = "[]"
 Maximum time step for solver. More...
 
double InitialStep = "[]"
 The initial step size for the solver. So far only used by the MLWrapper class for the native matlab solvers. More...
 
logical RealTimeMode = false
 Determines if the solver's StepPerformed event should be used upon solving instead of returning the full trajectory as one. More...
 
dscomponents.AMassMatrix M = "[]"
 The mass matrix \(M\) of the ODE \(M(t)x'(t) = \ldots\). More...
 
 Name = "KerMor BaseSolver class"
 The solver's name. More...
 
solvers.SolverTypes SolverType = solvers.SolverTypes.Unknown
 The type of the solver. More...
 
EVENT StepPerformed
 Gets fired when an ODE solver performs an intermediate step. 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...
 

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 DPCMObject
static function obj = loadobj (obj, from)
 Re-register any registered change listeners! More...
 
static function obj = loadobj (obj, from)
 

Constructor & Destructor Documentation

solvers.BaseSolver.BaseSolver ( )

Definition at line 151 of file BaseSolver.m.

References KerMorObject.KerMorObject(), and DPCMObject.registerProps().

Here is the call graph for this function:

Member Function Documentation

function [ rowvec t , matrix x ] = solvers.BaseSolver.solve (   odefun,
rowvec  t,
colvec  x0 
)
pure virtual

The abstract solve function for the ODE solver.

Parameters
odefunA function handle to the ode's function. Signature is odefun(t,x)
tEither a two dimensional vector with t(1) < t(2) specifiying the start and end time, or a greater or equal to three dimensional, strictly monotoneously increasing vector explicitly setting the desired output times. Depending on the MaxStep property, the solver can work with a finer time step internally.
x0The initial value
Return values
tThe times \(t_i\) which equal the given times or the linspace between both given times (two-elem t param) with distance \(dt\)
xThe solution of the ode at times \(t_i\)
static function res = solvers.BaseSolver.test_SolverSpeedTest ( )
static

Definition at line 254 of file BaseSolver.m.

References t.

Member Data Documentation

solvers.BaseSolver.InitialStep = "[]"

The initial step size for the solver. So far only used by the MLWrapper class for the native matlab solvers.

Property class important:
Some odes require a certain (small) initial step.

Default: [] (User solver's default settings)

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
This property has custom functionality when its value is changed.

Definition at line 68 of file BaseSolver.m.

Referenced by solvers.MLWrapper.solve().

solvers.BaseSolver.M = "[]"

The mass matrix \(M\) of the ODE \(M(t)x'(t) = \ldots\).

Default: []

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
This property has custom functionality when its value is changed.

Definition at line 101 of file BaseSolver.m.

Referenced by solvers.FullyImplEuler.customSolve(), solvers.SemiImplicitEuler.customSolve(), solvers.Heun.customSolve(), solvers.ExplEuler.customSolve(), solvers.AdaptiveSemiImplicitEuler.customSolve(), solvers.MLWrapper.solve(), and solvers.MLode15i.solverCall().

solvers.BaseSolver.MaxStep = "[]"

Maximum time step for solver.

Upon time-step computation via getCompTimes this value is used as \(dt\) inner time-step.

Property class critical:
Too large steps due to high time-step distances in the passed times vector \(t\) may lead to errorneous results. This property limits the maximum time-step size used in the implementations. Set to [] in order to rely on the times \(t\).

Default: [] (Use solver's default settings)

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
This property has custom functionality when its value is changed.

Definition at line 48 of file BaseSolver.m.

Referenced by models.BaseModel.computeTrajectory(), solvers.ExplEuler.ExplEuler(), solvers.FullyImplEuler.FullyImplEuler(), solvers.Heun.Heun(), solvers.MLode15i.MLode15i(), and solvers.MLWrapper.solve().

solvers.BaseSolver.Name = "KerMor BaseSolver class"

The solver's name.

Property class data:
Define your own solver name!
Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.
Default: "KerMor BaseSolver class"

Definition at line 116 of file BaseSolver.m.

Referenced by solvers.AdaptiveSemiImplicitEuler.AdaptiveSemiImplicitEuler(), solvers.BaseCustomSolver.BaseCustomSolver(), solvers.ExplEuler.ExplEuler(), solvers.Heun.Heun(), solvers.MLode15i.MLode15i(), and solvers.SemiImplicitEuler.SemiImplicitEuler().

solvers.BaseSolver.RealTimeMode = false

Determines if the solver's StepPerformed event should be used upon solving instead of returning the full trajectory as one.

Property class optional:
This setting is model dependent

Default: false

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

Definition at line 85 of file BaseSolver.m.

Referenced by solvers.FullyImplEuler.customSolve(), solvers.SemiImplicitEuler.customSolve(), solvers.Heun.customSolve(), solvers.ExplEuler.customSolve(), solvers.AdaptiveSemiImplicitEuler.customSolve(), and solvers.MLWrapper.solve().

solvers.BaseSolver.SolverType = solvers.SolverTypes.Unknown

The type of the solver.

MaxStep is only relevant for explicit solvers

Property class data:
ToDo!

Default: solvers.SolverTypes.Unknown

See Also
solvers.SolverTypes
Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.
This property has custom functionality when its value is changed.

Definition at line 130 of file BaseSolver.m.

Referenced by solvers.ExplEuler.ExplEuler(), solvers.FullyImplEuler.FullyImplEuler(), solvers.Heun.Heun(), solvers.MLode15i.MLode15i(), solvers.MLWrapper.MLWrapper(), and solvers.SemiImplicitEuler.SemiImplicitEuler().

solvers.BaseSolver.StepPerformed

Gets fired when an ODE solver performs an intermediate step.

See Also
RealTimeMode models.BaseModel.RealTimePlotting
Events:
StepPerformed

Definition at line 240 of file BaseSolver.m.


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