|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Spectral-shell stimulus: random annular bands in k-space. More...
#include "coords.h"#include "oakfield/operator_split.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | SimStimulusSpectralShellsConfig |
| Configuration for seeded random modes sampled from spectral shells. More... | |
Typedefs | |
| typedef struct SimStimulusSpectralShellsConfig | SimStimulusSpectralShellsConfig |
| Configuration for seeded random modes sampled from spectral shells. | |
Functions | |
| SimResult | sim_add_stimulus_spectral_shells_operator (struct SimContext *context, const SimStimulusSpectralShellsConfig *config, size_t *out_index) |
| Register a random spectral-shell stimulus operator. | |
| SimResult | sim_stimulus_spectral_shells_config (struct SimContext *context, size_t operator_index, SimStimulusSpectralShellsConfig *out_config) |
| Copy the current spectral-shells configuration from a registered operator. | |
| SimResult | sim_stimulus_spectral_shells_update (struct SimContext *context, size_t operator_index, const SimStimulusSpectralShellsConfig *config) |
| Replace or renormalize a registered spectral-shells configuration. | |
Spectral-shell stimulus: random annular bands in k-space.
Synthesizes spatial fields from seeded Fourier modes sampled within concentric k-space shells (annuli). For 1D fields, shell radii map to signed 1D wavenumbers; for 2D fields, shell radii map to random angles.
| SimResult sim_add_stimulus_spectral_shells_operator | ( | struct SimContext * | context, |
| const SimStimulusSpectralShellsConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a random spectral-shell stimulus operator.
The implementation copies and normalizes config, builds deterministic shell modes from the seed, and registers the operator on the target field.
| context | Simulation context that will own the operator. | |
| config | Optional spectral-shells configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_stimulus_spectral_shells_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimStimulusSpectralShellsConfig * | out_config | ||
| ) |
Copy the current spectral-shells configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_stimulus_spectral_shells_operator(). | |
| [out] | out_config | Receives the operator's normalized configuration. |
| SimResult sim_stimulus_spectral_shells_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimStimulusSpectralShellsConfig * | config | ||
| ) |
Replace or renormalize a registered spectral-shells configuration.
Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update rebuilds shell modes as needed and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the spectral-shells operator to update. |
| config | Optional replacement configuration. |