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

Fused spectral dissipation, dispersion, and global phase operator. More...

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

Go to the source code of this file.

Classes

struct  LinearSpectralFusionOperatorConfig
 Configuration for the fused spectral dissipation, dispersion, and phase operator. More...
 

Typedefs

typedef struct LinearSpectralFusionOperatorConfig LinearSpectralFusionOperatorConfig
 Configuration for the fused spectral dissipation, dispersion, and phase operator.
 

Functions

SimResult sim_add_linear_spectral_fusion_operator (struct SimContext *context, const LinearSpectralFusionOperatorConfig *config, size_t *out_index)
 Register a fused linear spectral operator.
 
SimResult sim_linear_spectral_fusion_config (struct SimContext *context, size_t operator_index, LinearSpectralFusionOperatorConfig *out_config)
 Copy the current fused spectral configuration from a registered operator.
 
SimResult sim_linear_spectral_fusion_update (struct SimContext *context, size_t operator_index, const LinearSpectralFusionOperatorConfig *config)
 Replace the non-target parameters of a fused spectral operator.
 

Detailed Description

Fused spectral dissipation, dispersion, and global phase operator.

Function Documentation

◆ sim_add_linear_spectral_fusion_operator()

SimResult sim_add_linear_spectral_fusion_operator ( struct SimContext context,
const LinearSpectralFusionOperatorConfig config,
size_t *  out_index 
)

Register a fused linear spectral operator.

The operator combines dissipative damping, dispersive phase, and global phase terms in one spectral pass when a split fallback is required.

Parameters
contextSimulation context that will own the operator.
configOptional fusion 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, field validation, allocation, FFT/cache setup, or registration.

◆ sim_linear_spectral_fusion_config()

SimResult sim_linear_spectral_fusion_config ( struct SimContext context,
size_t  operator_index,
LinearSpectralFusionOperatorConfig out_config 
)

Copy the current fused spectral configuration from a registered operator.

Parameters
contextSimulation context containing the operator.
operator_indexIndex returned by sim_add_linear_spectral_fusion_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 fusion state.

◆ sim_linear_spectral_fusion_update()

SimResult sim_linear_spectral_fusion_update ( struct SimContext context,
size_t  operator_index,
const LinearSpectralFusionOperatorConfig config 
)

Replace the non-target parameters of a fused spectral operator.

config is required. The registered target field is preserved even if config->field_index differs. A successful update refreshes symbolic/kernel constants, marks changed spectral coefficient caches dirty, and invalidates the scheduler plan.

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