compression:quantization (fields container)
Last update: 31.07.2026Version: 0.0.0
Description
Scales all the fields of a fields container to a given precision threshold, then rounds all the values to the unit.
Inputs
This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation. Some inputs are required, while others are optional and provide additional configuration. Each parameter is detailed in the sections that follow the table.
| Pin number | Name | Status | Expected type(s) |
|---|---|---|---|
| 0 | input_fc | Required | fields_container |
| 1 | threshold | Required | double, field, fields_container |
input_fc (Pin 0)
- Required: Yes
- Expected type(s):
fields_container
Fields container to be quantized.
threshold (Pin 1)
- Required: Yes
- Expected type(s):
double,field,fields_container
Precision threshold desired. Case double : the threshold is applied on all the fields of the input fields container. Case field with one, numComp or input size values : the threshold is used for each field of the input fields container. Case fields container : the corresponding threshold field is found by matching label.
Outputs
This table lists the output pins for this operator. Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing. Each output is detailed in the sections that follow the table.
| Pin number | Name | Expected type(s) |
|---|---|---|
| 0 | output_fc | fields_container |
output_fc (Pin 0)
- Expected type(s):
fields_container
Quantized fields container.
Configurations
This operator supports configuration options that modify its behavior.
mutex
- Expected type(s):
bool - Default value: false
If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.
Scripting
This operator can be accessed through scripting interfaces using these identifiers.
Category: compression
Plugin: N/A
Scripting name: quantization_fc
Full name: compression.quantization_fc
Internal name: quantization_fc
License: any_dpf_supported_increments
Examples
These examples demonstrate how to use this operator in different programming environments. Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.
C++
#include "dpf_api.h"
ansys::dpf::Operator op("quantization_fc"); // operator instantiation
op.connect(0, my_input_fc);
op.connect(1, my_threshold);
ansys::dpf::FieldsContainer my_output_fc = op.getOutput<ansys::dpf::FieldsContainer>(0);
CPython
import ansys.dpf.core as dpf
op = dpf.operators.compression.quantization_fc() # operator instantiation
op.inputs.input_fc.connect(my_input_fc)
op.inputs.threshold.connect(my_threshold)
my_output_fc = op.outputs.output_fc()
IPython
import mech_dpf
import Ans.DataProcessing as dpf
op = dpf.operators.compression.quantization_fc() # operator instantiation
op.inputs.input_fc.Connect(my_input_fc)
op.inputs.threshold.Connect(my_threshold)
my_output_fc = op.outputs.output_fc.GetData()
Changelog
- Version 0.0.0: Initial release.