Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
chaos_map.h File Reference

Discrete chaotic map operator for real or complex state fields. More...

#include "oakfield/operator_split.h"
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for chaos_map.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SimChaosMapOperatorConfig
 Configuration for discrete chaotic map operators. More...
 

Typedefs

typedef enum SimChaosMapType SimChaosMapType
 Supported chaotic map families.
 
typedef enum SimChaosKickMode SimChaosKickMode
 Standard map kick/drift ordering.
 
typedef enum SimChaosWrapMode SimChaosWrapMode
 Wrap mode for state components.
 
typedef enum SimChaosEscapeMode SimChaosEscapeMode
 Escape handling when state diverges.
 
typedef struct SimChaosMapOperatorConfig SimChaosMapOperatorConfig
 Configuration for discrete chaotic map operators.
 

Enumerations

enum  SimChaosMapType {
  SIM_CHAOS_MAP_STANDARD = 0 , SIM_CHAOS_MAP_IKEDA , SIM_CHAOS_MAP_EXPONENTIAL , SIM_CHAOS_MAP_QUADRATIC ,
  SIM_CHAOS_MAP_HENON , SIM_CHAOS_MAP_LOZI , SIM_CHAOS_MAP_TINKERBELL
}
 Supported chaotic map families. More...
 
enum  SimChaosKickMode { SIM_CHAOS_KICK_DRIFT = 0 , SIM_CHAOS_DRIFT_KICK , SIM_CHAOS_KICK_DRIFT_KICK }
 Standard map kick/drift ordering. More...
 
enum  SimChaosWrapMode { SIM_CHAOS_WRAP_NONE = 0 , SIM_CHAOS_WRAP_PERIODIC , SIM_CHAOS_WRAP_CLAMP , SIM_CHAOS_WRAP_MIRROR }
 Wrap mode for state components. More...
 
enum  SimChaosEscapeMode { SIM_CHAOS_ESCAPE_NONE = 0 , SIM_CHAOS_ESCAPE_CLAMP , SIM_CHAOS_ESCAPE_RESET , SIM_CHAOS_ESCAPE_NAN }
 Escape handling when state diverges. More...
 

Functions

SimResult sim_add_chaos_map_operator (struct SimContext *context, const SimChaosMapOperatorConfig *config, size_t *out_index)
 Register a chaos map operator with the provided configuration.
 
SimResult sim_chaos_map_config (struct SimContext *context, size_t operator_index, SimChaosMapOperatorConfig *out_config)
 Retrieve the configuration currently bound to a chaos map operator.
 
SimResult sim_chaos_map_update (struct SimContext *context, size_t operator_index, const SimChaosMapOperatorConfig *config)
 Update an existing chaos map operator in-place.
 

Detailed Description

Discrete chaotic map operator for real or complex state fields.

Typedef Documentation

◆ SimChaosMapOperatorConfig

Configuration for discrete chaotic map operators.

The state is stored in a complex field: re = x, im = y (or momentum for standard map).

Enumeration Type Documentation

◆ SimChaosEscapeMode

Escape handling when state diverges.

Enumerator
SIM_CHAOS_ESCAPE_NONE 

Do not apply escape handling.

SIM_CHAOS_ESCAPE_CLAMP 

Clamp escaped state back into bounds.

SIM_CHAOS_ESCAPE_RESET 

Reset escaped state to configured fallback.

SIM_CHAOS_ESCAPE_NAN 

Mark escaped state as NaN.

◆ SimChaosKickMode

Standard map kick/drift ordering.

Enumerator
SIM_CHAOS_KICK_DRIFT 

Apply kick before drift.

SIM_CHAOS_DRIFT_KICK 

Apply drift before kick.

SIM_CHAOS_KICK_DRIFT_KICK 

Symmetric kick-drift-kick ordering.

◆ SimChaosMapType

Supported chaotic map families.

Enumerator
SIM_CHAOS_MAP_STANDARD 

Chirikov standard map.

SIM_CHAOS_MAP_IKEDA 

Ikeda map.

SIM_CHAOS_MAP_EXPONENTIAL 

Exponential complex map.

SIM_CHAOS_MAP_QUADRATIC 

Quadratic complex map.

SIM_CHAOS_MAP_HENON 

Henon map.

SIM_CHAOS_MAP_LOZI 

Lozi map.

SIM_CHAOS_MAP_TINKERBELL 

Tinkerbell map.

◆ SimChaosWrapMode

Wrap mode for state components.

Enumerator
SIM_CHAOS_WRAP_NONE 

Leave state components unwrapped.

SIM_CHAOS_WRAP_PERIODIC 

Wrap state components periodically.

SIM_CHAOS_WRAP_CLAMP 

Clamp state components to configured bounds.

SIM_CHAOS_WRAP_MIRROR 

Mirror state components at configured bounds.

Function Documentation

◆ sim_add_chaos_map_operator()

SimResult sim_add_chaos_map_operator ( struct SimContext context,
const SimChaosMapOperatorConfig config,
size_t *  out_index 
)

Register a chaos map operator with the provided configuration.

Parameters
contextSimulation context that will own the operator.
configOptional chaos map configuration; NULL selects normalized defaults.
[out]out_indexOptional destination for the registered operator index.
Returns
SIM_RESULT_OK on success, or an error code from argument validation, field compatibility checks, allocation, or split registration.

◆ sim_chaos_map_config()

SimResult sim_chaos_map_config ( struct SimContext context,
size_t  operator_index,
SimChaosMapOperatorConfig out_config 
)

Retrieve the configuration currently bound to a chaos map operator.

Parameters
contextSimulation context containing the operator.
operator_indexIndex returned by sim_add_chaos_map_operator().
[out]out_configReceives the normalized configuration.
Returns
SIM_RESULT_OK on success, SIM_RESULT_INVALID_ARGUMENT for NULL pointers, SIM_RESULT_NOT_FOUND for a missing operator, or SIM_RESULT_INVALID_STATE when the operator has no chaos-map state.

◆ sim_chaos_map_update()

SimResult sim_chaos_map_update ( struct SimContext context,
size_t  operator_index,
const SimChaosMapOperatorConfig config 
)

Update an existing chaos map operator in-place.

Passing NULL for config keeps the current configuration and reapplies normalization. A successful update refreshes symbolic metadata.

Parameters
contextSimulation context containing the operator.
operator_indexIndex of the chaos map operator to update.
configOptional replacement chaos map configuration.
Returns
SIM_RESULT_OK on success, SIM_RESULT_INVALID_ARGUMENT for a NULL context, SIM_RESULT_NOT_FOUND for a missing operator, or SIM_RESULT_INVALID_STATE when the operator has no chaos-map state.