diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index 9450f8d2b0..cdf8b2a4c6 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -9,7 +9,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/regionFaModels\lnInclude + -I$(LIB_SRC)/regionFaModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index e2de7b9c0e..073406498d 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -7,7 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/regionFaModels\lnInclude + -I$(LIB_SRC)/regionFaModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options index dd183fe022..128034e6f8 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options @@ -10,7 +10,7 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/regionFaModels\lnInclude + -I$(LIB_SRC)/regionFaModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index c0dc52dba0..1780cf51aa 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -7,7 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/regionFaModels\lnInclude + -I$(LIB_SRC)/regionFaModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index 95fff6059e..124e0e5850 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -19,7 +19,7 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionFaModels\lnInclude + -I$(LIB_SRC)/regionFaModels/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/incompressible/pimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/Make/options index 05f18df063..7d728a22d5 100644 --- a/applications/solvers/incompressible/pimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/Make/options @@ -8,7 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/regionFaModels\lnInclude + -I$(LIB_SRC)/regionFaModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H index 2795dff15b..107aef1a4c 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H @@ -30,8 +30,8 @@ Description \*---------------------------------------------------------------------------*/ -#ifndef CGALTriangulation3DKernel_H -#define CGALTriangulation3DKernel_H +#ifndef Foam_CGALTriangulation3DKernel_H +#define Foam_CGALTriangulation3DKernel_H // Silence boost bind deprecation warnings (before CGAL-5.2.1) #include "CGAL/version.h" @@ -54,9 +54,19 @@ Description // #include "CGAL/Robust_circumcenter_traits_3.h" // typedef CGAL::Robust_circumcenter_traits_3 K; +#if defined(CGAL_VERSION_NR) && (CGAL_VERSION_NR < 1050500000) + // Prior to CGAL-5.5 + #include "CGAL/Robust_circumcenter_filtered_traits_3.h" typedef CGAL::Robust_circumcenter_filtered_traits_3 K; +#else + + #include "CGAL/Robust_weighted_circumcenter_filtered_traits_3.h" + typedef CGAL::Robust_weighted_circumcenter_filtered_traits_3 K; + +#endif + #else // Very robust but expensive kernel diff --git a/applications/utilities/preProcessing/viewFactorsGen/Make/options b/applications/utilities/preProcessing/viewFactorsGen/Make/options index 08e64c8a7d..cc5cbf8c6b 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/Make/options +++ b/applications/utilities/preProcessing/viewFactorsGen/Make/options @@ -4,7 +4,6 @@ EXE_INC = \ -Wno-old-style-cast \ $(COMP_FLAGS) \ ${CGAL_INC} \ - -DCGAL_HEADER_ONLY \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -12,7 +11,6 @@ EXE_INC = \ EXE_LIBS = \ - /* ${CGAL_LIBS} */ \ -lfiniteVolume \ -lsurfMesh \ -lmeshTools \ diff --git a/src/OpenFOAM/parallel/globalIndex/globalIndex.H b/src/OpenFOAM/parallel/globalIndex/globalIndex.H index 707dd1d3f5..0437ade234 100644 --- a/src/OpenFOAM/parallel/globalIndex/globalIndex.H +++ b/src/OpenFOAM/parallel/globalIndex/globalIndex.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018-2022 OpenCFD Ltd. + Copyright (C) 2018-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -489,12 +489,12 @@ public: //- Collect indirect data in processor order on master // Handles contiguous/non-contiguous data, skips empty fields. - template + template static void gather ( const labelUList& offsets, //!< offsets (master only) const label comm, //!< communicator - const UList& procIDs, + const ProcIDsContainer& procIDs, const IndirectListBase& fld, List& allFld, //! output field (master only) const int tag = UPstream::msgType(), diff --git a/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C b/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C index f1b60ac033..c069603602 100644 --- a/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C +++ b/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019-2022 OpenCFD Ltd. + Copyright (C) 2019-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -248,12 +248,12 @@ void Foam::globalIndex::gather } -template +template void Foam::globalIndex::gather ( const labelUList& off, // needed on master only const label comm, - const UList& procIDs, + const ProcIDsContainer& procIDs, const IndirectListBase& fld, List& allFld, const int tag, @@ -368,7 +368,7 @@ void Foam::globalIndex::gather ( offsets_, // needed on master only comm, - UPstream::procID(comm), + UPstream::allProcs(comm), // All communicator ranks sendData, allData, tag, @@ -404,7 +404,7 @@ void Foam::globalIndex::gather ( offsets_, // needed on master only comm, - UPstream::procID(comm), + UPstream::allProcs(comm), // All communicator ranks sendData, allData, tag, @@ -622,7 +622,7 @@ void Foam::globalIndex::mpiGather ( offsets_, // needed on master only comm, - UPstream::procID(comm), + UPstream::allProcs(comm), // All communicator ranks sendData, allData, tag, @@ -967,7 +967,7 @@ void Foam::globalIndex::scatter ( offsets_, // needed on master only comm, - UPstream::procID(comm), + UPstream::allProcs(comm), // All communicator ranks allData, localData, tag, diff --git a/src/TurbulenceModels/turbulenceModels/laminar/generalizedNewtonian/generalizedNewtonianViscosityModels/Casson/Casson.C b/src/TurbulenceModels/turbulenceModels/laminar/generalizedNewtonian/generalizedNewtonianViscosityModels/Casson/Casson.C index 60046e64c7..a2c6a200a3 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/generalizedNewtonian/generalizedNewtonianViscosityModels/Casson/Casson.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/generalizedNewtonian/generalizedNewtonianViscosityModels/Casson/Casson.C @@ -79,8 +79,8 @@ bool Foam::laminarModels::generalizedNewtonianViscosityModels::Casson::read coeffs.readEntry("m", m_); coeffs.readEntry("tau0", tau0_); - coeffs.readEntry("nuMin_", nuMin_); - coeffs.readEntry("nuMax_", nuMax_); + coeffs.readEntry("nuMin", nuMin_); + coeffs.readEntry("nuMax", nuMax_); return true; } diff --git a/src/functionObjects/field/expressions/fvExpressionField.C b/src/functionObjects/field/expressions/fvExpressionField.C index 3479c14ef0..df11c2e10d 100644 --- a/src/functionObjects/field/expressions/fvExpressionField.C +++ b/src/functionObjects/field/expressions/fvExpressionField.C @@ -389,7 +389,7 @@ bool Foam::functionObjects::fvExpressionField::read(const dictionary& dict) } autowrite_ = dict.getOrDefault("autowrite", false); - store_ = dict.getOrDefault("autowrite", true); + store_ = dict.getOrDefault("store", true); // "dimensions" is optional dimensions_.clear(); diff --git a/src/functionObjects/utilities/ensightWrite/ensightWriteUpdate.C b/src/functionObjects/utilities/ensightWrite/ensightWriteUpdate.C index 62084a8998..a6b7dbdc52 100644 --- a/src/functionObjects/utilities/ensightWrite/ensightWriteUpdate.C +++ b/src/functionObjects/utilities/ensightWrite/ensightWriteUpdate.C @@ -103,7 +103,7 @@ bool Foam::functionObjects::ensightWrite::readSelection(const dictionary& dict) selectFields_.uniq(); blockFields_.clear(); - dict.readIfPresent("blockFields", blockFields_); + dict.readIfPresent("excludeFields", blockFields_); blockFields_.uniq(); // Actions to define selection diff --git a/src/fvOptions/corrections/limitVelocity/limitVelocity.C b/src/fvOptions/corrections/limitVelocity/limitVelocity.C index dc9aef6674..cfafaa068c 100644 --- a/src/fvOptions/corrections/limitVelocity/limitVelocity.C +++ b/src/fvOptions/corrections/limitVelocity/limitVelocity.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation - Copyright (C) 2018-2022 OpenCFD Ltd. + Copyright (C) 2018-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -71,7 +71,7 @@ Foam::fv::limitVelocity::limitVelocity : fv::cellSetOption(name, modelType, dict, mesh), writeFile(mesh, name, typeName, dict, false), - UName_(word::null), + UName_("U"), max_(0) { read(dict); diff --git a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCUaGradU/ATCUaGradU.C b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCUaGradU/ATCUaGradU.C index 660a697ee2..62048a5e95 100644 --- a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCUaGradU/ATCUaGradU.C +++ b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCUaGradU/ATCUaGradU.C @@ -5,8 +5,8 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2007-2021 PCOpt/NTUA - Copyright (C) 2013-2021 FOSS GP + Copyright (C) 2007-2023 PCOpt/NTUA + Copyright (C) 2013-2023 FOSS GP Copyright (C) 2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -86,10 +86,9 @@ void ATCUaGradU::addATC(fvVectorMatrix& UaEqn) if (extraConvection_ > 0) { // Implicit part added to increase diagonal dominance - // Note: Maybe this needs to be multiplied with the ATClimiter ?? - UaEqn += extraConvection_*fvm::div(-phi, Ua); + UaEqn += ATClimiter_*extraConvection_*fvm::div(-phi, Ua); - // correct rhs due to implicitly augmenting the adjoint convection + // Correct rhs due to implicitly augmenting the adjoint convection ATC_ += extraConvection_*(fvc::grad(UaForATC(), "gradUaATC")().T() & U); } diff --git a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCstandard/ATCstandard.C b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCstandard/ATCstandard.C index 9ad646fe88..2bda6fdb42 100644 --- a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCstandard/ATCstandard.C +++ b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCstandard/ATCstandard.C @@ -5,8 +5,8 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2007-2021 PCOpt/NTUA - Copyright (C) 2013-2021 FOSS GP + Copyright (C) 2007-2023 PCOpt/NTUA + Copyright (C) 2013-2023 FOSS GP Copyright (C) 2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -90,10 +90,9 @@ void ATCstandard::addATC(fvVectorMatrix& UaEqn) if (extraConvection_ > 0) { // Implicit part added to increase diagonal dominance - // Note: Maybe this needs to be multiplied with the ATClimiter ?? - UaEqn += extraConvection_*fvm::div(-phi, Ua); + UaEqn += ATClimiter_*extraConvection_*fvm::div(-phi, Ua); - // correct rhs due to implicitly augmenting the adjoint convection + // Correct rhs due to implicitly augmenting the adjoint convection ATC_ += extraConvection_*(fvc::grad(Ua, "gradUaATC")().T() & U); } diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index f68410fbd8..e79c31d330 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -1942,7 +1942,7 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs // //globalBorderTris.gather // //( // // UPstream::worldComm, -// // UPstream::procID(Pstream::worldComm), +// // UPstream::allProcs(UPstream::worldComm), // // globalBorderCentres // //); // pointField globalBorderCentres(allCentres); @@ -1989,7 +1989,7 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs // //globalBorderTris.scatter // //( // // UPstream::worldComm, -// // UPstream::procID(Pstream::worldComm), +// // UPstream::allProcs(UPstream::worldComm), // // isMasterPoint // //); // //boolList isMasterBorder(s.size(), false); @@ -2087,7 +2087,7 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs globalTris().gather ( UPstream::worldComm, - UPstream::procID(Pstream::worldComm), + UPstream::allProcs(UPstream::worldComm), allCentres ); } @@ -2137,7 +2137,7 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs globalTris().scatter ( UPstream::worldComm, - UPstream::procID(Pstream::worldComm), + UPstream::allProcs(UPstream::worldComm), allDistribution, distribution ); diff --git a/src/surfMesh/readers/ensight/ensightSurfaceReaderTemplates.C b/src/surfMesh/readers/ensight/ensightSurfaceReaderTemplates.C index 28cfbb1698..32d161afea 100644 --- a/src/surfMesh/readers/ensight/ensightSurfaceReaderTemplates.C +++ b/src/surfMesh/readers/ensight/ensightSurfaceReaderTemplates.C @@ -82,7 +82,7 @@ Foam::tmp> Foam::ensightSurfaceReader::readField } // Check that data type is as expected - // (assumes OpenFOAM generated the data set) + // (assuming OpenFOAM generated the data set) string primitiveType; is.read(primitiveType); @@ -90,7 +90,8 @@ Foam::tmp> Foam::ensightSurfaceReader::readField if ( - primitiveType != ensightPTraits::typeName + debug + && primitiveType != ensightPTraits::typeName && primitiveType != pTraits::typeName ) { diff --git a/src/transportModels/incompressible/viscosityModels/Casson/Casson.C b/src/transportModels/incompressible/viscosityModels/Casson/Casson.C index 5cb1bdd8f1..1ff08f2d5f 100644 --- a/src/transportModels/incompressible/viscosityModels/Casson/Casson.C +++ b/src/transportModels/incompressible/viscosityModels/Casson/Casson.C @@ -119,8 +119,8 @@ bool Foam::viscosityModels::Casson::read CassonCoeffs_.readEntry("m", m_); CassonCoeffs_.readEntry("tau0", tau0_); - CassonCoeffs_.readEntry("nuMin_", nuMin_); - CassonCoeffs_.readEntry("nuMax_", nuMax_); + CassonCoeffs_.readEntry("nuMin", nuMin_); + CassonCoeffs_.readEntry("nuMax", nuMax_); return true; } diff --git a/wmake/rules/General/cgal b/wmake/rules/General/cgal index 7442d4071e..e147b8e0b1 100644 --- a/wmake/rules/General/cgal +++ b/wmake/rules/General/cgal @@ -1,21 +1,26 @@ # ---------------------------------------------------------------------------- # CGAL definitions - several possibilities # -# 0. missing -# 1. header-only -# 2. library, no mpfr -# 3. library, with mpfr (a likely default) +# - missing +# - header-only +# - header-only, no mpfr +# - library, no mpfr +# - library, with mpfr (default for older CGAL) # # Dispatch according to the defined 'CGAL_FLAVOUR' # - names may change [see wmake/scripts/have_cgal] -# (no-cgal | cgal-header | cgal-no-mpfr | cgal-mpfr) +# (no-cgal | cgal-header | cgal-header-no-mpfr | cgal-no-mpfr | cgal-mpfr) cgal_subrule := cgal-mpfr -ifneq (,$(findstring header,$(CGAL_FLAVOUR))) - cgal_subrule := cgal-header-only -endif ifneq (,$(findstring no-mpfr,$(CGAL_FLAVOUR))) cgal_subrule := cgal-no-mpfr + ifneq (,$(findstring header,$(CGAL_FLAVOUR))) + cgal_subrule := cgal-header-no-mpfr + endif +else + ifneq (,$(findstring header,$(CGAL_FLAVOUR))) + cgal_subrule := cgal-header-only + endif endif # ---------------------------------------------------------------------------- diff --git a/wmake/rules/General/cgal-header-no-mpfr b/wmake/rules/General/cgal-header-no-mpfr new file mode 100644 index 0000000000..a2e7cf01c8 --- /dev/null +++ b/wmake/rules/General/cgal-header-no-mpfr @@ -0,0 +1,18 @@ +# ----------------------------------------------------------------------------- +# CGAL (header-only version) without mpfr + +CGAL_INC = -DCGAL_HEADER_ONLY +CGAL_LIBS = + +CGAL_INC += \ + $(foreach dir,$(BOOST_INC_DIR),-I$(dir)) \ + $(foreach dir,$(CGAL_INC_DIR),-I$(dir)) + +CGAL_LIBS += \ + $(foreach dir,$(BOOST_LIB_DIR),-L$(dir)) + +# ---- +# Extra failsafe - still needed? (2020-05-15) +## CGAL_INC += -I/usr/local/include -I/usr/include + +# ----------------------------------------------------------------------------- diff --git a/wmake/rules/darwin64Clang/cgal b/wmake/rules/darwin64Clang/cgal deleted file mode 100644 index b04e6b0c68..0000000000 --- a/wmake/rules/darwin64Clang/cgal +++ /dev/null @@ -1,14 +0,0 @@ -# ---------------------------------------------------------------------------- -# CGAL on Darwin -# CGAL (library version) without mpfr - -CGAL_INC = \ - $(foreach dir,$(BOOST_INC_DIR),-I$(dir)) \ - $(foreach dir,$(CGAL_INC_DIR),-I$(dir)) - -CGAL_LIBS = \ - $(foreach dir,$(BOOST_LIB_DIR),-L$(dir)) \ - $(foreach dir,$(CGAL_LIB_DIR),-L$(dir)) \ - -lCGAL - -# ---------------------------------------------------------------------------- diff --git a/wmake/rules/linux64Mingw/c++ b/wmake/rules/linux64Mingw/c++ index ca34cafb7c..8223990a8b 100644 --- a/wmake/rules/linux64Mingw/c++ +++ b/wmake/rules/linux64Mingw/c++ @@ -35,6 +35,7 @@ LINKLIBSO = $(CC) $(c++FLAGS) -shared \ -Wl,--strip-all LINKEXE = $(CC) $(c++FLAGS) \ + -static-libgcc -static-libstdc++ \ -Wl,--enable-auto-import \ -Wl,--strip-all \ -Wl,--force-exe-suffix