Integrator registry and active integrator tracking.
More...
#include <stdbool.h>
#include <stddef.h>
#include "oakfield/integrator_registry.h"
Go to the source code of this file.
Integrator registry and active integrator tracking.
◆ sim_integrator_state_active()
Retrieve the active integrator pointer.
- Parameters
-
| state | State object to inspect. |
- Returns
- Active integrator pointer, or NULL when none is set.
◆ sim_integrator_state_destroy()
Destroy integrator state and release registry storage.
- Parameters
-
| state | State object to destroy; NULL is ignored. |
◆ sim_integrator_state_init()
Initialize integrator state and register built-in factories.
- Parameters
-
| state | State object to initialize. |
- Returns
- SIM_RESULT_OK or an error from registry initialization.
◆ sim_integrator_state_registry()
Access the underlying registry.
- Parameters
-
| state | State object to inspect. |
- Returns
- Mutable registry pointer, or NULL if unavailable.
◆ sim_integrator_state_registry_const()
Access the underlying registry (const).
- Parameters
-
| state | State object to inspect. |
- Returns
- Const registry pointer, or NULL if unavailable.
◆ sim_integrator_state_sequence()
Retrieve the optional integrator sequence.
- Parameters
-
| state | State object to inspect. |
| [out] | out_count | Optional receiver for sequence length. |
- Returns
- Internal sequence pointer, or NULL when no sequence is configured.
◆ sim_integrator_state_set_active()
Assign the active integrator pointer.
- Parameters
-
| state | State object to update. |
| integrator | Active integrator pointer; not owned by the state. |
◆ sim_integrator_state_set_sequence()
Assign an optional ordered integrator sequence.
When count is zero, the sequence and active pointer are both cleared. The sequence array is copied, but the Integrator instances remain caller-owned.
- Parameters
-
| state | State object to update. |
| integrators | Array of integrator pointers when count is nonzero. |
| count | Number of entries in integrators. |
- Returns
- SIM_RESULT_OK, SIM_RESULT_INVALID_ARGUMENT, or SIM_RESULT_OUT_OF_MEMORY.
◆ sim_integrator_state_set_stepping()
Mark an integrator as the one currently stepping.
- Parameters
-
| state | State object to update. |
| integrator | Integrator currently executing a step; not owned. |
◆ sim_integrator_state_stepping()
Retrieve the integrator currently executing a step, if any.
- Parameters
-
| state | State object to inspect. |
- Returns
- Stepping integrator pointer, or NULL.