|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Utility operator that converts fields between physical and spectral domains. More...
#include "oakfield/operator.h"

Go to the source code of this file.
Typedefs | |
| typedef enum SimFFTConvertDirection | SimFFTConvertDirection |
| Direction of a physical/spectral FFT conversion. | |
Enumerations | |
| enum | SimFFTConvertDirection { SIM_FFT_CONVERT_FORWARD = 0 , SIM_FFT_CONVERT_INVERSE = 1 } |
| Direction of a physical/spectral FFT conversion. More... | |
Functions | |
| SimResult | sim_add_fft_convert (struct SimContext *context, size_t input_field, SimFFTConvertDirection direction, bool in_place, size_t *out_field_index, size_t *out_operator_index) |
| Register an FFT conversion operator and allocate its output field. | |
Utility operator that converts fields between physical and spectral domains.
FFT conversion is modeled as an explicit graph-IR domain transition. Each conversion allocates a dedicated output field; in-place conversion is not supported.
| SimResult sim_add_fft_convert | ( | struct SimContext * | context, |
| size_t | input_field, | ||
| SimFFTConvertDirection | direction, | ||
| bool | in_place, | ||
| size_t * | out_field_index, | ||
| size_t * | out_operator_index | ||
| ) |
Register an FFT conversion operator and allocate its output field.
Forward conversion writes a complex spectral field; real scalar inputs produce a complex-real-constrained spectrum. Inverse conversion writes a physical field and returns real scalar output when the input has the complex-real constraint.
| context | Simulation context that will own the output field and operator. | |
| input_field | Index of the field to transform. | |
| direction | Forward physical-to-spectral or inverse spectral-to-physical. | |
| in_place | Must be false; true returns SIM_RESULT_NOT_SUPPORTED. | |
| [out] | out_field_index | Optional destination for the newly allocated output field index. |
| [out] | out_operator_index | Optional destination for the registered operator index. |