diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions index a1f67650d0..4b54ca4b34 100644 --- a/bin/tools/CleanFunctions +++ b/bin/tools/CleanFunctions @@ -6,7 +6,7 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # Copyright (C) 2011-2016 OpenFOAM Foundation -# Copyright (C) 2015-2022 OpenCFD Ltd. +# Copyright (C) 2015-2023 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later. @@ -107,6 +107,10 @@ cleanPostProcessing() cleanFaMesh() { + if [ -e constant/finite-area/faMesh ] + then + rm -rf constant/finite-area/faMesh + fi if [ -e constant/faMesh ] then if [ -e constant/faMesh/faMeshDefinition ] @@ -116,7 +120,7 @@ cleanFaMesh() echo echo "Warning: not removing constant/faMesh/" echo " It contains a 'faMeshDefinition' file" - echo " Relocate the file(s) to system/ to avoid this warning" + echo " Please relocate file(s) to system/ !!" echo else # Can remove constant/faMesh/ entirely (no faMeshDefinition) @@ -138,7 +142,7 @@ cleanPolyMesh() echo echo "Warning: not removing constant/polyMesh/" echo " It contains a 'blockMeshDict' or 'blockMeshDict.m4' file" - echo " Relocate the file(s) to system/ to avoid this warning" + echo " Please relocate file(s) to system/ !!" echo else # Can remove constant/polyMesh/ entirely (no blockMeshDict) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index de90d6792b..8cf4f8efca 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -116,10 +116,11 @@ private: // Private Data - // Primitive mesh data + //- Mesh and solver state data + meshState data_; - //- Mesh data - meshState data_; + + // Primitive mesh data //- Points pointIOField points_; @@ -434,11 +435,11 @@ public: // Access - //- Return a reference to the mesh data - virtual meshState& data() noexcept {return data_;} + //- Const reference to the mesh and solver state data + virtual const meshState& data() const noexcept { return data_; } - //- Return a const reference to the mesh data - virtual const meshState& data() const noexcept {return data_;} + //- Reference to the mesh and solver state data + virtual meshState& data() noexcept { return data_; } //- Return raw points virtual const pointField& points() const; diff --git a/src/finiteArea/faMesh/faMesh.H b/src/finiteArea/faMesh/faMesh.H index 10ecd62e25..4d9c779350 100644 --- a/src/finiteArea/faMesh/faMesh.H +++ b/src/finiteArea/faMesh/faMesh.H @@ -645,9 +645,11 @@ public: //- Return the current instance directory for faces const fileName& facesInstance() const; - const meshState& data() const noexcept { return mesh().data(); } + //- Const reference to the mesh and solver state data + const meshState& data() const { return mesh().data(); } - meshState& data() noexcept { return const_cast(mesh()).data(); } + //- Reference to the mesh and solver state data + meshState& data() { return const_cast(mesh()).data(); } // Parallel