Click or drag to resize

RungeKuttaExplicitBaseCore Class

The core implements functionality common to all Runge-Kutta methods, like stepping, error evaluation, interpolation and initial step finding.
Inheritance Hierarchy
SystemObject
  Altaxo.Calc.OdeRungeKuttaExplicitBaseCore
    Altaxo.Calc.OdeDOP853CoreDOP853

Namespace: Altaxo.Calc.Ode
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
protected class Core

The RungeKuttaExplicitBaseCore type exposes the following members.

Constructors
 NameDescription
Public methodRungeKuttaExplicitBaseCore Initializes a new instance of the RungeKuttaExplicitBaseCore.
Top
Properties
 NameDescription
Public propertyAbsoluteTolerance Gets or sets the absolute tolerance.
Public propertyAbsoluteTolerances Gets or sets the absolute tolerances. It must be ensured that this array is not altered.
Public propertyBHML Sets the coefficients for the error evaluation. These coefficients are the difference of the high order and low order bottom side coefficients of the Runge-Kutta scheme. If set to null, local error calculation, and thus automatic step size control, is not possible.
Public propertyErrorNorm The vector norm, by which from the vector of relative errors (dimension N) the scalar relative error is calculated.
Public propertyInterpolationCoefficients Gets or sets the interpolation coefficients for dense output.
Public propertyRelativeTolerance Gets or sets the relative tolerance.
Public propertyRelativeTolerances Gets or sets the relative tolerances. It must be ensured that this array is not altered.
Public propertyStepSizeFilter Gets or sets the step size filter. For the values see StepSizeFilter.
Public propertyStiffnessDetectionEveryNumberOfSteps Gets or sets the number of successful steps between test for stiffness. Setting this value to 0 disables stiffness detection. The default value is 0.
Public propertyStiffnessDetectionThresholdValue Sets the stiffness detection threshold value.
Public propertyX Gets the current value of x.
Public propertyX_previous Gets the value of x before the last step.
Public propertyY_volatile Gets the current values of the variables. Attention: the returned array will change the next time you call EvaluateNextSolutionPoint(Double). Therefore, if you not intend to use the values immediately, make a copy of this array!.
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodEvaluateNextSolutionPoint Evaluates the next solution point in one step. To get the results, see X and Y_volatile.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetInitialStepSize Gets the initial step size. The absolute and relative tolerances must be set before the call to this function.
Public methodGetInterpolatedY_volatileGet an interpolated point in the last evaluated interval. Please use the result immediately, or else make a copy of the result, since a internal array is returned, which is overwritten at the next operation.
Public methodGetRecommendedStepSize Gets the recommended step size.
Public methodGetRelativeError_InfinityNorm Gets the relative error by the infinity norm, which should be in the order of 1, if the step size is optimally chosen.
Public methodGetRelativeError_L2Norm Gets the relative error calculated by the L2-norm, which should be in the order of 1, if the step size is optimally chosen.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodRevert Reverts the state of the instance to the former solution point, by setting X to X_previous and Y_volatile y_previous.
Public methodSetCoefficientsForAdditionalStages Sets the coefficients for additional stages that are neccessary for dense output (interpolation).
Public methodThrowIfStiffnessDetected Function that is been called after every successfull step. Detects a stiffness condition. If it founds one, an exception will be thrown.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Protected field_aCentral coefficients of the Runge-Kutta scheme. See [1], page 135.
Protected field_a_interpolationAdditional central coefficients of the Runge-Kutta scheme optionally needed for interpolation.
Public field_absoluteTolerances The absolute tolerance. This is either an array of length 1 (in this case the absolute tolerances of all y values are equal), or an array of the same size than y.
Protected field_bHigh order bottom side coefficients of the Runge-Kutta scheme.
Protected field_bhmlDifferences between high order and low order bottom side coefficients of the Runge-Kutta scheme (for error estimation).
Protected field_cLeft side coefficients of the Runge-Kutta scheme (partitions of the step).
Protected field_c_interpolation Additional left side coefficients of the Runge-Kutta scheme optionally needed for dense output (partitions of the step).
Protected field_f The ODE function. First argument is the independent variable (usually named x or t), 2nd argument are the current y values, and the 3rd argument adopts the derivatives dy/dx calculated by this function.
Protected field_interpolationCoefficients The interpolation coefficients. Note that zero to third order is calculated from the y and slopes at the start and end of the step. Thus, this coefficients only have to cover the orders 4.. n of the interpolation.
Protected field_isDenseOutputPreparedTrue if dense output was prepared, i.e. the array _rcont contains valid values.
Protected field_isFirstSameAsLastMethodTrue if the last point is the same as first point (FSAL property). This is for instance true for the Dormand-Prince (RK547M) method.
Protected field_isKnextEvaluated Designates whether the slope at y_current was evaluated (for non-FSAL methods). For FSAL methods, this value is meaningless, because the last stage always contains k_next after a step.
Protected field_kArray of derivatives at the different stages.
Protected field_numberOfAdditionalStagesForDenseOutputThe number of additional stages for dense output of high order.
Protected field_numberOfNonstiffEvaluationResultsThe number of evaluation results in ThrowIfStiffnessDetected, for which the result was false (non-stiff). This counter is re-set to zero if a stiff condition is detected.
Protected field_numberOfRejectedStiffnessDetectionCalls The number of rejected stiffness detection calls after the last stiffness evaluation.
Protected field_numberOfStagesThe number of stages of this method.
Protected field_numberOfStiffEvaluationResultsThe number of evaluation results in ThrowIfStiffnessDetected, for which the result was true (stiff). This counter is re-set to zero if a non-stiff condition is detected.
Protected field_orderOrder of the Runge-Kutta method (the highest order of the embedded pair).
Protected field_rcontContains the precalcuated polynomial coefficients for dense output.
Public field_relativeTolerances The relativ tolerances. This is either an array of length 1 (in this case the relative tolerances of all y values are equal), or an array of the same size than y.
Protected field_stepSize_currentStep size of the current step.
Protected field_stepSize_previousStep size of the previous step.
Protected field_stepSizeFilter The step size filter.
Protected field_stiffnessDetectionEveryNumberOfSteps Number of (successfull) steps between calls to stiffness detection. If this is null, then stiffness detection is disabled.
Protected field_stiffnessDetectionThresholdValueSquared Squared value of the stiffness detection threshold.
Protected field_wasSolutionPointEvaluatedTrue if at least one solution point was evaluated.
Protected field_x_currentX value at the end of the current step.
Protected field_x_previousX value at the begin of the current step.
Protected field_y_currentY values at the end of the current step.
Protected field_y_current_LocalError Contains the array of local errors.
Protected field_y_previousY values at the beginning of the current step.
Protected field_y_stagesArray to accomodate y for calculation of the stages. At the end of EvaluateNextSolutionPoint(Double), this array usually contains the y of the last stage (for non-FSAL methods), or the y of the stage before the last stage (FSAL methods).
Protected fieldStatic memberStepSize_MaxFactorMaximum factor by which the step size can be increased.
Protected fieldStatic memberStepSize_MinFactorMinimum factor by which the step size can be decreased.
Protected fieldStatic memberStepSize_SafetyFactorSafety factor for the step size. Without this factor, the control loop for step size would try to set the stepsize so that the relative error would be around 1. But then, if the relative error is slighly above 1, this step would be rejected. By having a safety factor of less than 1 we get the relative error safely below 1.
Top
See Also