|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
1D spatial derivative operator (finite differences with periodic boundary). More...


Go to the source code of this file.
Classes | |
| struct | SimSpatialDerivativeOperatorConfig |
| Configuration for the spatial derivative operator. More... | |
Typedefs | |
| typedef enum SimSpatialDerivativeMethod | SimSpatialDerivativeMethod |
| Finite-difference stencil used by the spatial derivative operator. | |
| typedef struct SimSpatialDerivativeOperatorConfig | SimSpatialDerivativeOperatorConfig |
| Configuration for the spatial derivative operator. | |
Enumerations | |
| enum | SimSpatialDerivativeMethod { SIM_SPATIAL_DERIVATIVE_METHOD_CENTRAL = 0 , SIM_SPATIAL_DERIVATIVE_METHOD_FORWARD = 1 , SIM_SPATIAL_DERIVATIVE_METHOD_BACKWARD = 2 } |
| Finite-difference stencil used by the spatial derivative operator. More... | |
Functions | |
| const char * | sim_spatial_derivative_method_name (SimSpatialDerivativeMethod method) |
| Return the schema name for a spatial-derivative stencil. | |
| bool | sim_spatial_derivative_method_from_string (const char *name, SimSpatialDerivativeMethod *out_method) |
| Parse a spatial-derivative stencil name. | |
| SimResult | sim_add_spatial_derivative_operator (struct SimContext *context, const SimSpatialDerivativeOperatorConfig *config, size_t *out_index) |
| Register a 1D spatial derivative operator. | |
| SimResult | sim_spatial_derivative_config (struct SimContext *context, size_t operator_index, SimSpatialDerivativeOperatorConfig *out_config) |
| Copy the current spatial-derivative configuration from a registered operator. | |
| SimResult | sim_spatial_derivative_update (struct SimContext *context, size_t operator_index, const SimSpatialDerivativeOperatorConfig *config) |
| Replace or renormalize a registered spatial-derivative configuration. | |
1D spatial derivative operator (finite differences with periodic boundary).
| SimResult sim_add_spatial_derivative_operator | ( | struct SimContext * | context, |
| const SimSpatialDerivativeOperatorConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a 1D spatial derivative operator.
| context | Simulation context that will own the operator. | |
| config | Optional derivative configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_spatial_derivative_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimSpatialDerivativeOperatorConfig * | out_config | ||
| ) |
Copy the current spatial-derivative configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_spatial_derivative_operator(). | |
| [out] | out_config | Receives the normalized configuration. |
| bool sim_spatial_derivative_method_from_string | ( | const char * | name, |
| SimSpatialDerivativeMethod * | out_method | ||
| ) |
Parse a spatial-derivative stencil name.
| name | Lowercase schema name such as "central", "forward", or "backward". | |
| [out] | out_method | Receives the parsed method on success. |
name maps to a known method; false otherwise. | const char * sim_spatial_derivative_method_name | ( | SimSpatialDerivativeMethod | method | ) |
Return the schema name for a spatial-derivative stencil.
| method | Stencil enum value. |
| SimResult sim_spatial_derivative_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimSpatialDerivativeOperatorConfig * | config | ||
| ) |
Replace or renormalize a registered spatial-derivative configuration.
Passing NULL for config keeps the current configuration and reapplies normalization. A successful update refreshes symbolic state and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the spatial-derivative operator to update. |
| config | Optional replacement configuration. |