Skip to content

Commit

Permalink
@pooyan-dadvand suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenzorrilla committed Nov 21, 2024
1 parent 491cad1 commit c97fc53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions kratos/sources/model_part_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void ModelPartIO::WriteGeometries(GeometryContainerType const& rThisGeometries)
(*mpStream) << "Begin Geometries\t" << geometry_name << std::endl;
const auto it_geom_begin = rThisGeometries.Geometries().begin();
(*mpStream) << "\t" << it_geom_begin->Id() << "\t";
auto& r_geometry = *(*(it_geom_begin.base()));
auto& r_geometry = *it_geom_begin;
for (std::size_t i_node = 0; i_node < r_geometry.size(); i_node++)
(*mpStream) << r_geometry[i_node].Id() << "\t";
(*mpStream) << std::endl;
Expand All @@ -302,7 +302,7 @@ void ModelPartIO::WriteGeometries(GeometryContainerType const& rThisGeometries)
for(std::size_t i = 1; i < rThisGeometries.NumberOfGeometries(); i++) {
if(GeometryType::IsSame(*it_geom_previous, *it_geom_current)) {
(*mpStream) << "\t" << it_geom_current->Id() << "\t";
r_geometry = *(*(it_geom_current.base()));
r_geometry = *it_geom_current;
for (std::size_t i_node = 0; i_node < r_geometry.size(); i_node++)
(*mpStream) << r_geometry[i_node].Id() << "\t";
(*mpStream) << std::endl;
Expand All @@ -313,7 +313,7 @@ void ModelPartIO::WriteGeometries(GeometryContainerType const& rThisGeometries)

(*mpStream) << "Begin Geometries\t" << geometry_name << std::endl;
(*mpStream) << "\t" << it_geom_current->Id() << "\t";
r_geometry = *(*(it_geom_current.base()));
r_geometry = *it_geom_current;
for (std::size_t i_node = 0; i_node < r_geometry.size(); i_node++)
(*mpStream) << r_geometry[i_node].Id() << "\t";
(*mpStream) << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion kratos/utilities/auxiliar_model_part_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ void AuxiliarModelPartUtilities::RemoveOrphanNodesFromSubModelParts()
}
const auto& r_geometries = r_sub_model_part.Geometries();
for (auto it_geom = r_geometries.begin(); it_geom != r_geometries.end(); ++it_geom) {
auto& r_geometry = *(*(it_geom.base()));
auto& r_geometry = *it_geom;
for (auto& r_node : r_geometry) {
r_node.Set(TO_ERASE, false);
}
Expand Down

0 comments on commit c97fc53

Please sign in to comment.