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

Traveling Gaussian envelope stimulus for modulating fields. More...

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

Go to the source code of this file.

Classes

struct  SimStimulusGaussianConfig
 Parameterization for Gaussian-envelope stimulus operators. More...
 

Typedefs

typedef struct SimStimulusGaussianConfig SimStimulusGaussianConfig
 Parameterization for Gaussian-envelope stimulus operators.
 

Functions

SimResult sim_add_stimulus_gaussian_operator (struct SimContext *context, const SimStimulusGaussianConfig *config, size_t *out_index)
 Register a traveling Gaussian-envelope stimulus operator.
 
SimResult sim_stimulus_gaussian_config (struct SimContext *context, size_t operator_index, SimStimulusGaussianConfig *out_config)
 Copy the current Gaussian configuration from a registered operator.
 
SimResult sim_stimulus_gaussian_update (struct SimContext *context, size_t operator_index, const SimStimulusGaussianConfig *config)
 Replace or renormalize a registered Gaussian stimulus configuration.
 

Detailed Description

Traveling Gaussian envelope stimulus for modulating fields.

Can target real or complex fields; complex writes support phase rotation.

Function Documentation

◆ sim_add_stimulus_gaussian_operator()

SimResult sim_add_stimulus_gaussian_operator ( struct SimContext context,
const SimStimulusGaussianConfig config,
size_t *  out_index 
)

Register a traveling Gaussian-envelope stimulus operator.

The implementation copies and normalizes config, prepares any required buffers, and registers the operator on the configured target field.

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

◆ sim_stimulus_gaussian_config()

SimResult sim_stimulus_gaussian_config ( struct SimContext context,
size_t  operator_index,
SimStimulusGaussianConfig out_config 
)

Copy the current Gaussian configuration from a registered operator.

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

SimResult sim_stimulus_gaussian_update ( struct SimContext context,
size_t  operator_index,
const SimStimulusGaussianConfig config 
)

Replace or renormalize a registered Gaussian stimulus configuration.

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

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