94 this =
this@error.BaseEstimator;
117 prepared.aComp= error.alpha.AffineParametric(rm);
119 prepared.aComp= error.alpha.Constant(rm);
143 a = this.
aComp.getAlpha(phi, ut, t, this.
mu);
171 if isempty(this.lstPreSolve)
174 this.lstPreSolve.Enabled=
true;
181 copy =
clone@error.BaseEstimator(
this, copy);
183 copy.aComp= this.
aComp;
185 if ~isempty(copy.ReducedModel)
186 copy.lstPreSolve=
addlistener(copy.ReducedModel.ODESolver,
" PreSolve ",@copy.cbPreSolve);
187 copy.lstPreSolve.Enabled= this.lstPreSolve.Enabled;
193 clear@error.BaseEstimator(
this);
200 a = this.
aComp.getAlpha(phi, ut, t, this.
mu);
214 if ~isempty(this.lstPreSolve)
215 this.lstPreSolve.Enabled=
false;
217 ct =
postProcess@error.BaseEstimator(
this, x, t, inputidx);
247 function cbPreSolve(sender,data) {
266 if ~isempty(model.Approx)
267 if ~isa(model.Approx,
" approx.KernelApprox ")
268 errmsg =
" The full model "" s approx function must be a subclass of approx.KernelApprox for this error estimator. ";
271 elseif ~isa(model.System.f,
" dscomponents.ParamTimeKernelCoreFun ")
272 errmsg =
" If no approximation is used, the full model "" s core function must be a subclass of kernels.ParamTimeKernelCoreFun for this error estimator. ";
275 if ~isa(model.System.C,
" dscomponents.LinearOutputConv ")
276 errmsg =
" Local Lipschitz estimators work only for constant linear output conversion. ";
278 elseif model.System.C.TimeDependent
279 errmsg =
" Output error estimation for time dependent output not implemented yet. ";
282 if ~isa(model.ODESolver,
" solvers.BaseCustomSolver ");
283 errmsg =
" The reduced models ODE solver must be a subclass of BaseCustomSolver. ";
function a = getAlpha(colvec< double > x,double t,colvec< double > ut)
Convenience access method for semi-implicit euler method.
function copy = clone(copy)
The interface method with returns a copy of the current class instance.
BaseCompLemmaEstimator: Base class for error estimators using the comparison lemma formulation...
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.
dscomponents.AInputConv B
The input conversion.
The KerMor reduced model class.
function prepared = prepareForReducedModel(models.ReducedModel rm)
Prepares this estimator for use with a given reduced model. Basically uses the projection matrices an...
function offlineComputations(models.BaseFullModel model)
Overrides the method from BaseEstimator and performs additional computations.
Base class for all error estimators.
virtual function b = getBeta(colvec x,double t)
Computes the term from the error estimation ODE for given time and place.
solvers.BaseSolver ODESolver
The solver to use for the ODE. Must be an instance of any solvers.BaseSolver subclass.
static function errmsg = validModelForEstimator(models.BaseFullModel model)
Validations.
function ct = prepareConstants(colvec< double > mu,integer inputidx)
EstimationData
matrix containing the values at each time step.
dscomponents.ACoreFun f
The core f function from the dynamical system.
function ct = postProcess(colvec< double > x,double t,integer inputidx)
Return values: ct: The time needed for postprocessing.
models.ReducedModel ReducedModel
The reduced model associated with the error estimator.
addlistener
Creates a listener for the specified event and assigns a callback function to execute when the event ...
ExtraODEDims
The dimensions added to the ODE function by the estimator.
function e = evalODEPart(colvec x,double t,double ut)
Evaluates the auxiliary ode part for the comparison-lemma based error estimators. ...