|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Utility operator that advances field phase by a rate times the timestep. More...
#include "oakfield/operator_split.h"

Go to the source code of this file.
Classes | |
| struct | PhaseRotateOperatorConfig |
| Configuration for applying a uniform phase rotation to a target field. More... | |
Typedefs | |
| typedef struct PhaseRotateOperatorConfig | PhaseRotateOperatorConfig |
| Configuration for applying a uniform phase rotation to a target field. | |
Functions | |
| SimResult | sim_add_phase_rotate_operator (struct SimContext *context, const PhaseRotateOperatorConfig *config, size_t *out_index) |
| Register a phase-rotation utility operator. | |
| SimResult | sim_phase_rotate_config (struct SimContext *context, size_t operator_index, PhaseRotateOperatorConfig *out_config) |
| Copy the current configuration from a registered phase-rotation operator. | |
| SimResult | sim_phase_rotate_update (struct SimContext *context, size_t operator_index, const PhaseRotateOperatorConfig *config) |
| Replace the configuration of a registered phase-rotation operator. | |
Utility operator that advances field phase by a rate times the timestep.
Complex fields are rotated by exp(i * phase_rate * dt). Real fields, or fields constrained to real spectral subspaces, receive the projected cos(theta) scale.
| SimResult sim_add_phase_rotate_operator | ( | struct SimContext * | context, |
| const PhaseRotateOperatorConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a phase-rotation utility operator.
The implementation copies and normalizes config, validates that the target field is real double or complex double, and may register a symbolic kernel for unconstrained complex rotations.
| context | Simulation context that will own the operator. | |
| config | Optional phase-rotation configuration; NULL selects field 0 and zero rate. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_phase_rotate_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| PhaseRotateOperatorConfig * | out_config | ||
| ) |
Copy the current configuration from a registered phase-rotation operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_phase_rotate_operator(). | |
| [out] | out_config | Receives the operator configuration. |
| SimResult sim_phase_rotate_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const PhaseRotateOperatorConfig * | config | ||
| ) |
Replace the configuration of a registered phase-rotation operator.
config is required. A non-finite replacement phase_rate preserves the previous rate. A successful update refreshes operator info, patches the kernel constant when one is registered, and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the phase-rotation operator to update. |
| config | Replacement phase-rotation configuration. |