Repository navigation
fix(MSHInput): load partitioned entities as their parent entities - #231
Conversation
Partitioned MSH 4 files list the partition pieces in a $PartitionedEntities section. It was skipped, so each partition was loaded as a separate component and the $Entities components were removed as empty. Elements of a partitioned entity are now added to its parent entity, and elements of partition interfaces are ignored. Fixes #164 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cpp-Linter Report
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #164
Problem
The error reported in #164 (
Non continuous element indexing is not supported for now) was already removed by 5b040a7. The partitioned file of the issue still loaded wrong, but silently. Gmsh partitioned MSH 4 files list the partition pieces in a$PartitionedEntitiessection, and$Nodes/$Elementsrefer to these pieces, not to the$Entities. The section was skipped, so each partition piece became a component, and the$Entitiescomponents were removed as empty. The issue file (a box cut into 75 partitions) gave 75 Blocks, 497 Surfaces, 818 Lines and 404 Corners, with 27 "has no element" warnings.Changes
$PartitionedEntitiesis read. A partitioned entity whose parent has the same dimension is mapped to that parent: its elements are added to the parent component.$GhostElementssection, which was already skipped.The issue file now loads as the box: 1 Block, 6 Surfaces, 12 Lines, 8 Corners, all 36596 tetrahedra and 7332 nodes, no warning.
Tests
test_partitioned_entitiesloadscube_partitioned_v40.mshandcube_partitioned_v41.msh(Gmsh 4.12.1,cube_v41.mshcut into 3 partitions, with partition topology; the v4.1 file also has ghost cells). Each must be the cube oftest_brep_cubewith the same unique vertices, polygons and polyhedra ascube_v41.msh.Note: #230 changes
load_brepto return a vector. Whichever of the two PRs is merged second needsload_oneintest_partitioned_entities.🤖 Generated with Claude Code