    

 ## On this page

  

 

 # serialization:vtu export

 Last update: 31.07.2026 

**Version: 0.0.0**

## Description

Export DPF data into vtu format.

## 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[directory](#input_0)Required[`string`](../../core-concepts/dpf-types.md#standard-types)**1**[base\_name](#input_1)[`string`](../../core-concepts/dpf-types.md#standard-types)**2**[mesh](#input_2)Required[`abstract_meshed_region`](../../core-concepts/dpf-types.md#meshed-region)**3**[fields](#input_3)Required[`field`](../../core-concepts/dpf-types.md#field), [`fields_container`](../../core-concepts/dpf-types.md#fields-container), [`property_field`](../../core-concepts/dpf-types.md#property-field)**100**[write\_mode](#input_100)[`string`](../../core-concepts/dpf-types.md#standard-types)**101**[as\_point\_cloud](#input_101)[`bool`](../../core-concepts/dpf-types.md#standard-types)**102**[export\_faces](#input_102)[`bool`](../../core-concepts/dpf-types.md#standard-types)**103**[mesh\_properties](#input_103)[`vector<string>`](../../core-concepts/dpf-types.md#standard-types), [`string_field`](../../core-concepts/dpf-types.md#string-field)<a id="input_0"></a>

### directory (Pin 0)

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

directory path

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

### base\_name (Pin 1)

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

vtu base file name, (default is file)

<a id="input_2"></a>

### mesh (Pin 2)

- **Required:** Yes
- **Expected type(s):** [`abstract_meshed_region`](../../core-concepts/dpf-types.md#meshed-region)

mesh

<a id="input_3"></a>

### fields (Pin 3)

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

Nodal, Face, or Elemental field, fields container (over time), or property field to export. When there is no support available in the exported mesh, that data is ignored.

<a id="input_100"></a>

### write\_mode (Pin 100)

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

Available are rawbinarycompressed, rawbinary, base64appended, base64inline, ascii, default is (rawbinarycompressed)

<a id="input_101"></a>

### as\_point\_cloud (Pin 101)

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

Whether to export the mesh as a point cloud. Default is False.

<a id="input_102"></a>

### export\_faces (Pin 102)

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

Whether to also export faces as shell elements when the mesh contains cells. Default is False.

<a id="input_103"></a>

### mesh\_properties (Pin 103)

- **Required:** No
- **Expected type(s):** [`vector<string>`](../../core-concepts/dpf-types.md#standard-types), [`string_field`](../../core-concepts/dpf-types.md#string-field)

List of names of mesh properties to export.

## 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[path](#output_0)[`data_sources`](../../core-concepts/dpf-types.md#data-sources)<a id="output_0"></a>

### path (Pin 0)

- **Expected type(s):** [`data_sources`](../../core-concepts/dpf-types.md#data-sources)

list of output vtu file path

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

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

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

If this option is set to true, warning checks (like unit or data sizes) won't be done.

## Scripting

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

**Category**: serialization

**Plugin**: vtk

**Scripting name**: None

**Full name**: None

**Internal name**: vtu\_export

**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("vtu_export"); // operator instantiation
op.connect(0, my_directory);
op.connect(1, my_base_name);
op.connect(2, my_mesh);
op.connect(3, my_fields);
op.connect(100, my_write_mode);
op.connect(101, my_as_point_cloud);
op.connect(102, my_export_faces);
op.connect(103, my_mesh_properties);
ansys::dpf::DataSources my_path = op.getOutput<ansys::dpf::DataSources>(0);

```

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

op = dpf.operators.serialization.None() # operator instantiation
op.inputs.directory.connect(my_directory)
op.inputs.base_name.connect(my_base_name)
op.inputs.mesh.connect(my_mesh)
op.inputs.fields1.connect(my_fields1)
op.inputs.fields2.connect(my_fields2)
op.inputs.write_mode.connect(my_write_mode)
op.inputs.as_point_cloud.connect(my_as_point_cloud)
op.inputs.export_faces.connect(my_export_faces)
op.inputs.mesh_properties.connect(my_mesh_properties)
my_path = op.outputs.path()

```

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

op = dpf.operators.serialization.None() # operator instantiation
op.inputs.directory.Connect(my_directory)
op.inputs.base_name.Connect(my_base_name)
op.inputs.mesh.Connect(my_mesh)
op.inputs.fields.Connect(my_fields)
op.inputs.write_mode.Connect(my_write_mode)
op.inputs.as_point_cloud.Connect(my_as_point_cloud)
op.inputs.export_faces.Connect(my_export_faces)
op.inputs.mesh_properties.Connect(my_mesh_properties)
my_path = op.outputs.path.GetData()

```

  
## Changelog

- Version 0.0.0: Initial release.