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

Log-frequency spectral grid stimulus with explicit coordinate controls. More...

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

Go to the source code of this file.

Classes

struct  SimStimulusLogSpectralGridConfig
 Configuration for a log-frequency spectral grid stimulus. More...
 

Typedefs

typedef struct SimStimulusLogSpectralGridConfig SimStimulusLogSpectralGridConfig
 Configuration for a log-frequency spectral grid stimulus.
 

Functions

SimResult sim_add_stimulus_log_spectral_grid_operator (struct SimContext *context, const SimStimulusLogSpectralGridConfig *config, size_t *out_index)
 Register a log-frequency spectral grid stimulus operator.
 
SimResult sim_stimulus_log_spectral_grid_config (struct SimContext *context, size_t operator_index, SimStimulusLogSpectralGridConfig *out_config)
 Copy the current log-spectral-grid configuration from a registered operator.
 
SimResult sim_stimulus_log_spectral_grid_update (struct SimContext *context, size_t operator_index, const SimStimulusLogSpectralGridConfig *config)
 Replace or renormalize a registered log-spectral-grid configuration.
 

Detailed Description

Log-frequency spectral grid stimulus with explicit coordinate controls.

Function Documentation

◆ sim_add_stimulus_log_spectral_grid_operator()

SimResult sim_add_stimulus_log_spectral_grid_operator ( struct SimContext context,
const SimStimulusLogSpectralGridConfig config,
size_t *  out_index 
)

Register a log-frequency spectral grid stimulus operator.

The implementation copies and normalizes config, builds the modal grid and phase table, and registers the operator on the configured target field.

Parameters
contextSimulation context that will own the operator.
configOptional log-spectral-grid 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 validation, allocation, mode-table setup, or split-operator registration.

◆ sim_stimulus_log_spectral_grid_config()

SimResult sim_stimulus_log_spectral_grid_config ( struct SimContext context,
size_t  operator_index,
SimStimulusLogSpectralGridConfig out_config 
)

Copy the current log-spectral-grid configuration from a registered operator.

Parameters
contextSimulation context containing the operator.
operator_indexIndex returned by sim_add_stimulus_log_spectral_grid_operator().
[out]out_configReceives the operator's 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 stimulus state.

◆ sim_stimulus_log_spectral_grid_update()

SimResult sim_stimulus_log_spectral_grid_update ( struct SimContext context,
size_t  operator_index,
const SimStimulusLogSpectralGridConfig config 
)

Replace or renormalize a registered log-spectral-grid configuration.

Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update rebuilds modes as needed and invalidates the scheduler plan.

Parameters
contextSimulation context containing the operator.
operator_indexIndex of the log-spectral-grid operator to update.
configOptional replacement configuration.
Returns
SIM_RESULT_OK on success, or an error code if lookup, mode-table setup, or state validation fails.