Hello, I think when you merge 2 meshes (ex 2 BDF meshes) the renumbering is ok for the nodes, but not for the elements. The PIDs are preserved but the numbers of the elements can be duplicate. Example:
bdf1 contains GRID 1 0 0.00E+000.0300000.010000 GRID 2 0 0.00E+000.0303000.010000 GRID 3 0 0.00E+000.0300000.010300 CTRIA3 31 1801 1 2 3
bdf2 contains GRID 1 0 -0.00458-0.039680.036400 GRID 2 0 -0.00544-0.039620.036400 GRID 3 0 -0.00458-0.039680.034400 CTRIA3 31 0 -0.00544-0.039620.032400
the merge operation will result in a renumbering of the GRID objects, but the CTRIA3 objects are not renumbered: there will be two "CTRIA3 31" lines in the final file (one with PID 0 and the other one with PID 1801). This is not the desired behavior, there should be one single "CTRIA3 31" (the second one should be renumbered, ex CTRIA3 32).
This problem is blocking for some applications where the complexity makes the use of 'sed' unpractical.
I hope this helps, S.
Indeed, currently we do not renumber nodes/elements when we merge meshes. Not sure if we should... maybe as an option?
Hi, thanks for your interest in the topic.
In case there is no renumbering, different elements can get the same ID. The resulting meshes are useless in all solvers that I know of (CFD, structure). The existing implementation (merge of meshes) is informatically functional, but it produces useless meshes; the feature is useless in practice.
With a renumbering, this feature (merge) would become useful.
I hope this clarifies the problem,
I see. We should indeed implement a fix for this.
The fact that "the renumbering is ok for the nodes" is actually only due to the fact that when we save a BDF mesh we renumber the nodes by default (but you do have duplicate node tags in the model). The best solution is probably to simply also optionally renumber the elements when saving the mesh.
Leaving this open until we have a consistent way to enable/disable renumbering when writing meshes.
See also #5.
... and now I understand what was unclear :) Glad I could clarify, let me know if I can further help.
(FYI my problem first arose when trying to merge 2 meshes from GMSH and I've solved it by adding a constant to the element numbers of the second mesh; but if the meshes are coming from external sw and are more than 2, for some reasons it becomes unpractical)