diff --git a/dart/src/wAdjoint.cpp b/dart/src/wAdjoint.cpp index 2a249190091383d95a0725151bfbd6be12bb9a6b..d93f7669b50d9bc729645e0031ec1f3b10f0be7b 100644 --- a/dart/src/wAdjoint.cpp +++ b/dart/src/wAdjoint.cpp @@ -59,7 +59,7 @@ Adjoint::Adjoint(std::shared_ptr<Newton> _sol, std::shared_ptr<tbox::MshDeform> verbose = sol->verbose; // Linear solvers (if GMRES, use the same, but with a thighter tolerance) - if (sol->linsol->type() == LSOLTYPE::GMRES_ILUT) + if (sol->linsol->type() == LSolType::GMRES_ILUT) { std::shared_ptr<Gmres> gmres = std::make_shared<Gmres>(*dynamic_cast<Gmres *>(sol->linsol.get())); gmres->setTolerance(1e-8); @@ -67,7 +67,7 @@ Adjoint::Adjoint(std::shared_ptr<Newton> _sol, std::shared_ptr<tbox::MshDeform> } else alinsol = sol->linsol; - if (morph->linsol->type() == LSOLTYPE::GMRES_ILUT) + if (morph->linsol->type() == LSolType::GMRES_ILUT) { std::shared_ptr<Gmres> gmres = std::make_shared<Gmres>(*dynamic_cast<Gmres *>(morph->linsol.get())); gmres->setTolerance(1e-12); diff --git a/dart/src/wKuttaElement.cpp b/dart/src/wKuttaElement.cpp index 360efa5eb6a1e738558a3818c7024e5a20ede6d3..1888cafc737c7078c4603503ad3c0319d517c1c2 100644 --- a/dart/src/wKuttaElement.cpp +++ b/dart/src/wKuttaElement.cpp @@ -26,25 +26,25 @@ KuttaElement::KuttaElement(size_t _no, Element *&_surE, Element *&_volE, { // Sanity checks - if (surE->type() == ELTYPE::LINE2) + if (surE->type() == ElType::LINE2) nDim = 2; - else if (surE->type() == ELTYPE::TRI3) + else if (surE->type() == ElType::TRI3) nDim = 3; else { std::stringstream err; err << "KuttaElement only implemented for surface elements of type " - << ELTYPE::LINE2 << " or " << ELTYPE::TRI3 + << ElType::LINE2 << " or " << ElType::TRI3 << " (" << surE->type() << " was given)!\n"; throw std::runtime_error(err.str()); } - if (volE->type() == ELTYPE::TRI3 || volE->type() == ELTYPE::TETRA4) + if (volE->type() == ElType::TRI3 || volE->type() == ElType::TETRA4) nCol = volE->nodes.size(); else { std::stringstream err; err << "KuttaElement only implemented for volume elements of type " - << ELTYPE::TRI3 << " or " << ELTYPE::TETRA4 + << ElType::TRI3 << " or " << ElType::TETRA4 << " (" << volE->type() << " was given)!\n"; throw std::runtime_error(err.str()); } diff --git a/dart/src/wNewton.cpp b/dart/src/wNewton.cpp index 7943ae52b1d31bf04a4a8e02502d0de05ab97e3c..37dfb4b5596b73752ea5ae01896c3b5c1ae5df14 100644 --- a/dart/src/wNewton.cpp +++ b/dart/src/wNewton.cpp @@ -82,7 +82,7 @@ Newton::Newton(std::shared_ptr<Problem> _pbl, std::shared_ptr<tbox::LinearSolver * * Solve the steady transonic Full Potential Equation */ -STATUS Newton::run() +Status Newton::run() { // Multithread tbb::global_control control(tbb::global_control::max_allowed_parallelism, nthreads); @@ -249,7 +249,7 @@ STATUS Newton::run() << tms; if (verbose > 0) std::cout << std::endl; - return STATUS::CONVERGED; + return Status::CONVERGED; } else if (std::isnan(relRes)) { @@ -260,7 +260,7 @@ STATUS Newton::run() << tms; if (verbose > 0) std::cout << std::endl; - return STATUS::FAILED; + return Status::FAILED; } else { @@ -271,7 +271,7 @@ STATUS Newton::run() << tms; if (verbose > 0) std::cout << std::endl; - return STATUS::MAXIT; + return Status::MAXIT; } } diff --git a/dart/src/wNewton.h b/dart/src/wNewton.h index bec77d2248501a96b9048b5a1829e34ab328c35b..83950e3fc8c51d84e9ac44fc3c0da40475564703 100644 --- a/dart/src/wNewton.h +++ b/dart/src/wNewton.h @@ -49,7 +49,7 @@ private: public: Newton(std::shared_ptr<Problem> _pbl, std::shared_ptr<tbox::LinearSolver> _linsol, double rTol = 1e-6, double aTol = 1e-8, int mIt = 25, int nthrds = 1, int vrb = 1); - virtual STATUS run() override; + virtual Status run() override; #ifndef SWIG virtual void write(std::ostream &out) const override; diff --git a/dart/src/wPicard.cpp b/dart/src/wPicard.cpp index 537f1272fc0e354cf8e0a7fbe3ee37d34fbe6b5a..6648a8c22517976cc8e1655fbde080473f2a0ef7 100644 --- a/dart/src/wPicard.cpp +++ b/dart/src/wPicard.cpp @@ -75,7 +75,7 @@ Picard::Picard(std::shared_ptr<Problem> _pbl, std::shared_ptr<tbox::LinearSolver * * Solve the steady subsonic Full Potential Equation */ -STATUS Picard::run() +Status Picard::run() { // Multithread tbb::global_control control(tbb::global_control::max_allowed_parallelism, nthreads); @@ -177,7 +177,7 @@ STATUS Picard::run() << tms; if (verbose > 0) std::cout << std::endl; - return STATUS::CONVERGED; + return Status::CONVERGED; } else if (std::isnan(relRes)) { @@ -188,7 +188,7 @@ STATUS Picard::run() << tms; if (verbose > 0) std::cout << std::endl; - return STATUS::FAILED; + return Status::FAILED; } else { @@ -199,7 +199,7 @@ STATUS Picard::run() << tms; if (verbose > 0) std::cout << std::endl; - return STATUS::MAXIT; + return Status::MAXIT; } } diff --git a/dart/src/wPicard.h b/dart/src/wPicard.h index 0a8a27d10a6b539d07d6066027e33b1a203483a6..69980895437f11f6323f6772ae937ffcc40706d7 100644 --- a/dart/src/wPicard.h +++ b/dart/src/wPicard.h @@ -40,7 +40,7 @@ public: public: Picard(std::shared_ptr<Problem> _pbl, std::shared_ptr<tbox::LinearSolver> _linsol, double rTol = 1e-6, double aTol = 1e-8, int mIt = 25, int nthrds = 1, int vrb = 1); - virtual STATUS run() override; + virtual Status run() override; #ifndef SWIG virtual void write(std::ostream &out) const override; diff --git a/dart/src/wProblem.cpp b/dart/src/wProblem.cpp index 06d219dc192c5e9d5e4ac9b96f53c1c26a7b9618..e12f03a6786e20b5cea50cc0f0e59687086d9aed 100644 --- a/dart/src/wProblem.cpp +++ b/dart/src/wProblem.cpp @@ -209,27 +209,27 @@ void Problem::check() const { // Volume element type for (auto e : fluid->tag->elems) - if (e->type() != ELTYPE::TETRA4) - throwUnsupElType(e, "3", "volume", ELTYPE::TETRA4); + if (e->type() != ElType::TETRA4) + throwUnsupElType(e, "3", "volume", ElType::TETRA4); // Surface element type (Body) for (auto surf : bodies) for (auto e : surf->groups[0]->tag->elems) - if (e->type() != ELTYPE::TRI3) - throwUnsupElType(e, "3", "surface", ELTYPE::TRI3); + if (e->type() != ElType::TRI3) + throwUnsupElType(e, "3", "surface", ElType::TRI3); // Surface element type (Freestream B.C.) for (auto surf : fBCs) for (auto e : surf->tag->elems) - if (e->type() != ELTYPE::TRI3) - throwUnsupElType(e, "3", "surface", ELTYPE::TRI3); + if (e->type() != ElType::TRI3) + throwUnsupElType(e, "3", "surface", ElType::TRI3); // Surface element type (Wake B.C.) for (auto surf : wBCs) { for (auto e : surf->groups[0]->tag->elems) - if (e->type() != ELTYPE::TRI3) - throwUnsupElType(e, "3", "surface", ELTYPE::TRI3); + if (e->type() != ElType::TRI3) + throwUnsupElType(e, "3", "surface", ElType::TRI3); for (auto e : surf->groups[1]->tag->elems) - if (e->type() != ELTYPE::TRI3) - throwUnsupElType(e, "3", "surface", ELTYPE::TRI3); + if (e->type() != ElType::TRI3) + throwUnsupElType(e, "3", "surface", ElType::TRI3); } // Blowing B.C. if (!bBCs.empty()) @@ -240,27 +240,27 @@ void Problem::check() const { // Volume element type for (auto e : fluid->tag->elems) - if (e->type() != ELTYPE::TRI3) - throwUnsupElType(e, "2", "volume", ELTYPE::TRI3); + if (e->type() != ElType::TRI3) + throwUnsupElType(e, "2", "volume", ElType::TRI3); // Surface element type (Body) for (auto surf : bodies) for (auto e : surf->groups[0]->tag->elems) - if (e->type() != ELTYPE::LINE2) - throwUnsupElType(e, "2", "surface", ELTYPE::LINE2); + if (e->type() != ElType::LINE2) + throwUnsupElType(e, "2", "surface", ElType::LINE2); // Surface element type (Freestream B.C.) for (auto surf : fBCs) for (auto e : surf->tag->elems) - if (e->type() != ELTYPE::LINE2) - throwUnsupElType(e, "2", "surface", ELTYPE::LINE2); + if (e->type() != ElType::LINE2) + throwUnsupElType(e, "2", "surface", ElType::LINE2); // Surface element type (Wake B.C.) for (auto surf : wBCs) { for (auto e : surf->groups[0]->tag->elems) - if (e->type() != ELTYPE::LINE2) - throwUnsupElType(e, "2", "surface", ELTYPE::LINE2); + if (e->type() != ElType::LINE2) + throwUnsupElType(e, "2", "surface", ElType::LINE2); for (auto e : surf->groups[1]->tag->elems) - if (e->type() != ELTYPE::LINE2) - throwUnsupElType(e, "2", "surface", ELTYPE::LINE2); + if (e->type() != ElType::LINE2) + throwUnsupElType(e, "2", "surface", ElType::LINE2); } } else @@ -272,7 +272,7 @@ void Problem::check() const } } -void Problem::throwUnsupElType(Element const *e, std::string const &pdim, std::string const &edim, ELTYPE type) const +void Problem::throwUnsupElType(Element const *e, std::string const &pdim, std::string const &edim, ElType type) const { std::stringstream err; err << pdim << "D solver is only implemented for " diff --git a/dart/src/wProblem.h b/dart/src/wProblem.h index d59911e6863d6db28eafc223371731f2095517b5..c57042a0a712287aad3dd1d776092735fde66fd5 100644 --- a/dart/src/wProblem.h +++ b/dart/src/wProblem.h @@ -90,7 +90,7 @@ public: #endif private: - void throwUnsupElType(tbox::Element const *e, std::string const &pdim, std::string const &edim, tbox::ELTYPE type) const; + void throwUnsupElType(tbox::Element const *e, std::string const &pdim, std::string const &edim, tbox::ElType type) const; }; } // namespace dart diff --git a/dart/src/wSolver.cpp b/dart/src/wSolver.cpp index 2c2d60c8db50fa713d8f951dca4d3ab51e700747..11f4d809c5667ee85a44b3bb84e61859ac84af39 100644 --- a/dart/src/wSolver.cpp +++ b/dart/src/wSolver.cpp @@ -153,7 +153,7 @@ void Solver::reset() /** * @brief Dummy run */ -STATUS Solver::run() +Status Solver::run() { throw std::runtime_error("dart::Solver::run not implemented!\n"); } diff --git a/dart/src/wSolver.h b/dart/src/wSolver.h index fdf41515f3278f2056eb7bf977f21dc0ecb18e10..605f0c01f960e39ceda626a57c9f838e24d61e44 100644 --- a/dart/src/wSolver.h +++ b/dart/src/wSolver.h @@ -32,7 +32,7 @@ namespace dart /** * @brief Exit code of DART solver */ -enum class STATUS +enum class Status { CONVERGED = 0, // fully converged to prescribed (relative or absolute) tolerance MAXIT = 1, // not fully converged (max. number of iterations exceeded) @@ -77,7 +77,7 @@ public: virtual ~Solver(); void reset(); - virtual STATUS run(); + virtual Status run(); void save(tbox::MshExport *mshWriter, std::string const &suffix = ""); protected: diff --git a/dart/src/wWakeElement.cpp b/dart/src/wWakeElement.cpp index 533ae8e34201eb501ceccfd1031496a1002cd17a..0f70a6d6cdcc8ab0f20b1d4f2584b7e6ab0437df 100644 --- a/dart/src/wWakeElement.cpp +++ b/dart/src/wWakeElement.cpp @@ -28,35 +28,35 @@ WakeElement::WakeElement(size_t _no, Element *&_surUpE, Element *&_surLwE, // Sanity checks if (surUpE->type() != surLwE->type()) throw std::runtime_error("WakeElement: upper and lower surface element are not the same type!\n"); - if (surUpE->type() == ELTYPE::LINE2) + if (surUpE->type() == ElType::LINE2) nDim = 2; - else if (surUpE->type() == ELTYPE::TRI3) + else if (surUpE->type() == ElType::TRI3) nDim = 3; else { std::stringstream err; err << "WakeElement only implemented for surface elements of type " - << ELTYPE::LINE2 << " or " << ELTYPE::TRI3 + << ElType::LINE2 << " or " << ElType::TRI3 << " (" << surUpE->type() << " was given)!\n"; throw std::runtime_error(err.str()); } - if (volUpE->type() == ELTYPE::TRI3 || volUpE->type() == ELTYPE::TETRA4) + if (volUpE->type() == ElType::TRI3 || volUpE->type() == ElType::TETRA4) nColUp = volUpE->nodes.size(); else { std::stringstream err; err << "WakeElement only implemented for volume elements of type " - << ELTYPE::TRI3 << " or " << ELTYPE::TETRA4 + << ElType::TRI3 << " or " << ElType::TETRA4 << " (" << volUpE->type() << " was given)!\n"; throw std::runtime_error(err.str()); } - if (volLwE->type() == ELTYPE::TRI3 || volLwE->type() == ELTYPE::TETRA4) + if (volLwE->type() == ElType::TRI3 || volLwE->type() == ElType::TETRA4) nColLw = volLwE->nodes.size(); else { std::stringstream err; err << "WakeElement only implemented for volume elements of type " - << ELTYPE::TRI3 << " or " << ELTYPE::TETRA4 + << ElType::TRI3 << " or " << ElType::TETRA4 << " (" << volLwE->type() << " was given)!\n"; throw std::runtime_error(err.str()); } diff --git a/ext/amfe b/ext/amfe index bed0e7b82d06153dfa5822ba62bb34fa74261faa..72c873b118e967a5dfbc2cbb4493f080be261752 160000 --- a/ext/amfe +++ b/ext/amfe @@ -1 +1 @@ -Subproject commit bed0e7b82d06153dfa5822ba62bb34fa74261faa +Subproject commit 72c873b118e967a5dfbc2cbb4493f080be261752 diff --git a/vii/src/DBoundaryLayer.h b/vii/src/DBoundaryLayer.h index f6556ac95cb4ed7ee8264d096d699e1628989698..7c8e223bf4bf547b9fc6d000c390d06722e2155f 100644 --- a/vii/src/DBoundaryLayer.h +++ b/vii/src/DBoundaryLayer.h @@ -1,5 +1,5 @@ -#ifndef DBoundaryLayer_H -#define DBoundaryLayer_H +#ifndef DBOUNDARYLAYER_H +#define DBOUNDARYLAYER_H #include "vii.h" #include "DClosures.h" @@ -65,4 +65,4 @@ public: void computeBlwVel(); }; } // namespace vii -#endif // DBoundaryLayer_H +#endif // DBOUNDARYLAYER_H diff --git a/vii/src/DClosures.h b/vii/src/DClosures.h index b08744f8082e06ad859aef21efe0762a2f13668a..fa4aca2645e2404498df3364c712e823534c5c68 100644 --- a/vii/src/DClosures.h +++ b/vii/src/DClosures.h @@ -27,4 +27,4 @@ public: const std::string name); }; } // namespace vii -#endif // DClosures_H \ No newline at end of file +#endif // DCLOSURES_H diff --git a/vii/src/DDiscretization.h b/vii/src/DDiscretization.h index f88480cc6902415bacdbac0c79c7e9631cd0d48a..1f9855b85f54554cd6104448871e6b3e9f8c82f5 100644 --- a/vii/src/DDiscretization.h +++ b/vii/src/DDiscretization.h @@ -1,5 +1,5 @@ -#ifndef DDiscretization_H -#define DDiscretization_H +#ifndef DDISCRETIZATION_H +#define DDISCRETIZATION_H #include "vii.h" #include "DBoundaryLayer.h" @@ -46,4 +46,4 @@ public: void computeBLcoord(); }; } // namespace vii -#endif // WDiscretization_H \ No newline at end of file +#endif // WDISCRETIZATION_H diff --git a/vii/src/DDriver.h b/vii/src/DDriver.h index 0ba4854a016fe3c82a6d0978f9cd481250cfbfa5..3651560c0b1166fc6b710b85db38583489ec2e98 100644 --- a/vii/src/DDriver.h +++ b/vii/src/DDriver.h @@ -1,5 +1,5 @@ -#ifndef DDriver_H -#define DDriver_H +#ifndef DDRIVER_H +#define DDRIVER_H #include "vii.h" #include "wObject.h" @@ -71,4 +71,4 @@ private: int outputStatus(double maxMach) const; }; } // namespace vii -#endif // DDriver_H \ No newline at end of file +#endif // DDRIVER_H diff --git a/vii/src/DEdge.h b/vii/src/DEdge.h index 02311392c60c6c6908cc7f9cefb83984f99d705c..2eadb1755abc3f7cebdbfcc74b00d02bfd0918af 100644 --- a/vii/src/DEdge.h +++ b/vii/src/DEdge.h @@ -1,5 +1,5 @@ -#ifndef DEdge_H -#define DEdge_H +#ifndef DEDGE_H +#define DEDGE_H #include "vii.h" #include <vector> @@ -41,4 +41,4 @@ public: void setVtOld(std::vector<double> const _vtOld); }; } // namespace vii -#endif // DEdge_H \ No newline at end of file +#endif // DEDGE_H diff --git a/vii/src/DFluxes.h b/vii/src/DFluxes.h index d77449f35ef1b0823f8e896dd864862d4689c465..54f292086ba066eab98c7abdafcde6e0b77b64d0 100644 --- a/vii/src/DFluxes.h +++ b/vii/src/DFluxes.h @@ -1,5 +1,5 @@ -#ifndef DFluxes_H -#define DFluxes_H +#ifndef DFLUXES_H +#define DFLUXES_H #include "vii.h" #include "DBoundaryLayer.h" @@ -28,4 +28,4 @@ private: double amplificationRoutine(double Hk, double Ret, double theta) const; }; } // namespace vii -#endif // DFluxes_H \ No newline at end of file +#endif // DFLUXES_H diff --git a/vii/src/DSolver.h b/vii/src/DSolver.h index f3abc6d4c3f0a284fdf885f49736add96fe11195..435a7b76b6cbc95f258d1ba39b838cfa3526185e 100644 --- a/vii/src/DSolver.h +++ b/vii/src/DSolver.h @@ -1,5 +1,5 @@ -#ifndef DSolver_H -#define DSolver_H +#ifndef DSOLVER_H +#define DSOLVER_H #include "vii.h" #include "DFluxes.h" @@ -48,4 +48,4 @@ private: void resetSolution(size_t iPoint, BoundaryLayer *bl, std::vector<double> Sln0, bool usePrevPoint = false); }; } // namespace vii -#endif // DSolver_H \ No newline at end of file +#endif // DSOLVER_H diff --git a/vii/src/vii.h b/vii/src/vii.h index 300376aa109821be80d2be4899a591c4329c2897..ac4d1e5a46aaa80226bb6ce4d6e9fd826a6b3624 100644 --- a/vii/src/vii.h +++ b/vii/src/vii.h @@ -16,8 +16,8 @@ // Global header of the "vii" module. -#ifndef vii_H -#define vii_H +#ifndef VII_H +#define VII_H #if defined(WIN32) #ifdef vii_EXPORTS @@ -50,4 +50,4 @@ class Edge; class Closures; } // namespace vii -#endif // VII_H \ No newline at end of file +#endif // VII_H