|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Rectangular wave-equation standing modes with fixed boundaries. More...


Go to the source code of this file.
Classes | |
| struct | SimStimulusWaveModesConfig |
| Configuration for rectangular standing wave-equation mode stimuli. More... | |
Typedefs | |
| typedef struct SimStimulusWaveModesConfig | SimStimulusWaveModesConfig |
| Configuration for rectangular standing wave-equation mode stimuli. | |
Functions | |
| SimResult | sim_add_stimulus_wave_modes_operator (struct SimContext *context, const SimStimulusWaveModesConfig *config, size_t *out_index) |
| Register a rectangular wave-equation standing-mode stimulus operator. | |
| SimResult | sim_stimulus_wave_modes_config (struct SimContext *context, size_t operator_index, SimStimulusWaveModesConfig *out_config) |
| Copy the current wave-modes configuration from a registered operator. | |
| SimResult | sim_stimulus_wave_modes_update (struct SimContext *context, size_t operator_index, const SimStimulusWaveModesConfig *config) |
| Replace or renormalize a registered wave-modes stimulus configuration. | |
Rectangular wave-equation standing modes with fixed boundaries.
Evaluates a local chart (u, v) and injects A * Phi_{m,n}(u, v) * exp(i * (-omega_{m,n} * (t + t_0) + phi)), where Phi_{m,n}(u, v) = sin(m * pi * (u / L_u + 1/2)) * sin(n * pi * (v / L_v + 1/2)) and omega_{m,n} = c * pi * sqrt((m / L_u)^2 + (n / L_v)^2).
For rank-1 fields, only the u-mode is used and omega_m = c * pi * m / L_u. Real fields receive the real component. Complex fields receive the full complex mode with an additional global rotation.
| SimResult sim_add_stimulus_wave_modes_operator | ( | struct SimContext * | context, |
| const SimStimulusWaveModesConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a rectangular wave-equation standing-mode stimulus operator.
The implementation copies and normalizes config, then registers a split operator that evaluates the fixed-boundary mode on the target field.
| context | Simulation context that will own the operator. | |
| config | Optional wave-modes configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_stimulus_wave_modes_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimStimulusWaveModesConfig * | out_config | ||
| ) |
Copy the current wave-modes configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_stimulus_wave_modes_operator(). | |
| [out] | out_config | Receives the operator's normalized configuration. |
| SimResult sim_stimulus_wave_modes_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimStimulusWaveModesConfig * | config | ||
| ) |
Replace or renormalize a registered wave-modes stimulus configuration.
Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update refreshes symbolic state and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the wave-modes operator to update. |
| config | Optional replacement configuration. |