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.Num.DifferentialFirstOrderSolverEuler Class Reference

Base class for definition of a system of first order ordinary differential equations (initial problem). More...

+ Inheritance diagram for IG.Num.DifferentialFirstOrderSolverEuler:
+ Collaboration diagram for IG.Num.DifferentialFirstOrderSolverEuler:

Public Member Functions

 DifferentialFirstOrderSolverEuler (DifferentialFirstOrderSystemBase equations)
 Constructs a solver for the specified system of first order ordinary differential equations. More...
 
- Public Member Functions inherited from IG.Num.DifferentialFirstOrderSolverBase
 DifferentialFirstOrderSolverBase (DifferentialFirstOrderSystemBase equations)
 Constructs a solver for the specified system of first order ordinary differential equations. More...
 
double[][] GetResultsArray ()
 Creates and returns an array containing all stored results. More...
 
void StoreSavedState ()
 Stores the saved solver-extended state of the problem (property SavedState) to the list of results (property Results). More...
 
void SaveState (double parameterValue, double[] functionValues, int stepNumber, double stepLength)
 Saves the current values of the problem parameter (independent variable) and function values to the auxiliary state array (property SavedState), together with the specified step number and step length. More...
 
void SaveState (double[] state, int stepNumber, int stepLength)
 Saves the current state of the problem (including the current parameter and function values, step number and step length) to the auxiliary state array (property SavedState). More...
 
double GetSavedParameter (double[] savedState)
 Retrieves the value of parameter (independent variable) from the saved state and returns it. More...
 
int GetSavedStepNumber (double[] savedState)
 Retrieves the step number from the saved state and returns it. More...
 
double GetSavedStepSize (double[] savedState)
 Retrieves the step size from the saved state and returns it. More...
 
void GetSavedFunctionValues (double[] savedState, double[] functionValues)
 Retrieves the calculated function values from the saved state and copies them to the provided array. More...
 
void GetSavedState (double[] savedState, double[] state)
 Retrieves the calculated function values from the saved state and copies them to the provided array. More...
 
void InitializeSolver ()
 Performs all the initializations that are necessary before solving the equations. This includes transcribing basic problem data from the problem object, transcribing initial state from equations object as well as allocating all auxiliary variables. More...
 
abstract void CalculateTrial (double stepLength)
 Calculates a trial solution after the specified increase in step size. More...
 
virtual void CalculateWithFixedStep (double finalTime)
 

Additional Inherited Members

- Public Attributes inherited from IG.Num.DifferentialFirstOrderSolverBase
int _outputFrequency
 
bool _doOutput = (DefaultOutputLevel > 0 && DefaultOutputFrequency!=0)
 
int _storingFrequency = DefaultStoringFrequency
 
bool _doStoreResults = DefaultStoringFrequency != 0
 
- Static Public Attributes inherited from IG.Num.DifferentialFirstOrderSolverBase
static int DefaultOutputLevel = 0
 Default output level for solvers of first order systems of differential equations. More...
 
static int DefaultOutputFrequency = 5
 Default output frequency, sefines how often output is made. More...
 
static int DefaultFileSaveFrequency = 5
 
static int DefaultStoringFrequency = 1
 
- Protected Member Functions inherited from IG.Num.DifferentialFirstOrderSolverBase
virtual void InitializeProblemData ()
 Initializes basic problem data according to equations. More...
 
virtual void InitializeSolverInternals ()
 Initializes the solver state. More...
 
- Protected Attributes inherited from IG.Num.DifferentialFirstOrderSolverBase
int _outputLevel = DefaultOutputLevel
 
int _fileSaveFrequency = DefaultFileSaveFrequency
 
bool _doFileSave
 
List< double[]> _results = new List<double[]>()
 
int _numEquations
 
int _numStateVariables
 
int _numSavedStateVariables = 0
 
bool _isHistoryDependent = false
 
DifferentialFirstOrderSystemBase _problem
 
double _initialParameter
 
double _finalParameter
 
double _numSteps
 
bool _isFixedStep = true
 
double _initialStepLength
 
double _stepLength
 
double _stepNumber = 0
 
double _parameter
 
double _nextParameter
 
double[] _functionValues
 
double[] _nextFunctionValues
 
double[] _state
 
double[] _nextState
 
double[] _savedState
 
- Properties inherited from IG.Num.DifferentialFirstOrderSolverBase
int OutputLevel [get, set]
 Level of output to console produced during operation (0 means no output). More...
 
int OutputFrequency [get, set]
 
bool DoOutput [get, set]
 
int FileSaveFrequency [get, set]
 
bool DoFileSave [get, set]
 
TextWriter FileSaver [get, set]
 
int StoringFrequency [get, protected set]
 
bool DoStoreResults [get, protected set]
 
List< double[]> Results [get]
 Gets a reference to the list where results are stored. More...
 
virtual int NumEquations [get, protected set]
 Number of equations in the system of equations. More...
 
int NumStateVariables [get, set]
 Number of state variables, including independent variable and function values. More...
 
virtual int NumSavedStateVariables [get]
 Gets the required length of the saved state array. More...
 
bool IsHistoryDependent [get, set]
 Flag indicating whether the problem is history dependent (meaning that it has additional state variables that are not calculated by the solver). More...
 
DifferentialFirstOrderSystemBase Problem [get, protected set]
 Definition of a system of first order ordinary differential equations with initial condition. More...
 
double InitialParameter [get, protected set]
 Initial value of parameter (independent variable). More...
 
double FinalParameter [get, protected set]
 Final value of parameter (independent variable). More...
 
double NumSteps [get, protected set]
 Number of steps. More...
 
bool IsFixedStep [get, protected set]
 Flag indicating whether a fixed step is used (as contrary to adaptive step). More...
 
double InitialStepLength [get, set]
 Initial step length. More...
 
double StepLength [get, set]
 Step length. More...
 
double StepNumber [get, protected set]
 Current step number. More...
 
double Parameter [get, protected set]
 Current value of independent parameter. More...
 
double NextParameter [get, protected set]
 Value of independent parameter in the next step. More...
 
double[] FunctionValues [get, protected set]
 Array of current function values. More...
 
double[] NextFunctionValues [get, protected set]
 Array of function values in the next step. More...
 
double[] State [get, protected set]
 Current state of the problem. More...
 
double[] NextState [get, protected set]
 State of the problem for the next step. More...
 
double[] SavedState [get, protected set]
 Array of state and other variables to be saved or restored. More...
 

Detailed Description

Base class for definition of a system of first order ordinary differential equations (initial problem).

See also remarks on saving the state for the DifferentialFirstOrderSolverBase and DifferentialFirstOrderSystemBase classes.

$A Igor Mar2009;

Constructor & Destructor Documentation

IG.Num.DifferentialFirstOrderSolverEuler.DifferentialFirstOrderSolverEuler ( DifferentialFirstOrderSystemBase  equations)
inline

Constructs a solver for the specified system of first order ordinary differential equations.

Parameters
equations

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