IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
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...
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... | |
![]() | |
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 |
![]() | |
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... | |
![]() | |
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... | |
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).
|
pure virtual |
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.
Implemented in IG.MPetekLib.Algorithms.PlottableModels.Oscillators.MagneticOscHardSpring, IG.MPetekLib.Algorithms.PlottableModels.Oscillators.DrivenNonlinearOscillator, IG.MPetekLib.Algorithms.PlottableModels.Oscillators.DrivenNonlinOscNondim, IG.MPetekLib.Algorithms.PlottableModels.Oscillators.DrivenHarmonicOscillator, and IG.MPetekLib.Algorithms.PlottableModels.Oscillators.SimpleHarmonicOscillator.
|
inline |
Solves the ODE by calling Solve() on the ODE solver.
References IG.MPetekLib.Algorithms.Solvers.InitialProblemODE_RK4.InitialProblemSolverBase._solutionODE, and IG.MPetekLib.Algorithms.Solvers.InitialProblemODE_RK4.InitialProblemSolverBase.Solve().
Referenced by 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._02DrivenPlotSolution.Run(), and IG.MPetekLib.Application.Scripts.LinearOscillator._05AnalytAndNumSolutionPlot.StartNewStaPlottingThread().
|
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().
|
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().
|
inline |
Only exposes the same method on the ODE solver.
References IG.MPetekLib.Algorithms.Solvers.InitialProblemODE_RK4.InitialProblemSolverBase._solutionODE, and IG.MPetekLib.Algorithms.Solvers.InitialProblemODE_RK4.InitialProblemSolverBase.VerifyErrorsValidity().
|
protected |
|
protected |
|
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().
|
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().