utility:mechanical: make time chunk
Last update: 31.07.2026Version: 0.0.0
Description
Splits a list of time/freq values into chunks depending on evaluated result properties,mesh size and max number of bytes accepted and calls "make_for_each_range" to generate a range that can be consumed by the for_each operator
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 | target_time_freq_values | Required | vector<double>, double |
| 1 | operator_to_iterate | Required | operator |
| 2 | pin_index | Required | int32 |
| 7 | abstract_meshed_region | Required | abstract_meshed_region |
| 200 | chunk_config | Required | abstract_data_tree |
| 1000 | producer_op1 | Required | operator |
| 1001 | output_pin_of_producer_op1 | Required | int32 |
| 1002 | input_pin_of_consumer_op1 | Required | int32 |
| 1003 | consumer_op1 | Required | operator |
target_time_freq_values (Pin 0)
- Required: Yes
- Expected type(s):
vector<double>,double
List of time/freq values to potentially split in chunks.
operator_to_iterate (Pin 1)
- Required: Yes
- Expected type(s):
operator
Operator that must be reconnected with the range values.
pin_index (Pin 2)
- Required: Yes
- Expected type(s):
int32
abstract_meshed_region (Pin 7)
- Required: Yes
- Expected type(s):
abstract_meshed_region
The number of nodes (for "Nodal" results) or number of elements (for "Elemental" results) is used to compute the chunk.
chunk_config (Pin 200)
- Required: Yes
- Expected type(s):
abstract_data_tree
a data tree with an int attribute "max_num_bytes", an int attribute "dimensionality" (average result size by entity), a string attribute "location" ("Nodal" or"Elemental") is expected.
producer_op1 (Pin 1000)
- Required: Yes
- Expected type(s):
operator
output_pin_of_producer_op1 (Pin 1001)
- Required: Yes
- Expected type(s):
int32
input_pin_of_consumer_op1 (Pin 1002)
- Required: Yes
- Expected type(s):
int32
consumer_op1 (Pin 1003)
- Required: Yes
- Expected type(s):
operator
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 | chunks |
chunks (Pin 0)
- Expected type(s):
To connect to "producer_consumer_for_each" Operator on pin 0
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.
Scripting
This operator can be accessed through scripting interfaces using these identifiers.
Category: utility
Plugin: core
Scripting name: None
Full name: None
Internal name: mechanical::make_time_chunk_for_each
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("mechanical::make_time_chunk_for_each"); // operator instantiation
op.connect(0, my_target_time_freq_values);
op.connect(1, my_operator_to_iterate);
op.connect(2, my_pin_index);
op.connect(7, my_abstract_meshed_region);
op.connect(200, my_chunk_config);
op.connect(1000, my_producer_op1);
op.connect(1001, my_output_pin_of_producer_op1);
op.connect(1002, my_input_pin_of_consumer_op1);
op.connect(1003, my_consumer_op1);
my_chunks = op.getOutput<>(0);
CPython
import ansys.dpf.core as dpf
op = dpf.operators.utility.None() # operator instantiation
op.inputs.target_time_freq_values.connect(my_target_time_freq_values)
op.inputs.operator_to_iterate.connect(my_operator_to_iterate)
op.inputs.pin_index.connect(my_pin_index)
op.inputs.abstract_meshed_region.connect(my_abstract_meshed_region)
op.inputs.chunk_config.connect(my_chunk_config)
op.inputs.producer_op11.connect(my_producer_op11)
op.inputs.producer_op12.connect(my_producer_op12)
op.inputs.output_pin_of_producer_op11.connect(my_output_pin_of_producer_op11)
op.inputs.output_pin_of_producer_op12.connect(my_output_pin_of_producer_op12)
op.inputs.input_pin_of_consumer_op11.connect(my_input_pin_of_consumer_op11)
op.inputs.input_pin_of_consumer_op12.connect(my_input_pin_of_consumer_op12)
op.inputs.consumer_op11.connect(my_consumer_op11)
op.inputs.consumer_op12.connect(my_consumer_op12)
my_chunks = op.outputs.chunks()
IPython
import mech_dpf
import Ans.DataProcessing as dpf
op = dpf.operators.utility.None() # operator instantiation
op.inputs.target_time_freq_values.Connect(my_target_time_freq_values)
op.inputs.operator_to_iterate.Connect(my_operator_to_iterate)
op.inputs.pin_index.Connect(my_pin_index)
op.inputs.abstract_meshed_region.Connect(my_abstract_meshed_region)
op.inputs.chunk_config.Connect(my_chunk_config)
op.inputs.producer_op1.Connect(my_producer_op1)
op.inputs.output_pin_of_producer_op1.Connect(my_output_pin_of_producer_op1)
op.inputs.input_pin_of_consumer_op1.Connect(my_input_pin_of_consumer_op1)
op.inputs.consumer_op1.Connect(my_consumer_op1)
my_chunks = op.outputs.chunks.GetData()
Changelog
- Version 0.0.0: Initial release.