FunctionMathIntegrateConservativeOde Method (FuncDouble, Double, Double, Double, Double, Double, Double, OdeSettings) |
Namespace: Meta.Numerics.Analysis
public static OdeResult IntegrateConservativeOde( Func<double, double, double> rhs, double x0, double y0, double yPrime0, double x1, OdeSettings settings )
Exception | Condition |
---|---|
ArgumentNullException | The rhs or settings is null. |
NonconvergenceException | The ODE could not be integrated to the required precision before exhausting the maximum allowed number of rhs evaluations. |
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.