LibCapy - verletintegration

VerletIntegration implementation.

Macros:

Enumerations:

None.

Typedefs:

None.

Struct CapyVerletIntegration :

Struct CapyVerletIntegration's properties:

Derivative function F(). F(t, X, X') = X'' The derivative should not rely on X' (only on t and X)

Number of variables (automatically set based on derivation.nbInput and order)

Initial values [t0, X0, X'0] (default: all 0)

Temporary vectors for calculation

Discretise step delta t (default: 1e-3)

Struct CapyVerletIntegration's methods:

Approximate X(t) using Verlet integration

Input argument(s):

t: value for which we want to approximate X(t)
vals: values [t0, X(t0), X'(t0)]

Output and side effect(s):

Update 'vals' with the approximated values at 't'

Run one step

Input argument(s):

vals: values [t0, X(t0), X'(t0)]

Output and side effect(s):

'vals' is updated with the result of one step of Verlet integration

Destructor

Functions:

Create a CapyVerletIntegration

Input argument(s):

derivative: the derivative function, should not rely on X' (only on t and X)

Output and side effect(s):

Return a CapyVerletIntegration

Allocate memory for a new CapyVerletIntegration and create it

Input argument(s):

derivative: the derivative function, should not rely on X' (only on t and X)

Output and side effect(s):

Return a CapyVerletIntegration

Exception(s):

May raise CapyExc_MallocFailed.

Free the memory used by a CapyVerletIntegration* and reset '*that' to NULL

Input argument(s):

that: a pointer to the CapyVerletIntegration to free

2025-08-05
in LibCapy,
0 views
Copyright 2021-2025 Baillehache Pascal