|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Utility operator that copies one field into another compatible field. More...


Go to the source code of this file.
Classes | |
| struct | SimCopyOperatorConfig |
| Configuration for copying one compatible field into another. More... | |
Typedefs | |
| typedef struct SimCopyOperatorConfig | SimCopyOperatorConfig |
| Configuration for copying one compatible field into another. | |
Functions | |
| SimResult | sim_add_copy_operator (struct SimContext *context, const SimCopyOperatorConfig *config, size_t *out_index) |
| Register a field copy utility operator. | |
| SimResult | sim_copy_config (struct SimContext *context, size_t operator_index, SimCopyOperatorConfig *out_config) |
| Copy the current configuration from a registered copy operator. | |
| SimResult | sim_copy_update (struct SimContext *context, size_t operator_index, const SimCopyOperatorConfig *config) |
| Replace the configuration of a registered copy operator. | |
Utility operator that copies one field into another compatible field.
The copy operator supports real double, complex double, and exact-integer fields. Exact integers are copied byte-for-byte and do not support accumulation or dt scaling.
| SimResult sim_add_copy_operator | ( | struct SimContext * | context, |
| const SimCopyOperatorConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a field copy utility operator.
The implementation copies and normalizes config, resolves the default scale-by-dt policy, and validates that source and destination fields have the same element count, element size, and scalar domain.
| context | Simulation context that will own the operator. | |
| config | Optional copy configuration; NULL selects zero-initialized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_copy_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimCopyOperatorConfig * | out_config | ||
| ) |
Copy the current configuration from a registered copy operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_copy_operator(). | |
| [out] | out_config | Receives the operator's normalized configuration. |
| SimResult sim_copy_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimCopyOperatorConfig * | config | ||
| ) |
Replace the configuration of a registered copy operator.
config is required. The replacement is normalized and the referenced fields are validated before it is stored.
| context | Simulation context containing the operator. |
| operator_index | Index of the copy operator to update. |
| config | Replacement copy configuration. |