mapping:apply mechanical native mapping
Last update: 31.07.2026Version: 0.0.0
Description
Maps source data from source mesh to target mesh (computes interpolation).This operator needs to be used with the prepare mechanical native mapping associated one.
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 | source_mesh | Required | abstract_meshed_region |
| 1 | source_mesh_id | Required | int32 |
| 2 | target_mesh | Required | abstract_meshed_region |
| 3 | target_mesh_id | Required | int32 |
| 4 | mapping_manager_data | Required | |
| 5 | source_data | Required | fields_container |
| 6 | target_scoping | scoping |
|
| 9 | threads_user_requested | int32 |
source_mesh (Pin 0)
- Required: Yes
- Expected type(s):
abstract_meshed_region
Source mesh
source_mesh_id (Pin 1)
- Required: Yes
- Expected type(s):
int32
Source mesh id
target_mesh (Pin 2)
- Required: Yes
- Expected type(s):
abstract_meshed_region
Target mesh
target_mesh_id (Pin 3)
- Required: Yes
- Expected type(s):
int32
Target mesh id
mapping_manager_data (Pin 4)
- Required: Yes
- Expected type(s):
source_data (Pin 5)
- Required: Yes
- Expected type(s):
fields_container
Source data
target_scoping (Pin 6)
- Required: No
- Expected type(s):
scoping
Target scoping the result will be scoped on
threads_user_requested (Pin 9)
- Required: No
- Expected type(s):
int32
Number of threads to be used to parallelize apply operations. Default: 1 (run in series).
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 | mapped_data | fields_container |
| 1 | apply_output |
mapped_data (Pin 0)
- Expected type(s):
fields_container
Mapped data
apply_output (Pin 1)
- Expected type(s):
A Map containing the outputs of the interpolation as a key value pair
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: mapping
Plugin: N/A
Scripting name: apply_mechanical_native_mapping
Full name: mapping.apply_mechanical_native_mapping
Internal name: mechanical_native_mapping::apply
License: any_dpf_supported_increments
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_native_mapping::apply"); // operator instantiation
op.connect(0, my_source_mesh);
op.connect(1, my_source_mesh_id);
op.connect(2, my_target_mesh);
op.connect(3, my_target_mesh_id);
op.connect(4, my_mapping_manager_data);
op.connect(5, my_source_data);
op.connect(6, my_target_scoping);
op.connect(9, my_threads_user_requested);
ansys::dpf::FieldsContainer my_mapped_data = op.getOutput<ansys::dpf::FieldsContainer>(0);
my_apply_output = op.getOutput<>(1);
CPython
import ansys.dpf.core as dpf
op = dpf.operators.mapping.apply_mechanical_native_mapping() # operator instantiation
op.inputs.source_mesh.connect(my_source_mesh)
op.inputs.source_mesh_id.connect(my_source_mesh_id)
op.inputs.target_mesh.connect(my_target_mesh)
op.inputs.target_mesh_id.connect(my_target_mesh_id)
op.inputs.mapping_manager_data.connect(my_mapping_manager_data)
op.inputs.source_data.connect(my_source_data)
op.inputs.target_scoping.connect(my_target_scoping)
op.inputs.threads_user_requested.connect(my_threads_user_requested)
my_mapped_data = op.outputs.mapped_data()
my_apply_output = op.outputs.apply_output()
IPython
import mech_dpf
import Ans.DataProcessing as dpf
op = dpf.operators.mapping.apply_mechanical_native_mapping() # operator instantiation
op.inputs.source_mesh.Connect(my_source_mesh)
op.inputs.source_mesh_id.Connect(my_source_mesh_id)
op.inputs.target_mesh.Connect(my_target_mesh)
op.inputs.target_mesh_id.Connect(my_target_mesh_id)
op.inputs.mapping_manager_data.Connect(my_mapping_manager_data)
op.inputs.source_data.Connect(my_source_data)
op.inputs.target_scoping.Connect(my_target_scoping)
op.inputs.threads_user_requested.Connect(my_threads_user_requested)
my_mapped_data = op.outputs.mapped_data.GetData()
my_apply_output = op.outputs.apply_output.GetData()
Changelog
- Version 0.0.0: Initial release.