diff --git a/CMakeLists.txt b/CMakeLists.txt index 57221249d1f0390ae8ce809306ee1f4ba431be76..87fdee39aa6621d671f249224b8ed0e1fa58de93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ find_package(PkgConfig REQUIRED) #------------------------------------------------------ # custom variable allowing to define version suffixes such as -rc*, -beta*, ... -set(PUGS_VERSION "0.4.1") +set(PUGS_VERSION "0.5.0") # deduce PUGS_SHORT_VERSION using regex string(REGEX MATCH "^[0-9]+\.[0-9]+\.[0-9]+" PUGS_SHORT_VERSION ${PUGS_VERSION}) diff --git a/src/mesh/MeshFlatEdgeBoundary.cpp b/src/mesh/MeshFlatEdgeBoundary.cpp index c20b9c1a5967fa511fdd4c9f99359696d7117cc2..7a2d4918d9c822303ba6debee91b5f4d707569c4 100644 --- a/src/mesh/MeshFlatEdgeBoundary.cpp +++ b/src/mesh/MeshFlatEdgeBoundary.cpp @@ -4,7 +4,7 @@ #include <mesh/Mesh.hpp> #include <mesh/MeshFlatNodeBoundary.hpp> -template <MeshConcept MeshType> +template <typename MeshType> MeshFlatEdgeBoundary<MeshType> getMeshFlatEdgeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor) { diff --git a/src/mesh/MeshFlatEdgeBoundary.hpp b/src/mesh/MeshFlatEdgeBoundary.hpp index 10ab8edb835e8c7652665cae4b9db9cfe75c4418..70b51bc982222b7006b21e3a825cfeeab3fe6c93 100644 --- a/src/mesh/MeshFlatEdgeBoundary.hpp +++ b/src/mesh/MeshFlatEdgeBoundary.hpp @@ -24,7 +24,7 @@ class MeshFlatEdgeBoundary final : public MeshEdgeBoundary // clazy:exclude=co MeshFlatEdgeBoundary& operator=(const MeshFlatEdgeBoundary&) = default; MeshFlatEdgeBoundary& operator=(MeshFlatEdgeBoundary&&) = default; - template <MeshConcept MeshTypeT> + template <typename MeshTypeT> friend MeshFlatEdgeBoundary<MeshTypeT> getMeshFlatEdgeBoundary(const MeshTypeT& mesh, const IBoundaryDescriptor& boundary_descriptor); @@ -40,7 +40,7 @@ class MeshFlatEdgeBoundary final : public MeshEdgeBoundary // clazy:exclude=co ~MeshFlatEdgeBoundary() = default; }; -template <MeshConcept MeshType> +template <typename MeshType> MeshFlatEdgeBoundary<MeshType> getMeshFlatEdgeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor); diff --git a/src/mesh/MeshFlatFaceBoundary.cpp b/src/mesh/MeshFlatFaceBoundary.cpp index 632c6a033dee7fc5593363660cc179faa966fb80..2ecdf6768eb865413386b10a1a419c6e30799def 100644 --- a/src/mesh/MeshFlatFaceBoundary.cpp +++ b/src/mesh/MeshFlatFaceBoundary.cpp @@ -4,7 +4,7 @@ #include <mesh/Mesh.hpp> #include <mesh/MeshFlatNodeBoundary.hpp> -template <MeshConcept MeshType> +template <typename MeshType> MeshFlatFaceBoundary<MeshType> getMeshFlatFaceBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor) { diff --git a/src/mesh/MeshFlatFaceBoundary.hpp b/src/mesh/MeshFlatFaceBoundary.hpp index 0c53a31e095251c6ffaa70b7f6d58bfce10a6864..fc4d9d0f82b15a0d02dea4efdff3a13a6cceeb7a 100644 --- a/src/mesh/MeshFlatFaceBoundary.hpp +++ b/src/mesh/MeshFlatFaceBoundary.hpp @@ -24,7 +24,7 @@ class MeshFlatFaceBoundary final : public MeshFaceBoundary // clazy:exclude=co MeshFlatFaceBoundary& operator=(const MeshFlatFaceBoundary&) = default; MeshFlatFaceBoundary& operator=(MeshFlatFaceBoundary&&) = default; - template <MeshConcept MeshTypeT> + template <typename MeshTypeT> friend MeshFlatFaceBoundary<MeshTypeT> getMeshFlatFaceBoundary(const MeshTypeT& mesh, const IBoundaryDescriptor& boundary_descriptor); @@ -40,7 +40,7 @@ class MeshFlatFaceBoundary final : public MeshFaceBoundary // clazy:exclude=co ~MeshFlatFaceBoundary() = default; }; -template <MeshConcept MeshType> +template <typename MeshType> MeshFlatFaceBoundary<MeshType> getMeshFlatFaceBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor); diff --git a/src/mesh/MeshFlatNodeBoundary.cpp b/src/mesh/MeshFlatNodeBoundary.cpp index bdc7c20a2c854c2a9a6492d8f06f46a026b38b0b..c3ca1dbd4ce980e6290b99af8a7bca878ca4520f 100644 --- a/src/mesh/MeshFlatNodeBoundary.cpp +++ b/src/mesh/MeshFlatNodeBoundary.cpp @@ -323,7 +323,7 @@ MeshFlatNodeBoundary<Mesh<3>>::_getOutgoingNormal(const Mesh<3>& mesh) } } -template <MeshConcept MeshType> +template <typename MeshType> MeshFlatNodeBoundary<MeshType> getMeshFlatNodeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor) { diff --git a/src/mesh/MeshFlatNodeBoundary.hpp b/src/mesh/MeshFlatNodeBoundary.hpp index 2eb28d14899a1d70f47f8cd139b435c4a81390b7..66c610ea72a3aed5e6876516890c0d168bc9aac4 100644 --- a/src/mesh/MeshFlatNodeBoundary.hpp +++ b/src/mesh/MeshFlatNodeBoundary.hpp @@ -20,21 +20,23 @@ class [[nodiscard]] MeshFlatNodeBoundary final : public MeshNodeBoundary // cl Rd _getNormal(const MeshType& mesh); void _checkBoundaryIsFlat(const TinyVector<MeshType::Dimension, double>& normal, - const TinyVector<MeshType::Dimension, double>& origin, const double length, + const TinyVector<MeshType::Dimension, double>& origin, + const double length, const MeshType& mesh) const; Rd _getOutgoingNormal(const MeshType& mesh); public: - const Rd& outgoingNormal() const + const Rd& + outgoingNormal() const { return m_outgoing_normal; } MeshFlatNodeBoundary& operator=(const MeshFlatNodeBoundary&) = default; - MeshFlatNodeBoundary& operator=(MeshFlatNodeBoundary&&) = default; + MeshFlatNodeBoundary& operator=(MeshFlatNodeBoundary&&) = default; - template <MeshConcept MeshTypeT> + template <typename MeshTypeT> friend MeshFlatNodeBoundary<MeshTypeT> getMeshFlatNodeBoundary(const MeshTypeT& mesh, const IBoundaryDescriptor& boundary_descriptor); @@ -50,11 +52,11 @@ class [[nodiscard]] MeshFlatNodeBoundary final : public MeshNodeBoundary // cl public: MeshFlatNodeBoundary() = default; MeshFlatNodeBoundary(const MeshFlatNodeBoundary&) = default; - MeshFlatNodeBoundary(MeshFlatNodeBoundary &&) = default; + MeshFlatNodeBoundary(MeshFlatNodeBoundary&&) = default; ~MeshFlatNodeBoundary() = default; }; -template <MeshConcept MeshType> +template <typename MeshType> MeshFlatNodeBoundary<MeshType> getMeshFlatNodeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor); diff --git a/src/mesh/MeshLineEdgeBoundary.cpp b/src/mesh/MeshLineEdgeBoundary.cpp index 40de23d1e2dc86bbd82b8542b75e32d1cac40352..f1e0333a9afd8a642f3809560f0c16431e98e1e4 100644 --- a/src/mesh/MeshLineEdgeBoundary.cpp +++ b/src/mesh/MeshLineEdgeBoundary.cpp @@ -5,7 +5,7 @@ #include <mesh/MeshLineNodeBoundary.hpp> #include <utils/Messenger.hpp> -template <MeshConcept MeshType> +template <typename MeshType> MeshLineEdgeBoundary<MeshType> getMeshLineEdgeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor) { diff --git a/src/mesh/MeshLineEdgeBoundary.hpp b/src/mesh/MeshLineEdgeBoundary.hpp index 0fc5db0ba6b73960cd1a64c5a0626585c857a4b8..11994eefa1d84580d6c21b58a4d5332ba8479431 100644 --- a/src/mesh/MeshLineEdgeBoundary.hpp +++ b/src/mesh/MeshLineEdgeBoundary.hpp @@ -18,7 +18,7 @@ class [[nodiscard]] MeshLineEdgeBoundary final : public MeshEdgeBoundary // cl const Rd m_direction; public: - template <MeshConcept MeshTypeT> + template <typename MeshTypeT> friend MeshLineEdgeBoundary<MeshTypeT> getMeshLineEdgeBoundary(const MeshTypeT& mesh, const IBoundaryDescriptor& boundary_descriptor); @@ -44,7 +44,7 @@ class [[nodiscard]] MeshLineEdgeBoundary final : public MeshEdgeBoundary // cl ~MeshLineEdgeBoundary() = default; }; -template <MeshConcept MeshType> +template <typename MeshType> MeshLineEdgeBoundary<MeshType> getMeshLineEdgeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor); diff --git a/src/mesh/MeshLineFaceBoundary.cpp b/src/mesh/MeshLineFaceBoundary.cpp index 3608e7aef37dfeddf9eb2c6ad7d207d1acae3f07..81ea991ed6dcf999e3144a9b4d9d48f080a1499e 100644 --- a/src/mesh/MeshLineFaceBoundary.cpp +++ b/src/mesh/MeshLineFaceBoundary.cpp @@ -5,7 +5,7 @@ #include <mesh/MeshLineNodeBoundary.hpp> #include <utils/Messenger.hpp> -template <MeshConcept MeshType> +template <typename MeshType> MeshLineFaceBoundary<MeshType> getMeshLineFaceBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor) { diff --git a/src/mesh/MeshLineFaceBoundary.hpp b/src/mesh/MeshLineFaceBoundary.hpp index 206961a08f88f9a4008a14a7a223b9d90ff323ed..5b993923c2836500f46ebbc112ef234c05c67f94 100644 --- a/src/mesh/MeshLineFaceBoundary.hpp +++ b/src/mesh/MeshLineFaceBoundary.hpp @@ -17,7 +17,7 @@ class [[nodiscard]] MeshLineFaceBoundary final : public MeshFaceBoundary // cl const Rd m_direction; public: - template <MeshConcept MeshTypeT> + template <typename MeshTypeT> friend MeshLineFaceBoundary<MeshTypeT> getMeshLineFaceBoundary(const MeshTypeT& mesh, const IBoundaryDescriptor& boundary_descriptor); @@ -43,7 +43,7 @@ class [[nodiscard]] MeshLineFaceBoundary final : public MeshFaceBoundary // cl ~MeshLineFaceBoundary() = default; }; -template <MeshConcept MeshType> +template <typename MeshType> MeshLineFaceBoundary<MeshType> getMeshLineFaceBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor); diff --git a/src/mesh/MeshLineNodeBoundary.cpp b/src/mesh/MeshLineNodeBoundary.cpp index 1cd3bb64d749d49de82d925bff9eaa3ecf88ead9..7ec8bb898aa7af4a8d747e516f0438b1792edb67 100644 --- a/src/mesh/MeshLineNodeBoundary.cpp +++ b/src/mesh/MeshLineNodeBoundary.cpp @@ -105,7 +105,7 @@ MeshLineNodeBoundary<Mesh<3>>::_getDirection(const Mesh<3>& mesh) return direction; } -template <MeshConcept MeshType> +template <typename MeshType> MeshLineNodeBoundary<MeshType> getMeshLineNodeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor) { diff --git a/src/mesh/MeshLineNodeBoundary.hpp b/src/mesh/MeshLineNodeBoundary.hpp index fb75ef9a49d77095c47d1a45db42e636b905c572..95cbab34cfbb35190fe23f607bdbcd46698f4023 100644 --- a/src/mesh/MeshLineNodeBoundary.hpp +++ b/src/mesh/MeshLineNodeBoundary.hpp @@ -24,7 +24,7 @@ class [[nodiscard]] MeshLineNodeBoundary final : public MeshNodeBoundary // cl const MeshType& mesh) const; public: - template <MeshConcept MeshTypeT> + template <typename MeshTypeT> friend MeshLineNodeBoundary<MeshTypeT> getMeshLineNodeBoundary(const MeshTypeT& mesh, const IBoundaryDescriptor& boundary_descriptor); @@ -58,7 +58,7 @@ class [[nodiscard]] MeshLineNodeBoundary final : public MeshNodeBoundary // cl ~MeshLineNodeBoundary() = default; }; -template <MeshConcept MeshType> +template <typename MeshType> MeshLineNodeBoundary<MeshType> getMeshLineNodeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor); diff --git a/src/scheme/AcousticSolver.cpp b/src/scheme/AcousticSolver.cpp index 90998d3aba2e9ecf0a9b5c4e8961c7b87889eaa5..e4db63bd7ec57502c08a1e3f212386ebe8215859 100644 --- a/src/scheme/AcousticSolver.cpp +++ b/src/scheme/AcousticSolver.cpp @@ -371,8 +371,8 @@ class AcousticSolverHandler::AcousticSolver final : public AcousticSolverHandler const std::shared_ptr<const DiscreteFunctionVariant>& p_v, const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& bc_descriptor_list) const { - std::shared_ptr i_mesh = getCommonMesh({rho_v, c_v, u_v, p_v}); - if (not i_mesh) { + std::shared_ptr mesh_v = getCommonMesh({rho_v, c_v, u_v, p_v}); + if (not mesh_v) { throw NormalError("discrete functions are not defined on the same mesh"); } @@ -380,7 +380,7 @@ class AcousticSolverHandler::AcousticSolver final : public AcousticSolverHandler throw NormalError("acoustic solver expects P0 functions"); } - const MeshType& mesh = *i_mesh->get<MeshType>(); + const MeshType& mesh = *mesh_v->get<MeshType>(); const DiscreteScalarFunction& rho = rho_v->get<DiscreteScalarFunction>(); const DiscreteScalarFunction& c = c_v->get<DiscreteScalarFunction>(); const DiscreteVectorFunction& u = u_v->get<DiscreteVectorFunction>(); @@ -474,8 +474,8 @@ class AcousticSolverHandler::AcousticSolver final : public AcousticSolverHandler const std::shared_ptr<const ItemValueVariant>& ur, const std::shared_ptr<const SubItemValuePerItemVariant>& Fjr) const { - std::shared_ptr i_mesh = getCommonMesh({rho_v, u_v, E_v}); - if (not i_mesh) { + std::shared_ptr mesh_v = getCommonMesh({rho_v, u_v, E_v}); + if (not mesh_v) { throw NormalError("discrete functions are not defined on the same mesh"); } @@ -484,7 +484,7 @@ class AcousticSolverHandler::AcousticSolver final : public AcousticSolverHandler } return this->apply_fluxes(dt, // - *i_mesh->get<MeshType>(), // + *mesh_v->get<MeshType>(), // rho_v->get<DiscreteScalarFunction>(), // u_v->get<DiscreteVectorFunction>(), // E_v->get<DiscreteScalarFunction>(), // @@ -863,9 +863,9 @@ class AcousticSolverHandler::AcousticSolver<MeshType>::SymmetryBoundaryCondition ~SymmetryBoundaryCondition() = default; }; -AcousticSolverHandler::AcousticSolverHandler(const std::shared_ptr<const MeshVariant>& i_mesh) +AcousticSolverHandler::AcousticSolverHandler(const std::shared_ptr<const MeshVariant>& mesh_v) { - if (not i_mesh) { + if (not mesh_v) { throw NormalError("discrete functions are not defined on the same mesh"); } @@ -878,5 +878,5 @@ AcousticSolverHandler::AcousticSolverHandler(const std::shared_ptr<const MeshVar throw NormalError("unexpected mesh type"); } }, - i_mesh->variant()); + mesh_v->variant()); } diff --git a/src/scheme/HyperelasticSolver.cpp b/src/scheme/HyperelasticSolver.cpp index d88067f982e244a53cb6f87d062e404392188a69..7bc6cd8c0dc854ecaa8caa2d8809891ed328790d 100644 --- a/src/scheme/HyperelasticSolver.cpp +++ b/src/scheme/HyperelasticSolver.cpp @@ -388,8 +388,8 @@ class HyperelasticSolverHandler::HyperelasticSolver final : public HyperelasticS const std::shared_ptr<const DiscreteFunctionVariant>& sigma_v, const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& bc_descriptor_list) const { - std::shared_ptr i_mesh = getCommonMesh({rho_v, aL_v, aT_v, u_v, sigma_v}); - if (not i_mesh) { + std::shared_ptr mesh_v = getCommonMesh({rho_v, aL_v, aT_v, u_v, sigma_v}); + if (not mesh_v) { throw NormalError("discrete functions are not defined on the same mesh"); } @@ -397,7 +397,7 @@ class HyperelasticSolverHandler::HyperelasticSolver final : public HyperelasticS throw NormalError("hyperelastic solver expects P0 functions"); } - const MeshType& mesh = *i_mesh->get<MeshType>(); + const MeshType& mesh = *mesh_v->get<MeshType>(); const DiscreteScalarFunction& rho = rho_v->get<DiscreteScalarFunction>(); const DiscreteVectorFunction& u = u_v->get<DiscreteVectorFunction>(); const DiscreteScalarFunction& aL = aL_v->get<DiscreteScalarFunction>(); @@ -505,8 +505,8 @@ class HyperelasticSolverHandler::HyperelasticSolver final : public HyperelasticS const std::shared_ptr<const ItemValueVariant>& ur, const std::shared_ptr<const SubItemValuePerItemVariant>& Fjr) const { - std::shared_ptr i_mesh = getCommonMesh({rho, u, E}); - if (not i_mesh) { + std::shared_ptr mesh_v = getCommonMesh({rho, u, E}); + if (not mesh_v) { throw NormalError("discrete functions are not defined on the same mesh"); } @@ -515,7 +515,7 @@ class HyperelasticSolverHandler::HyperelasticSolver final : public HyperelasticS } return this->apply_fluxes(dt, // - *i_mesh->get<MeshType>(), // + *mesh_v->get<MeshType>(), // rho->get<DiscreteScalarFunction>(), // u->get<DiscreteVectorFunction>(), // E->get<DiscreteScalarFunction>(), // @@ -939,9 +939,9 @@ class HyperelasticSolverHandler::HyperelasticSolver<MeshType>::SymmetryBoundaryC ~SymmetryBoundaryCondition() = default; }; -HyperelasticSolverHandler::HyperelasticSolverHandler(const std::shared_ptr<const MeshVariant>& i_mesh) +HyperelasticSolverHandler::HyperelasticSolverHandler(const std::shared_ptr<const MeshVariant>& mesh_v) { - if (not i_mesh) { + if (not mesh_v) { throw NormalError("discrete functions are not defined on the same mesh"); } @@ -954,5 +954,5 @@ HyperelasticSolverHandler::HyperelasticSolverHandler(const std::shared_ptr<const throw NormalError("unexpected mesh type"); } }, - i_mesh->variant()); + mesh_v->variant()); }