serialization:vtu export
Last update: 31.07.2026Version: 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 number | Name | Status | Expected type(s) |
|---|---|---|---|
| 0 | directory | Required | string |
| 1 | base_name | string |
|
| 2 | mesh | Required | abstract_meshed_region |
| 3 | fields | Required | field, fields_container, property_field |
| 100 | write_mode | string |
|
| 101 | as_point_cloud | bool |
|
| 102 | export_faces | bool |
|
| 103 | mesh_properties | vector<string>, string_field |
directory (Pin 0)
- Required: Yes
- Expected type(s):
string
directory path
base_name (Pin 1)
- Required: No
- Expected type(s):
string
vtu base file name, (default is file)
mesh (Pin 2)
- Required: Yes
- Expected type(s):
abstract_meshed_region
mesh
fields (Pin 3)
- Required: Yes
- Expected type(s):
field,fields_container,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.
write_mode (Pin 100)
- Required: No
- Expected type(s):
string
Available are rawbinarycompressed, rawbinary, base64appended, base64inline, ascii, default is (rawbinarycompressed)
as_point_cloud (Pin 101)
- Required: No
- Expected type(s):
bool
Whether to export the mesh as a point cloud. Default is False.
export_faces (Pin 102)
- Required: No
- Expected type(s):
bool
Whether to also export faces as shell elements when the mesh contains cells. Default is False.
mesh_properties (Pin 103)
- Required: No
- Expected type(s):
vector<string>,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 number | Name | Expected type(s) |
|---|---|---|
| 0 | path | data_sources |
path (Pin 0)
- Expected type(s):
data_sources
list of output vtu file path
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.
permissive
- Expected type(s):
bool - 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++
#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
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
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.