|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Random Fourier feature stimulus fields. 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 | SimStimulusRandomFourierConfig |
| Configuration for seeded random Fourier feature stimulus fields. More... | |
Typedefs | |
| typedef struct SimStimulusRandomFourierConfig | SimStimulusRandomFourierConfig |
| Configuration for seeded random Fourier feature stimulus fields. | |
Functions | |
| SimResult | sim_add_stimulus_random_fourier_operator (struct SimContext *context, const SimStimulusRandomFourierConfig *config, size_t *out_index) |
| Register a random Fourier feature stimulus operator. | |
| SimResult | sim_stimulus_random_fourier_config (struct SimContext *context, size_t operator_index, SimStimulusRandomFourierConfig *out_config) |
| Copy the current random-Fourier configuration from a registered operator. | |
| SimResult | sim_stimulus_random_fourier_update (struct SimContext *context, size_t operator_index, const SimStimulusRandomFourierConfig *config) |
| Replace or renormalize a registered random-Fourier configuration. | |
Random Fourier feature stimulus fields.
Synthesizes spatially structured fields via random Fourier features: f(x, t) = sum_k a_k cos(ω_k x - Ω t + φ_k)
For complex fields, a complex-valued sum is written. For real fields, the real part is written, yielding Hermitian-symmetric spectra.
| SimResult sim_add_stimulus_random_fourier_operator | ( | struct SimContext * | context, |
| const SimStimulusRandomFourierConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a random Fourier feature stimulus operator.
The implementation copies and normalizes config, derives deterministic features from the seed, and registers the operator on the target field.
| context | Simulation context that will own the operator. | |
| config | Optional random-Fourier configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_stimulus_random_fourier_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimStimulusRandomFourierConfig * | out_config | ||
| ) |
Copy the current random-Fourier configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_stimulus_random_fourier_operator(). | |
| [out] | out_config | Receives the operator's normalized configuration. |
| SimResult sim_stimulus_random_fourier_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimStimulusRandomFourierConfig * | config | ||
| ) |
Replace or renormalize a registered random-Fourier configuration.
Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update rebuilds features as needed and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the random-Fourier operator to update. |
| config | Optional replacement configuration. |