IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase Class Referenceabstract

A template class for physical models, which are described by ordinary differential equations (ODEs). It contains a definition of the model's ODE, an ODE solver object and a solution array. Each child should define its own plottable curves). More...

+ Inheritance diagram for IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase:
+ Collaboration diagram for IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase:

Public Member Functions

abstract double ODE (double[] arg)
 The definition of an ODE, which desribes the physical system. It is effectievely a method, which returns the value of the highest derivative as a function of other variables. More...
 
void SolveNumerically ()
 Solves the ODE by calling Solve() on the ODE solver. More...
 
void CalculateErrors ()
 Estimates errors by comparing the solution at current step size to the solution at half of the current step size. More...
 
void PostProcessErrors (int forceTakeValue)
 Najprej izračuna absolutne vrednosti napak. Potem poskuša zgladiti krivuljo (uporabno če ta oscilira). More...
 
void VerifyErrorsValidity (int nPoints)
 Only exposes the same method on the ODE solver. More...
 
- Public Member Functions inherited from IG.MPetekLib.Algorithms.PlottableModels.PlottableModelBase
PlotZedgraphCurve NewCurveFromPlottableData (PlotterZedGraph plotter, int x, int y)
 Creates a new PlotZedgraphCurve object from the available plottable data. More...
 
void LoadPlottableDataToCurve (PlotZedgraphCurve curve, int x, int y)
 Copies the calculated data to the existing PlotZedgraphCurve object. Enough space must be available on the curve object's list. More...
 

Protected Attributes

InitialProblemSolverRK4 _solver
 
double[] _initialConditions
 
- Protected Attributes inherited from IG.MPetekLib.Algorithms.PlottableModels.PlottableModelBase
string _title
 

Properties

InitialProblemSolverRK4 Solver [get, set]
 An ODE solver object. More...
 
double[] InitialConditions [get, set]
 User definable initial conditions which are passed to the ODE solver object. You must provide the correct number of initial conditions. For a II. order ODE they should be specified as: {x, f(x), f'(x), f''(x)}. The value of the highest derivative is deduced automatically and is only provided by the user as a placeholder. It does not need to be correct (can be any number). More...
 
- Properties inherited from IG.MPetekLib.Algorithms.PlottableModels.PlottableModelBase
string Title [get, set]
 The plottable model's name. Also used as a plot title. More...
 
List< double[]> PlottableData [get, set]
 The main solution array, which is used by the plotter. More...
 

Detailed Description

A template class for physical models, which are described by ordinary differential equations (ODEs). It contains a definition of the model's ODE, an ODE solver object and a solution array. Each child should define its own plottable curves).

Member Function Documentation

abstract double IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase.ODE ( double[]  arg)
pure virtual
void IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase.CalculateErrors ( )
inline

Estimates errors by comparing the solution at current step size to the solution at half of the current step size.

References IG.MPetekLib.Algorithms.Solvers.InitialProblemODE_RK4.InitialProblemSolverBase._solutionODE, and IG.MPetekLib.Algorithms.Solvers.InitialProblemODE_RK4.InitialProblemSolverBase.CalculateErrors().

void IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase.PostProcessErrors ( int  forceTakeValue)
inline

Najprej izračuna absolutne vrednosti napak. Potem poskuša zgladiti krivuljo (uporabno če ta oscilira).

References IG.MPetekLib.Algorithms.Solvers.InitialProblemODE_RK4.InitialProblemSolverBase._solutionODE, and IG.MPetekLib.Algorithms.Solvers.InitialProblemODE_RK4.InitialProblemSolverBase.PostProcessErrors().

void IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase.VerifyErrorsValidity ( int  nPoints)
inline

Member Data Documentation

InitialProblemSolverRK4 IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase._solver
protected
double [] IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase._initialConditions
protected

Property Documentation

InitialProblemSolverRK4 IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase.Solver
getset

An ODE solver object.

Referenced by IG.MPetekLib.Application.Scripts.LinearOscillator._11MultipleResCurvesPlot3D.ResonanceCurveHarmonicFamily3dWithManualScaling(), IG.MPetekLib.Application.Scripts.NonlinearOscNondim._17SteadyStateAmplitude.Run(), IG.MPetekLib.Application.Scripts.NonlinearOscNondim._16SolutionPlot.Run(), IG.MPetekLib.Application.Scripts.NonlinearOscillator._15SolutionPlot.Run(), IG.MPetekLib.Application.Scripts.NonlinearOscillator._19SingleResonancePlot.Run(), IG.MPetekLib.Application.Scripts.NonlinearOscillator._22SingleResCurveManyPhases.Run(), IG.MPetekLib.Application.Scripts.MagOscHardSpring._23SingleResCurveManyPhases.Run(), IG.Script._18ChaoticPlot.Run(), IG.MPetekLib.Application.Scripts.NonlinearOscillator._21MultipleResCurvesPlot.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._08SteadyStateAmplitude.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._12MultipleResCurvesPlot.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._13SolutionAndDrivingFunctionPlot.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._05AnalytAndNumSolutionPlot.Run(), IG.MPetekLib.Application.Scripts.NonlinearOscNondim._20MultipleResCurvesPlot.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._09SingleResonanceCurvePlot.Run(), IG.MPetekLib.Application.Scripts.MagOscHardSpring._24MultiResCurvesPlotPhaseScan.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._02DrivenPlotSolution.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._10MultipleResCurvesPlotObsolete.Run(), IG.Script.DemoResonanceCurvePlot.Run(), IG.Script.DemoResonanceCurvePlotExt.Run(), and IG.MPetekLib.Application.Scripts.LinearOscillator._11MultipleResCurvesPlot3D.Run().

double [] IG.MPetekLib.Algorithms.PlottableModels.PlottableODEModelBase.InitialConditions
getset

User definable initial conditions which are passed to the ODE solver object. You must provide the correct number of initial conditions. For a II. order ODE they should be specified as: {x, f(x), f'(x), f''(x)}. The value of the highest derivative is deduced automatically and is only provided by the user as a placeholder. It does not need to be correct (can be any number).

Referenced by IG.MPetekLib.Application.Scripts.NonlinearOscNondim._17SteadyStateAmplitude.Run(), IG.MPetekLib.Application.Scripts.NonlinearOscillator._15SolutionPlot.Run(), IG.MPetekLib.Application.Scripts.NonlinearOscNondim._16SolutionPlot.Run(), IG.Script._18ChaoticPlot.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._08SteadyStateAmplitude.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._13SolutionAndDrivingFunctionPlot.Run(), IG.MPetekLib.Application.Scripts.LinearOscillator._05AnalytAndNumSolutionPlot.Run(), and IG.MPetekLib.Application.Scripts.LinearOscillator._02DrivenPlotSolution.Run().


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