Click or drag to resize

FunctionMathIntegrateConservativeOde Method (FuncDouble, Double, Double, Double, Double, Double, Double, OdeSettings)

Solves a conservative second order ordinary differential equation initial value problem using the given settings.

Namespace:  Meta.Numerics.Analysis
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
Syntax
public static OdeResult IntegrateConservativeOde(
	Func<double, double, double> rhs,
	double x0,
	double y0,
	double yPrime0,
	double x1,
	OdeSettings settings
)

Parameters

rhs
Type: SystemFuncDouble, Double, Double
The right hand side function.
x0
Type: SystemDouble
The initial value of the independent variable.
y0
Type: SystemDouble
The initial value of the function variable.
yPrime0
Type: SystemDouble
The initial value of the function derivative.
x1
Type: SystemDouble
The final value of the independent variable.
settings
Type: Meta.Numerics.AnalysisOdeSettings
The settings to use when solving the problem.

Return Value

Type: OdeResult
The solution, including the final value of the function and its derivative.
Exceptions
ExceptionCondition
ArgumentNullExceptionThe rhs or settings is null.
NonconvergenceExceptionThe ODE could not be integrated to the required precision before exhausting the maximum allowed number of rhs evaluations.
Remarks

A conservative ODE is an ODE of the form

where the right-hand-side depends only on x and y, not on the derivative y'. ODEs of this form are called conservative because they exhibit conserved quantities: combinations of y and y' that maintain the same value as the system evolves. Many forms of Newtonian equations of motion, for example, are conservative ODEs, with conserved quantities such as energy, momentum, and angular momentum. Our specialized conservative ODE integrator is not only more efficient for conservative ODEs, but does a better job of maintaining the conserved quantities.

See Also