diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H index e6dec13b3f..67ae812c71 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H @@ -50,7 +50,7 @@ + ( he2.name() == thermo2.phasePropertyName("e") ? fvc::div(fvc::absolute(alphaPhi2, alpha2, U2), p) - + p*fvc::ddt(alpha1) + + p*fvc::ddt(alpha2) : -alpha2*dpdt ) diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Make/options b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Make/options index 23df4fe774..ae6726cd0c 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Make/options +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Make/options @@ -4,7 +4,6 @@ include $(GENERAL_RULES)/cgal EXE_INC = \ -DUNIX \ - -Wno-old-style-cast \ /* -IMarchingCubes */ \ -I$(FASTDUALOCTREE_SRC_PATH) \ -I../conformalVoronoiMesh/lnInclude \ diff --git a/applications/utilities/preProcessing/viewFactorsGen/Make/options b/applications/utilities/preProcessing/viewFactorsGen/Make/options index cc5cbf8c6b..803c6f22ef 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/Make/options +++ b/applications/utilities/preProcessing/viewFactorsGen/Make/options @@ -1,7 +1,6 @@ include $(GENERAL_RULES)/cgal-header-only EXE_INC = \ - -Wno-old-style-cast \ $(COMP_FLAGS) \ ${CGAL_INC} \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -9,7 +8,6 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/parallel/distributed/lnInclude - EXE_LIBS = \ -lfiniteVolume \ -lsurfMesh \ diff --git a/applications/utilities/surface/surfaceBooleanFeatures/PolyhedronReader/Make/options b/applications/utilities/surface/surfaceBooleanFeatures/PolyhedronReader/Make/options index 3f7a39676c..36f8439a38 100644 --- a/applications/utilities/surface/surfaceBooleanFeatures/PolyhedronReader/Make/options +++ b/applications/utilities/surface/surfaceBooleanFeatures/PolyhedronReader/Make/options @@ -1,8 +1,6 @@ EXE_NDEBUG = -DNDEBUG /* EXE_NDEBUG = -g -O0 -DFULLDEBUG */ -c++CGALWARN = -Wno-old-style-cast - /*-- Define CGAL_INEXACT to use inexact CGAL constructions */ include $(GENERAL_RULES)/cgal @@ -11,7 +9,6 @@ EXE_INC = \ ${ROUNDING_MATH} \ ${EXE_NDEBUG} \ ${CGAL_INC} \ - ${c++LESSWARN} \ -I.. \ -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/modules/OpenQBMM b/modules/OpenQBMM index dfbb204b70..9826f810ea 160000 --- a/modules/OpenQBMM +++ b/modules/OpenQBMM @@ -1 +1 @@ -Subproject commit dfbb204b703b0245b00ff82d60ba45e185d4c433 +Subproject commit 9826f810ea9e8d29c66de2cd8e9d5e734d7b1ea8 diff --git a/modules/external-solver b/modules/external-solver index 60323b8a06..090b5a7452 160000 --- a/modules/external-solver +++ b/modules/external-solver @@ -1 +1 @@ -Subproject commit 60323b8a06af9442040b446e6cca8d7f8a7cb0c2 +Subproject commit 090b5a74521214664ea91bb4128c2f4ad62c761c diff --git a/modules/visualization b/modules/visualization index 0f21605bec..42281cdd8c 160000 --- a/modules/visualization +++ b/modules/visualization @@ -1 +1 @@ -Subproject commit 0f21605bec1834acbe271c4849dd1d12fc802766 +Subproject commit 42281cdd8c9c1b076dd056338ed8715999a9d35a diff --git a/src/OSspecific/POSIX/printStack/printStack.C b/src/OSspecific/POSIX/printStack/printStack.C index a492937696..c81fdd4533 100644 --- a/src/OSspecific/POSIX/printStack/printStack.C +++ b/src/OSspecific/POSIX/printStack/printStack.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019-2023 OpenCFD Ltd. + Copyright (C) 2019-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,12 +64,11 @@ std::string pipeOpen(const std::string& cmd, const int lineNum = 0) if (cnt == lineNum) { // Retain the last line, trimming trailing newline - str.assign(buf); - - if (str.size()) + if (nread > 0) { - str.resize(str.size()-1); + buf[nread-1] = '\0'; } + str.assign(buf); } } diff --git a/src/dynamicMesh/motionSolvers/displacement/pointSmoothing/displacementSmartPointSmoothingMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/pointSmoothing/displacementSmartPointSmoothingMotionSolver.C index 264f739e18..804c10214f 100644 --- a/src/dynamicMesh/motionSolvers/displacement/pointSmoothing/displacementSmartPointSmoothingMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/pointSmoothing/displacementSmartPointSmoothingMotionSolver.C @@ -480,7 +480,7 @@ void Foam::displacementSmartPointSmoothingMotionSolver::solve() markAffectedFaces(facesToMove_, affectedFaces); - for(label i = 0; i < nPointSmootherIter_; i ++) + for (label nIter = 0; nIter < nPointSmootherIter_; ++nIter) { const pointField wantedPoints ( @@ -624,7 +624,7 @@ void Foam::displacementSmartPointSmoothingMotionSolver::solve() if (debug & 2) { - OBJstream os(debugDir/"untangle_" + Foam::name(i) + ".obj"); + OBJstream os(debugDir/"untangle_" + Foam::name(nIter) + ".obj"); const pointField wantedPoints ( diff --git a/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C b/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C index 0aa301237d..b52943570c 100644 --- a/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C +++ b/src/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C @@ -27,6 +27,7 @@ License \*---------------------------------------------------------------------------*/ #include "zoneDistribute.H" +#include "processorPolyPatch.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -44,10 +45,48 @@ Foam::zoneDistribute::zoneDistribute(const fvMesh& mesh) stencil_(zoneCPCStencil::New(mesh)), globalNumbering_(stencil_.globalNumbering()), send_(UPstream::nProcs()), - pBufs_(UPstream::commsTypes::nonBlocking) + pBufs_(UPstream::commsTypes::nonBlocking), + cyclicBoundaryCells_(mesh.nCells(), false) { // Don't clear storage on persistent buffer pBufs_.allowClearRecv(false); + + // Loop over boundary patches and store cells with a face on a cyclic patch + bool hasCyclicPatches = false; + forAll(mesh.boundaryMesh(), patchi) + { + const cyclicPolyPatch* cpp = + isA(mesh.boundaryMesh()[patchi]); + + if (cpp) + { + cyclicBoundaryCells_.set(cpp->faceCells()); + hasCyclicPatches = true; + } + } + + // Populate cyclicCentres_ + if(hasCyclicPatches) + { + // Make a boolList from the bitSet + boolList isCyclicCell(mesh.nCells(), false); + + forAll(cyclicBoundaryCells_, celli) + { + if (cyclicBoundaryCells_.test(celli)) + { + isCyclicCell[celli] = true; + } + } + + // Use getFields to get map of cell centres across processor boundaries + setUpCommforZone(isCyclicCell, true); + + cyclicCentres_.reset + ( + new Map(getFields(isCyclicCell, mesh_.C())) + ); + } } @@ -141,5 +180,226 @@ void Foam::zoneDistribute::setUpCommforZone } } +Foam::List Foam::zoneDistribute::getCyclicPatches +( + const label celli, + const label globalIdx +) const +{ + // Initialise cyclic patch label list + List