|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Finite-difference gradient operator writing X/Y derivative fields. More...


Go to the source code of this file.
Classes | |
| struct | SimGradientOperatorConfig |
| Configuration for writing finite-difference gradient components. More... | |
Macros | |
| #define | SIM_GRADIENT_AXIS_AUTO ((size_t)SIZE_MAX) |
Typedefs | |
| typedef enum SimGradientStencil | SimGradientStencil |
| Finite-difference stencils available for gradient derivatives. | |
| typedef struct SimGradientOperatorConfig | SimGradientOperatorConfig |
| Configuration for writing finite-difference gradient components. | |
Enumerations | |
| enum | SimGradientStencil { SIM_GRADIENT_STENCIL_CENTRAL_2 = 0 , SIM_GRADIENT_STENCIL_CENTRAL_4 , SIM_GRADIENT_STENCIL_FORWARD_1 , SIM_GRADIENT_STENCIL_BACKWARD_1 , SIM_GRADIENT_STENCIL_FORWARD_2 , SIM_GRADIENT_STENCIL_BACKWARD_2 } |
| Finite-difference stencils available for gradient derivatives. More... | |
Functions | |
| SimResult | sim_add_gradient_operator (struct SimContext *context, const SimGradientOperatorConfig *config, size_t *out_index) |
| Register a finite-difference gradient operator. | |
| SimResult | sim_gradient_config (struct SimContext *context, size_t operator_index, SimGradientOperatorConfig *out_config) |
| Copy the current gradient configuration from a registered operator. | |
| SimResult | sim_gradient_update (struct SimContext *context, size_t operator_index, const SimGradientOperatorConfig *config) |
| Replace the configuration of a registered gradient operator. | |
Finite-difference gradient operator writing X/Y derivative fields.
| enum SimGradientStencil |
Finite-difference stencils available for gradient derivatives.
| SimResult sim_add_gradient_operator | ( | struct SimContext * | context, |
| const SimGradientOperatorConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a finite-difference gradient operator.
| context | Simulation context that will own the operator. | |
| config | Optional gradient configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_gradient_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimGradientOperatorConfig * | out_config | ||
| ) |
Copy the current gradient configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_gradient_operator(). | |
| [out] | out_config | Receives the normalized configuration. |
| SimResult sim_gradient_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimGradientOperatorConfig * | config | ||
| ) |
Replace the configuration of a registered gradient operator.
config is required. The replacement is normalized and field compatibility is checked before storing it.
| context | Simulation context containing the operator. |
| operator_index | Index of the gradient operator to update. |
| config | Replacement gradient configuration. |