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

Spectral dispersion operator applying k-dependent phase rotation. More...

Include dependency graph for dispersion.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DispersionOperatorConfig
 Configuration for k-dependent spectral phase dispersion. More...
 

Typedefs

typedef struct DispersionOperatorConfig DispersionOperatorConfig
 Configuration for k-dependent spectral phase dispersion.
 

Functions

SimResult sim_add_dispersion_operator (struct SimContext *context, const DispersionOperatorConfig *config, size_t *out_index)
 Register a spectral dispersion operator.
 
SimResult sim_dispersion_config (struct SimContext *context, size_t operator_index, DispersionOperatorConfig *out_config)
 Copy the current dispersion configuration from a registered operator.
 
SimResult sim_dispersion_update (struct SimContext *context, size_t operator_index, const DispersionOperatorConfig *config)
 Replace the configuration of a registered dispersion operator.
 

Detailed Description

Spectral dispersion operator applying k-dependent phase rotation.

Complex fields receive exp(i * theta(k)) evolution. Real fields use the projected real multiplier cos(theta(k)).

Function Documentation

◆ sim_add_dispersion_operator()

SimResult sim_add_dispersion_operator ( struct SimContext context,
const DispersionOperatorConfig config,
size_t *  out_index 
)

Register a spectral dispersion operator.

Parameters
contextSimulation context that will own the operator.
configOptional dispersion 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 argument validation, target-field validation, allocation, FFT plan setup, or registration.

◆ sim_dispersion_config()

SimResult sim_dispersion_config ( struct SimContext context,
size_t  operator_index,
DispersionOperatorConfig out_config 
)

Copy the current dispersion configuration from a registered operator.

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

◆ sim_dispersion_update()

SimResult sim_dispersion_update ( struct SimContext context,
size_t  operator_index,
const DispersionOperatorConfig config 
)

Replace the configuration of a registered dispersion operator.

config is required. The target field cannot be retargeted by update.

Parameters
contextSimulation context containing the operator.
operator_indexIndex of the dispersion operator to update.
configReplacement dispersion configuration.
Returns
SIM_RESULT_OK on success, or an error code from argument validation, lookup, state validation, field validation, or cache refresh.