    

 ## On this page

  

 

 # compression:quantization (fields container)

 Last update: 31.07.2026 

**Version: 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 numberNameStatusExpected type(s)0[input\_fc](#input_0)Required[`fields_container`](../../core-concepts/dpf-types.md#fields-container)**1**[threshold](#input_1)Required[`double`](../../core-concepts/dpf-types.md#standard-types), [`field`](../../core-concepts/dpf-types.md#field), [`fields_container`](../../core-concepts/dpf-types.md#fields-container)<a id="input_0"></a>

### input\_fc (Pin 0)

- **Required:** Yes
- **Expected type(s):** [`fields_container`](../../core-concepts/dpf-types.md#fields-container)

Fields container to be quantized.

<a id="input_1"></a>

### threshold (Pin 1)

- **Required:** Yes
- **Expected type(s):** [`double`](../../core-concepts/dpf-types.md#standard-types), [`field`](../../core-concepts/dpf-types.md#field), [`fields_container`](../../core-concepts/dpf-types.md#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 numberNameExpected type(s)0[output\_fc](#output_0)[`fields_container`](../../core-concepts/dpf-types.md#fields-container)<a id="output_0"></a>

### output\_fc (Pin 0)

- **Expected type(s):** [`fields_container`](../../core-concepts/dpf-types.md#fields-container)

Quantized fields container.

## Configurations

This operator supports [configuration options](../../core-concepts/operator-configurations.md) that modify its behavior.

### [mutex](../../core-concepts/operator-configurations.md#mutex)

- **Expected type(s):** [`bool`](../../core-concepts/dpf-types.md#standard-types)
- **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++```cpp
#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```python
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```python
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.