KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
Base class for all error estimators. More...
Base class for all error estimators.
In KerMor any error estimators have the chance to add additionaly terms to the ODE function by using the evalODEPart and getE0 functions. Finally, the method postProcess gets called when the ODE solver finished to allow for any processing / final computation of error estimates.
Definition at line 18 of file BaseEstimator.m.
Public Member Functions | |
function | offlineComputations (models.BaseFullModel model) |
Performs a validity check for the given model and sets up the estimator for use with the specified model. More... | |
function double ct = | postProcess (unused1,rowvec t, unused2) |
Post-processes the error estimator ODE part after reduced simulation computation. More... | |
function | clear () |
Clears the last error set by the estimator. More... | |
function copy = | clone (copy) |
Creates a copy of this error estimator. Call only allowed from subclasses. More... | |
function e0 = | getE0 (colvec< double > mu) |
Calls the inner initial error computation strategy. More... | |
function ct = | prepareConstants (colvec< double > mu, unused1) |
function
prepared = | prepareForReducedModel (models.ReducedModel rmodel) |
Default implementation which simply clones this (subclass!)instance and returns the copy to use in reduced models. More... | |
virtual function eint = | evalODEPart (colvec x,double t,double ut) |
Template method for evaluation of the auxiliary ode part of the error estimator. 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 est = | getEstimator (models.BaseFullModel model) |
Factory method that creates a suitable error estimator for the given model. More... | |
static function errmsg = | validModelForEstimator (models.ReducedModel rmodel) |
Abstract static method that forces subclasses to specify whether an estimator can be used for a given model or not. More... | |
Public Attributes | |
Enabled | |
Flag that indicates whether error estimation is used or not. More... | |
StateError = "[]" | |
The reduction state-space error from the last simulation. More... | |
ExtraODEDims = 0 | |
The dimensions added to the ODE function by the estimator. More... | |
OutputError = "[]" | |
The output error from the last simulation. More... | |
models.ReducedModel | ReducedModel = "[]" |
The reduced model associated with the error estimator. More... | |
mu | |
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) |
function error.BaseEstimator.clear | ( | ) |
Clears the last error set by the estimator.
Definition at line 234 of file BaseEstimator.m.
References OutputError, and StateError.
Referenced by models.ReducedModel.computeTrajectory().
|
virtual |
Creates a copy of this error estimator. Call only allowed from subclasses.
copy | The subclass instance where to copy the local properties to |
Implements ICloneable.
Definition at line 244 of file BaseEstimator.m.
References Enabled, ExtraODEDims, mu, OutputError, ReducedModel, and StateError.
Referenced by testing.DEIM.getDEIMEstimators_ErrOrders(), testing.DEIM.getDEIMEstimators_MDEIM_ST(), and prepareForReducedModel().
Template method for evaluation of the auxiliary ode part of the error estimator.
x | The full extended state variable vector. Extended means that the last ExtraODEDims rows contain the error estimators own data. If not used, implementers must take care to ditch those values if any function evaluations are performed within the integral part. |
t | The current time \(t\) |
ut | The value of the input function \(u(t)\) if given, [] else. |
eint | The auxiliary ode part value. |
Implemented in error.TPWLLocalLipEstimator, and error.BaseCompLemmaEstimator.
Calls the inner initial error computation strategy.
mu | The currently used parameter \(\vmu\). Set to \([]\) if not used. |
Definition at line 270 of file BaseEstimator.m.
Referenced by error.IterationCompLemmaEstimator.postProcess().
|
static |
Factory method that creates a suitable error estimator for the given model.
Tries to always select the best estimator available for the model. Of course the error estimator can be changed manually later on.
model | A KerMor full model |
Definition at line 381 of file BaseEstimator.m.
function error.BaseEstimator.offlineComputations | ( | models.BaseFullModel | model | ) |
Performs a validity check for the given model and sets up the estimator for use with the specified model.
Override in subclasses and call this method first to perform any additional offline computations
model | A KerMor full model |
Definition at line 159 of file BaseEstimator.m.
References models.BaseModel.System, and models.BaseFirstOrderSystem.x0.
Referenced by error.DefaultEstimator.DefaultEstimator().
Post-processes the error estimator ODE part after reduced simulation computation.
Here the OutputError fields
unused1 | Marked as "~" in original m-file. |
t | The times at which the reduced simulation was computed |
unused2 | Marked as "~" in original m-file. |
x | The reduced simulation's system state PLUS the error estimation values in the last this.ExtraODEDims rows. |
inputidx | The current input index |
ct | The time needed for postprocessing |
Definition at line 181 of file BaseEstimator.m.
References all(), models.BaseFirstOrderSystem.C, models.ReducedModel.FullModel, mu, OutputError, ReducedModel, StateError, models.BaseModel.System, and models.ReducedModel.V.
Referenced by models.ReducedModel.computeTrajectory().
Definition at line 282 of file BaseEstimator.m.
References mu.
Referenced by models.ReducedModel.computeTrajectory().
function prepared = error.BaseEstimator.prepareForReducedModel | ( | models.ReducedModel | rmodel | ) |
Default implementation which simply clones this (subclass!)instance and returns the copy to use in reduced models.
Override in subclasses to do final (e.g. projection-related) steps.
rmodel | A KerMor reduced model |
Definition at line 288 of file BaseEstimator.m.
References clone().
Referenced by models.ReducedModel.build(), and error.DefaultEstimator.DefaultEstimator().
|
staticpure virtual |
Abstract static method that forces subclasses to specify whether an estimator can be used for a given model or not.
rmodel | A KerMor reduced model |
Implemented in error.TPWLLocalLipEstimator.
error.BaseEstimator.Enabled |
Flag that indicates whether error estimation is used or not.
Default: true
Dependent
set to true. Definition at line 67 of file BaseEstimator.m.
Referenced by clone(), models.ReducedModel.computeTrajectory(), error.DefaultEstimator.DefaultEstimator(), and error.DEIMEstimator.prepareConstants().
error.BaseEstimator.ExtraODEDims = 0 |
The dimensions added to the ODE function by the estimator.
Please set to correct value in subclasses as simulations are not possible if set incorrect.
Default: 0
SetAccess = Protected, GetAccess = Public
Definition at line 97 of file BaseEstimator.m.
Referenced by error.BaseCompLemmaEstimator.BaseCompLemmaEstimator(), clone(), models.ReducedModel.computeTrajectory(), error.DefaultEstimator.DefaultEstimator(), error.DEIMEstimator.DEIMEstimator(), error.TPWLLocalLipEstimator.evalODEPart(), error.DefaultEstimator.postProcess(), error.TPWLLocalLipEstimator.postProcess(), and error.TPWLLocalLipEstimator.TPWLLocalLipEstimator().
error.BaseEstimator.mu |
Definition at line 146 of file BaseEstimator.m.
Referenced by clone(), error.BaseCompLemmaEstimator.evalODEPart(), error.TPWLLocalLipEstimator.evalODEPart(), error.BaseCompLemmaEstimator.getAlpha(), error.DEIMEstimator.getAlpha(), error.GLEstimator.getBeta(), error.IterationCompLemmaEstimator.getBeta(), error.DEIMEstimator.getBeta(), error.DefaultEstimator.postProcess(), postProcess(), error.TPWLLocalLipEstimator.postProcess(), error.IterationCompLemmaEstimator.postProcess(), error.DEIMEstimator.postProcess(), and prepareConstants().
error.BaseEstimator.OutputError = "[]" |
The output error from the last simulation.
Default: []
SetAccess = Private, GetAccess = Public
Definition at line 115 of file BaseEstimator.m.
Referenced by clear(), clone(), testing.DEIM.effectivityAnalysis(), testing.DEIM.getDEIMReducedModelErrors(), EstimatorAnalyzer.getErrorEstimates(), and postProcess().
error.BaseEstimator.ReducedModel = "[]" |
The reduced model associated with the error estimator.
SetAccess = Private, GetAccess = Public
Definition at line 130 of file BaseEstimator.m.
Referenced by clone(), error.BaseCompLemmaEstimator.evalODEPart(), error.TPWLLocalLipEstimator.evalODEPart(), error.BaseCompLemmaEstimator.getAlpha(), error.DEIMEstimator.getAlpha(), error.IterationCompLemmaEstimator.getBeta(), error.DEIMEstimator.getBeta(), error.TPWLLocalLipEstimator.init(), error.DefaultEstimator.postProcess(), postProcess(), error.TPWLLocalLipEstimator.postProcess(), error.IterationCompLemmaEstimator.postProcess(), error.DEIMEstimator.postProcess(), error.GLEstimator.prepareConstants(), error.BaseCompLemmaEstimator.prepareConstants(), error.IterationCompLemmaEstimator.prepareConstants(), and error.DEIMEstimator.prepareConstants().
error.BaseEstimator.StateError = "[]" |
The reduction state-space error from the last simulation.
Default: []
SetAccess = Protected, GetAccess = Public
Definition at line 82 of file BaseEstimator.m.
Referenced by clear(), clone(), EstimatorAnalyzer.getErrorEstimates(), error.GLEstimator.postProcess(), error.DefaultEstimator.postProcess(), postProcess(), error.TPWLLocalLipEstimator.postProcess(), error.IterationCompLemmaEstimator.postProcess(), and error.DEIMEstimator.postProcess().