Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/geode/io/model/gid_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
auto attribute = surface.mesh()
.polygon_attribute_manager()
.find_read_only_attribute< geode::index_t >(
attribute_ids.value().at( 0 ) );

Check warning on line 64 in src/geode/io/model/gid_output.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/gid_output.cpp:64:34 [bugprone-unchecked-optional-access]

unchecked access to optional value
return attribute->value( 0 );
}

Expand All @@ -78,7 +78,7 @@
auto attribute = block.mesh()
.polyhedron_attribute_manager()
.find_read_only_attribute< geode::index_t >(
attribute_ids.value().at( 0 ) );

Check warning on line 81 in src/geode/io/model/gid_output.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/gid_output.cpp:81:34 [bugprone-unchecked-optional-access]

unchecked access to optional value
return attribute->value( 0 );
}

Expand Down Expand Up @@ -121,11 +121,11 @@
for( const auto& cmv :
brep_.component_mesh_vertices( uv_index ) )
{
if( cmv.component_id.type()
if( cmv.component_id.type
== geode::Block3D::component_type_static() )
{
file_ << uv_index + NODE_OFFSET << geode::SPACE;
file_ << brep_.block( cmv.component_id.id() )
file_ << brep_.block( cmv.component_id.id )
.mesh()
.point( cmv.vertex )
.string()
Expand Down Expand Up @@ -179,12 +179,12 @@
bool is_vertex_in_block = false;
for( const auto& cmv : brep_.component_mesh_vertices( uv_index ) )
{
if( cmv.component_id.type()
if( cmv.component_id.type
== geode::Surface3D::component_type_static() )
{
is_vertex_on_surface = true;
}
else if( cmv.component_id.type()
else if( cmv.component_id.type
== geode::Block3D::component_type_static() )
{
is_vertex_in_block = true;
Expand All @@ -208,7 +208,7 @@
brep_.component_mesh_vertices( uv_index ) )
{
file_ << uv_index + NODE_OFFSET << geode::SPACE;
file_ << brep_.surface( cmv.component_id.id() )
file_ << brep_.surface( cmv.component_id.id )
.mesh()
.point( cmv.vertex )
.string()
Expand Down
22 changes: 11 additions & 11 deletions src/geode/io/model/msh_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
using boundary_incidences_relations = absl::flat_hash_map< geode::uuid,
absl::flat_hash_set< geode::uuid > >;

void build_topology()

Check warning on line 118 in src/geode/io/model/msh_input.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/msh_input.cpp:118:14 [readability-function-cognitive-complexity]

function 'build_topology' has cognitive complexity of 13 (threshold 10)
{
if( version() == 4
&& ( absl::c_find( sections_, "$Entities" )
Expand All @@ -126,7 +126,7 @@
boundary_incidences_relations corner_line_relations;
boundary_incidences_relations line_surface_relations;
boundary_incidences_relations surface_block_relations;
for( const auto uv : geode::Range{ brep_.nb_unique_vertices() } )

Check warning on line 129 in src/geode/io/model/msh_input.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/msh_input.cpp:129:29 [readability-identifier-length]

variable name 'uv' is too short, expected at least 3 characters
{
const auto cmv = get_component_mesh_vertices( uv );
add_potential_relationships( std::get< 0 >( cmv ),
Expand All @@ -136,7 +136,7 @@
add_potential_relationships( std::get< 2 >( cmv ),
std::get< 3 >( cmv ), surface_block_relations );
}
for( const auto uv : geode::Range{ brep_.nb_unique_vertices() } )

Check warning on line 139 in src/geode/io/model/msh_input.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/msh_input.cpp:139:29 [readability-identifier-length]

variable name 'uv' is too short, expected at least 3 characters
{
const auto cmv = get_component_mesh_vertices( uv );
filter_potential_relationships( std::get< 0 >( cmv ),
Expand Down Expand Up @@ -296,7 +296,7 @@
// TODO physical tags
const auto nb_physical_tags =
geode::string_to_index( tokens.at( 7 ) );
for( const auto b : geode::Range{ geode::string_to_index(

Check warning on line 299 in src/geode/io/model/msh_input.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/msh_input.cpp:299:33 [readability-identifier-length]

variable name 'b' is too short, expected at least 3 characters
tokens.at( 8 + nb_physical_tags ) ) } )
{
const auto boundary_msh_id =
Expand All @@ -312,7 +312,7 @@
}
}

void create_surfaces( const geode::index_t nb_surfaces )

Check warning on line 315 in src/geode/io/model/msh_input.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/msh_input.cpp:315:14 [readability-function-cognitive-complexity]

function 'create_surfaces' has cognitive complexity of 12 (threshold 10)
{
for( const auto unused : geode::Range{ nb_surfaces } )
{
Expand All @@ -331,12 +331,12 @@
boundary_counter;
const auto nb_physical_tags =
geode::string_to_index( tokens.at( 7 ) );
for( const auto b : geode::Range{ geode::string_to_index(

Check warning on line 334 in src/geode/io/model/msh_input.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/msh_input.cpp:334:33 [readability-identifier-length]

variable name 'b' is too short, expected at least 3 characters
tokens.at( 8 + nb_physical_tags ) ) } )
{
const auto boundary_msh_id = geode::string_to_double(
tokens.at( 9 + nb_physical_tags + b ) );
auto it = boundary_counter.emplace(

Check warning on line 339 in src/geode/io/model/msh_input.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/msh_input.cpp:339:26 [readability-identifier-length]

variable name 'it' is too short, expected at least 3 characters
static_cast< geode::index_t >(
std::abs( boundary_msh_id ) ),
1 );
Expand Down Expand Up @@ -389,7 +389,7 @@
// TODO physical tags
const auto nb_physical_tags =
geode::string_to_index( tokens.at( 7 ) );
for( const auto b : geode::Range{ geode::string_to_index(

Check warning on line 392 in src/geode/io/model/msh_input.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/msh_input.cpp:392:33 [readability-identifier-length]

variable name 'b' is too short, expected at least 3 characters
tokens.at( 8 + nb_physical_tags ) ) } )
{
const auto boundary_msh_id = std::abs( geode::string_to_int(
Expand Down Expand Up @@ -653,13 +653,13 @@
{ line.component_id(), e1 } ) );
for( const auto& cmv0 : cmvs0 )
{
if( cmv0.component_id.id() != surface.id() )
if( cmv0.component_id.id != surface.id() )
{
continue;
}
for( const auto& cmv1 : cmvs1 )
{
if( cmv1.component_id.id() != surface.id() )
if( cmv1.component_id.id != surface.id() )
{
continue;
}
Expand Down Expand Up @@ -810,8 +810,8 @@
{
for( const auto& incidence_vertex : incidence_type_vertices )
{
b2i_relations[boundary_vertex.component_id.id()].emplace(
incidence_vertex.component_id.id() );
b2i_relations[boundary_vertex.component_id.id].emplace(
incidence_vertex.component_id.id );
}
}
}
Expand All @@ -825,13 +825,13 @@
{
for( const auto& boundary_vertex : boundary_type_vertices )
{
if( b2i_relations.find( boundary_vertex.component_id.id() )
if( b2i_relations.find( boundary_vertex.component_id.id )
== b2i_relations.end() )
{
continue;
}
auto& incidences_in_relations =
b2i_relations.at( boundary_vertex.component_id.id() );
b2i_relations.at( boundary_vertex.component_id.id );

auto it = incidences_in_relations.cbegin();
while( it != incidences_in_relations.cend() )
Expand All @@ -842,7 +842,7 @@
incidence_type_vertices.end(),
[&incidence_id](
const geode::ComponentMeshVertex& cmv ) {
return cmv.component_id.id() == incidence_id;
return cmv.component_id.id == incidence_id;
} )
== incidence_type_vertices.end() )
{
Expand All @@ -864,25 +864,25 @@
std::vector< geode::ComponentMeshVertex > blocks_vertices;
for( const auto& cmv : brep_.component_mesh_vertices( uv ) )
{
if( cmv.component_id.type()
if( cmv.component_id.type
== geode::Corner3D::component_type_static() )
{
corners_vertices.push_back( cmv );
continue;
}
if( cmv.component_id.type()
if( cmv.component_id.type
== geode::Line3D::component_type_static() )
{
lines_vertices.push_back( cmv );
continue;
}
if( cmv.component_id.type()
if( cmv.component_id.type
== geode::Surface3D::component_type_static() )
{
surfaces_vertices.push_back( cmv );
continue;
}
if( cmv.component_id.type()
if( cmv.component_id.type
== geode::Block3D::component_type_static() )
{
blocks_vertices.push_back( cmv );
Expand Down
4 changes: 2 additions & 2 deletions src/geode/io/model/svg_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ namespace
colocated_info.colocated_mapping[cmv];
const auto& corner =
section_.corner( corner_ids[mapped_corner] );
const auto& line = section_.line(
potential_corner_cmv_[cmv].component_id.id() );
const auto& line =
section_.line( potential_corner_cmv_[cmv].component_id.id );
if( !boundary_relation_exist( corner, line ) )
{
builder_.add_corner_line_boundary_relationship(
Expand Down
Loading