Skip to content

fix(MSHInput): load partitioned entities as their parent entities - #231

Merged
BenPinet merged 4 commits into
nextfrom
fix/msh-partitioned-entities
Nov 10, 2026
Merged

BenPinet merged 4 commits into
nextfrom
fix/msh-partitioned-entities

Conversation

@panquez

@panquez panquez commented Nov 9, 2026

Copy link
Copy Markdown
Member

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 $PartitionedEntities section, and $Nodes/$Elements refer to these pieces, not to the $Entities. The section was skipped, so each partition piece became a component, and the $Entities components 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

  • $PartitionedEntities is read. A partitioned entity whose parent has the same dimension is mapped to that parent: its elements are added to the parent component.
  • Partition interface entities (parent of higher dimension, for instance a surface between two partitions inside a volume) and ghost entities are not model components: their elements are skipped. Ghost cells are written in a separate $GhostElements section, which was already skipped.
  • MSH 2.2 partitioned files already loaded correctly: Gmsh writes the parent entity tag in the elements.

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_entities loads cube_partitioned_v40.msh and cube_partitioned_v41.msh (Gmsh 4.12.1, cube_v41.msh cut into 3 partitions, with partition topology; the v4.1 file also has ghost cells). Each must be the cube of test_brep_cube with the same unique vertices, polygons and polyhedra as cube_v41.msh.

Note: #230 changes load_brep to return a vector. Whichever of the two PRs is merged second needs load_one in test_partitioned_entities.

