Skip to main content

DPF Framework 2026 R1

serialization:migrate to vtu

Last update: 31.07.2026

Version: 0.0.0

Description

Extract all results from a datasources and exports them into vtu format. All the connected inputs are forwarded to the result providers operators.

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 time_scoping scoping, vector<int32>
3 streams_container streams_container
4 data_sources Required data_sources
20 directory Required string
21 base_name string
30 result string
100 write_mode string

time_scoping (Pin 0)

time sets to export, default is all

streams_container (Pin 3)

result file container allowed to be kept open to cache data

data_sources (Pin 4)

result file path container, used if no streams are set

directory (Pin 20)

  • Required: Yes
  • Expected type(s): string

directory path

base_name (Pin 21)

  • Required: No
  • Expected type(s): string

vtu base file name, (default is file)

result (Pin 30)

  • Required: No
  • Expected type(s): string

if Operator's names are connected to this Pin, only these results are exported (else all available results are exported)

write_mode (Pin 100)

  • Required: No
  • Expected type(s): string

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

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)

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: true

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: migrate_to_vtu

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("migrate_to_vtu"); // operator instantiation
op.connect(0, my_time_scoping);
op.connect(3, my_streams_container);
op.connect(4, my_data_sources);
op.connect(20, my_directory);
op.connect(21, my_base_name);
op.connect(30, my_result);
op.connect(100, my_write_mode);
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.time_scoping.connect(my_time_scoping)
op.inputs.streams_container.connect(my_streams_container)
op.inputs.data_sources.connect(my_data_sources)
op.inputs.directory.connect(my_directory)
op.inputs.base_name.connect(my_base_name)
op.inputs.result1.connect(my_result1)
op.inputs.result2.connect(my_result2)
op.inputs.write_mode.connect(my_write_mode)
my_path = op.outputs.path()
IPython
import mech_dpf
import Ans.DataProcessing as dpf

op = dpf.operators.serialization.None() # operator instantiation
op.inputs.time_scoping.Connect(my_time_scoping)
op.inputs.streams_container.Connect(my_streams_container)
op.inputs.data_sources.Connect(my_data_sources)
op.inputs.directory.Connect(my_directory)
op.inputs.base_name.Connect(my_base_name)
op.inputs.result.Connect(my_result)
op.inputs.write_mode.Connect(my_write_mode)
my_path = op.outputs.path.GetData()

Changelog

  • Version 0.0.0: Initial release.

Connect with Ansys