    

 ## On this page

  

 

 # utility:concatenate fields containers

 Last update: 31.07.2026 

**Version: 0.0.0**

## Description

Concatenates fields containers into a unique one by concatenating each of their fields.

Example:

- Fields Container 1: 
    - Field1 with components: { UX, UY, UZ }
    - Field2 with components: { VX, VY, VZ }
- Fields Container 2: 
    - Field1 with components: { RX, RY, RZ }
    - Field2 with components: { AX, AY, AZ }
- Output Fields Container: 
    - Field1 with components: { UX, UY, UZ, RX, RY, RZ }
    - Field2 with components: { VX, VY, VZ, AX, AY, AZ }

## 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)**-3**[rescoping\_value](#input_-3)[`double`](../../core-concepts/dpf-types.md#standard-types)**-2**[reference\_scoping\_index](#input_-2)[`int32`](../../core-concepts/dpf-types.md#standard-types)**-1**[field\_support](#input_-1)`abstract_field_support`0[fields\_containers](#input_0)Required[`vector<fields_container>`](../../core-concepts/dpf-types.md#vector%3Cfields-container%3E)<a id="input_-3"></a>

### rescoping\_value (Pin -3)

- **Required:** No
- **Expected type(s):** [`double`](../../core-concepts/dpf-types.md#standard-types)

Value used to fill the missing values when scopings are different. Default is 0.

<a id="input_-2"></a>

### reference\_scoping\_index (Pin -2)

- **Required:** No
- **Expected type(s):** [`int32`](../../core-concepts/dpf-types.md#standard-types)

Pin of the field of which to take the scoping for the output field. If -1 all scopings will be merged, if -2 all scopings will be intersected. Default is -1.

<a id="input_-1"></a>

### field\_support (Pin -1)

- **Required:** No
- **Expected type(s):** `abstract_field_support`

Support of the output fields container's fields. By default each field has the support of the corresponding field of the first fields container.

<a id="input_0"></a>

### fields\_containers (Pin 0)

- **Required:** Yes
- **Expected type(s):** [`vector<fields_container>`](../../core-concepts/dpf-types.md#vector%3Cfields-container%3E)

A vector of fields containers to merge from pin 0 to ...

## 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[merged\_collections](#output_0)[`fields_container`](../../core-concepts/dpf-types.md#fields-container)<a id="output_0"></a>

### merged\_collections (Pin 0)

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

Fields containers with fields which have as many components as the sum of all the input fields' numbers of components of the same index.

## 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.

### [read\_inputs\_in\_parallel](../../core-concepts/operator-configurations.md#read_inputs_in_parallel)

- **Expected type(s):** [`bool`](../../core-concepts/dpf-types.md#standard-types)
- **Default value:** false

If this option is set to true, the operator's inputs will be evaluated in parallel.

## Scripting

This operator can be accessed through scripting interfaces using these identifiers.

**Category**: utility

**Plugin**: core

**Scripting name**: concatenate\_fields\_containers

**Full name**: utility.concatenate\_fields\_containers

**Internal name**: merge::concatenate\_fields\_containers

**License**: None

## 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("merge::concatenate_fields_containers"); // operator instantiation
op.connect(-3, my_rescoping_value);
op.connect(-2, my_reference_scoping_index);
op.connect(-1, my_field_support);
op.connect(0, my_fields_containers);
ansys::dpf::FieldsContainer my_merged_collections = op.getOutput<ansys::dpf::FieldsContainer>(0);

```

CPython```python
import ansys.dpf.core as dpf

op = dpf.operators.utility.concatenate_fields_containers() # operator instantiation
op.inputs.rescoping_value.connect(my_rescoping_value)
op.inputs.reference_scoping_index.connect(my_reference_scoping_index)
op.inputs.field_support.connect(my_field_support)
op.inputs.fields_containers1.connect(my_fields_containers1)
op.inputs.fields_containers2.connect(my_fields_containers2)
my_merged_collections = op.outputs.merged_collections()

```

IPython```python
import mech_dpf
import Ans.DataProcessing as dpf

op = dpf.operators.utility.concatenate_fields_containers() # operator instantiation
op.inputs.rescoping_value.Connect(my_rescoping_value)
op.inputs.reference_scoping_index.Connect(my_reference_scoping_index)
op.inputs.field_support.Connect(my_field_support)
op.inputs.fields_containers.Connect(my_fields_containers)
my_merged_collections = op.outputs.merged_collections.GetData()

```

  
## Changelog

- Version 0.0.0: Initial release.