diff --git a/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp b/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp index 9af0f991e76f96f24f9b6719070d5b99aa66fbd5..71f2575145ce3e14ddf8e2b3ece0d8c9a0cd4af0 100644 --- a/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp +++ b/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp @@ -44,7 +44,8 @@ BoundaryElementsAtPoint::BoundaryElementsAtPoint( const_cast<std::vector<MeshLib::Node*>&>(mesh.getNodes()); std::size_t const nearest_node_id = *std::min_element(node_ids.begin(), node_ids.end(), - [&mesh_nodes, &point](auto id0, auto id1) { + [&mesh_nodes, &point](auto id0, auto id1) + { return MathLib::sqrDist(*mesh_nodes[id0], point) < MathLib::sqrDist(*mesh_nodes[id1], point); }); diff --git a/MeshGeoToolsLib/BoundaryElementsSearcher.cpp b/MeshGeoToolsLib/BoundaryElementsSearcher.cpp index d54c54057ac922d15721ac3485c443995f04d051..64e4e968d85bdd087d7e912a74f810621e1a662d 100644 --- a/MeshGeoToolsLib/BoundaryElementsSearcher.cpp +++ b/MeshGeoToolsLib/BoundaryElementsSearcher.cpp @@ -54,9 +54,8 @@ std::vector<MeshLib::Element*> const& getBoundaryElements( [[maybe_unused]] bool const multiple_nodes_allowed) { if (auto const it = find_if(cbegin(cached_elements), cend(cached_elements), - [&](auto const& element) { - return getCachedItem(*element) == item; - }); + [&](auto const& element) + { return getCachedItem(*element) == item; }); it != cend(cached_elements)) { return (*it)->getBoundaryElements(); diff --git a/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp b/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp index 9035a7ff84f3ad9b08a0f25ce079bc4c6018a3e4..2cd477582bd47db1159e1918b4b5f37f7ca488ee 100644 --- a/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp +++ b/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp @@ -10,8 +10,8 @@ #include "ConstructMeshesFromGeometries.h" #include "BaseLib/Logging.h" -#include "GeoLib/GEOObjects.h" #include "BoundaryElementsSearcher.h" +#include "GeoLib/GEOObjects.h" #include "MeshLib/Elements/Element.h" #include "MeshLib/MeshEditing/DuplicateMeshComponents.h" #include "MeshLib/Node.h" @@ -120,9 +120,8 @@ constructAdditionalMeshesFromGeoObjects(GeoLib::GEOObjects const& geo_objects, // Set axial symmetry for the additional meshes to the same value as the // "bulk" mesh. std::for_each(begin(additional_meshes), end(additional_meshes), - [axial_symmetry = mesh.isAxiallySymmetric()](auto& m) { - m->setAxiallySymmetric(axial_symmetry); - }); + [axial_symmetry = mesh.isAxiallySymmetric()](auto& m) + { m->setAxiallySymmetric(axial_symmetry); }); return additional_meshes; } } // namespace MeshGeoToolsLib diff --git a/MeshGeoToolsLib/GeoMapper.cpp b/MeshGeoToolsLib/GeoMapper.cpp index 4ebe82656f077b7ea997b5b0dbc24795af8fbd74..55d63f5945bd13cfa8f0c049393adb099a41490d 100644 --- a/MeshGeoToolsLib/GeoMapper.cpp +++ b/MeshGeoToolsLib/GeoMapper.cpp @@ -418,7 +418,8 @@ static std::vector<GeoLib::LineSegment> mapLineSegment( auto min_dist_segment = std::min_element( sub_segments.begin(), sub_segments.end(), [&beg_pnt](GeoLib::LineSegment const& seg0, - GeoLib::LineSegment const& seg1) { + GeoLib::LineSegment const& seg1) + { // min dist for segment 0 const double d0( std::min(MathLib::sqrDist(beg_pnt, seg0.getBeginPoint()), @@ -559,7 +560,8 @@ static void mapPolylineOnSurfaceMesh( auto candidate_elements(getCandidateElementsForLineSegmentIntersection( mesh_element_grid, *segment_it)); - auto mapPoint = [&candidate_elements](MathLib::Point3d& p) { + auto mapPoint = [&candidate_elements](MathLib::Point3d& p) + { auto const* elem( findElementContainingPointXY(candidate_elements, p)); if (elem) diff --git a/MeshGeoToolsLib/MeshNodeSearcher.cpp b/MeshGeoToolsLib/MeshNodeSearcher.cpp index 9f578e0e016d4e60089ce3b99dcbd0a4604dbd45..19dba9cef543049d8af73c519e690984d00f9272 100644 --- a/MeshGeoToolsLib/MeshNodeSearcher.cpp +++ b/MeshGeoToolsLib/MeshNodeSearcher.cpp @@ -69,9 +69,8 @@ std::vector<std::size_t> const& getMeshNodeIDs( SearchAllNodes const search_all_nodes) { if (auto const it = find_if(cbegin(cached_elements), cend(cached_elements), - [&](auto const& element) { - return getCachedItem(*element) == item; - }); + [&](auto const& element) + { return getCachedItem(*element) == item; }); it != cend(cached_elements)) { return (*it)->getNodeIDs();