🤖 Generated with Claude Code

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>
@panquez
panquez requested a review from BotellaA November 9, 2026 16:02
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 46 concern(s)
  • src/geode/io/model/msh_input.cpp:79:12: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: dimension, nb_vertices

       79 |     struct GmshElementType
          |            ^
       80 |     {
       81 |         geode::local_index_t dimension;
          |                                       
          |                                       {}
       82 |         geode::local_index_t nb_vertices;
          |                                         
          |                                         {}
  • src/geode/io/model/msh_input.cpp:173:33: warning: [readability-identifier-length]

    variable name 'n' is too short, expected at least 3 characters

      173 |                 for( const auto n : geode::Range{ nb_contiguous_ } )
          |                                 ^
  • src/geode/io/model/msh_input.cpp:185:9: warning: [modernize-use-nodiscard]

    function 'node' should be marked [[nodiscard]]

      185 |         std::optional< geode::index_t > node( geode::index_t tag ) const
          |         ^
          |         [[nodiscard]] 
  • src/geode/io/model/msh_input.cpp:197:24: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      197 |             const auto it = tag2node_.find( tag );
          |                        ^
  • src/geode/io/model/msh_input.cpp:235:14: warning: [readability-function-cognitive-complexity]

    function 'read_file' has cognitive complexity of 18 (threshold 10)

      235 |         void read_file()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:241:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      241 |             while( next_line( line ) )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:244:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      244 |                 if( line == "$Entities" && version() == 4 )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:244:41: note: +1
      244 |                 if( line == "$Entities" && version() == 4 )
          |                                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:249:22: note: +1, nesting level increased to 2
      249 |                 else if( line == "$PartitionedEntities" && version() == 4 )
          |                      ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:249:57: note: +1
      249 |                 else if( line == "$PartitionedEntities" && version() == 4 )
          |                                                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:253:22: note: +1, nesting level increased to 2
      253 |                 else if( line == "$Nodes" )
          |                      ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:255:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      255 |                     if( version() == 2 )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:259:21: note: +1, nesting level increased to 3
      259 |                     else
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:265:22: note: +1, nesting level increased to 2
      265 |                 else if( line == "$Elements" )
          |                      ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:267:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      267 |                     if( version() == 2 )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:271:21: note: +1, nesting level increased to 3
      271 |                     else
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:277:22: note: +1, nesting level increased to 2
      277 |                 else if( geode::string_starts_with( line, "$" ) )
          |                      ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:286:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      286 |             if( nb_degenerate_elements_ != 0 )
          |             ^
  • src/geode/io/model/msh_input.cpp:419:19: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      419 |             auto [it, inserted] =
          |                   ^
  • src/geode/io/model/msh_input.cpp:495:29: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      495 |             for( const auto b : geode::Range{ nb_boundaries } )
          |                             ^
  • src/geode/io/model/msh_input.cpp:500:28: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      500 |                 const auto it =
          |                            ^
  • src/geode/io/model/msh_input.cpp:731:33: warning: [readability-identifier-length]

    variable name 'n' is too short, expected at least 3 characters

      731 |                 for( const auto n : geode::Range{ nb_nodes } )
          |                                 ^
  • src/geode/io/model/msh_input.cpp:744:29: warning: [readability-identifier-length]

    variable name 'n' is too short, expected at least 3 characters

      744 |             for( const auto n : geode::Range{ nb_nodes } )
          |                             ^
  • src/geode/io/model/msh_input.cpp:792:51: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      792 |                 if( absl::c_linear_search( nodes, node_id.value() ) )
          |                                                   ^~~~~~~
  • src/geode/io/model/msh_input.cpp:797:34: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      797 |                 nodes.push_back( node_id.value() );
          |                                  ^~~~~~~
  • src/geode/io/model/msh_input.cpp:882:40: warning: [bugprone-implicit-widening-of-multiplication-result]

    performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'index_t' (aka 'unsigned int')

      882 |                                      + nb_elements * element_type.nb_vertices );
          |                                        ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:882:40: note: make conversion explicit to silence this warning
       24 |                                      + nb_elements * element_type.nb_vertices );
          |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                        static_cast<size_type>(               )
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:882:40: note: perform multiplication in a wider type
      882 |                                      + nb_elements * element_type.nb_vertices );
          |                                        ^~~~~~~~~~~
          |                                        static_cast<size_type>( )
  • src/geode/io/model/msh_input.cpp:882:40: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      882 |                                      + nb_elements * element_type.nb_vertices );
          |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                        (                                     )
  • src/geode/io/model/msh_input.cpp:911:29: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      911 |                 const auto [it, inserted] =
          |                             ^
  • src/geode/io/model/msh_input.cpp:941:14: warning: [readability-function-cognitive-complexity]

    function 'complete_corners' has cognitive complexity of 16 (threshold 10)

      941 |         void complete_corners()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:944:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      944 |             for( const auto& [tag, elements] : components_[1] )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:948:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      948 |             for( auto& [tag, corner] : components_[0] )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:950:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      950 |                 if( !corner.nodes.empty() || !corner.position )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:950:43: note: +1
      950 |                 if( !corner.nodes.empty() || !corner.position )
          |                                           ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:956:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      956 |                 for( const auto& line :
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:959:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      959 |                     for( const auto node : lines.at( line.id() )->nodes )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:963:25: note: +4, including nesting penalty of 3, nesting level increased to 4
      963 |                         if( distance < min_distance )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:970:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      970 |                 if( closest_node )
          |                 ^
  • src/geode/io/model/msh_input.cpp:1099:32: warning: [readability-identifier-length]

    parameter name 'to' is too short, expected at least 3 characters

     1099 |             const geode::uuid& to ) const
          |                                ^
  • src/geode/io/model/msh_input.cpp:1141:14: warning: [readability-function-cognitive-complexity]

    function 'infer_corner_relations' has cognitive complexity of 21 (threshold 10)

     1141 |         void infer_corner_relations()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1143:13: note: +1, including nesting penalty of 0, nesting level increased to 1
     1143 |             for( const auto& corner : brep_.corners() )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1147:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1147 |                 for( const auto& line_id : lines )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1150:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1150 |                     if( brep_.is_boundary( corner, line )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1151:25: note: +1
     1151 |                         || brep_.is_internal( corner, line ) )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1158:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1158 |                     if( mesh.edges_around_vertex( vertex.value() ).size() == 2
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1159:25: note: +1
     1159 |                         && !is_closed( mesh ) )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1164:21: note: +1, nesting level increased to 3
     1164 |                     else
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1171:13: note: +1, including nesting penalty of 0, nesting level increased to 1
     1171 |             for( const auto& corner : brep_.corners() )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1173:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1173 |                 if( is_corner_related( corner ) )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1177:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1177 |                 for( const auto& surface_id :
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1184:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1184 |                 if( is_corner_related( corner ) )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1188:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1188 |                 for( const auto& block_id :
          |                 ^
  • src/geode/io/model/msh_input.cpp:1158:51: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

     1158 |                     if( mesh.edges_around_vertex( vertex.value() ).size() == 2
          |                                                   ^~~~~~
  • src/geode/io/model/msh_input.cpp:1222:13: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'edge_vertices'

     1222 |             std::array< geode::index_t, 2 > edge_vertices;
          |             ^                                            
          |                                                          {}
  • src/geode/io/model/msh_input.cpp:1225:36: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

     1225 |                 edge_vertices[v] = component_vertex( line.component_id(),
          |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1226 |                     line_mesh.edge_vertex( { 0, v } ), surface.id() )
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/io/model/msh_input.cpp:1245:14: warning: [readability-function-cognitive-complexity]

    function 'infer_line_relations' has cognitive complexity of 24 (threshold 10)

     1245 |         void infer_line_relations()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1247:13: note: +1, including nesting penalty of 0, nesting level increased to 1
     1247 |             for( const auto& line : brep_.lines() )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1249:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1249 |                 if( line.mesh().nb_edges() == 0 )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1254:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1254 |                 for( const auto& surface_id :
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1259:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1259 |                     if( brep_.is_boundary( line, surface )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1260:25: note: +1
     1260 |                         || brep_.is_internal( line, surface ) )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1266:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1266 |                     if( !nb_polygons )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1270:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1270 |                     if( nb_polygons.value() == 2 )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1275:21: note: +1, nesting level increased to 3
     1275 |                     else
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1281:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1281 |                 if( brep_.nb_incidences( line.id() ) != 0
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1282:21: note: +1
     1282 |                     || brep_.nb_embeddings( line.id() ) != 0 )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1286:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1286 |                 for( const auto& block_id :
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1290:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1290 |                     if( contains_all_vertices( line, block_id ) )
          |                     ^
  • src/geode/io/model/msh_input.cpp:1330:21: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

     1330 |                     component_vertex( surface.component_id(),
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1331 |                         surface_mesh.polygon_vertex( { 0, v } ), block.id() )
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/io/model/msh_input.cpp:1350:14: warning: [readability-function-cognitive-complexity]

    function 'infer_surface_relations' has cognitive complexity of 16 (threshold 10)

     1350 |         void infer_surface_relations()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1352:13: note: +1, including nesting penalty of 0, nesting level increased to 1
     1352 |             for( const auto& surface : brep_.surfaces() )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1354:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1354 |                 if( surface.mesh().nb_polygons() == 0 )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1360:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1360 |                 for( const auto& block_id :
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1365:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1365 |                     if( brep_.is_boundary( surface, block )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1366:25: note: +1
     1366 |                         || brep_.is_internal( surface, block ) )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1372:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1372 |                     if( !nb_polyhedra )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1376:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1376 |                     if( nb_polyhedra.value() == 2 )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1381:21: note: +1, nesting level increased to 3
     1381 |                     else
          |                     ^
  • src/geode/io/model/msh_input.cpp:1390:14: warning: [readability-function-cognitive-complexity]

    function 'unset_internal_line_adjacencies' has cognitive complexity of 19 (threshold 10)

     1390 |         void unset_internal_line_adjacencies()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1392:13: note: +1, including nesting penalty of 0, nesting level increased to 1
     1392 |             for( const auto& surface : brep_.surfaces() )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1395:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1395 |                 for( const auto& line : brep_.internal_lines( surface ) )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1398:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1398 |                     for( const auto e : geode::Range{ line_mesh.nb_edges() } )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1404:25: note: +4, including nesting penalty of 3, nesting level increased to 4
     1404 |                         if( !v0 || !v1 )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1404:33: note: +1
     1404 |                         if( !v0 || !v1 )
          |                                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1408:25: note: +4, including nesting penalty of 3, nesting level increased to 4
     1408 |                         for( const auto& edge :
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1416:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1416 |                 if( polygon_edges.empty() )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1421:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1421 |                 for( const auto& edge : polygon_edges )
          |                 ^
  • src/geode/io/model/msh_input.cpp:1400:36: warning: [readability-identifier-length]

    variable name 'v0' is too short, expected at least 3 characters

     1400 |                         const auto v0 = component_vertex( line.component_id(),
          |                                    ^
  • src/geode/io/model/msh_input.cpp:1402:36: warning: [readability-identifier-length]

    variable name 'v1' is too short, expected at least 3 characters

     1402 |                         const auto v1 = component_vertex( line.component_id(),
          |                                    ^
  • src/geode/io/model/msh_input.cpp:1428:14: warning: [readability-function-cognitive-complexity]

    function 'unset_internal_surface_adjacencies' has cognitive complexity of 27 (threshold 10)

     1428 |         void unset_internal_surface_adjacencies()
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1430:13: note: +1, including nesting penalty of 0, nesting level increased to 1
     1430 |             for( const auto& block : brep_.blocks() )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1433:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1433 |                 for( const auto& surface : brep_.internal_surfaces( block ) )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1436:21: note: +3, including nesting penalty of 2, nesting level increased to 3
     1436 |                     for( const auto p :
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1440:25: note: +4, including nesting penalty of 3, nesting level increased to 4
     1440 |                         for( const auto v : geode::LRange{
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1447:29: note: +5, including nesting penalty of 4, nesting level increased to 5
     1447 |                             if( !vertex )
          |                             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1453:25: note: +4, including nesting penalty of 3, nesting level increased to 4
     1453 |                         if( facet_vertices.size()
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1458:25: note: +4, including nesting penalty of 3, nesting level increased to 4
     1458 |                         for( const auto& facet :
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1466:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1466 |                 if( polyhedron_facets.empty() )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/model/msh_input.cpp:1471:17: note: +2, including nesting penalty of 1, nesting level increased to 2
     1471 |                 for( const auto& facet : polyhedron_facets )
          |                 ^
  • src/geode/io/model/msh_input.cpp:1499:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

     1499 | namespace geode
          | ^~~~~~~~~~~~~~~
     1500 | {
          | ~
     1501 |     namespace internal
          |     ~~~~~~~~~~~~~~~~~~
          |     namespace geode::internal
  • tests/model/test-msh.cpp:166:67: warning: [performance-unnecessary-value-param]

    the parameter 'components' is copied for each invocation but only used as a const reference; consider making it a const reference

      166 |     void check_component_vertices( const geode::BRep& brep, Range components )
          |                                                                   ^
          |                                                             const  &
  • tests/model/test-msh.cpp:211:26: warning: [readability-identifier-length]

    variable name 'c' is too short, expected at least 3 characters

      211 |         for( const auto& c : brep.corners() )
          |                          ^
  • tests/model/test-msh.cpp:220:26: warning: [readability-identifier-length]

    variable name 'l' is too short, expected at least 3 characters

      220 |         for( const auto& l : brep.lines() )
          |                          ^
  • tests/model/test-msh.cpp:229:26: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

      229 |         for( const auto& s : brep.surfaces() )
          |                          ^
  • tests/model/test-msh.cpp:238:26: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      238 |         for( const auto& b : brep.blocks() )
          |                          ^
  • tests/model/test-msh.cpp:241:49: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      241 |                 brep.nb_boundaries( b.id() ) == 6,
          |                                                 ^
  • tests/model/test-msh.cpp:257:26: warning: [readability-identifier-length]

    variable name 'c' is too short, expected at least 3 characters

      257 |         for( const auto& c : brep.corners() )
          |                          ^
  • tests/model/test-msh.cpp:264:56: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      264 |                     || brep.nb_incidences( c.id() ) == 5,
          |                                                        ^
  • tests/model/test-msh.cpp:267:26: warning: [readability-identifier-length]

    variable name 'l' is too short, expected at least 3 characters

      267 |         for( const auto& l : brep.lines() )
          |                          ^
  • tests/model/test-msh.cpp:274:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      274 |                     && brep.nb_incidences( l.id() ) < 5,
          |                                                       ^
  • tests/model/test-msh.cpp:277:26: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

      277 |         for( const auto& s : brep.surfaces() )
          |                          ^
  • tests/model/test-msh.cpp:287:26: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      287 |         for( const auto& b : brep.blocks() )
          |                          ^
  • tests/model/test-msh.cpp:306:26: warning: [readability-identifier-length]

    variable name 'c' is too short, expected at least 3 characters

      306 |         for( const auto& c : brep.corners() )
          |                          ^
  • tests/model/test-msh.cpp:316:26: warning: [readability-identifier-length]

    variable name 'l' is too short, expected at least 3 characters

      316 |         for( const auto& l : brep.lines() )
          |                          ^
  • tests/model/test-msh.cpp:328:26: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

      328 |         for( const auto& s : brep.surfaces() )
          |                          ^
  • tests/model/test-msh.cpp:342:22: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'write_file' of similar type ('std::string_view') are easily swapped by mistake

      342 |     void write_file( std::string_view filename, std::string_view content )
          |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:342:39: note: the first parameter in the range is 'filename'
      342 |     void write_file( std::string_view filename, std::string_view content )
          |                                       ^~~~~~~~
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:342:66: note: the last parameter in the range is 'content'
      342 |     void write_file( std::string_view filename, std::string_view content )
          |                                                                  ^~~~~~~
  • tests/model/test-msh.cpp:748:10: warning: [readability-function-cognitive-complexity]

    function 'test_brep_embedded' has cognitive complexity of 16 (threshold 10)

      748 |     void test_brep_embedded( const geode::BRep& brep )
          |          ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:754:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      754 |         for( const auto& surface : brep.surfaces() )
          |         ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:756:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      756 |             if( brep.nb_internal_lines( surface ) != 1 )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:762:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      762 |             for( const auto& line : brep.boundaries( surface ) )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:766:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      766 |             for( const auto& line : brep.internal_lines( surface ) )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:778:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      778 |         for( const auto& corner : brep.corners() )
          |         ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:782:21: note: +1
      782 |                     || ( brep.nb_incidences( corner.id() ) == 1
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:783:26: note: +1
      783 |                          && brep.nb_embeddings( corner.id() ) == 0 ),
          |                          ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:786:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      786 |         for( const auto& line : brep.lines() )
          |         ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:792:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      792 |         for( const auto& block : brep.blocks() )
          |         ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:801:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      801 |             for( const auto& surface : brep.boundaries( block ) )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/tests/model/test-msh.cpp:805:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      805 |             for( const auto& surface : brep.internal_surfaces( block ) )
          |             ^

✨ Powered by cpp-linter -- ⭐ Star • ❤️ Sponsor • 💬 Feedback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BenPinet
BenPinet merged commit 0ada46a into next Nov 10, 2026
24 checks passed
@BenPinet
BenPinet deleted the fix/msh-partitioned-entities branch November 10, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants