116 Name =
"KerMor BaseSolver class";
153 this.
registerProps(
" MaxStep ",
" InitialStep ",
" Name ",
" RealTimeMode ",
" SolverType ");
185 #if 0 //mtoc++: 'set.MaxStep'
191 error(" Positive real scalar expected. ");
193 error(" Maximum time step must be greater than zero. Use [] to unset. ");
202 #if 0 //mtoc++: 'set.SolverType'
204 if ~isa(value,
" solvers.SolverTypes ")
215 #if 0 //mtoc++: 'set.InitialStep'
218 error(" Positive real scalar expected. ");
227 #if 0 //mtoc++: 'set.M'
229 if ~isempty(value) && ~isa(value,
" dscomponents.AMassMatrix ")
230 error(" Mass
matrix must be a dscomponents.AMassMatrix subclass ");
255 m = models.synth.KernelTest(200);
256 m.ErrorEstimator= [];
257 m.offlineGenerations;
258 perform(solvers.ExplEuler);
259 perform(solvers.MLWrapper(@ode23));
260 perform(solvers.MLWrapper(@ode45));
261 perform(solvers.Heun);
262 perform(solvers.FullyImplEuler(m));
266 function perform(solver)
269 r = m.buildReducedModel;
271 fprintf(
" Using solver %s (red. model build time %gs)\n ",solver.Name,
t);
273 ma.compareRedFull(r.getRandomParam);
ModelAnalyzer: Analysis tools for reduced models and approximations.
SolverTypes: Enumeration class classifying a ode solver type as explicit solver, implicit solver or M...
logical RealTimeMode
Determines if the solver's StepPerformed event should be used upon solving instead of returning the f...
Base class for any KerMor class.
virtual function [ rowvec t , matrix x ] = solve(odefun,rowvec t,colvec x0)
The abstract solve function for the ODE solver.
function registerProps(varargin)
Call this method at any class that defines DPCM observed properties.
double InitialStep
The initial step size for the solver. So far only used by the MLWrapper class for the native matlab s...
EVENT StepPerformed
Gets fired when an ODE solver performs an intermediate step.
KerMorObject()
Constructs a new KerMor object.
solvers.SolverTypes SolverType
The type of the solver.
double MaxStep
Maximum time step for solver.
dscomponents.AMassMatrix M
The mass matrix of the ODE .
Base class for all KerMor ODE solvers.
static function res = test_SolverSpeedTest()
function res = isposrealscalar(value)
isposintscalar: Backwards-compatibility function for matlab versions greater than 2012a ...