From 7dc566d8a8a6e5de142afbff5ca1b01467dfa87b Mon Sep 17 00:00:00 2001 From: acrovato <a.crovato@uliege.be> Date: Fri, 13 Dec 2024 11:28:25 +0100 Subject: [PATCH] Bugfix and format --- fpm/src/fBody.cpp | 5 +++-- fpm/src/fBody.h | 2 +- fpm/src/fBuilder.h | 2 +- fpm/src/fEdge.h | 2 +- fpm/src/fField.h | 2 +- fpm/src/fProblem.cpp | 10 +++++----- fpm/src/fProblem.h | 2 +- fpm/src/fSolver.h | 2 +- fpm/src/fTimers.h | 4 ++-- fpm/src/fWake.h | 2 +- fpm/src/fpm.h | 2 +- 11 files changed, 18 insertions(+), 17 deletions(-) diff --git a/fpm/src/fBody.cpp b/fpm/src/fBody.cpp index 398e3c0..9ff1f89 100644 --- a/fpm/src/fBody.cpp +++ b/fpm/src/fBody.cpp @@ -61,7 +61,8 @@ Body::Body(std::shared_ptr<MshData> _msh, std::string const &id, for (auto e : te.tag->elems) for (auto n : e->nodes) teNodes.push_back(n); - std::sort(teNodes.begin(), teNodes.end(), [](Node *a, Node *b) -> bool { return a->pos(1) < b->pos(1); }); + std::sort(teNodes.begin(), teNodes.end(), [](Node *a, Node *b) -> bool + { return a->pos(1) < b->pos(1); }); teNodes.erase(std::unique(teNodes.begin(), teNodes.end()), teNodes.end()); // Translate TE nodes (along x-coordinate) std::vector<Node *> wkNodes; @@ -104,7 +105,7 @@ Body::Body(std::shared_ptr<MshData> _msh, std::string const &id, } catch (const std::out_of_range &) { - //std::cout << lwe->nodes[i]->no << "not found in map!\n"; + // std::cout << lwe->nodes[i]->no << "not found in map!\n"; } } } diff --git a/fpm/src/fBody.h b/fpm/src/fBody.h index 181af38..90f29c5 100644 --- a/fpm/src/fBody.h +++ b/fpm/src/fBody.h @@ -55,4 +55,4 @@ public: } // namespace fpm -#endif //FBODY_H +#endif // FBODY_H diff --git a/fpm/src/fBuilder.h b/fpm/src/fBuilder.h index 10069df..9f58684 100644 --- a/fpm/src/fBuilder.h +++ b/fpm/src/fBuilder.h @@ -73,4 +73,4 @@ private: }; } // namespace fpm -#endif //FBUILDER_H +#endif // FBUILDER_H diff --git a/fpm/src/fEdge.h b/fpm/src/fEdge.h index 959675c..f5d01e6 100644 --- a/fpm/src/fEdge.h +++ b/fpm/src/fEdge.h @@ -90,4 +90,4 @@ public: } // namespace fpm #endif -#endif //FEDGE_H +#endif // FEDGE_H diff --git a/fpm/src/fField.h b/fpm/src/fField.h index 360c422..613dc58 100644 --- a/fpm/src/fField.h +++ b/fpm/src/fField.h @@ -40,4 +40,4 @@ public: } // namespace fpm -#endif //FFIELD_H +#endif // FFIELD_H diff --git a/fpm/src/fProblem.cpp b/fpm/src/fProblem.cpp index f240905..b9cb64b 100644 --- a/fpm/src/fProblem.cpp +++ b/fpm/src/fProblem.cpp @@ -206,7 +206,7 @@ double Problem::Cp(Eigen::Vector3d U) return 1 - u.dot(u); else { - //particularized: 2 / (gamma * mInf * mInf) * (pow(1 + 0.5 * (gamma - 1) * mInf * mInf * (1 - gradU2), gamma / (gamma - 1)) - 1); + // particularized: 2 / (gamma * mInf * mInf) * (pow(1 + 0.5 * (gamma - 1) * mInf * mInf * (1 - gradU2), gamma / (gamma - 1)) - 1); double a = 1 + 0.2 * mach * mach * (1 - u.dot(u)); return 2 / (1.4 * mach * mach) * (sqrt(a * a * a * a * a * a * a) - 1); } @@ -257,21 +257,21 @@ void Problem::check() const // Volume elements if (field) for (auto e : field->tag->elems) - if (e->type() != ELTYPE::HEX8) + if (e->type() != ElType::HEX8) { std::stringstream err; err << "FPM solver is only implemented for surface elements of type " - << ELTYPE::HEX8 << " (" << e->type() << " was given)!\n"; + << ElType::HEX8 << " (" << e->type() << " was given)!\n"; throw std::runtime_error(err.str()); } // Surface elements for (auto b : bodies) for (auto e : b->tag->elems) - if (e->type() != ELTYPE::QUAD4) + if (e->type() != ElType::QUAD4) { std::stringstream err; err << "FPM solver is only implemented for surface elements of type " - << ELTYPE::QUAD4 << " (" << e->type() << " was given)!\n"; + << ElType::QUAD4 << " (" << e->type() << " was given)!\n"; throw std::runtime_error(err.str()); } } diff --git a/fpm/src/fProblem.h b/fpm/src/fProblem.h index 3cdd15c..ab962b2 100644 --- a/fpm/src/fProblem.h +++ b/fpm/src/fProblem.h @@ -71,4 +71,4 @@ public: } // namespace fpm -#endif //FPROBLEM_H +#endif // FPROBLEM_H diff --git a/fpm/src/fSolver.h b/fpm/src/fSolver.h index c2cdb1a..deacab6 100644 --- a/fpm/src/fSolver.h +++ b/fpm/src/fSolver.h @@ -68,4 +68,4 @@ private: }; } // namespace fpm -#endif //FSOLVER_H +#endif // FSOLVER_H diff --git a/fpm/src/fTimers.h b/fpm/src/fTimers.h index e08840b..c9c6537 100644 --- a/fpm/src/fTimers.h +++ b/fpm/src/fTimers.h @@ -70,9 +70,9 @@ public: #ifndef SWIG Timer &operator[](std::string const &name); virtual void write(std::ostream &out) const override; -#endif //SWIG +#endif // SWIG }; } // namespace fpm -#endif //FTIMERS_H +#endif // FTIMERS_H diff --git a/fpm/src/fWake.h b/fpm/src/fWake.h index 6d725ac..45da091 100644 --- a/fpm/src/fWake.h +++ b/fpm/src/fWake.h @@ -44,4 +44,4 @@ public: } // namespace fpm -#endif //FWAKE_H +#endif // FWAKE_H diff --git a/fpm/src/fpm.h b/fpm/src/fpm.h index 676bbd8..73c4bbf 100644 --- a/fpm/src/fpm.h +++ b/fpm/src/fpm.h @@ -54,4 +54,4 @@ class EquEdge; } // namespace fpm -#endif //FPM_H +#endif // FPM_H -- GitLab