averaging:elemental nodal to nodal (fields container)
Last update: 03.06.2026Version: 0.0.0
Description
Transforms Elemental Nodal fields into Nodal fields using an averaging process. The result is computed on a given node's scoping. If the input fields are mixed shell/solid, then the fields are split by element shape and the output fields container has an elshape label depending on the merge_solid_shell input.
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 | fields_container | Required | fields_container |
| 1 | mesh | abstract_meshed_region, meshes_container |
|
| 2 | should_average | bool |
|
| 3 | scoping | scoping, scopings_container |
|
| 4 | extend_to_mid_nodes | bool |
|
| 5 | extend_weights_to_mid_nodes | bool |
|
| 26 | merge_solid_shell | bool |
|
| 27 | shell_layer | int32 |
fields_container (Pin 0)
- Required: Yes
- Expected type(s):
fields_container
mesh (Pin 1)
- Required: No
- Expected type(s):
abstract_meshed_region,meshes_container
The mesh region in this pin is used to perform the averaging. It is used if there is no fields support.
should_average (Pin 2)
- Required: No
- Expected type(s):
bool
Each nodal value is divided by the number of elements linked to this node (default is true for discrete quantities).
scoping (Pin 3)
- Required: No
- Expected type(s):
scoping,scopings_container
Average only on these nodes. If it is a scoping container, the label must correspond to the one of the fields containers.
extend_to_mid_nodes (Pin 4)
- Required: No
- Expected type(s):
bool
Compute mid nodes (when available) by averaging the neighbour primary nodes.
extend_weights_to_mid_nodes (Pin 5)
- Required: No
- Expected type(s):
bool
Extends weights to mid nodes (when available). Default is false.
merge_solid_shell (Pin 26)
- Required: No
- Expected type(s):
bool
For shell/solid mixed fields, group in the same field all solids and shells (false by default). If this pin is true, a shell_layer needs to be specified.
shell_layer (Pin 27)
- Required: No
- Expected type(s):
int32
0: Top, 1: Bottom, 2: BottomTop, 3: Mid, 4: BottomTopMid. If merge_solid_shell is true, this pin needs to be specified to a value that extracts only one layer (Top, Bottom or Mid).
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 | fields_container | fields_container |
| 1 | weights | class dataProcessing::DpfTypeCollection<class dataprocessing::cpropertyfield> |
fields_container (Pin 0)
- Expected type(s):
fields_container
weights (Pin 1)
- Expected type(s):
class dataProcessing::DpfTypeCollection<class dataprocessing::cpropertyfield>
Gives for each node, the number of times it was found in the Elemental Nodal field. Can be used to average later.
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.
num_threads
- Expected type(s):
int32 - Default value: 0
Number of threads to use to run in parallel
run_in_parallel
- Expected type(s):
bool - Default value: true
Loops are allowed to run in parallel if the value of this config is set to true.
Scripting
This operator can be accessed through scripting interfaces using these identifiers.
Category: averaging
Plugin: core
Scripting name: elemental_nodal_to_nodal_fc
Full name: averaging.elemental_nodal_to_nodal_fc
Internal name: elemental_nodal_To_nodal_fc
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("elemental_nodal_To_nodal_fc"); // operator instantiation
op.connect(0, my_fields_container);
op.connect(1, my_mesh);
op.connect(2, my_should_average);
op.connect(3, my_scoping);
op.connect(4, my_extend_to_mid_nodes);
op.connect(5, my_extend_weights_to_mid_nodes);
op.connect(26, my_merge_solid_shell);
op.connect(27, my_shell_layer);
ansys::dpf::FieldsContainer my_fields_container = op.getOutput<ansys::dpf::fieldscontainer>(0);
ansys::dpf::Class Dataprocessing::Dpftypecollection<class dataprocessing::cpropertyfield> my_weights = op.getOutput<ansys::dpf::class dataprocessing::cpropertyfield>>(1);
</ansys::dpf::class></ansys::dpf::fieldscontainer>
CPython
import ansys.dpf.core as dpf
op = dpf.operators.averaging.elemental_nodal_to_nodal_fc() # operator instantiation
op.inputs.fields_container.connect(my_fields_container)
op.inputs.mesh.connect(my_mesh)
op.inputs.should_average.connect(my_should_average)
op.inputs.scoping.connect(my_scoping)
op.inputs.extend_to_mid_nodes.connect(my_extend_to_mid_nodes)
op.inputs.extend_weights_to_mid_nodes.connect(my_extend_weights_to_mid_nodes)
op.inputs.merge_solid_shell.connect(my_merge_solid_shell)
op.inputs.shell_layer.connect(my_shell_layer)
my_fields_container = op.outputs.fields_container()
my_weights = op.outputs.weights()
IPython
import mech_dpf
import Ans.DataProcessing as dpf
op = dpf.operators.averaging.elemental_nodal_to_nodal_fc() # operator instantiation
op.inputs.fields_container.Connect(my_fields_container)
op.inputs.mesh.Connect(my_mesh)
op.inputs.should_average.Connect(my_should_average)
op.inputs.scoping.Connect(my_scoping)
op.inputs.extend_to_mid_nodes.Connect(my_extend_to_mid_nodes)
op.inputs.extend_weights_to_mid_nodes.Connect(my_extend_weights_to_mid_nodes)
op.inputs.merge_solid_shell.Connect(my_merge_solid_shell)
op.inputs.shell_layer.Connect(my_shell_layer)
my_fields_container = op.outputs.fields_container.GetData()
my_weights = op.outputs.weights.GetData()
Changelog
- Version 0.0.0: Initial release.