Hi team,
Is there an effective way how to get the element Ids if dpf mesh element indices are known? In the following code the skin mesh is created. One of the outputs provides the link between new skin element Ids with the corresponding 3D volume element indices. But how can I link these 3D volume element indices to the original mesh element Ids?
import Ans.DataProcessing as dpf
ns_name = 'Test'
analysis_index = 0
analysis = ExtAPI.DataModel.Project.Model.Analyses[analysis_index]
data_sources = dpf.DataSources(analysis.ResultFileName)
model_dpf = dpf.Model(data_sources)
mesh_dpf = model_dpf.Mesh
op_nscoping = dpf.operators.scoping.on_named_selection()
op_nscoping.inputs.data_sources.Connect(data_sources)
op_nscoping.inputs.named_selection_name.Connect(ns_name.ToUpper())
op_nscoping.inputs.requested_location.Connect('Nodal')
node_scoping = op_nscoping.outputs.getmesh_scoping()
op_skin = dpf.operators.mesh.skin()
op_skin.inputs.mesh.Connect(mesh_dpf)
op_skin.inputs.mesh_scoping.Connect(node_scoping)
skin_mesh = op_skin.outputs.getmesh()
skin_nodes = op_skin.outputs.getnodes_mesh_scoping()
facet_indices = op_skin.outputs.getfacet_indices()
skin_elem_ids_to_old_elem_indices = op_skin.outputs.getproperty_field_new_elements_to_old()
old_elem_indices = skin_elem_ids_to_old_elem_indices.Data
pass
Basically I am looking for the inverse dictionary to this one:
elem_id_to_index = {elem_id : mesh_dpf.ElementIds.IndexOf(elem_id) for elem_id in elem_ids}
Thank you for the support in advance.