From f8edbbda797135b23bb1d56e1336eb34f98ecca9 Mon Sep 17 00:00:00 2001 From: Ozaq Date: Mon, 22 Apr 2024 21:49:11 +0200 Subject: [PATCH] fix formatting --- libsimulator/src/GeneralizedCentrifugalForceModel.cpp | 8 +++++--- libsimulator/src/Journey.hpp | 2 +- libsimulator/src/Mesh.cpp | 4 +--- libsimulator/src/NeighborhoodSearch.hpp | 2 +- libsimulator/src/Point.hpp | 2 +- libsimulator/src/SocialForceModel.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libsimulator/src/GeneralizedCentrifugalForceModel.cpp b/libsimulator/src/GeneralizedCentrifugalForceModel.cpp index f5256fb8a..0c50738c4 100644 --- a/libsimulator/src/GeneralizedCentrifugalForceModel.cpp +++ b/libsimulator/src/GeneralizedCentrifugalForceModel.cpp @@ -228,7 +228,7 @@ Point GeneralizedCentrifugalForceModel::ForceRepPed( const double dist_intpol_left = mindist + maxNeighborInterpolationDistance; // lower cut-off for Frep (modCFM) const double dist_intpol_right = - maxNeighborInteractionDistance - + maxNeighborInteractionDistance - maxNeighborInterpolationDistance; // upper cut-off for Frep (modCFM) const double smax = mindist - maxNeighborInterpolationDistance; // max overlapping double f = 0.0f; // fuction value @@ -281,7 +281,8 @@ Point GeneralizedCentrifugalForceModel::ForceRepPed( if(dist_eff >= dist_intpol_right) { // 2 f = -agent1_mass * K_ij * nom / dist_intpol_right; // abs(NR-Dv(i)+Sa) f1 = -f / dist_intpol_right; - px = hermite_interp(dist_eff, dist_intpol_right, maxNeighborInteractionDistance, f, 0, f1, 0); + px = hermite_interp( + dist_eff, dist_intpol_right, maxNeighborInteractionDistance, f, 0, f1, 0); F_rep = ep12 * px; } else if(dist_eff >= dist_intpol_left) { // 3 f = -agent1_mass * K_ij * nom / fabs(dist_eff); // abs(NR-Dv(i)+Sa) @@ -447,7 +448,8 @@ Point GeneralizedCentrifugalForceModel::ForceInterpolation( if(dist_eff > tmp2) { // 2 f = -nominator / dist_intpol_right; f1 = -f / dist_intpol_right; // nominator / (dist_intpol_right^2) = derivativ of f - px = hermite_interp(dist_eff, dist_intpol_right, maxGeometryInteractionDistance, f, 0, f1, 0); + px = hermite_interp( + dist_eff, dist_intpol_right, maxGeometryInteractionDistance, f, 0, f1, 0); F_rep = e * px; } else if(dist_eff >= tmp3) { // 3 f = -nominator / fabs(dist_eff); // devided by abs f the effective distance diff --git a/libsimulator/src/Journey.hpp b/libsimulator/src/Journey.hpp index 8c51a99ca..287fcf0f7 100644 --- a/libsimulator/src/Journey.hpp +++ b/libsimulator/src/Journey.hpp @@ -96,7 +96,7 @@ class FixedTransition : public Transition BaseStage* next; public: - FixedTransition(BaseStage* next_) : next(next_){}; + FixedTransition(BaseStage* next_) : next(next_) {}; BaseStage* NextStage() override { return next; } }; diff --git a/libsimulator/src/Mesh.cpp b/libsimulator/src/Mesh.cpp index 62fd01ff3..1f22069b2 100644 --- a/libsimulator/src/Mesh.cpp +++ b/libsimulator/src/Mesh.cpp @@ -416,9 +416,7 @@ std::vector Mesh::FVertices() const std::begin(vertices), std::end(vertices), std::back_inserter(f_vertices), - [](const auto& v) { - return glm::vec2{v.x, v.y}; - }); + [](const auto& v) { return glm::vec2{v.x, v.y}; }); return f_vertices; } diff --git a/libsimulator/src/NeighborhoodSearch.hpp b/libsimulator/src/NeighborhoodSearch.hpp index 712a87965..da589910a 100644 --- a/libsimulator/src/NeighborhoodSearch.hpp +++ b/libsimulator/src/NeighborhoodSearch.hpp @@ -73,7 +73,7 @@ class NeighborhoodSearch } public: - explicit NeighborhoodSearch(double cellSize) : _cellSize(cellSize){}; + explicit NeighborhoodSearch(double cellSize) : _cellSize(cellSize) {}; void AddAgent(const Value& item) { diff --git a/libsimulator/src/Point.hpp b/libsimulator/src/Point.hpp index d682d832c..6aa28d78f 100644 --- a/libsimulator/src/Point.hpp +++ b/libsimulator/src/Point.hpp @@ -15,7 +15,7 @@ class Point double y{}; public: - Point(double x = 0, double y = 0) : x(x), y(y){}; + Point(double x = 0, double y = 0) : x(x), y(y) {}; /// Norm double Norm() const; diff --git a/libsimulator/src/SocialForceModel.cpp b/libsimulator/src/SocialForceModel.cpp index 117b41911..72a4739b9 100644 --- a/libsimulator/src/SocialForceModel.cpp +++ b/libsimulator/src/SocialForceModel.cpp @@ -17,7 +17,7 @@ #include SocialForceModel::SocialForceModel(double bodyForce_, double friction_) - : bodyForce(bodyForce_), friction(friction_){}; + : bodyForce(bodyForce_), friction(friction_) {}; OperationalModelType SocialForceModel::Type() const {