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.BaseCustomSolver Class Referenceabstract

BaseCustomSolver: Base class for all self-implemented solvers. More...

Detailed Description

BaseCustomSolver: Base class for all self-implemented solvers.

Adds another abstraction layer to distinguish between self-implemented ode solvers and third-party solvers.

Author
Daniel Wirtz
Date
2011-05-31
Change in 0.7:
(Timm Strecker, 2013-01-24) accelerated method getCompTimes
New in 0.4:
(Daniel Wirtz, 2011-05-31) Added this class.
Todo:
checkout code at http://www.mymathlib.com/diffeq/embedded_runge_kutta/embedded_prince_dormand_v1_4_5.html

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 18 of file BaseCustomSolver.m.

Public Member Functions

 BaseCustomSolver ()
 
function [ rowvec t , matrix x ] = solve (function_handle odefun,rowvec t,colvec x0)
 Solves the ode and wraps the actual solving method. More...
 
- Public Member Functions inherited from solvers.BaseSolver
 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 ()
 

Public Attributes

EVENT PreSolve
 Gets fired before the solver starts. More...
 
EVENT PostSolve
 Gets fired after the solver has finished. More...
 
- Public Attributes inherited from solvers.BaseSolver
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...
 

Protected Member Functions

virtual function colvec< double > x = customSolve (odefun, t, x0, outputtimes)
 The abstract solve function for custom ODE solver implementations. 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from solvers.BaseSolver
static function res = test_SolverSpeedTest ()
 
- 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.BaseCustomSolver.BaseCustomSolver ( )

Definition at line 46 of file BaseCustomSolver.m.

References solvers.BaseSolver.Name.

Member Function Documentation

function colvec< double > x = solvers.BaseCustomSolver.customSolve (   odefun,
  t,
  x0,
  outputtimes 
)
protectedpure virtual

The abstract solve function for custom ODE solver implementations.

In difference to the solvers.BaseSolver.solve method the times passed here are already matched to possible MaxStep restrictions (thus extended).

See Also
getCompTimes
Change in 0.7:
(Daniel Wirtz, 2013-01-11) Passing the outputtimes parameter to the customSolve method in order to allow for more memory-efficient implementations.
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
outputtimesA logical vector indicating the output times of effective interest.

Implemented in solvers.AdaptiveSemiImplicitEuler.

Referenced by solve().

Here is the caller graph for this function:

function [ rowvec t , matrix x ] = solvers.BaseCustomSolver.solve ( function_handle  odefun,
rowvec  t,
colvec  x0 
)

Solves the ode and wraps the actual solving method.

Parameters
odefunA function handle to the ode function, satisfying the interface also required by matlab's explicit ode solvers.
tThe desired times \(t_0,\ldots,t_N\) as row vector.
x0The initial value \(x(0) = x_0\) for \(t=0\)
Return values
tThe times \(t_i\)
xThe solution of the ode at the time steps \(t_0,\ldots,t_N\) as matrix.

Definition at line 52 of file BaseCustomSolver.m.

References customSolve(), and handle.notify.

Here is the call graph for this function:

Member Data Documentation

solvers.BaseCustomSolver.PostSolve

Gets fired after the solver has finished.

Carries an SolverEventData instance with the Times field set to the actual times being used during solving and the States field set to the corresponding state variable values.

Attention
This event is not fired when using a Matlab builtin solver.
See Also
solver.ode.SolverEventData
Events:
PostSolve

Definition at line 234 of file BaseCustomSolver.m.

solvers.BaseCustomSolver.PreSolve

Gets fired before the solver starts.

Carries an SolverEventData instance with the Times field set to the actual times being used during solving.

Attention
This event is not fired when using a Matlab builtin solver.
See Also
solver.ode.SolverEventData
Events:
PreSolve

Definition at line 218 of file BaseCustomSolver.m.


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