Diagnostics

GeometricProblems.Diagnostics.compute_error_driftMethod

Computes the drift in an invariant error.

Arguments: (t::TimeSeries, invariant_error::DataSeries{T,1}, interval_length=100)

The time series of the solution is split into intervals of interval_length time steps. In each interval, the maximum of the absolute value of the invariant error is determined. Returns a tuple of a TimeSeries that holds the centers of all intervals and a ScalarDataSeries that holds the maxima.

This is useful to detect drifts in invariants that are not preserved exactly but whose error is oscillating such as the energy error of Hamiltonian systems with symplectic integrators.

source
GeometricProblems.Diagnostics.compute_invariantMethod

Compute an invariant for the solution of an ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, invariant::Function)

The invariant functions needs to take two arguments (t,q) and return the corresponding value of the invariant.

Returns a ScalarDataSeries holding the time series of the invariant.

source
GeometricProblems.Diagnostics.compute_invariantMethod

Compute an invariant for the solution of a partitioned ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, p::DataSeries{T}, invariant::Function)

The invariant functions needs to take three arguments (t,q,p) and return the corresponding value of the invariant.

Returns a ScalarDataSeries holding the time series of the invariant.

source
GeometricProblems.Diagnostics.compute_invariant_errorMethod

Compute the relative error of an invariant for the solution of an ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, invariant::Function)

The invariant functions needs to take two arguments (t,q) and return the corresponding value of the invariant.

Returns a tuple of two 1d DataSeries holding the time series of the invariant and the relativ error, respectively.

source
GeometricProblems.Diagnostics.compute_invariant_errorMethod

Compute the relative error of an invariant for the solution of a partitioned ODE or DAE system.

Arguments: (t::TimeSeries, q::DataSeries{T}, p::DataSeries{T}, invariant::Function)

The invariant functions needs to take three arguments (t,q,p) and return the corresponding value of the invariant.

Returns a tuple of two ScalarDataSeries holding the time series of the invariant and the relativ error, respectively.

source
GeometricProblems.Diagnostics.compute_momentum_errorMethod

Computes the difference of the momentum and the one-form of an implicit ODE or DAE system.

Arguments: (p::DataSeries{DT}, ϑ::DataSeries{DT})

Returns a DataSeries similar to p holding the time series of the difference between p and ϑ.

source
GeometricProblems.Diagnostics.compute_one_formMethod

Compute the one-form (symplectic potential) for the solution of a Lagrangian system.

Arguments: (t::TimeSeries, q::DataSeries, one_form::Function)

The one_form function needs to take three arguments (t,q,k) where k is the index of the one-form component.

Returns a DataSeries similar to q holding the time series of the one-form.

source