From 89c9a88ca729370f2e48b3c00824dd2db28385ed Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Fri, 8 Mar 2024 23:36:46 +0100 Subject: [PATCH] Rename remaining i_mesh (interface) variables to mesh_v (variant) --- src/scheme/AcousticSolver.cpp | 18 +++++++++--------- src/scheme/HyperelasticSolver.cpp | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/scheme/AcousticSolver.cpp b/src/scheme/AcousticSolver.cpp index 90998d3ab..e4db63bd7 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 d88067f98..7bc6cd8c0 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()); } -- GitLab