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

Regularized cylindrical wave-emitter stimulus. More...

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

Go to the source code of this file.

Classes

struct  SimStimulusCylindricalWaveEmitterConfig
 Configuration for a regularized cylindrical wave-emitter stimulus. More...
 

Typedefs

typedef struct SimStimulusCylindricalWaveEmitterConfig SimStimulusCylindricalWaveEmitterConfig
 Configuration for a regularized cylindrical wave-emitter stimulus.
 

Functions

SimResult sim_add_stimulus_cylindrical_wave_emitter_operator (struct SimContext *context, const SimStimulusCylindricalWaveEmitterConfig *config, size_t *out_index)
 Register a regularized cylindrical wave-emitter stimulus operator.
 
SimResult sim_stimulus_cylindrical_wave_emitter_config (struct SimContext *context, size_t operator_index, SimStimulusCylindricalWaveEmitterConfig *out_config)
 Copy the current cylindrical emitter configuration from a registered operator.
 
SimResult sim_stimulus_cylindrical_wave_emitter_update (struct SimContext *context, size_t operator_index, const SimStimulusCylindricalWaveEmitterConfig *config)
 Replace or renormalize a registered cylindrical emitter configuration.
 

Detailed Description

Regularized cylindrical wave-emitter stimulus.

Evaluates a local chart (u, v) and injects A * exp(-alpha * r_a) / sqrt(r_a) * exp(i * (k_r * r_a - omega * t + phi)), where r_a = sqrt(rho^2 + a^2) regularizes the source core and rho = |u - u_c| in rank-1 or hypot(u - u_c, v - v_c) in rank-2.

Real fields receive the real component. Complex fields receive the full complex wave with an additional global rotation.

Function Documentation

◆ sim_add_stimulus_cylindrical_wave_emitter_operator()

SimResult sim_add_stimulus_cylindrical_wave_emitter_operator ( struct SimContext context,
const SimStimulusCylindricalWaveEmitterConfig config,
size_t *  out_index 
)

Register a regularized cylindrical wave-emitter stimulus operator.

The implementation copies and normalizes config, then registers a split operator that writes the emitter wave into the configured target field.

Parameters
contextSimulation context that will own the operator.
configOptional emitter 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, or split-operator registration.

◆ sim_stimulus_cylindrical_wave_emitter_config()

SimResult sim_stimulus_cylindrical_wave_emitter_config ( struct SimContext context,
size_t  operator_index,
SimStimulusCylindricalWaveEmitterConfig out_config 
)

Copy the current cylindrical emitter configuration from a registered operator.

Parameters
contextSimulation context containing the operator.
operator_indexIndex returned by sim_add_stimulus_cylindrical_wave_emitter_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_cylindrical_wave_emitter_update()

SimResult sim_stimulus_cylindrical_wave_emitter_update ( struct SimContext context,
size_t  operator_index,
const SimStimulusCylindricalWaveEmitterConfig config 
)

Replace or renormalize a registered cylindrical emitter configuration.

Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update refreshes derived state and invalidates the scheduler plan.

Parameters
contextSimulation context containing the operator.
operator_indexIndex of the cylindrical emitter operator to update.
configOptional replacement configuration.
Returns
SIM_RESULT_OK on success, or an error code if lookup, allocation, or state validation fails.