From 4e95cfb18fefe3e6f5939c7eae48c999b98c7d9f Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Sun, 10 Oct 2021 12:43:13 +0200 Subject: [PATCH] [MGTL] clang-format. --- MeshGeoToolsLib/BoundaryElementsAtPoint.cpp | 3 ++- MeshGeoToolsLib/BoundaryElementsSearcher.cpp | 5 ++--- MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp | 7 +++---- MeshGeoToolsLib/GeoMapper.cpp | 6 ++++-- MeshGeoToolsLib/MeshNodeSearcher.cpp | 5 ++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp b/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp index 9af0f991e76..71f2575145c 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 d54c54057ac..64e4e968d85 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 9035a7ff84f..2cd477582bd 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 4ebe82656f0..55d63f5945b 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 9f578e0e016..19dba9cef54 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(); -- GitLab