161 if isa(model.
System.
x0,
" dscomponents.AffineInitialValue ")
162 this.e0Comp= error.initial.AffineParametric;
164 this.e0Comp= error.initial.Constant;
184 warning(
" BaseEstimator:postProcess ",
" State error is all zero. Attention! ");
191 if ~isequal(fs.StateScaling,1)
193 C = C*spdiags(fs.StateScaling,0,fd,fd);
200 e(idx) = norm(m.System.C.evaluate(t(idx),this.
mu))*e(idx);
203 Ce = C.evaluate([],this.
mu);
246 error(
" Clone to this method can only be called from subclasses. ");
253 copy.e0Comp= this.e0Comp;
271 e0 = this.e0Comp.getE0(mu);
289 prepared = this.
clone;
290 if ~isa(rmodel,
" models.ReducedModel ")
291 error(
" The given value has to be a models.ReducedModel instance. ");
293 prepared.ReducedModel= rmodel;
294 this.e0Comp.prepareForReducedModel(rmodel);
315 #if 0 //mtoc++: 'set.StateError'
324 #if 0 //mtoc++: 'set.ExtraODEDims'
326 if (~isscalar(value) || value < 0) && value ~= 0
327 error(
" The value must be 0 or positive integer ");
336 #if 0 //mtoc++: 'set.Enabled'
339 error("
Enabled property must be a
boolean flag ");
343 this.fEnabled= value;
350 #if 0 //mtoc++: 'get.Enabled'
352 value = this.fEnabled;
382 if isempty(error.IterationCompLemmaEstimator.validModelForEstimator(model))
383 est = error.IterationCompLemmaEstimator;
386 elseif isempty(error.DEIMEstimator.validModelForEstimator(model))
387 est = error.DEIMEstimator;
388 elseif isempty(error.GLEstimator.validModelForEstimator(model))
389 est = error.GLEstimator;
391 est = error.DefaultEstimator;
392 fprintf(
" BaseEstimator.getEstimator: No suitable error estimator found for given model. Using the default estimator (disabled).\n ");
function copy = clone(copy)
Creates a copy of this error estimator. Call only allowed from subclasses.
virtual function eint = evalODEPart(colvec x,double t,double ut)
Template method for evaluation of the auxiliary ode part of the error estimator.
ICLONEABLE Interface for cloneable handle classes.
The base class for any KerMor detailed model.
models.BaseFullModel FullModel
The full model this reduced model was created from.
models.BaseFirstOrderSystem System
The actual dynamical system used in the model.
OutputError
The output error from the last simulation.
Base class for any KerMor class.
static function errmsg = validModelForEstimator(models.ReducedModel rmodel)
Abstract static method that forces subclasses to specify whether an estimator can be used for a given...
StateError
The reduction state-space error from the last simulation.
The KerMor reduced model class.
matrix< double > V
The matrix that has been used for projection.
function e0 = getE0(colvec< double > mu)
Calls the inner initial error computation strategy.
dscomponents.AInitialValue x0
Function handle to initial state evaluation.
Base class for all error estimators.
Enabled
Flag that indicates whether error estimation is used or not.
function double ct = postProcess(unused1,rowvec t, unused2)
Post-processes the error estimator ODE part after reduced simulation computation. ...
function prepared = prepareForReducedModel(models.ReducedModel rmodel)
Default implementation which simply clones this (subclass!)instance and returns the copy to use in re...
function ct = prepareConstants(colvec< double > mu, unused1)
dscomponents.LinearOutputConv C
The output conversion Defaults to an LinearOutputConv instance using a 1-matrix, which just forwards ...
function clear()
Clears the last error set by the estimator.
static function est = getEstimator(models.BaseFullModel model)
Factory method that creates a suitable error estimator for the given model.
function offlineComputations(models.BaseFullModel model)
Performs a validity check for the given model and sets up the estimator for use with the specified mo...
models.ReducedModel ReducedModel
The reduced model associated with the error estimator.
ExtraODEDims
The dimensions added to the ODE function by the estimator.