Click or drag to resize

RungeKuttaFehlberg78Integrator Class

This is a seventh order Runge-Kutta algorithm with error control based on the work of Fehlberg which can adapt the size of the integration step based on comparing the eight order evaluation with the seventh order evaluation to produce an estimate of the numerical error produced by a given integration step.
Inheritance Hierarchy

Namespace:  AGI.Foundation.NumericalMethods
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public class RungeKuttaFehlberg78Integrator : RungeKuttaAdaptiveStepIntegrator

The RungeKuttaFehlberg78Integrator type exposes the following members.

Constructors
  NameDescription
Public methodRungeKuttaFehlberg78Integrator
Initializes a new instance.
Public methodRungeKuttaFehlberg78Integrator(DependentVariableDerivatives, Double)
Initializes a new instance based on the given system of equations and initial step size.
Protected methodRungeKuttaFehlberg78Integrator(RungeKuttaFehlberg78Integrator, CopyContext)
Initializes a new instance as a copy of an existing instance.
Top
Properties
  NameDescription
Public propertyAbsoluteTolerance
Gets or sets the tolerance which provides a baseline for the error control. By default, this value is Epsilon10.
Public propertyAdaptiveWeights
Gets or sets the weights to be applied to the state elements when computing the error which determines how to adapt the step size. This is in addition to any weights used in the integration algorithm itself. If these weights have not been initialized before Initialize(Double, Double) is called, they will be set to a default value of one.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyCurrentStepSize
Gets the current (positive) size of the step which the integrator will use for the next integration step.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyDimension
Gets the number of dependent variables based on the Dimension of the SystemOfEquations.
(Inherited from NumericalIntegrator.)
Public propertyDirection
Gets or sets whether to integrate forward, increasing the independent variable, or backward, decreasing the independent variable.
(Inherited from NumericalIntegrator.)
Public propertyFinalDependentVariableValues
Gets or sets the values of the dependent variables resulting from the last integration step.
(Inherited from NumericalIntegrator.)
Public propertyFinalIndependentVariableValue
Gets or sets the value of the independent variable after an integration step.
(Inherited from NumericalIntegrator.)
Public propertyInitialDependentVariableValues
Gets or sets the values of the dependent variables prior to an integration step. These values will be updated to the previous FinalDependentVariableValues at the beginning of each integration step.
(Inherited from NumericalIntegrator.)
Public propertyInitialIndependentVariableValue
Gets or sets the value of the independent variable prior to an integration step.
(Inherited from NumericalIntegrator.)
Public propertyInitialStepSize
Gets or sets the initial (positive) size of the step to add to the InitialIndependentVariableValue when performing an integration. By default, the initial value is one.
(Inherited from NumericalIntegrator.)
Public propertyIsThreadSafe
Gets a value indicating whether the methods on this instance are safe to call from multiple threads simultaneously.
(Inherited from NumericalIntegrator.)
Public propertyIterations
Gets or sets the number of iteration required to adapt the CurrentStepSize to within error tolerance.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyMaximumIterations
Gets or sets the maximum number of Iterations to allow before forcing the integrator to accept the CurrentStepSize and proceed to the next step.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyMaximumStepSize
Gets or sets the maximum size of the CurrentStepSize.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyMinimumStepSize
Gets or sets the (positive) minimum size of the CurrentStepSize.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyPreviousStepSize
Gets the size of the last step taken by the integrator. This returns the difference between the FinalIndependentVariableValue and the InitialIndependentVariableValue.
(Inherited from NumericalIntegrator.)
Public propertyRelativeTolerance
Gets or sets the tolerance which provides a relative weight for the numerical error based on the dependent variables. By default, this value is Epsilon13.
Public propertyStepDeflationExponent
Gets or sets the exponent to apply to the error when calculating the amount to decrease the size of the step.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyStepDeflationFactor
Gets or sets a scalar multiplier to apply to the step when decreasing it.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyStepInflationExponent
Gets or sets the exponent to apply to the error when calculating the amount to increase the size of the step.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyStepInflationFactor
Gets or sets a scalar multiplier to apply to the step when increasing it.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyStepSizeBehavior
Gets or sets whether to avoid adapting the step size and instead fix the value of CurrentStepSize.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertyStepSizeInformation
Gets or sets a value indicating whether the CurrentStepSize was changed from the InitialStepSize and, if so, the nature of how it was changed.
(Inherited from NumericalIntegrator.)
Public propertyStepTruncationOrder
Gets or sets the integer exponent specifying the order of magnitude at which to truncate the significant digits in the CurrentStepSize. For instance, to truncate the value to three decimal places, specify a truncation order of -3. To truncate the value to an order of 100, specify a truncation order of 2. To specify the step size should be an integer value, specify a truncation order of 0.
(Inherited from AdaptiveNumericalIntegrator.)
Public propertySystemOfEquations
Gets or sets the system of differential equations corresponding to the derivatives of the dependent variables.
(Inherited from NumericalIntegrator.)
Protected propertyTableau
Gets or sets the Butcher Tableau with the coefficients and weights to use to perform the RungeKutta integration.
(Inherited from RungeKuttaAdaptiveStepIntegrator.)
Top
Methods
  NameDescription
Public methodAdaptStep
This method updates the CurrentStepSize to account for error in the state and its derivatives. It returns true if the integrator should reintegrate with the updated step size or false if the integrator should continue to the next integration step (potentially with a different step size).
(Overrides AdaptiveNumericalIntegratorAdaptStep.)
Protected methodAdjustStep
Adjusts a given step by increasing it or decreasing it based on the given error. If the error is greater than one, the step will increase. Otherwise, it will decrease. After adjusting the step, BoundAndTruncateStepSize(Double) is called.
(Inherited from AdaptiveNumericalIntegrator.)
Protected methodBoundAndTruncateStepSize
A method which should be called before updating the CurrentStepSize which will bound the size based on the MinimumStepSize and MaximumStepSize, and will truncate it based on the StepTruncationOrder.
(Inherited from AdaptiveNumericalIntegrator.)
Public methodClone
Create a copy of this integrator.
(Overrides NumericalIntegratorClone(CopyContext).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitialize
Initialize the integrator's initial independent and dependent variables and reset the integration parameters. This should be called by the user prior to performing the first integration step.
(Overrides RungeKuttaAdaptiveStepIntegratorInitialize(Double, Double).)
Public methodIntegrate

Perform an integration step moving the independent and dependent variables from their initial (the final values of the previous step) to their new final values, using the CurrentStepSize.

When overriding this method, StartNextStep should be called prior to integration.

(Inherited from AdaptiveNumericalIntegrator.)
Public methodIntegrate(Double)
Integrate the current integration step with the given step size.
(Inherited from AdaptiveNumericalIntegrator.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReintegrate

Repeats the last integration of the differential equations.

When overriding this method, note that the CurrentStepSize property should be unaffected by the stepSize parameter.

(Inherited from RungeKuttaAdaptiveStepIntegrator.)
Protected methodSetCurrentStepSize
Sets the value of the CurrentStepSize which the integrator will use for the next integration step.
(Inherited from AdaptiveNumericalIntegrator.)
Protected methodStartNextStep
This performs the task of setting the Initial values to the previous Final values prior to taking the next step. This method is called prior to integrating the step but not called during reintegration.
(Inherited from NumericalIntegrator.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also