Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
zero_field.h File Reference

Utility operator that clears a real or complex field in place. More...

Include dependency graph for zero_field.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ZeroFieldOperatorConfig
 Configuration for clearing a target field in place. More...
 

Typedefs

typedef struct ZeroFieldOperatorConfig ZeroFieldOperatorConfig
 Configuration for clearing a target field in place.
 

Functions

SimResult sim_add_zero_field_operator (struct SimContext *context, const ZeroFieldOperatorConfig *config, size_t *out_index)
 Register an in-place zero-field utility operator.
 
SimResult sim_zero_field_config (struct SimContext *context, size_t operator_index, ZeroFieldOperatorConfig *out_config)
 Copy the current configuration from a registered zero-field operator.
 
SimResult sim_zero_field_update (struct SimContext *context, size_t operator_index, const ZeroFieldOperatorConfig *config)
 Update a registered zero-field operator without retargeting it.
 

Detailed Description

Utility operator that clears a real or complex field in place.

Function Documentation

◆ sim_add_zero_field_operator()

SimResult sim_add_zero_field_operator ( struct SimContext context,
const ZeroFieldOperatorConfig config,
size_t *  out_index 
)

Register an in-place zero-field utility operator.

The operator clears all elements of the configured field during its split step. The target field must exist at registration time.

Parameters
contextSimulation context that will own the operator.
configOptional zero-field configuration; NULL selects field index 0.
[out]out_indexOptional destination for the registered operator index.
Returns
SIM_RESULT_OK on success, SIM_RESULT_INVALID_ARGUMENT for NULL context or missing field, SIM_RESULT_OUT_OF_MEMORY on allocation failure, or a registration error.

◆ sim_zero_field_config()

SimResult sim_zero_field_config ( struct SimContext context,
size_t  operator_index,
ZeroFieldOperatorConfig out_config 
)

Copy the current configuration from a registered zero-field operator.

Parameters
contextSimulation context containing the operator.
operator_indexIndex returned by sim_add_zero_field_operator().
[out]out_configReceives the operator configuration.
Returns
SIM_RESULT_OK on success, SIM_RESULT_INVALID_ARGUMENT for NULL pointers, SIM_RESULT_NOT_FOUND for a missing operator, or SIM_RESULT_INVALID_STATE when the operator has no zero-field state.

◆ sim_zero_field_update()

SimResult sim_zero_field_update ( struct SimContext context,
size_t  operator_index,
const ZeroFieldOperatorConfig config 
)

Update a registered zero-field operator without retargeting it.

config is required and its field_index must match the registered target. A successful update refreshes symbolic state and invalidates the scheduler plan.

Parameters
contextSimulation context containing the operator.
operator_indexIndex of the zero-field operator to update.
configReplacement configuration with the same field_index.
Returns
SIM_RESULT_OK on success, SIM_RESULT_INVALID_ARGUMENT for NULL inputs or field retargeting, SIM_RESULT_NOT_FOUND for a missing operator, or SIM_RESULT_INVALID_STATE when the operator has no zero-field state.