From efa8cae943f45a75993e42d29143d69374f84206 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 2 Feb 2023 11:37:47 +0000 Subject: [PATCH] solver: Remove unused bool return from moveMesh method --- applications/solvers/modules/VoFSolver/VoFSolver.H | 2 +- applications/solvers/modules/VoFSolver/moveMesh.C | 8 +------- .../modules/incompressibleFluid/incompressibleFluid.H | 4 ++-- .../solvers/modules/incompressibleFluid/moveMesh.C | 8 ++------ .../solvers/modules/isothermalFluid/isothermalFluid.H | 4 ++-- .../solvers/modules/isothermalFluid/moveMesh.C | 8 ++------ applications/solvers/modules/movingMesh/movingMesh.C | 6 +----- applications/solvers/modules/movingMesh/movingMesh.H | 2 +- .../modules/multiphaseEuler/multiphaseEuler/moveMesh.C | 10 ++-------- .../multiphaseEuler/multiphaseEuler/multiphaseEuler.H | 2 +- applications/solvers/modules/shockFluid/moveMesh.C | 6 +----- applications/solvers/modules/shockFluid/shockFluid.H | 2 +- applications/solvers/modules/solid/solid.C | 9 +-------- applications/solvers/modules/solid/solid.H | 2 +- src/finiteVolume/solver/solver.H | 2 +- 15 files changed, 20 insertions(+), 55 deletions(-) diff --git a/applications/solvers/modules/VoFSolver/VoFSolver.H b/applications/solvers/modules/VoFSolver/VoFSolver.H index 21b7be9442..eaa85601fc 100644 --- a/applications/solvers/modules/VoFSolver/VoFSolver.H +++ b/applications/solvers/modules/VoFSolver/VoFSolver.H @@ -212,7 +212,7 @@ public: virtual void preSolve(); //- Called at the start of the PIMPLE loop to move the mesh - virtual bool moveMesh(); + virtual void moveMesh(); //- Called at the start of the PIMPLE loop virtual void prePredictor() = 0; diff --git a/applications/solvers/modules/VoFSolver/moveMesh.C b/applications/solvers/modules/VoFSolver/moveMesh.C index 638308133e..7d2f047594 100644 --- a/applications/solvers/modules/VoFSolver/moveMesh.C +++ b/applications/solvers/modules/VoFSolver/moveMesh.C @@ -29,7 +29,7 @@ License // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -bool Foam::solvers::VoFSolver::moveMesh() +void Foam::solvers::VoFSolver::moveMesh() { if (pimple.firstIter() || pimple.moveMeshOuterCorrectors()) { @@ -102,16 +102,10 @@ bool Foam::solvers::VoFSolver::moveMesh() meshCourantNo(); correctInterface(); - - divU.clear(); - - return true; } divU.clear(); } - - return false; } diff --git a/applications/solvers/modules/incompressibleFluid/incompressibleFluid.H b/applications/solvers/modules/incompressibleFluid/incompressibleFluid.H index 61cb5f18fb..f732582dd6 100644 --- a/applications/solvers/modules/incompressibleFluid/incompressibleFluid.H +++ b/applications/solvers/modules/incompressibleFluid/incompressibleFluid.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -174,7 +174,7 @@ public: virtual void preSolve(); //- Called at the start of the PIMPLE loop to move the mesh - virtual bool moveMesh(); + virtual void moveMesh(); //- Called at the start of the PIMPLE loop virtual void prePredictor(); diff --git a/applications/solvers/modules/incompressibleFluid/moveMesh.C b/applications/solvers/modules/incompressibleFluid/moveMesh.C index 830f677589..99f813cfa1 100644 --- a/applications/solvers/modules/incompressibleFluid/moveMesh.C +++ b/applications/solvers/modules/incompressibleFluid/moveMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,7 +29,7 @@ License // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -bool Foam::solvers::incompressibleFluid::moveMesh() +void Foam::solvers::incompressibleFluid::moveMesh() { if (pimple.firstIter() || pimple.moveMeshOuterCorrectors()) { @@ -67,12 +67,8 @@ bool Foam::solvers::incompressibleFluid::moveMesh() } meshCourantNo(); - - return true; } } - - return false; } diff --git a/applications/solvers/modules/isothermalFluid/isothermalFluid.H b/applications/solvers/modules/isothermalFluid/isothermalFluid.H index 95d6a0ad7d..bf2f3034ef 100644 --- a/applications/solvers/modules/isothermalFluid/isothermalFluid.H +++ b/applications/solvers/modules/isothermalFluid/isothermalFluid.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -239,7 +239,7 @@ public: virtual void preSolve(); //- Called at the start of the PIMPLE loop to move the mesh - virtual bool moveMesh(); + virtual void moveMesh(); //- Called at the start of the PIMPLE loop virtual void prePredictor(); diff --git a/applications/solvers/modules/isothermalFluid/moveMesh.C b/applications/solvers/modules/isothermalFluid/moveMesh.C index f85f5ca97a..d1542f910f 100644 --- a/applications/solvers/modules/isothermalFluid/moveMesh.C +++ b/applications/solvers/modules/isothermalFluid/moveMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,7 +28,7 @@ License // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -bool Foam::solvers::isothermalFluid::moveMesh() +void Foam::solvers::isothermalFluid::moveMesh() { if (pimple.firstIter() || pimple.moveMeshOuterCorrectors()) { @@ -76,12 +76,8 @@ bool Foam::solvers::isothermalFluid::moveMesh() } meshCourantNo(); - - return true; } } - - return false; } diff --git a/applications/solvers/modules/movingMesh/movingMesh.C b/applications/solvers/modules/movingMesh/movingMesh.C index 08b88c36e3..c6ba567d76 100644 --- a/applications/solvers/modules/movingMesh/movingMesh.C +++ b/applications/solvers/modules/movingMesh/movingMesh.C @@ -71,16 +71,12 @@ void Foam::solvers::movingMesh::preSolve() } -bool Foam::solvers::movingMesh::moveMesh() +void Foam::solvers::movingMesh::moveMesh() { if (pimple.firstIter() || pimple.moveMeshOuterCorrectors()) { mesh.move(); - - return true; } - - return false; } diff --git a/applications/solvers/modules/movingMesh/movingMesh.H b/applications/solvers/modules/movingMesh/movingMesh.H index 3cebeb7ec6..a6ef22536b 100644 --- a/applications/solvers/modules/movingMesh/movingMesh.H +++ b/applications/solvers/modules/movingMesh/movingMesh.H @@ -89,7 +89,7 @@ public: virtual void preSolve(); //- Called at the start of the PIMPLE loop to move the mesh - virtual bool moveMesh(); + virtual void moveMesh(); //- Called at the beginning of the PIMPLE loop virtual void prePredictor(); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/moveMesh.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/moveMesh.C index 2a79c2ea9f..6d23b4e9e5 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/moveMesh.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/moveMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,7 +29,7 @@ License // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -bool Foam::solvers::multiphaseEuler::moveMesh() +void Foam::solvers::multiphaseEuler::moveMesh() { if ( @@ -69,16 +69,10 @@ bool Foam::solvers::multiphaseEuler::moveMesh() ); meshCourantNo(); - - divU.clear(); - - return true; } divU.clear(); } - - return false; } diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.H b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.H index 7a97bfd3e9..1ab0c4593b 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.H +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.H @@ -217,7 +217,7 @@ public: virtual void preSolve(); //- Called at the start of the PIMPLE loop to move the mesh - virtual bool moveMesh(); + virtual void moveMesh(); //- Called at the start of the PIMPLE loop virtual void prePredictor(); diff --git a/applications/solvers/modules/shockFluid/moveMesh.C b/applications/solvers/modules/shockFluid/moveMesh.C index 54ffb27f45..9b7b4226b6 100644 --- a/applications/solvers/modules/shockFluid/moveMesh.C +++ b/applications/solvers/modules/shockFluid/moveMesh.C @@ -27,7 +27,7 @@ License // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -bool Foam::solvers::shockFluid::moveMesh() +void Foam::solvers::shockFluid::moveMesh() { if (pimple.firstIter() || pimple.moveMeshOuterCorrectors()) { @@ -41,12 +41,8 @@ bool Foam::solvers::shockFluid::moveMesh() } meshCourantNo(); - - return true; } } - - return false; } diff --git a/applications/solvers/modules/shockFluid/shockFluid.H b/applications/solvers/modules/shockFluid/shockFluid.H index 9bc2422b32..42001b49ae 100644 --- a/applications/solvers/modules/shockFluid/shockFluid.H +++ b/applications/solvers/modules/shockFluid/shockFluid.H @@ -224,7 +224,7 @@ public: virtual void preSolve(); //- Called at the start of the PIMPLE loop to move the mesh - virtual bool moveMesh(); + virtual void moveMesh(); //- Called at the start of the PIMPLE loop virtual void prePredictor(); diff --git a/applications/solvers/modules/solid/solid.C b/applications/solvers/modules/solid/solid.C index fcf594ad71..37e5de8de2 100644 --- a/applications/solvers/modules/solid/solid.C +++ b/applications/solvers/modules/solid/solid.C @@ -160,7 +160,7 @@ void Foam::solvers::solid::preSolve() } -bool Foam::solvers::solid::moveMesh() +void Foam::solvers::solid::moveMesh() { if (pimple.firstIter() || pimple.moveMeshOuterCorrectors()) { @@ -173,14 +173,7 @@ bool Foam::solvers::solid::moveMesh() } mesh.move(); - - if (mesh.changing()) - { - return mesh.moving(); - } } - - return false; } diff --git a/applications/solvers/modules/solid/solid.H b/applications/solvers/modules/solid/solid.H index f372fc7703..9d7a6a77f8 100644 --- a/applications/solvers/modules/solid/solid.H +++ b/applications/solvers/modules/solid/solid.H @@ -130,7 +130,7 @@ public: virtual void preSolve(); //- Called at the start of the PIMPLE loop to move the mesh - virtual bool moveMesh(); + virtual void moveMesh(); //- Called at the beginning of the PIMPLE loop virtual void prePredictor(); diff --git a/src/finiteVolume/solver/solver.H b/src/finiteVolume/solver/solver.H index 51ff432673..9da87f47de 100644 --- a/src/finiteVolume/solver/solver.H +++ b/src/finiteVolume/solver/solver.H @@ -160,7 +160,7 @@ public: virtual void preSolve() = 0; //- Called at the start of the PIMPLE loop to move the mesh - virtual bool moveMesh() = 0; + virtual void moveMesh() = 0; //- Called at the start of the PIMPLE loop virtual void prePredictor() = 0;