Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
Integrator Struct Reference

Integrator instance shared across schemes. More...

#include <integrator.h>

Collaboration diagram for Integrator:

Public Attributes

char name [32]
 
IntegratorStepFn step
 
IntegratorDriftFn drift
 
IntegratorNoiseFn noise
 
IntegratorDestroyFn destroy
 
void * userdata
 
bool adaptive
 
bool enable_stochastic
 
double min_dt
 
double max_dt
 
double tolerance
 
double safety
 
double current_dt
 
double last_step
 
double last_error
 
double stochastic_strength
 
uint32_t rng_state
 
uint32_t last_attempt_count
 
uint32_t last_rejection_count
 
double ** buffers
 
size_t buffer_count
 
size_t buffer_elements
 
size_t buffer_element_size
 
void ** drift_snapshots
 
size_t * drift_snapshot_sizes
 
size_t * drift_snapshot_capacities
 
size_t drift_snapshot_count
 
void * drift_state_scratch
 
size_t drift_state_scratch_capacity
 
size_t target_field_index
 
double subordination_alpha
 
size_t subordination_quadrature_n
 
bool is_complex
 
double split_feedback_dt
 
double split_feedback_max_error
 
uint32_t split_feedback_substeps
 

Detailed Description

Integrator instance shared across schemes.

The struct is public so host runtimes can inspect diagnostics and attach context userdata. Buffers and drift snapshots are owned by the integrator after successful configuration and are released by integrator_destroy().

Member Data Documentation

◆ adaptive

bool Integrator::adaptive

Whether adaptive stepping is enabled.

◆ buffer_count

size_t Integrator::buffer_count

Number of allocated buffers.

◆ buffer_element_size

size_t Integrator::buffer_element_size

Size of each scalar in buffers (bytes).

◆ buffer_elements

size_t Integrator::buffer_elements

Length (in scalars) of each buffer.

◆ buffers

double** Integrator::buffers

Scratch buffers for intermediate storage.

◆ current_dt

double Integrator::current_dt

Suggested timestep for the next call.

◆ destroy

IntegratorDestroyFn Integrator::destroy

Optional teardown hook for owned state.

◆ drift

IntegratorDriftFn Integrator::drift

Deterministic drift evaluator.

◆ drift_snapshot_capacities

size_t* Integrator::drift_snapshot_capacities

Allocated bytes per drift snapshot slot.

◆ drift_snapshot_count

size_t Integrator::drift_snapshot_count

Number of drift snapshot slots currently tracked.

◆ drift_snapshot_sizes

size_t* Integrator::drift_snapshot_sizes

Bytes captured into each drift snapshot slot.

◆ drift_snapshots

void** Integrator::drift_snapshots

Reusable per-field snapshots for drift evaluation.

◆ drift_state_scratch

void* Integrator::drift_state_scratch

Reusable scratch copy of the target state during drift.

◆ drift_state_scratch_capacity

size_t Integrator::drift_state_scratch_capacity

Allocated bytes in drift_state_scratch.

◆ enable_stochastic

bool Integrator::enable_stochastic

Toggle for stochastic contributions.

◆ is_complex

bool Integrator::is_complex

Whether the integrator is handling complex data.

◆ last_attempt_count

uint32_t Integrator::last_attempt_count

Attempts spent producing the last realized step.

◆ last_error

double Integrator::last_error

Error norm recorded during last update.

◆ last_rejection_count

uint32_t Integrator::last_rejection_count

Rejected attempts before the last realized step.

◆ last_step

double Integrator::last_step

Timestep realized by the last update.

◆ max_dt

double Integrator::max_dt

Maximum admissible timestep.

◆ min_dt

double Integrator::min_dt

Minimum admissible timestep.

◆ name

char Integrator::name[32]

Identifier for diagnostics.

◆ noise

IntegratorNoiseFn Integrator::noise

Stochastic hook (optional).

◆ rng_state

uint32_t Integrator::rng_state

RNG state for stochastic hooks.

◆ safety

double Integrator::safety

Safety multiplier for adaptation.

◆ split_feedback_dt

double Integrator::split_feedback_dt

Sum of substep durations reported during the current step.

◆ split_feedback_max_error

double Integrator::split_feedback_max_error

Maximum error estimate reported via split feedback.

◆ split_feedback_substeps

uint32_t Integrator::split_feedback_substeps

Count of substeps contributing feedback this step.

◆ step

IntegratorStepFn Integrator::step

Active stepper implementation.

◆ stochastic_strength

double Integrator::stochastic_strength

Amplitude of stochastic increments.

◆ subordination_alpha

double Integrator::subordination_alpha

Active alpha when using the subordination integrator.

◆ subordination_quadrature_n

size_t Integrator::subordination_quadrature_n

Active quadrature sample count for subordination.

◆ target_field_index

size_t Integrator::target_field_index

Context field index advanced by this integrator.

◆ tolerance

double Integrator::tolerance

Error tolerance target.

◆ userdata

void* Integrator::userdata

Opaque payload.


The documentation for this struct was generated from the following file: