Skip to main content

DPF Framework 2026 R1

utility:make for each range

Last update: 31.07.2026

Version: 0.0.0

Description

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)
-1 try_generate_iterable bool
0 iterable
1 operator_to_iterate Required operator
2 pin_index Required int32
3 valueA Required
4 valueB Required
5 valueC Required

try_generate_iterable (Pin -1)

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

if true, already iterable values connected in pin 3 like vectors, Scoping, TimefreqSupport, Containers and DataSources are split to iterate on it (default is true)

iterable (Pin 0)

  • Required: No
  • Expected type(s):

Iterable object, generated by make_for_each_range oeprator, that can be combined with the one currently generated.

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

valueA (Pin 3)

  • Required: Yes
  • Expected type(s):

valueB (Pin 4)

  • Required: Yes
  • Expected type(s):

valueC (Pin 5)

  • Required: Yes
  • Expected type(s):

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 output

output (Pin 0)

  • Expected type(s):

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

Full name: utility.make_for_each_range

Internal name: make_for_each_range

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("make_for_each_range"); // operator instantiation
op.connect(-1, my_try_generate_iterable);
op.connect(0, my_iterable);
op.connect(1, my_operator_to_iterate);
op.connect(2, my_pin_index);
op.connect(3, my_valueA);
op.connect(4, my_valueB);
op.connect(5, my_valueC);
 my_output = op.getOutput<>(0);
CPython
import ansys.dpf.core as dpf

op = dpf.operators.utility.make_for_each_range() # operator instantiation
op.inputs.try_generate_iterable.connect(my_try_generate_iterable)
op.inputs.iterable.connect(my_iterable)
op.inputs.operator_to_iterate.connect(my_operator_to_iterate)
op.inputs.pin_index.connect(my_pin_index)
op.inputs.valueA.connect(my_valueA)
op.inputs.valueB.connect(my_valueB)
op.inputs.valueC1.connect(my_valueC1)
op.inputs.valueC2.connect(my_valueC2)
my_output = op.outputs.output()
IPython
import mech_dpf
import Ans.DataProcessing as dpf

op = dpf.operators.utility.make_for_each_range() # operator instantiation
op.inputs.try_generate_iterable.Connect(my_try_generate_iterable)
op.inputs.iterable.Connect(my_iterable)
op.inputs.operator_to_iterate.Connect(my_operator_to_iterate)
op.inputs.pin_index.Connect(my_pin_index)
op.inputs.valueA.Connect(my_valueA)
op.inputs.valueB.Connect(my_valueB)
op.inputs.valueC.Connect(my_valueC)
my_output = op.outputs.output.GetData()

Changelog

  • Version 0.0.0: Initial release.

Connect with Ansys