From ad762e6c69aed7240f4ceaa431e0f254f0fb6cae Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Wed, 23 May 2018 20:30:01 +0200 Subject: [PATCH] Changes to make CMake work with release candidate --- .../combustion/fireFoam/CMakeLists.txt | 17 +- applications/solvers/coupled/CMakeLists.txt | 1 - .../engine/turbDyMEngineFoam/CMakeLists.txt | 2 +- .../buoyantBoussinesqPisoFoam/CMakeLists.txt | 2 +- .../solvers/immersedBoundary/CMakeLists.txt | 7 +- .../CMakeLists.txt | 6 +- .../simpleIbFoam/CMakeLists.txt | 46 - .../solvers/incompressible/CMakeLists.txt | 3 +- .../RichardsFoam}/CMakeLists.txt | 8 +- .../CMakeLists.txt | 6 +- .../multiphase/MRFInterFoam/CMakeLists.txt | 2 +- .../multiphase/cavitatingFoam/CMakeLists.txt | 2 +- .../compressibleInterDyMFoam/CMakeLists.txt | 2 +- .../compressibleInterFoam/CMakeLists.txt | 2 +- .../multiphase/interDyMFoam/CMakeLists.txt | 2 +- .../multiphase/interFoam/CMakeLists.txt | 2 +- .../multiphase/interMixingFoam/CMakeLists.txt | 2 +- .../interPhaseChangeFoam/CMakeLists.txt | 2 +- .../multiphaseInterFoam/CMakeLists.txt | 2 +- .../multiphase/porousInterFoam/CMakeLists.txt | 2 +- .../twoLiquidMixingFoam/CMakeLists.txt | 2 +- .../refineImmersedBoundaryMesh/CMakeLists.txt | 2 +- .../writeIbMasks/CMakeLists.txt | 2 +- .../decomposePar/CMakeLists.txt | 11 +- .../reconstructPar/CMakeLists.txt | 8 +- .../reconstructParMesh/CMakeLists.txt | 10 +- .../postProcessing/graphics/CMakeLists.txt | 4 +- .../PV3FoamReader/vtkPV3Foam/CMakeLists.txt | 48 - .../CMakeLists.txt | 3 +- .../PVReaders/PVFoamReader/CMakeLists.txt | 11 +- .../PVFoamReader/vtkPVFoamReader.cxx | 95 +- .../vtkPVFoam}/CMakeLists.txt | 28 +- .../PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C | 2 +- .../surface/surfaceCoarsen/CMakeLists.txt | 2 +- cmake/FOAMConfigVersion.cmake | 31 - cmake/FindCCMIO.cmake | 4 + cmake/FindMesquite.cmake | 8 +- cmake/FindParMGridGen.cmake | 5 +- cmake/FindScotch.cmake | 4 +- cmake/compileFOAM.cmake | 19 +- cmake/tests.cmake | 2 +- src/CMakeLists.txt | 2 + src/ODE/CMakeLists.txt | 18 +- src/OSspecific/POSIX/CMakeLists.txt | 6 +- .../conjugateHeatTransfer/CMakeLists.txt | 0 src/coupledMatrix/CMakeLists.txt | 2 +- src/cudaSolvers/CMakeLists.txt | 2 +- src/dbns/CMakeLists.txt | 2 +- src/decompositionMethods/CMakeLists.txt | 1 + .../decomposeReconstruct/CMakeLists.txt | 63 + .../metisDecomp/CMakeLists.txt | 2 +- .../parMetisDecomp/CMakeLists.txt | 2 +- .../scotchDecomp/CMakeLists.txt | 2 +- src/dynamicMesh/CMakeLists.txt | 3 +- src/dynamicMesh/dynamicMesh/CMakeLists.txt | 5 + .../loadBalanceFvMesh}/CMakeLists.txt | 7 +- .../topoChangerFvMesh/CMakeLists.txt | 11 +- src/finiteArea/CMakeLists.txt | 38 +- src/finiteVolume/CMakeLists.txt | 7 +- src/foam/CMakeLists.txt | 100 +- src/foam/global/global.C | 80 - src/foam/global/global.C.in | 7 +- src/fvAgglomerationMethods/CMakeLists.txt | 1 + .../MGridGenGamgAgglomeration/CMakeLists.txt | 2 +- .../pairPatchAgglomeration/CMakeLists.txt | 39 + src/immersedBoundary/CMakeLists.txt | 4 +- .../immersedBoundary/CMakeLists.txt | 11 +- .../CMakeLists.txt | 7 +- .../immersedBoundaryTurbulence/CMakeLists.txt | 42 - .../immersedBoundaryTurbulence/Make/files | 6 - .../immersedBoundaryTurbulence/Make/options | 24 - ...aryEpsilonWallFunctionFvPatchScalarField.C | 393 - ...aryEpsilonWallFunctionFvPatchScalarField.H | 201 - ...ndaryOmegaWallFunctionFvPatchScalarField.C | 401 - ...ndaryOmegaWallFunctionFvPatchScalarField.H | 216 - ...ryVelocityWallFunctionFvPatchVectorField.C | 294 - ...ryVelocityWallFunctionFvPatchVectorField.H | 192 - ...immersedBoundaryWallFunctionFvPatchField.C | 233 - ...immersedBoundaryWallFunctionFvPatchField.H | 195 - ...mmersedBoundaryWallFunctionFvPatchFields.C | 50 - ...mmersedBoundaryWallFunctionFvPatchFields.H | 55 - src/lagrangian/dsmc/CMakeLists.txt | 2 +- src/lduSolvers/CMakeLists.txt | 8 +- src/mesh/extrudeModel/CMakeLists.txt | 3 +- src/meshTools/readSTLASCII.C | 2272 ------ .../overset}/CMakeLists.txt | 4 +- .../oversetDynamicFvMesh}/CMakeLists.txt | 14 +- src/overset/oversetMesh/CMakeLists.txt | 79 + .../foamCalcFunctions/CMakeLists.txt | 1 + .../functionObjects/CMakeLists.txt | 4 +- .../functionObjects/IO/CMakeLists.txt | 8 +- .../functionObjects/field/CMakeLists.txt | 13 +- .../functionObjects/fvTools}/CMakeLists.txt | 18 +- .../functionObjects/jobControl/CMakeLists.txt | 40 + .../functionObjects/utilities/CMakeLists.txt | 26 +- src/sampling/CMakeLists.txt | 21 +- src/solidModels/CMakeLists.txt | 10 +- src/surfMesh/CMakeLists.txt | 2 +- src/surfMesh/STLsurfaceFormatASCII.C | 2229 ------ .../CMakeLists.txt | 2 +- src/thermophysicalModels/basic/CMakeLists.txt | 1 + .../liquidMixture/CMakeLists.txt | 2 +- .../liquids/CMakeLists.txt | 2 +- .../reactionThermo/chemkinLexer.C | 6724 ----------------- .../thermophysicalFunctions/CMakeLists.txt | 2 +- .../incompressible/CMakeLists.txt | 2 +- .../incompressible/RAS/CMakeLists.txt | 13 + 107 files changed, 674 insertions(+), 13973 deletions(-) rename applications/solvers/immersedBoundary/{interIbFoam => pimpleDyMIbFoam}/CMakeLists.txt (91%) delete mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/CMakeLists.txt rename applications/solvers/{immersedBoundary/icoIbFoam => incompressible/RichardsFoam}/CMakeLists.txt (92%) rename applications/solvers/{immersedBoundary/icoDyMIbFoam => incompressible/RichardsFoam/spatialMeanValueRichardsonFoam}/CMakeLists.txt (93%) delete mode 100644 applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/CMakeLists.txt rename applications/utilities/postProcessing/graphics/{PV3FoamReader => PVReaders}/CMakeLists.txt (95%) rename applications/utilities/postProcessing/graphics/{PV4FoamReader/vtkPV4Foam => PVReaders/vtkPVFoam}/CMakeLists.txt (77%) delete mode 100644 cmake/FOAMConfigVersion.cmake rename {applications/solvers/coupled => src}/conjugateHeatTransfer/CMakeLists.txt (100%) create mode 100644 src/decompositionMethods/decomposeReconstruct/CMakeLists.txt rename src/{immersedBoundary/immersedBoundaryForce => dynamicMesh/loadBalanceFvMesh}/CMakeLists.txt (85%) delete mode 100644 src/foam/global/global.C create mode 100644 src/fvAgglomerationMethods/pairPatchAgglomeration/CMakeLists.txt delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/CMakeLists.txt delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/Make/files delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/Make/options delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.C delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.H delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.C delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.H delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.C delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.H delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.C delete mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.H delete mode 100644 src/meshTools/readSTLASCII.C rename {applications/utilities/postProcessing/graphics/PV4FoamReader => src/overset}/CMakeLists.txt (95%) rename {applications/solvers/immersedBoundary/potentialIbFoam => src/overset/oversetDynamicFvMesh}/CMakeLists.txt (84%) create mode 100644 src/overset/oversetMesh/CMakeLists.txt rename {applications/solvers/immersedBoundary/porousSimpleIbFoam => src/postProcessing/functionObjects/fvTools}/CMakeLists.txt (82%) create mode 100644 src/postProcessing/functionObjects/jobControl/CMakeLists.txt delete mode 100644 src/surfMesh/STLsurfaceFormatASCII.C delete mode 100644 src/thermophysicalModels/reactionThermo/chemkinLexer.C diff --git a/applications/solvers/combustion/fireFoam/CMakeLists.txt b/applications/solvers/combustion/fireFoam/CMakeLists.txt index 891dab31b..c3902fde1 100644 --- a/applications/solvers/combustion/fireFoam/CMakeLists.txt +++ b/applications/solvers/combustion/fireFoam/CMakeLists.txt @@ -30,4 +30,19 @@ # # -------------------------------------------------------------------------- -add_subdirectory(combustionModels) \ No newline at end of file +add_subdirectory(combustionModels) + +list(APPEND SOURCES + fireFoam.C +) + +# Set minimal environment for external compilation +if(NOT FOAM_FOUND) + cmake_minimum_required(VERSION 2.8) + find_package(FOAM REQUIRED) +endif() + +add_foam_executable(fireFoam + DEPENDS compressibleTurbulenceModel radiation combustionModels + SOURCES ${SOURCES} +) diff --git a/applications/solvers/coupled/CMakeLists.txt b/applications/solvers/coupled/CMakeLists.txt index f1d304bee..a80314a31 100644 --- a/applications/solvers/coupled/CMakeLists.txt +++ b/applications/solvers/coupled/CMakeLists.txt @@ -35,4 +35,3 @@ add_subdirectory(conjugateHeatFoam) add_subdirectory(pUCoupledFoam) add_subdirectory(conjugateHeatSimpleFoam) add_subdirectory(MRFPorousFoam) -add_subdirectory(conjugateHeatTransfer) \ No newline at end of file diff --git a/applications/solvers/engine/turbDyMEngineFoam/CMakeLists.txt b/applications/solvers/engine/turbDyMEngineFoam/CMakeLists.txt index 79ee5c146..925000dab 100644 --- a/applications/solvers/engine/turbDyMEngineFoam/CMakeLists.txt +++ b/applications/solvers/engine/turbDyMEngineFoam/CMakeLists.txt @@ -41,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(turbDyMEngineFoam - DEPENDS incompressibleTurbulenceModel engine + DEPENDS engine incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/CMakeLists.txt b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/CMakeLists.txt index 465ddddb4..f918a44e2 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/CMakeLists.txt +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/CMakeLists.txt @@ -41,7 +41,7 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(buoyantBoussinesqPisoFoam - DEPENDS incompressibleTurbulenceModel + DEPENDS incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/immersedBoundary/CMakeLists.txt b/applications/solvers/immersedBoundary/CMakeLists.txt index 19bb1ec34..67bf92733 100644 --- a/applications/solvers/immersedBoundary/CMakeLists.txt +++ b/applications/solvers/immersedBoundary/CMakeLists.txt @@ -30,9 +30,4 @@ # # -------------------------------------------------------------------------- -add_subdirectory(potentialIbFoam) -add_subdirectory(porousSimpleIbFoam) -add_subdirectory(simpleIbFoam) -add_subdirectory(icoDyMIbFoam) -add_subdirectory(interIbFoam) -add_subdirectory(icoIbFoam) \ No newline at end of file +add_subdirectory(pimpleDyMIbFoam) diff --git a/applications/solvers/immersedBoundary/interIbFoam/CMakeLists.txt b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/CMakeLists.txt similarity index 91% rename from applications/solvers/immersedBoundary/interIbFoam/CMakeLists.txt rename to applications/solvers/immersedBoundary/pimpleDyMIbFoam/CMakeLists.txt index 0aa7219b6..24e0a41e3 100644 --- a/applications/solvers/immersedBoundary/interIbFoam/CMakeLists.txt +++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/CMakeLists.txt @@ -31,7 +31,7 @@ # -------------------------------------------------------------------------- list(APPEND SOURCES - interIbFoam.C + pimpleDyMIbFoam.C ) # Set minimal environment for external compilation @@ -40,7 +40,7 @@ if(NOT FOAM_FOUND) find_package(FOAM REQUIRED) endif() -add_foam_executable(interIbFoam - DEPENDS immersedBoundary interfaceProperties incompressibleTurbulenceModel +add_foam_executable(pimpleDyMIbFoam + DEPENDS immersedBoundary dynamicFvMesh incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/immersedBoundary/simpleIbFoam/CMakeLists.txt b/applications/solvers/immersedBoundary/simpleIbFoam/CMakeLists.txt deleted file mode 100644 index 1f782001f..000000000 --- a/applications/solvers/immersedBoundary/simpleIbFoam/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -# -------------------------------------------------------------------------- -# ======== | -# \ / F ield | foam-extend: Open Source CFD -# \ / O peration | Version: 4.1 -# \ / A nd | Web: http://www.foam-extend.org -# \/ M anipulation | For copyright notice see file Copyright -# -------------------------------------------------------------------------- -# License -# This file is part of foam-extend. -# -# foam-extend is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or {at your -# option} any later version. -# -# foam-extend is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with foam-extend. If not, see . -# -# Description -# CMakeLists.txt file for libraries and applications -# -# Author -# Henrik Rusche, Wikki GmbH, 2017. All rights reserved -# -# -# -------------------------------------------------------------------------- - -list(APPEND SOURCES - simpleIbFoam.C -) - -# Set minimal environment for external compilation -if(NOT FOAM_FOUND) - cmake_minimum_required(VERSION 2.8) - find_package(FOAM REQUIRED) -endif() - -add_foam_executable(simpleIbFoam - DEPENDS immersedBoundaryTurbulence - SOURCES ${SOURCES} -) diff --git a/applications/solvers/incompressible/CMakeLists.txt b/applications/solvers/incompressible/CMakeLists.txt index a9ba4fafd..7194c4ffe 100644 --- a/applications/solvers/incompressible/CMakeLists.txt +++ b/applications/solvers/incompressible/CMakeLists.txt @@ -43,4 +43,5 @@ add_subdirectory(icoDyMSimpleFoam) add_subdirectory(nonNewtonianIcoFoam) add_subdirectory(pimpleFoam) add_subdirectory(shallowWaterFoam) -add_subdirectory(MRFSimpleFoam) \ No newline at end of file +add_subdirectory(MRFSimpleFoam) +add_subdirectory(RichardsFoam) diff --git a/applications/solvers/immersedBoundary/icoIbFoam/CMakeLists.txt b/applications/solvers/incompressible/RichardsFoam/CMakeLists.txt similarity index 92% rename from applications/solvers/immersedBoundary/icoIbFoam/CMakeLists.txt rename to applications/solvers/incompressible/RichardsFoam/CMakeLists.txt index a5afe5a3b..c56526c98 100644 --- a/applications/solvers/immersedBoundary/icoIbFoam/CMakeLists.txt +++ b/applications/solvers/incompressible/RichardsFoam/CMakeLists.txt @@ -30,8 +30,10 @@ # # -------------------------------------------------------------------------- +add_subdirectory(spatialMeanValueRichardsonFoam) + list(APPEND SOURCES - icoIbFoam.C + RichardsFoam.C ) # Set minimal environment for external compilation @@ -40,7 +42,7 @@ if(NOT FOAM_FOUND) find_package(FOAM REQUIRED) endif() -add_foam_executable(icoIbFoam - DEPENDS immersedBoundary +add_foam_executable(RichardsFoam + DEPENDS finiteVolume SOURCES ${SOURCES} ) diff --git a/applications/solvers/immersedBoundary/icoDyMIbFoam/CMakeLists.txt b/applications/solvers/incompressible/RichardsFoam/spatialMeanValueRichardsonFoam/CMakeLists.txt similarity index 93% rename from applications/solvers/immersedBoundary/icoDyMIbFoam/CMakeLists.txt rename to applications/solvers/incompressible/RichardsFoam/spatialMeanValueRichardsonFoam/CMakeLists.txt index c46ec3330..61e09372e 100644 --- a/applications/solvers/immersedBoundary/icoDyMIbFoam/CMakeLists.txt +++ b/applications/solvers/incompressible/RichardsFoam/spatialMeanValueRichardsonFoam/CMakeLists.txt @@ -31,7 +31,7 @@ # -------------------------------------------------------------------------- list(APPEND SOURCES - icoDyMIbFoam.C + spatialMeanValueRichardsonFoam.C ) # Set minimal environment for external compilation @@ -40,7 +40,7 @@ if(NOT FOAM_FOUND) find_package(FOAM REQUIRED) endif() -add_foam_executable(icoDyMIbFoam - DEPENDS immersedBoundary dynamicFvMesh +add_foam_executable(spatialMeanValueRichardsonFoam + DEPENDS finiteVolume SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/MRFInterFoam/CMakeLists.txt b/applications/solvers/multiphase/MRFInterFoam/CMakeLists.txt index 2acb1ca3c..c494542fd 100644 --- a/applications/solvers/multiphase/MRFInterFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/MRFInterFoam/CMakeLists.txt @@ -41,7 +41,7 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(MRFInterFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel + DEPENDS interfaceProperties incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/cavitatingFoam/CMakeLists.txt b/applications/solvers/multiphase/cavitatingFoam/CMakeLists.txt index 6bc047082..201c0a2c9 100644 --- a/applications/solvers/multiphase/cavitatingFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/cavitatingFoam/CMakeLists.txt @@ -41,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(cavitatingFoam - DEPENDS incompressibleTurbulenceModel barotropicCompressibilityModel + DEPENDS barotropicCompressibilityModel incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/CMakeLists.txt b/applications/solvers/multiphase/compressibleInterDyMFoam/CMakeLists.txt index f21718496..7be6357cb 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/CMakeLists.txt @@ -41,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(compressibleInterDyMFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel dynamicFvMesh + DEPENDS interfaceProperties dynamicFvMesh incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/compressibleInterFoam/CMakeLists.txt b/applications/solvers/multiphase/compressibleInterFoam/CMakeLists.txt index 0a7a8005c..6a20c2895 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/compressibleInterFoam/CMakeLists.txt @@ -41,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(compressibleInterFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel + DEPENDS interfaceProperties incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/interDyMFoam/CMakeLists.txt b/applications/solvers/multiphase/interDyMFoam/CMakeLists.txt index 745dfba6c..39a2a1bde 100644 --- a/applications/solvers/multiphase/interDyMFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/interDyMFoam/CMakeLists.txt @@ -41,7 +41,7 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(interDyMFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel dynamicFvMesh + DEPENDS interfaceProperties dynamicFvMesh incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/interFoam/CMakeLists.txt b/applications/solvers/multiphase/interFoam/CMakeLists.txt index b1573238d..b24f707cb 100644 --- a/applications/solvers/multiphase/interFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/interFoam/CMakeLists.txt @@ -41,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(interFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel + DEPENDS interfaceProperties incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/interMixingFoam/CMakeLists.txt b/applications/solvers/multiphase/interMixingFoam/CMakeLists.txt index a3a92b600..30ec5e19e 100644 --- a/applications/solvers/multiphase/interMixingFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/interMixingFoam/CMakeLists.txt @@ -43,7 +43,7 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(interMixingFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel + DEPENDS interfaceProperties incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/CMakeLists.txt b/applications/solvers/multiphase/interPhaseChangeFoam/CMakeLists.txt index 417c5cd0c..43882adff 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/interPhaseChangeFoam/CMakeLists.txt @@ -46,7 +46,7 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(interPhaseChangeFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel + DEPENDS interfaceProperties incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/multiphaseInterFoam/CMakeLists.txt b/applications/solvers/multiphase/multiphaseInterFoam/CMakeLists.txt index eab4c9c71..cf746f653 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/multiphaseInterFoam/CMakeLists.txt @@ -44,7 +44,7 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(multiphaseInterFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel + DEPENDS interfaceProperties incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/porousInterFoam/CMakeLists.txt b/applications/solvers/multiphase/porousInterFoam/CMakeLists.txt index 554037bd8..b40ac63e8 100644 --- a/applications/solvers/multiphase/porousInterFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/porousInterFoam/CMakeLists.txt @@ -41,7 +41,7 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(porousInterFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel + DEPENDS interfaceProperties incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/CMakeLists.txt b/applications/solvers/multiphase/twoLiquidMixingFoam/CMakeLists.txt index 4c3f10a63..ea4daf374 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/CMakeLists.txt +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/CMakeLists.txt @@ -41,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(twoLiquidMixingFoam - DEPENDS interfaceProperties incompressibleTurbulenceModel + DEPENDS interfaceProperties incompressibleRASModels incompressibleLESModels SOURCES ${SOURCES} ) diff --git a/applications/utilities/immersedBoundary/refineImmersedBoundaryMesh/CMakeLists.txt b/applications/utilities/immersedBoundary/refineImmersedBoundaryMesh/CMakeLists.txt index 4b644f3f0..3c114482a 100644 --- a/applications/utilities/immersedBoundary/refineImmersedBoundaryMesh/CMakeLists.txt +++ b/applications/utilities/immersedBoundary/refineImmersedBoundaryMesh/CMakeLists.txt @@ -41,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(refineImmersedBoundaryMesh - DEPENDS immersedBoundary + DEPENDS finiteVolume immersedBoundaryDynamicMesh SOURCES ${SOURCES} ) diff --git a/applications/utilities/immersedBoundary/writeIbMasks/CMakeLists.txt b/applications/utilities/immersedBoundary/writeIbMasks/CMakeLists.txt index 26ffdd69f..ef94cb95e 100644 --- a/applications/utilities/immersedBoundary/writeIbMasks/CMakeLists.txt +++ b/applications/utilities/immersedBoundary/writeIbMasks/CMakeLists.txt @@ -41,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(writeIbMasks - DEPENDS immersedBoundary + DEPENDS postCalc immersedBoundary SOURCES ${SOURCES} ) diff --git a/applications/utilities/parallelProcessing/decomposePar/CMakeLists.txt b/applications/utilities/parallelProcessing/decomposePar/CMakeLists.txt index 0f78fb247..a0823fdda 100644 --- a/applications/utilities/parallelProcessing/decomposePar/CMakeLists.txt +++ b/applications/utilities/parallelProcessing/decomposePar/CMakeLists.txt @@ -31,16 +31,7 @@ # -------------------------------------------------------------------------- list(APPEND SOURCES - decomposeMesh.C decomposePar.C - domainDecomposition.C - distributeCells.C - faMeshDecomposition.C - fvFieldDecomposer.C - faFieldDecomposer.C - pointFieldDecomposer.C - tetPointFieldDecomposer.C - lagrangianFieldDecomposer.C ) # Set minimal environment for external compilation @@ -50,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(decomposePar - DEPENDS finiteVolume finiteArea tetFiniteElement + DEPENDS decomposeReconstruct SOURCES ${SOURCES} ) diff --git a/applications/utilities/parallelProcessing/reconstructPar/CMakeLists.txt b/applications/utilities/parallelProcessing/reconstructPar/CMakeLists.txt index 778cf51a6..36f2ec614 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/CMakeLists.txt +++ b/applications/utilities/parallelProcessing/reconstructPar/CMakeLists.txt @@ -32,12 +32,6 @@ list(APPEND SOURCES processorMeshes.C - processorFaMeshes.C - fvFieldReconstructor.C - faFieldReconstructor.C - pointFieldReconstructor.C - tetPointFieldReconstructor.C - reconstructLagrangianPositions.C reconstructPar.C ) @@ -48,6 +42,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(reconstructPar - DEPENDS finiteVolume finiteArea tetFiniteElement + DEPENDS decomposeReconstruct SOURCES ${SOURCES} ) diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/CMakeLists.txt b/applications/utilities/parallelProcessing/reconstructParMesh/CMakeLists.txt index 81fe1e7c3..434963f32 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/CMakeLists.txt +++ b/applications/utilities/parallelProcessing/reconstructParMesh/CMakeLists.txt @@ -31,14 +31,6 @@ # -------------------------------------------------------------------------- list(APPEND SOURCES - processorMeshesReconstructor.C - processorMeshesRebuild.C - processorFaMeshes.C - fvFieldReconstructor.C - faFieldReconstructor.C - pointFieldReconstructor.C - tetPointFieldReconstructor.C - reconstructLagrangianPositions.C reconstructParMesh.C ) @@ -49,6 +41,6 @@ if(NOT FOAM_FOUND) endif() add_foam_executable(reconstructParMesh - DEPENDS finiteVolume finiteArea tetFiniteElement + DEPENDS decomposeReconstruct SOURCES ${SOURCES} ) diff --git a/applications/utilities/postProcessing/graphics/CMakeLists.txt b/applications/utilities/postProcessing/graphics/CMakeLists.txt index 78dfb58f8..84125bf25 100644 --- a/applications/utilities/postProcessing/graphics/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/CMakeLists.txt @@ -31,8 +31,6 @@ # -------------------------------------------------------------------------- add_subdirectory(newEnsightFoamReader) -#add_subdirectory(PV3FoamReader) -#add_subdirectory(PVFoamReader) -add_subdirectory(PV4FoamReader) +add_subdirectory(PVReaders) #add_subdirectory(fieldview9Reader) add_subdirectory(ensightFoamReader) diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/CMakeLists.txt deleted file mode 100644 index d984281b3..000000000 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -# -------------------------------------------------------------------------- -# ======== | -# \ / F ield | foam-extend: Open Source CFD -# \ / O peration | Version: 4.1 -# \ / A nd | Web: http://www.foam-extend.org -# \/ M anipulation | For copyright notice see file Copyright -# -------------------------------------------------------------------------- -# License -# This file is part of foam-extend. -# -# foam-extend is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or {at your -# option} any later version. -# -# foam-extend is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with foam-extend. If not, see . -# -# Description -# CMakeLists.txt file for libraries and applications -# -# Author -# Henrik Rusche, Wikki GmbH, 2017. All rights reserved -# -# -# -------------------------------------------------------------------------- - -list(APPEND SOURCES - vtkPV3Foam.C - vtkPV3FoamFields.C - vtkPV3FoamMesh.C - vtkPV3FoamMeshLagrangian.C - vtkPV3FoamMeshPatch.C - vtkPV3FoamMeshSet.C - vtkPV3FoamMeshVolume.C - vtkPV3FoamMeshZone.C - vtkPV3FoamUpdateInfo.C - vtkPV3FoamUtilities.C -) - -add_foam_library(vtkPV3Foam SHARED ${SOURCES}) - -target_link_libraries(vtkPV3Foam PUBLIC foam) diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/CMakeLists.txt similarity index 95% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/CMakeLists.txt rename to applications/utilities/postProcessing/graphics/PVReaders/CMakeLists.txt index 1f7685df3..8332c66c8 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/CMakeLists.txt @@ -30,4 +30,5 @@ # # -------------------------------------------------------------------------- -add_subdirectory(vtkPV3Foam) \ No newline at end of file +add_subdirectory(PVFoamReader) +add_subdirectory(vtkPVFoam) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt index dcb8f431b..074b2f11a 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt @@ -1,4 +1,5 @@ -# create a plugin that adds a reader to the ParaView GUI# it is added in the file dialog when doing opens/saves. +# create a plugin that adds a reader to the ParaView GUI +# it is added in the file dialog when doing opens/saves. # The qrc file is processed by Qt's resource compiler (rcc) # the qrc file must have a resource prefix of "/ParaViewResources" @@ -17,11 +18,11 @@ INCLUDE(${PARAVIEW_USE_FILE}) # Build the server-side plugin ADD_PARAVIEW_PLUGIN( - PV4FoamReader_SM "1.0" - SERVER_MANAGER_XML PV4FoamReader_SM.xml - SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx + PVFoamReader_SM "1.0" + SERVER_MANAGER_XML PVFoamReader_SM.xml + SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx ) -TARGET_LINK_LIBRARIES(PV4FoamReader_SM PUBLIC vtkPV4Foam pqCore) +TARGET_LINK_LIBRARIES(PVFoamReader_SM PUBLIC vtkPVFoam pqCore) #----------------------------------------------------------------------------- diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.cxx index 53ea3b37f..0754e7d82 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoamReader.cxx @@ -1,7 +1,7 @@ /*========================================================================= Program: Visualization Toolkit - Module: $RCSfile: vtkPV4FoamReader.cxx,v $ + Module: $RCSfile: vtkPVFoamReader.cxx,v $ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. @@ -13,10 +13,10 @@ =========================================================================*/ -#include "vtkPV4FoamReader.h" +#include "vtkPVFoamReader.h" // Foam includes -#include "vtkPV4Foam.H" +#include "vtkPVFoam.H" #include "pqApplicationCore.h" #include "pqRenderView.h" @@ -33,11 +33,11 @@ #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkStringArray.h" -vtkStandardNewMacro(vtkPV4FoamReader); +vtkStandardNewMacro(vtkPVFoamReader); #undef EXPERIMENTAL_TIME_CACHING -vtkPV4FoamReader::vtkPV4FoamReader() +vtkPVFoamReader::vtkPVFoamReader() { Debug = 0; vtkDebugMacro(<<"Constructor"); @@ -49,7 +49,7 @@ vtkPV4FoamReader::vtkPV4FoamReader() output0_ = NULL; -#ifdef VTKPV4FOAM_DUALPORT +#ifdef VTKPVFOAM_DUALPORT // Add second output for the Lagrangian this->SetNumberOfOutputPorts(2); vtkMultiBlockDataSet *lagrangian = vtkMultiBlockDataSet::New(); @@ -65,6 +65,7 @@ vtkPV4FoamReader::vtkPV4FoamReader() CacheMesh = 1; ExtrapolatePatches = 0; + UseVTKPolyhedron = 0; IncludeSets = 0; IncludeZones = 0; ShowPatchNames = 0; @@ -81,7 +82,7 @@ vtkPV4FoamReader::vtkPV4FoamReader() SelectionObserver = vtkCallbackCommand::New(); SelectionObserver->SetCallback ( - &vtkPV4FoamReader::SelectionModifiedCallback + &vtkPVFoamReader::SelectionModifiedCallback ); SelectionObserver->SetClientData(this); @@ -108,7 +109,7 @@ vtkPV4FoamReader::vtkPV4FoamReader() } -vtkPV4FoamReader::~vtkPV4FoamReader() +vtkPVFoamReader::~vtkPVFoamReader() { vtkDebugMacro(<<"Deconstructor"); @@ -140,7 +141,7 @@ vtkPV4FoamReader::~vtkPV4FoamReader() // Do everything except set the output info -int vtkPV4FoamReader::RequestInformation +int vtkPVFoamReader::RequestInformation ( vtkInformation* vtkNotUsed(request), vtkInformationVector** vtkNotUsed(inputVector), @@ -149,7 +150,7 @@ int vtkPV4FoamReader::RequestInformation { vtkDebugMacro(<<"RequestInformation"); - if (Foam::vtkPV4Foam::debug) + if (Foam::vtkPVFoam::debug) { cout<<"REQUEST_INFORMATION\n"; } @@ -162,7 +163,7 @@ int vtkPV4FoamReader::RequestInformation int nInfo = outputVector->GetNumberOfInformationObjects(); - if (Foam::vtkPV4Foam::debug) + if (Foam::vtkPVFoam::debug) { cout<<"RequestInformation with " << nInfo << " item(s)\n"; for (int infoI = 0; infoI < nInfo; ++infoI) @@ -173,7 +174,7 @@ int vtkPV4FoamReader::RequestInformation if (!foamData_) { - foamData_ = new Foam::vtkPV4Foam(FileName, this); + foamData_ = new Foam::vtkPVFoam(FileName, this); } else { @@ -210,7 +211,7 @@ int vtkPV4FoamReader::RequestInformation timeRange[0] = timeSteps[0]; timeRange[1] = timeSteps[nTimeSteps-1]; - if (Foam::vtkPV4Foam::debug > 1) + if (Foam::vtkPVFoam::debug > 1) { cout<<"nTimeSteps " << nTimeSteps << "\n" <<"timeRange " << timeRange[0] << " to " << timeRange[1] @@ -240,7 +241,7 @@ int vtkPV4FoamReader::RequestInformation // Set the output info -int vtkPV4FoamReader::RequestData +int vtkPVFoamReader::RequestData ( vtkInformation* vtkNotUsed(request), vtkInformationVector** vtkNotUsed(inputVector), @@ -264,7 +265,7 @@ int vtkPV4FoamReader::RequestData int nInfo = outputVector->GetNumberOfInformationObjects(); - if (Foam::vtkPV4Foam::debug) + if (Foam::vtkPVFoam::debug) { cout<<"RequestData with " << nInfo << " item(s)\n"; for (int infoI = 0; infoI < nInfo; ++infoI) @@ -282,7 +283,7 @@ int vtkPV4FoamReader::RequestData // taking port0 as the lead for other outputs would be nice, but fails when // a filter is added - we need to check everything // but since PREVIOUS_UPDATE_TIME_STEPS() is protected, relay the logic - // to the vtkPV4Foam::setTime() method + // to the vtkPVFoam::setTime() method for (int infoI = 0; infoI < nInfo; ++infoI) { vtkInformation *outInfo = outputVector->GetInformationObject(infoI); @@ -314,7 +315,7 @@ int vtkPV4FoamReader::RequestData ) ); - if (Foam::vtkPV4Foam::debug) + if (Foam::vtkPVFoam::debug) { cout<< "update output with " << output->GetNumberOfBlocks() << " blocks\n"; @@ -342,7 +343,7 @@ int vtkPV4FoamReader::RequestData output->ShallowCopy(output0_); } - if (Foam::vtkPV4Foam::debug) + if (Foam::vtkPVFoam::debug) { if (needsUpdate) { @@ -362,7 +363,7 @@ int vtkPV4FoamReader::RequestData #else -#ifdef VTKPV4FOAM_DUALPORT +#ifdef VTKPVFOAM_DUALPORT foamData_->Update ( output, @@ -396,7 +397,7 @@ int vtkPV4FoamReader::RequestData } -void vtkPV4FoamReader::addPatchNamesToView() +void vtkPVFoamReader::addPatchNamesToView() { pqApplicationCore* appCore = pqApplicationCore::instance(); @@ -416,7 +417,7 @@ void vtkPV4FoamReader::addPatchNamesToView() } -void vtkPV4FoamReader::removePatchNamesFromView() +void vtkPVFoamReader::removePatchNamesFromView() { pqApplicationCore* appCore = pqApplicationCore::instance(); @@ -436,7 +437,7 @@ void vtkPV4FoamReader::removePatchNamesFromView() } -void vtkPV4FoamReader::PrintSelf(ostream& os, vtkIndent indent) +void vtkPVFoamReader::PrintSelf(ostream& os, vtkIndent indent) { vtkDebugMacro(<<"PrintSelf"); @@ -453,7 +454,7 @@ void vtkPV4FoamReader::PrintSelf(ostream& os, vtkIndent indent) } -int vtkPV4FoamReader::GetTimeStep() +int vtkPVFoamReader::GetTimeStep() { return foamData_ ? foamData_->timeIndex() : -1; } @@ -462,35 +463,35 @@ int vtkPV4FoamReader::GetTimeStep() // ---------------------------------------------------------------------- // Parts selection list control -vtkDataArraySelection* vtkPV4FoamReader::GetPartSelection() +vtkDataArraySelection* vtkPVFoamReader::GetPartSelection() { vtkDebugMacro(<<"GetPartSelection"); return PartSelection; } -int vtkPV4FoamReader::GetNumberOfPartArrays() +int vtkPVFoamReader::GetNumberOfPartArrays() { vtkDebugMacro(<<"GetNumberOfPartArrays"); return PartSelection->GetNumberOfArrays(); } -const char* vtkPV4FoamReader::GetPartArrayName(int index) +const char* vtkPVFoamReader::GetPartArrayName(int index) { vtkDebugMacro(<<"GetPartArrayName"); return PartSelection->GetArrayName(index); } -int vtkPV4FoamReader::GetPartArrayStatus(const char* name) +int vtkPVFoamReader::GetPartArrayStatus(const char* name) { vtkDebugMacro(<<"GetPartArrayStatus"); return PartSelection->ArrayIsEnabled(name); } -void vtkPV4FoamReader::SetPartArrayStatus(const char* name, int status) +void vtkPVFoamReader::SetPartArrayStatus(const char* name, int status) { vtkDebugMacro(<<"SetPartArrayStatus"); if (status) @@ -507,35 +508,35 @@ void vtkPV4FoamReader::SetPartArrayStatus(const char* name, int status) // ---------------------------------------------------------------------- // volField selection list control -vtkDataArraySelection* vtkPV4FoamReader::GetVolFieldSelection() +vtkDataArraySelection* vtkPVFoamReader::GetVolFieldSelection() { vtkDebugMacro(<<"GetVolFieldSelection"); return VolFieldSelection; } -int vtkPV4FoamReader::GetNumberOfVolFieldArrays() +int vtkPVFoamReader::GetNumberOfVolFieldArrays() { vtkDebugMacro(<<"GetNumberOfVolFieldArrays"); return VolFieldSelection->GetNumberOfArrays(); } -const char* vtkPV4FoamReader::GetVolFieldArrayName(int index) +const char* vtkPVFoamReader::GetVolFieldArrayName(int index) { vtkDebugMacro(<<"GetVolFieldArrayName"); return VolFieldSelection->GetArrayName(index); } -int vtkPV4FoamReader::GetVolFieldArrayStatus(const char* name) +int vtkPVFoamReader::GetVolFieldArrayStatus(const char* name) { vtkDebugMacro(<<"GetVolFieldArrayStatus"); return VolFieldSelection->ArrayIsEnabled(name); } -void vtkPV4FoamReader::SetVolFieldArrayStatus(const char* name, int status) +void vtkPVFoamReader::SetVolFieldArrayStatus(const char* name, int status) { vtkDebugMacro(<<"SetVolFieldArrayStatus"); if (status) @@ -552,35 +553,35 @@ void vtkPV4FoamReader::SetVolFieldArrayStatus(const char* name, int status) // ---------------------------------------------------------------------- // pointField selection list control -vtkDataArraySelection* vtkPV4FoamReader::GetPointFieldSelection() +vtkDataArraySelection* vtkPVFoamReader::GetPointFieldSelection() { vtkDebugMacro(<<"GetPointFieldSelection"); return PointFieldSelection; } -int vtkPV4FoamReader::GetNumberOfPointFieldArrays() +int vtkPVFoamReader::GetNumberOfPointFieldArrays() { vtkDebugMacro(<<"GetNumberOfPointFieldArrays"); return PointFieldSelection->GetNumberOfArrays(); } -const char* vtkPV4FoamReader::GetPointFieldArrayName(int index) +const char* vtkPVFoamReader::GetPointFieldArrayName(int index) { vtkDebugMacro(<<"GetPointFieldArrayName"); return PointFieldSelection->GetArrayName(index); } -int vtkPV4FoamReader::GetPointFieldArrayStatus(const char* name) +int vtkPVFoamReader::GetPointFieldArrayStatus(const char* name) { vtkDebugMacro(<<"GetPointFieldArrayStatus"); return PointFieldSelection->ArrayIsEnabled(name); } -void vtkPV4FoamReader::SetPointFieldArrayStatus(const char* name, int status) +void vtkPVFoamReader::SetPointFieldArrayStatus(const char* name, int status) { vtkDebugMacro(<<"SetPointFieldArrayStatus"); if (status) @@ -597,35 +598,35 @@ void vtkPV4FoamReader::SetPointFieldArrayStatus(const char* name, int status) // ---------------------------------------------------------------------- // lagrangianField selection list control -vtkDataArraySelection* vtkPV4FoamReader::GetLagrangianFieldSelection() +vtkDataArraySelection* vtkPVFoamReader::GetLagrangianFieldSelection() { vtkDebugMacro(<<"GetLagrangianFieldSelection"); return LagrangianFieldSelection; } -int vtkPV4FoamReader::GetNumberOfLagrangianFieldArrays() +int vtkPVFoamReader::GetNumberOfLagrangianFieldArrays() { vtkDebugMacro(<<"GetNumberOfLagrangianFieldArrays"); return LagrangianFieldSelection->GetNumberOfArrays(); } -const char* vtkPV4FoamReader::GetLagrangianFieldArrayName(int index) +const char* vtkPVFoamReader::GetLagrangianFieldArrayName(int index) { vtkDebugMacro(<<"GetLagrangianFieldArrayName"); return LagrangianFieldSelection->GetArrayName(index); } -int vtkPV4FoamReader::GetLagrangianFieldArrayStatus(const char* name) +int vtkPVFoamReader::GetLagrangianFieldArrayStatus(const char* name) { vtkDebugMacro(<<"GetLagrangianFieldArrayStatus"); return LagrangianFieldSelection->ArrayIsEnabled(name); } -void vtkPV4FoamReader::SetLagrangianFieldArrayStatus +void vtkPVFoamReader::SetLagrangianFieldArrayStatus ( const char* name, int status @@ -645,7 +646,7 @@ void vtkPV4FoamReader::SetLagrangianFieldArrayStatus // ---------------------------------------------------------------------- -void vtkPV4FoamReader::SelectionModifiedCallback +void vtkPVFoamReader::SelectionModifiedCallback ( vtkObject*, unsigned long, @@ -653,18 +654,18 @@ void vtkPV4FoamReader::SelectionModifiedCallback void* ) { - static_cast(clientdata)->SelectionModified(); + static_cast(clientdata)->SelectionModified(); } -void vtkPV4FoamReader::SelectionModified() +void vtkPVFoamReader::SelectionModified() { vtkDebugMacro(<<"SelectionModified"); Modified(); } -int vtkPV4FoamReader::FillOutputPortInformation +int vtkPVFoamReader::FillOutputPortInformation ( int port, vtkInformation* info diff --git a/applications/utilities/postProcessing/graphics/PV4FoamReader/vtkPV4Foam/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/CMakeLists.txt similarity index 77% rename from applications/utilities/postProcessing/graphics/PV4FoamReader/vtkPV4Foam/CMakeLists.txt rename to applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/CMakeLists.txt index 390c417b3..0d683321b 100644 --- a/applications/utilities/postProcessing/graphics/PV4FoamReader/vtkPV4Foam/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/CMakeLists.txt @@ -33,22 +33,22 @@ include(${PARAVIEW_USE_FILE}) list(APPEND SOURCES - vtkPV4Foam.C - vtkPV4FoamFields.C - vtkPV4FoamMesh.C - vtkPV4FoamMeshLagrangian.C - vtkPV4FoamMeshPatch.C - vtkPV4FoamMeshSet.C - vtkPV4FoamMeshVolume.C - vtkPV4FoamMeshZone.C - vtkPV4FoamUpdateInfo.C - vtkPV4FoamUtilities.C + vtkPVFoam.C + vtkPVFoamFields.C + vtkPVFoamMesh.C + vtkPVFoamMeshLagrangian.C + vtkPVFoamMeshPatch.C + vtkPVFoamMeshSet.C + vtkPVFoamMeshVolume.C + vtkPVFoamMeshZone.C + vtkPVFoamUpdateInfo.C + vtkPVFoamUtilities.C ) -add_foam_library(vtkPV4Foam SHARED ${SOURCES}) +add_foam_library(vtkPVFoam SHARED ${SOURCES}) -target_link_libraries(vtkPV4Foam finiteVolume) -target_include_directories(vtkPV4Foam PUBLIC - $ +target_link_libraries(vtkPVFoam finiteVolume) +target_include_directories(vtkPVFoam PUBLIC + $ # $ ) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C index f219f942a..474654408 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C @@ -300,7 +300,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh // but avoids crashes when there is no vtkPolyhedron support // establish unique node ids used - HashSet> hashUniqId(2*256); + HashSet > hashUniqId(2*256); forAll(cFaces, cFacei) { diff --git a/applications/utilities/surface/surfaceCoarsen/CMakeLists.txt b/applications/utilities/surface/surfaceCoarsen/CMakeLists.txt index 20e922e97..71b06247d 100644 --- a/applications/utilities/surface/surfaceCoarsen/CMakeLists.txt +++ b/applications/utilities/surface/surfaceCoarsen/CMakeLists.txt @@ -32,7 +32,7 @@ list(APPEND SOURCES bunnylod/progmesh.C - bunnylod/vector.C + bunnylod/vectorb.C surfaceCoarsen.C ) diff --git a/cmake/FOAMConfigVersion.cmake b/cmake/FOAMConfigVersion.cmake deleted file mode 100644 index c03c15f1d..000000000 --- a/cmake/FOAMConfigVersion.cmake +++ /dev/null @@ -1,31 +0,0 @@ -# This is a basic version file for the Config-mode of find_package(). -# It is used by write_basic_package_version_file() as input file for configure_file() -# to create a version-file which can be installed along a config.cmake file. -# -# The created file sets PACKAGE_VERSION_EXACT if the current version string and -# the requested version string are exactly the same and it sets -# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. -# The variable CVF_VERSION must be set before calling configure_file(). - -set(PACKAGE_VERSION "4.0") - -if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() - -# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: -if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") - return() -endif() - -# check that the installed version has the same 32/64bit-ness as the one which is currently searching: -if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") - math(EXPR installedBits "8 * 8") - set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_UNSUITABLE TRUE) -endif() diff --git a/cmake/FindCCMIO.cmake b/cmake/FindCCMIO.cmake index d1274c9a8..dce28195b 100644 --- a/cmake/FindCCMIO.cmake +++ b/cmake/FindCCMIO.cmake @@ -34,8 +34,12 @@ find_library(CCMIO_LIBRARY2 ${CCMIO_PKGCONF_LIBRARY_DIRS} ) +message(STATUS ${CCMIO_INCLUDE_DIR}) +message(STATUS ${CCMIO_LIBRARY}) + # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. + set(CCMIO_PROCESS_INCLUDES CCMIO_INCLUDE_DIR CCMIO_INCLUDE_DIR2) set(CCMIO_PROCESS_LIBS CCMIO_LIBRARY CCMIO_LIBRARY2) libfind_process(CCMIO) diff --git a/cmake/FindMesquite.cmake b/cmake/FindMesquite.cmake index c7746c550..a160c6fe4 100644 --- a/cmake/FindMesquite.cmake +++ b/cmake/FindMesquite.cmake @@ -20,8 +20,12 @@ find_library(MESQUITE_LIBRARY ${MESQUITE_PKGCONF_LIBRARY_DIRS} ) +message(STATUS ${MESQUITE_INCLUDE_DIR}) +message(STATUS ${MESQUITE_LIBRARY}) + # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. -set(MESQUITE_PROCESS_INCLUDES MESQUITE_INCLUDE_DIR) -set(MESQUITE_PROCESS_LIBS MESQUITE_LIBRARY) + +set(MESQUITE_PROCESS_INCLUDE MESQUITE_INCLUDE_DIR) +set(MESQUITE_PROCESS_LIB MESQUITE_LIBRARY) libfind_process(MESQUITE) diff --git a/cmake/FindParMGridGen.cmake b/cmake/FindParMGridGen.cmake index 518dfb2f5..c7547464a 100644 --- a/cmake/FindParMGridGen.cmake +++ b/cmake/FindParMGridGen.cmake @@ -33,6 +33,7 @@ find_library(PARMGRIDGEN_LIBRARY message(STATUS ${PARMGRIDGEN_INCLUDE_DIR}) message(STATUS ${PARMGRIDGEN_LIBRARY}) -set(PARMGRIDGEN_PROCESS_INCLUDES PARMGRIDGEN_INCLUDE_DIR PARMGRIDGEN_INCLUDE_DIR2) -set(PARMGRIDGEN_PROCESS_LIBS PARMGRIDGEN_LIBRARY) +set(PARMGRIDGEN_PROCESS_INCLUDE PARMGRIDGEN_INCLUDE_DIR) +set(PARMGRIDGEN_PROCESS_INCLUDES PARMGRIDGEN_INCLUDE_DIR2) +set(PARMGRIDGEN_PROCESS_LIB PARMGRIDGEN_LIBRARY) libfind_process(PARMGRIDGEN) diff --git a/cmake/FindScotch.cmake b/cmake/FindScotch.cmake index e89c5c179..0c23d41f1 100644 --- a/cmake/FindScotch.cmake +++ b/cmake/FindScotch.cmake @@ -26,6 +26,6 @@ find_library(SCOTCH_LIBRARY message(STATUS ${SCOTCH_INCLUDE_DIR}) message(STATUS ${SCOTCH_LIBRARY}) -set(SCOTCH_PROCESS_INCLUDES SCOTCH_INCLUDE_DIR) -set(SCOTCH_PROCESS_LIBS SCOTCH_LIBRARY) +set(SCOTCH_PROCESS_INCLUDE SCOTCH_INCLUDE_DIR) +set(SCOTCH_PROCESS_LIB SCOTCH_LIBRARY) libfind_process(SCOTCH) diff --git a/cmake/compileFOAM.cmake b/cmake/compileFOAM.cmake index b5bbf7004..9e6c19032 100644 --- a/cmake/compileFOAM.cmake +++ b/cmake/compileFOAM.cmake @@ -118,6 +118,11 @@ if(CCMIO_FOUND) set_property(TARGET ccmio PROPERTY INTERFACE_LINK_LIBRARIES ${CCMIO_LIBRARIES}) endif() +#SET(CMAKE_INSTALL_RPATH FALSE) +#SET(CMAKE_SKIP_BUILD_RPATH TRUE) +#SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) +#SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + # # Recurse into the source # @@ -155,17 +160,27 @@ else() target_compile_definitions(OSspecific PUBLIC WM_DP) endif() +# Label size +set(FOAM_LABEL_SIZE "32" CACHE STRING "Label size") +set_property(CACHE FOAM_LABEL_SIZE PROPERTY STRINGS 32 64) +target_compile_definitions(OSspecific PUBLIC WM_LABEL_SIZE=${FOAM_LABEL_SIZE}) + # No Repository target_compile_definitions(OSspecific PUBLIC NoRepository) +# No Repository +target_compile_definitions(OSspecific PUBLIC linux64) + # FOAM's full debug mode if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") target_compile_definitions(OSspecific PUBLIC FULLDEBUG) target_compile_options(OSspecific PUBLIC -fdefault-inline -ggdb3) endif() -#option(FOAM_PRECISION "help string describing option" -WM_DP) - +#target_compile_options( +# OSspecific PUBLIC +# -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor +#) # # Exports and install diff --git a/cmake/tests.cmake b/cmake/tests.cmake index f9f2e28ae..4cc4711f1 100644 --- a/cmake/tests.cmake +++ b/cmake/tests.cmake @@ -321,7 +321,7 @@ message("Site name: ${SITE}") # Compile FOAM, libs and apps add_custom_target (foam-extend-$ENV{WM_PROJECT_VERSION} ALL - ${FOAM_ROOT}/Allwmake + #${FOAM_ROOT}/Allwmake ) set_property( diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9fdd833dd..f87e07b8d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,6 +32,7 @@ add_subdirectory(foam) add_subdirectory(immersedBoundary) +add_subdirectory(overset) add_subdirectory(lagrangian) add_subdirectory(edgeMesh) add_subdirectory(coupledMatrix) @@ -62,3 +63,4 @@ add_subdirectory(meshTools) add_subdirectory(dynamicMesh) add_subdirectory(thermophysicalModels) add_subdirectory(dbns) +add_subdirectory(conjugateHeatTransfer) diff --git a/src/ODE/CMakeLists.txt b/src/ODE/CMakeLists.txt index 6c5e809df..6819357de 100644 --- a/src/ODE/CMakeLists.txt +++ b/src/ODE/CMakeLists.txt @@ -51,7 +51,23 @@ set(sixDOF sixDOF) list(APPEND SOURCES ${sixDOF}/finiteRotation/finiteRotation.C ${sixDOF}/sixDOFqODE/sixDOFqODE.C - ${sixDOF}/sixDOFbodies/sixDOFbodies.C + ${sixDOF}/sixDOFODE/constraints/rotationalConstraints/rotationalConstraint/rotationalConstraint.C + ${sixDOF}/sixDOFODE/constraints/rotationalConstraints/constantAngularAcceleration/constantAngularAcceleration.C + ${sixDOF}/sixDOFODE/constraints/translationalConstraints/translationalConstraint/translationalConstraint.C + ${sixDOF}/sixDOFODE/constraints/translationalConstraints/constantTranslationalAcceleration/constantTranslationalAcceleration.C + ${sixDOF}/sixDOFODE/constraints/translationalConstraints/periodicOscillation/periodicOscillation.C + + ${sixDOF}/sixDOFODE/restraints/translationalRestraints/translationalRestraint/translationalRestraint.C + ${sixDOF}/sixDOFODE/restraints/translationalRestraints/linearSpringDamper/linearSpringDamper.C + ${sixDOF}/sixDOFODE/restraints/rotationalRestraints/rotationalRestraint/rotationalRestraint.C + ${sixDOF}/sixDOFODE/restraints/rotationalRestraints/angularDamper/angularDamper.C + + ${sixDOF}/sixDOFODE/sixDOFODE.C + ${sixDOF}/sixDOFODE/newSixDOFODE.C + ${sixDOF}/quaternionSixDOF/quaternionSixDOF.C + ${sixDOF}/geometricSixDOF/geometricSixDOF.C + + ${sixDOF}/sixDOFBodies/sixDOFBodies.C ) add_foam_library(ODE SHARED ${SOURCES}) diff --git a/src/OSspecific/POSIX/CMakeLists.txt b/src/OSspecific/POSIX/CMakeLists.txt index 1033f3313..5f1fcb057 100644 --- a/src/OSspecific/POSIX/CMakeLists.txt +++ b/src/OSspecific/POSIX/CMakeLists.txt @@ -44,7 +44,12 @@ list(APPEND SOURCES POSIX.C cpuTime/cpuTime.C clockTime/clockTime.C + memInfo/memInfo.C multiThreader/multiThreader.C + +# Note: fileMonitor assumes inotify by default. Compile with -DFOAM_USE_STAT +# to use stat (=timestamps) instead of inotify + fileMonitor.C ) #ifdef SunOS64 @@ -59,5 +64,4 @@ list(APPEND SOURCES add_foam_library(OSspecific SHARED ${SOURCES}) -target_link_libraries(OSspecific) add_dependencies(OSspecific foam_lnInclude) diff --git a/applications/solvers/coupled/conjugateHeatTransfer/CMakeLists.txt b/src/conjugateHeatTransfer/CMakeLists.txt similarity index 100% rename from applications/solvers/coupled/conjugateHeatTransfer/CMakeLists.txt rename to src/conjugateHeatTransfer/CMakeLists.txt diff --git a/src/coupledMatrix/CMakeLists.txt b/src/coupledMatrix/CMakeLists.txt index 061dea019..4cb4d7035 100644 --- a/src/coupledMatrix/CMakeLists.txt +++ b/src/coupledMatrix/CMakeLists.txt @@ -54,4 +54,4 @@ list(APPEND SOURCES add_foam_library(coupledLduMatrix SHARED ${SOURCES}) -target_link_libraries(coupledLduMatrix finiteVolume) +target_link_libraries(coupledLduMatrix PUBLIC finiteVolume) diff --git a/src/cudaSolvers/CMakeLists.txt b/src/cudaSolvers/CMakeLists.txt index 40d439181..9ef4d2af0 100644 --- a/src/cudaSolvers/CMakeLists.txt +++ b/src/cudaSolvers/CMakeLists.txt @@ -43,4 +43,4 @@ list(APPEND SOURCES add_foam_library(cudaSolvers SHARED ${SOURCES}) -target_link_libraries(cudaSolvers finiteVolume) +target_link_libraries(cudaSolvers PUBLIC finiteVolume) diff --git a/src/dbns/CMakeLists.txt b/src/dbns/CMakeLists.txt index fe7d5b1c3..145dfe9c4 100644 --- a/src/dbns/CMakeLists.txt +++ b/src/dbns/CMakeLists.txt @@ -53,7 +53,7 @@ list(APPEND SOURCES if(PARMGRIDGEN_FOUND) add_foam_library(dbns SHARED ${SOURCES}) - target_link_libraries(dbns compressibleTurbulenceModel parmgridgen) + target_link_libraries(dbns PUBLIC compressibleTurbulenceModel parmgridgen) else() message(WARNING dbns will not be build) endif() diff --git a/src/decompositionMethods/CMakeLists.txt b/src/decompositionMethods/CMakeLists.txt index b4dfa4e0d..10e1a89f7 100644 --- a/src/decompositionMethods/CMakeLists.txt +++ b/src/decompositionMethods/CMakeLists.txt @@ -34,3 +34,4 @@ add_subdirectory(parMetisDecomp) add_subdirectory(decompositionMethods) add_subdirectory(scotchDecomp) add_subdirectory(metisDecomp) +add_subdirectory(decomposeReconstruct) diff --git a/src/decompositionMethods/decomposeReconstruct/CMakeLists.txt b/src/decompositionMethods/decomposeReconstruct/CMakeLists.txt new file mode 100644 index 000000000..97ffc23c6 --- /dev/null +++ b/src/decompositionMethods/decomposeReconstruct/CMakeLists.txt @@ -0,0 +1,63 @@ +# -------------------------------------------------------------------------- +# ======== | +# \ / F ield | foam-extend: Open Source CFD +# \ / O peration | Version: 4.1 +# \ / A nd | Web: http://www.foam-extend.org +# \/ M anipulation | For copyright notice see file Copyright +# -------------------------------------------------------------------------- +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or {at your +# option} any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Description +# CMakeLists.txt file for libraries and applications +# +# Author +# Henrik Rusche, Wikki GmbH, 2017. All rights reserved +# +# +# -------------------------------------------------------------------------- + +list(APPEND SOURCES + passivePatches/passiveProcessorPolyPatch/passiveProcessorPolyPatch.C + passivePatches/passiveProcessorFvPatch/passiveProcessorFvPatch.C + + passivePatchFields/passiveFvPatchFields/passiveProcessor/passiveProcessorFvPatchFields.C + passivePatchFields/passiveFvsPatchFields/passiveProcessor/passiveProcessorFvsPatchFields.C + + decomposeTools/finiteVolume/domainDecomposition.C + decomposeTools/finiteVolume/distributeCells.C + decomposeTools/finiteVolume/decomposeMesh.C + decomposeTools/finiteVolume/fvFieldDecomposer.C + decomposeTools/finiteArea/faMeshDecomposition.C + decomposeTools/finiteArea/faFieldDecomposer.C + decomposeTools/point/pointFieldDecomposer.C + decomposeTools/tetFiniteElement/tetPointFieldDecomposer.C + decomposeTools/lagrangian/lagrangianFieldDecomposer.C + + reconstructTools/finiteVolume/sharedPoints.C + reconstructTools/finiteVolume/processorMeshesReconstructor.C + reconstructTools/finiteVolume/processorMeshesRebuild.C + reconstructTools/finiteVolume/fvFieldReconstructor.C + reconstructTools/finiteArea/processorFaMeshes.C + reconstructTools/finiteArea/faFieldReconstructor.C + reconstructTools/point/pointFieldReconstructor.C + reconstructTools/tetFiniteElement/tetPointFieldReconstructor.C + reconstructTools/lagrangian/reconstructLagrangianPositions.C +) + +add_foam_library(decomposeReconstruct SHARED ${SOURCES}) + +target_link_libraries(decomposeReconstruct PUBLIC decompositionMethods lagrangianBasic finiteVolume finiteArea tetFiniteElement) diff --git a/src/decompositionMethods/metisDecomp/CMakeLists.txt b/src/decompositionMethods/metisDecomp/CMakeLists.txt index 4302ccc18..8722b2343 100644 --- a/src/decompositionMethods/metisDecomp/CMakeLists.txt +++ b/src/decompositionMethods/metisDecomp/CMakeLists.txt @@ -36,4 +36,4 @@ list(APPEND SOURCES add_foam_library(metisDecomp SHARED ${SOURCES}) -target_link_libraries(metisDecomp finiteVolume metis) +target_link_libraries(metisDecomp PUBLIC decompositionMethods metis) diff --git a/src/decompositionMethods/parMetisDecomp/CMakeLists.txt b/src/decompositionMethods/parMetisDecomp/CMakeLists.txt index 3189279a3..b297683f0 100644 --- a/src/decompositionMethods/parMetisDecomp/CMakeLists.txt +++ b/src/decompositionMethods/parMetisDecomp/CMakeLists.txt @@ -36,4 +36,4 @@ list(APPEND SOURCES add_foam_library(parMetisDecomp SHARED ${SOURCES}) -target_link_libraries(parMetisDecomp metisDecomp parmetis) +target_link_libraries(parMetisDecomp PUBLIC metisDecomp parmetis) diff --git a/src/decompositionMethods/scotchDecomp/CMakeLists.txt b/src/decompositionMethods/scotchDecomp/CMakeLists.txt index 791f791ef..4c8158feb 100644 --- a/src/decompositionMethods/scotchDecomp/CMakeLists.txt +++ b/src/decompositionMethods/scotchDecomp/CMakeLists.txt @@ -37,4 +37,4 @@ list(APPEND SOURCES add_foam_library(scotchDecomp SHARED ${SOURCES}) -target_link_libraries(scotchDecomp finiteVolume scotch) +target_link_libraries(scotchDecomp PUBLIC decompositionMethods scotch) diff --git a/src/dynamicMesh/CMakeLists.txt b/src/dynamicMesh/CMakeLists.txt index 1da97cda2..41956639b 100644 --- a/src/dynamicMesh/CMakeLists.txt +++ b/src/dynamicMesh/CMakeLists.txt @@ -34,4 +34,5 @@ add_subdirectory(topoChangerFvMesh) add_subdirectory(dynamicMesh) add_subdirectory(dynamicTopoFvMesh) add_subdirectory(dynamicFvMesh) -add_subdirectory(meshMotion) \ No newline at end of file +add_subdirectory(meshMotion) +add_subdirectory(loadBalanceFvMesh) diff --git a/src/dynamicMesh/dynamicMesh/CMakeLists.txt b/src/dynamicMesh/dynamicMesh/CMakeLists.txt index 401fb4c6a..fd916f1fe 100644 --- a/src/dynamicMesh/dynamicMesh/CMakeLists.txt +++ b/src/dynamicMesh/dynamicMesh/CMakeLists.txt @@ -75,6 +75,11 @@ list(APPEND SOURCES set(repatchCoverage ${polyMeshModifiers}/repatchCoverage) list(APPEND SOURCES ${repatchCoverage}/repatchCoverage.C +) + +set(polyhedralRefinement ${polyMeshModifiers}/polyhedralRefinement) +list(APPEND SOURCES + ${polyhedralRefinement}/polyhedralRefinement.C polyTopoChange/polyTopoChange/polyTopoChange.C polyTopoChange/polyTopoChange/actions/topoAction/topoActions.C polyTopoChange/polyTopoChanger/polyTopoChanger.C diff --git a/src/immersedBoundary/immersedBoundaryForce/CMakeLists.txt b/src/dynamicMesh/loadBalanceFvMesh/CMakeLists.txt similarity index 85% rename from src/immersedBoundary/immersedBoundaryForce/CMakeLists.txt rename to src/dynamicMesh/loadBalanceFvMesh/CMakeLists.txt index 34b9a3b02..d337b2d03 100644 --- a/src/immersedBoundary/immersedBoundaryForce/CMakeLists.txt +++ b/src/dynamicMesh/loadBalanceFvMesh/CMakeLists.txt @@ -31,10 +31,9 @@ # -------------------------------------------------------------------------- list(APPEND SOURCES - immersedBoundaryForces.C - immersedBoundaryForcesFunctionObject.C + loadBalanceFvMesh/loadBalanceFvMesh.C ) -add_foam_library(immersedBoundaryForceFunctionObject SHARED ${SOURCES}) +add_foam_library(loadBalanceFvMesh SHARED ${SOURCES}) -target_link_libraries(immersedBoundaryForceFunctionObject immersedBoundaryTurbulence forces) +target_link_libraries(loadBalanceFvMesh PUBLIC decomposeReconstruct topoChangerFvMesh) diff --git a/src/dynamicMesh/topoChangerFvMesh/CMakeLists.txt b/src/dynamicMesh/topoChangerFvMesh/CMakeLists.txt index b3f28d2de..2b2b31190 100644 --- a/src/dynamicMesh/topoChangerFvMesh/CMakeLists.txt +++ b/src/dynamicMesh/topoChangerFvMesh/CMakeLists.txt @@ -32,6 +32,7 @@ list(APPEND SOURCES topoChangerFvMesh/topoChangerFvMesh.C + topoChangerFvMesh/topoChangerFvMeshLoadBalance.C attachDetachFvMesh/attachDetachFvMesh.C linearValveFvMesh/linearValveFvMesh.C linearValveLayersFvMesh/linearValveLayersFvMesh.C @@ -41,8 +42,16 @@ list(APPEND SOURCES mixerFvMesh/mixerFvMesh.C multiMixerFvMesh/mixerRotor.C multiMixerFvMesh/multiMixerFvMesh.C + dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C + dynamicPolyRefinementFvMesh/refinementSelection/refinementSelection/refinementSelection.C + dynamicPolyRefinementFvMesh/refinementSelection/fieldBoundsRefinement/fieldBoundsRefinement.C + dynamicPolyRefinementFvMesh/refinementSelection/minCellVolumeRefinement/minCellVolumeRefinement.C + dynamicPolyRefinementFvMesh/refinementSelection/minCellSizeRefinement/minCellSizeRefinement.C + dynamicPolyRefinementFvMesh/refinementSelection/minPatchDistanceRefinement/minPatchDistanceRefinement.C + dynamicPolyRefinementFvMesh/refinementSelection/compositeRefinementSelection/compositeRefinementSelection.C ) add_foam_library(topoChangerFvMesh SHARED ${SOURCES}) -target_link_libraries(topoChangerFvMesh PUBLIC dynamicFvMesh) +target_link_libraries(topoChangerFvMesh PUBLIC dynamicFvMesh decomposeReconstruct) + diff --git a/src/finiteArea/CMakeLists.txt b/src/finiteArea/CMakeLists.txt index ff5932da3..261c78601 100644 --- a/src/finiteArea/CMakeLists.txt +++ b/src/finiteArea/CMakeLists.txt @@ -61,30 +61,40 @@ list(APPEND SOURCES set(faPatchFields fields/faPatchFields) list(APPEND SOURCES ${faPatchFields}/faPatchField/faPatchFields.C + ${faPatchFields}/faPatchField/faPatchVectorNFields.C ) set(basicFaPatchFields ${faPatchFields}/basic) list(APPEND SOURCES - ${basicFaPatchFields}/basicSymmetry/basicSymmetryFaPatchFields.C ${basicFaPatchFields}/basicSymmetry/basicSymmetryFaPatchScalarField.C ${basicFaPatchFields}/calculated/calculatedFaPatchFields.C + ${basicFaPatchFields}/calculated/calculatedFaPatchVectorNFields.C ${basicFaPatchFields}/coupled/coupledFaPatchFields.C + ${basicFaPatchFields}/coupled/coupledFaPatchVectorNFields.C ${basicFaPatchFields}/zeroGradient/zeroGradientFaPatchFields.C + ${basicFaPatchFields}/zeroGradient/zeroGradientFaPatchVectorNFields.C ${basicFaPatchFields}/fixedValue/fixedValueFaPatchFields.C + ${basicFaPatchFields}/fixedValue/fixedValueFaPatchVectorNFields.C ${basicFaPatchFields}/fixedGradient/fixedGradientFaPatchFields.C + ${basicFaPatchFields}/fixedGradient/fixedGradientFaPatchVectorNFields.C ${basicFaPatchFields}/mixed/mixedFaPatchFields.C ${basicFaPatchFields}/transform/transformFaPatchFields.C ${basicFaPatchFields}/transform/transformFaPatchScalarField.C + ${basicFaPatchFields}/transform/transformFaPatchVectorNFields.C ) set(constraintFaPatchFields ${faPatchFields}/constraint) list(APPEND SOURCES ${constraintFaPatchFields}/empty/emptyFaPatchFields.C + ${constraintFaPatchFields}/empty/emptyFaPatchVectorNFields.C ${constraintFaPatchFields}/processor/processorFaPatchFields.C ${constraintFaPatchFields}/processor/processorFaPatchScalarField.C + ${constraintFaPatchFields}/processor/processorFaPatchVectorNFields.C ${constraintFaPatchFields}/wedge/wedgeFaPatchFields.C ${constraintFaPatchFields}/wedge/wedgeFaPatchScalarField.C + ${constraintFaPatchFields}/wedge/wedgeFaPatchVectorNFields.C ${constraintFaPatchFields}/cyclic/cyclicFaPatchFields.C + ${constraintFaPatchFields}/cyclic/cyclicFaPatchVectorNFields.C ${constraintFaPatchFields}/symmetry/symmetryFaPatchFields.C ) @@ -93,6 +103,8 @@ list(APPEND SOURCES ${derivedFaPatchFields}/fixedValueOutflow/fixedValueOutflowFaPatchFields.C ${derivedFaPatchFields}/inletOutlet/inletOutletFaPatchFields.C ${derivedFaPatchFields}/slip/slipFaPatchFields.C + ${derivedFaPatchFields}/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.C + ${derivedFaPatchFields}/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFields.C ) set(faePatchFields fields/faePatchFields) @@ -114,8 +126,21 @@ list(APPEND SOURCES ${constraintFaePatchFields}/wedge/wedgeFaePatchFields.C ${constraintFaePatchFields}/cyclic/cyclicFaePatchFields.C ${constraintFaePatchFields}/symmetry/symmetryFaePatchFields.C +) + +set(faePatchVectorNFields ${faePatchFields}/faePatchVectorNFields) +list(APPEND SOURCES + ${faePatchVectorNFields}/faePatchVectorNFields.C + ${faePatchVectorNFields}/calculatedFaePatchVectorNFields.C + ${faePatchVectorNFields}/emptyFaePatchVectorNFields.C + ${faePatchVectorNFields}/wedgeFaePatchVectorNFields.C + ${faePatchVectorNFields}/coupledFaePatchVectorNFields.C + ${faePatchVectorNFields}/processorFaePatchVectorNFields.C + fields/areaFields/areaFields.C + fields/areaFields/areaVectorNFields.C fields/edgeFields/edgeFields.C + fields/edgeFields/edgeVectorNFields.C faMatrices/faMatrices.C faMatrices/faScalarMatrix/faScalarMatrix.C ) @@ -148,6 +173,7 @@ list(APPEND SOURCES set(divSchemes finiteArea/divSchemes) list(APPEND SOURCES + finiteArea/fam/vectorFamDiv.C ${divSchemes}/faDivScheme/faDivSchemes.C ${divSchemes}/gaussFaDivScheme/gaussFaDivSchemes.C ) @@ -186,6 +212,16 @@ list(APPEND SOURCES ${convectionSchemes}/gaussFaConvectionScheme/gaussFaConvectionSchemes.C ) +set(general cfdTools/general) + +set(solutionFaControl ${general}/solutionFaControl) +list(APPEND SOURCES + ${solutionFaControl}/solutionFaControl/solutionFaControl.C + ${solutionFaControl}/simpleFaControl/simpleFaControl.C + ${solutionFaControl}/pimpleFaControl/pimpleFaControl.C + ${solutionFaControl}/pisoFaControl/pisoFaControl.C +) + add_foam_library(finiteArea SHARED ${SOURCES}) target_link_libraries(finiteArea PUBLIC foam) diff --git a/src/finiteVolume/CMakeLists.txt b/src/finiteVolume/CMakeLists.txt index 5dd66bf8d..b2c545239 100644 --- a/src/finiteVolume/CMakeLists.txt +++ b/src/finiteVolume/CMakeLists.txt @@ -142,7 +142,7 @@ list(APPEND SOURCES set(basicFvPatchFields ${fvPatchFields}/basic) list(APPEND SOURCES - ${basicFvPatchFields}/basicSymmetry/basicSymmetryFvPatchFields.C +# ${basicFvPatchFields}/basicSymmetry/basicSymmetryFvPatchFields.C ${basicFvPatchFields}/basicSymmetry/basicSymmetryFvPatchScalarField.C ${basicFvPatchFields}/calculated/calculatedFvPatchFields.C ${basicFvPatchFields}/calculated/calculatedFvPatchVectorNFields.C @@ -178,11 +178,13 @@ list(APPEND SOURCES ${constraintFvPatchFields}/wedge/wedgeFvPatchFields.C ${constraintFvPatchFields}/wedge/wedgeFvPatchScalarField.C ${constraintFvPatchFields}/wedge/wedgeFvPatchVectorNFields.C + ${constraintFvPatchFields}/ggi/ggiFvPatchScalarField.C ${constraintFvPatchFields}/ggi/ggiFvPatchFields.C ${constraintFvPatchFields}/ggi/ggiFvPatchVectorNFields.C ${constraintFvPatchFields}/jumpGgi/jumpGgiFvPatchFields.C ${constraintFvPatchFields}/cyclicGgi/cyclicGgiFvPatchFields.C ${constraintFvPatchFields}/overlapGgi/overlapGgiFvPatchFields.C + ${constraintFvPatchFields}/jumpOverlapGgi/jumpOverlapGgiFvPatchFields.C ${constraintFvPatchFields}/mixingPlane/mixingPlaneFvPatchFields.C ${constraintFvPatchFields}/jumpMixingPlane/jumpMixingPlaneFvPatchFields.C ${constraintFvPatchFields}/regionCoupling/regionCouplingFvPatchFields.C @@ -245,6 +247,9 @@ list(APPEND SOURCES ${derivedFvPatchFields}/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C ${derivedFvPatchFields}/pulseFixedValue/pulseFixedValueFvPatchFields.C ${derivedFvPatchFields}/waveTransmissiveInlet/waveTransmissiveInletFvPatchFields.C + ${derivedFvPatchFields}/noSlipWall/noSlipWallFvPatchVectorField.C + ${derivedFvPatchFields}/noSlipMovingWall/noSlipMovingWallFvPatchVectorField.C + ${derivedFvPatchFields}/blockSymmPlane/blockSymmPlaneFvPatchVectorField.C ) set(fvsPatchFields fields/fvsPatchFields) diff --git a/src/foam/CMakeLists.txt b/src/foam/CMakeLists.txt index b893d1858..992229c63 100644 --- a/src/foam/CMakeLists.txt +++ b/src/foam/CMakeLists.txt @@ -57,11 +57,16 @@ list(APPEND SOURCES set(ints primitives/ints) list(APPEND SOURCES - ${ints}/int/intIO.C + ${ints}/uint32/uint32.C + ${ints}/uint32/uint32IO.C + ${ints}/uint64/uint64.C + ${ints}/uint64/uint64IO.C ${ints}/uint/uintIO.C - ${ints}/long/longIO.C - ${ints}/longLong/longLongIO.C - ${ints}/ulong/ulongIO.C + ${ints}/int32/int32.C + ${ints}/int32/int32IO.C + ${ints}/int64/int64.C + ${ints}/int64/int64IO.C + ${ints}/int/intIO.C ${ints}/label/label.C ${ints}/uLabel/uLabel.C primitives/Scalar/doubleScalar/doubleScalar.C @@ -88,6 +93,9 @@ list(APPEND SOURCES primitives/complex/complex.C primitives/quaternion/quaternion.C primitives/septernion/septernion.C +# functions, data entries + primitives/functions/Function1/makeDataEntries.C + primitives/functions/Polynomial/polynomialFunction.C ) set(strings primitives/strings) @@ -98,8 +106,9 @@ list(APPEND SOURCES ${strings}/word/wordIO.C ${strings}/fileName/fileName.C ${strings}/fileName/fileNameIO.C - ${strings}/keyType/keyTypeIO.C - ${strings}/wordRe/wordReIO.C + ${strings}/keyType/keyType.C + ${strings}/wordRe/wordRe.C + ${strings}/stringOps/stringOps.C primitives/hashes/Hasher/Hasher.C ) @@ -122,8 +131,8 @@ list(APPEND SOURCES primitives/random/Random.C containers/HashTables/HashTable/HashTableCore.C containers/HashTables/StaticHashTable/StaticHashTableCore.C - containers/Lists/SortableList/ParSortableListName.C - containers/Lists/PackedList/PackedListName.C +# containers/Lists/SortableList/ParSortableListName.C +# containers/Lists/PackedList/PackedListName.C containers/Lists/ListOps/ListOps.C containers/LinkedLists/linkTypes/SLListBase/SLListBase.C containers/LinkedLists/linkTypes/DLListBase/DLListBase.C @@ -143,6 +152,8 @@ list(APPEND SOURCES ${primitiveLists}/tensorList.C ${primitiveLists}/VectorNLists.C ${primitiveLists}/wordIOList.C + ${primitiveLists}/hashedWordList.C + ${primitiveLists}/PackedBoolList.C ) set(Streams db/IOstreams) @@ -190,13 +201,13 @@ list(APPEND SOURCES set(Pstreams ${Streams}/Pstreams) list(APPEND SOURCES ${Pstreams}/Pstream.C + ${Pstreams}/PstreamReduceOps.C ${Pstreams}/PstreamCommsStruct.C ${Pstreams}/PstreamGlobals.C ${Pstreams}/IPstream.C ${Pstreams}/OPstream.C ${Pstreams}/IPread.C ${Pstreams}/OPwrite.C - ${Pstreams}/PstreamsPrint.C ) set(dictionary db/dictionary) @@ -225,8 +236,11 @@ list(APPEND SOURCES set(functionEntries ${dictionary}/functionEntries) list(APPEND SOURCES + ${functionEntries}/calcEntry/calcEntry.C + ${functionEntries}/codeStream/codeStream.C ${functionEntries}/functionEntry/functionEntry.C ${functionEntries}/includeEntry/includeEntry.C + ${functionEntries}/includeEtcEntry/includeEtcEntry.C ${functionEntries}/includeIfPresentEntry/includeIfPresentEntry.C ${functionEntries}/inputModeEntry/inputModeEntry.C ${functionEntries}/removeEntry/removeEntry.C @@ -256,12 +270,20 @@ list(APPEND SOURCES db/objectRegistry/objectRegistry.C db/postfixedSubRegistry/postfixedSubRegistry.C db/CallbackRegistry/CallbackRegistryName.C - db/dlLibraryTable/dlLibraryTable.C db/functionObjects/functionObject/functionObject.C db/functionObjects/functionObjectList/functionObjectList.C + db/functionObjects/functionObjectFile/functionObjectFile.C db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C ) +set(dll db/dynamicLibrary) +list(APPEND SOURCES + ${dll}/dlLibraryTable/dlLibraryTable.C + ${dll}/dynamicCode/dynamicCode.C + ${dll}/dynamicCode/dynamicCodeContext.C + ${dll}/codedBase/codedBase.C +) + set(Time db/Time) list(APPEND SOURCES ${Time}/TimePaths.C @@ -303,6 +325,12 @@ list(APPEND SOURCES ${LUscalarMatrix}/procLduInterface.C ) +set(crMatrix matrices/crMatrix) +list(APPEND SOURCES + ${crMatrix}/crAddressing.C + ${crMatrix}/crMatrix.C +) + set(lduMatrix matrices/lduMatrix) list(APPEND SOURCES ${lduMatrix}/lduMatrix/lduMatrix.C @@ -368,7 +396,7 @@ list(APPEND SOURCES ${AMG}/GAMGSolverSolve.C ) -set(AMGInterfaces ${AMG}/interfaces) +set(AMGInterfaces ${AMG}/interfaces/AMGInterfaces) list(APPEND SOURCES ${AMGInterfaces}/AMGInterface/AMGInterface.C ${AMGInterfaces}/AMGInterface/newAMGInterface.C @@ -380,7 +408,15 @@ list(APPEND SOURCES ${AMGInterfaces}/mixingPlaneAMGInterface/mixingPlaneAMGInterface.C ) -set(AMGInterfaceFields ${AMG}/interfaceFields) +set(SAMGInterfaces ${AMG}/interfaces/SAMGInterfaces) +list(APPEND SOURCES + ${SAMGInterfaces}/SAMGInterface/SAMGInterface.C + ${SAMGInterfaces}/SAMGInterface/newSAMGInterface.C + ${SAMGInterfaces}/processorSAMGInterface/processorSAMGInterface.C + ${SAMGInterfaces}/ggiSAMGInterface/ggiSAMGInterface.C +) + +set(AMGInterfaceFields ${AMG}/interfaceFields/AMGInterfaceFields) list(APPEND SOURCES ${AMGInterfaceFields}/AMGInterfaceField/AMGInterfaceField.C ${AMGInterfaceFields}/AMGInterfaceField/newAMGInterfaceField.C @@ -392,6 +428,14 @@ list(APPEND SOURCES ${AMGInterfaceFields}/mixingPlaneAMGInterfaceField/mixingPlaneAMGInterfaceField.C ) +set(SAMGInterfaceFields ${AMG}/interfaceFields/SAMGInterfaceFields) +list(APPEND SOURCES + ${SAMGInterfaceFields}/SAMGInterfaceField/SAMGInterfaceField.C + ${SAMGInterfaceFields}/SAMGInterfaceField/newSAMGInterfaceField.C + ${SAMGInterfaceFields}/processorSAMGInterfaceField/processorSAMGInterfaceField.C + ${SAMGInterfaceFields}/ggiSAMGInterfaceField/ggiSAMGInterfaceField.C +) + set(AMGAgglomerations ${AMG}/AMGAgglomerations) set(GAMGAgglomeration ${AMGAgglomerations}/GAMGAgglomeration) @@ -517,6 +561,7 @@ list(APPEND SOURCES ${globalMeshData}/globalMeshData.C ${globalMeshData}/globalPoints.C ${globalMeshData}/globalIndex.C + ${globalMeshData}/globalProcFaceIndex.C ${polyMesh}/syncTools/syncTools.C ) @@ -748,6 +793,19 @@ list(APPEND SOURCES ${interpolations}/RBFInterpolation/RBFFunctions/Gauss/Gauss.C ${interpolations}/RBFInterpolation/RBFFunctions/TPS/TPS.C ${interpolations}/RBFInterpolation/RBFFunctions/IMQB/IMQB.C + ${interpolations}/interpolationTable/tableReaders/tableReaders.C + ${interpolations}/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C + ${interpolations}/interpolationTable/tableReaders/csv/csvTableReaders.C +) + +set(interpolationWeights ${interpolations}/interpolationWeights) +list(APPEND SOURCES + ${interpolationWeights}/interpolationWeights/interpolationWeights.C + ${interpolationWeights}/linearInterpolationWeights/linearInterpolationWeights.C + ${interpolationWeights}/splineInterpolationWeights/splineInterpolationWeights.C +) + +list(APPEND SOURCES algorithms/MeshWave/MeshWaveName.C algorithms/MeshWave/FaceCellWaveName.C algorithms/polygon/clipping/SutherlandHodgman.C @@ -849,10 +907,19 @@ list(APPEND SOURCES ${BlockAMGInterfaceFields}/GGIBlockAMGInterfaceField/GGIBlockAMGInterfaceFields.C ) +set(BlockSAMGInterfaceFields ${BlockAMG}/BlockSAMGInterfaceFields) +list(APPEND SOURCES + ${BlockSAMGInterfaceFields}/BlockSAMGInterfaceField/blockSAMGInterfaceFields.C + ${BlockSAMGInterfaceFields}/BlockSAMGInterfaceField/blockVectorNSAMGInterfaceFields.C + ${BlockSAMGInterfaceFields}/ProcessorBlockSAMGInterfaceField/ProcessorBlockSAMGInterfaceFields.C + ${BlockSAMGInterfaceFields}/GGIBlockSAMGInterfaceField/GGIBlockSAMGInterfaceFields.C +) + set(BlockMatrixCoarsening ${BlockAMG}/BlockMatrixCoarsening) list(APPEND SOURCES ${BlockMatrixCoarsening}/BlockMatrixCoarsening/blockMatrixCoarsenings.C - ${BlockMatrixCoarsening}/BlockMatrixAgglomeration/blockMatrixAgglomerations.C + ${BlockMatrixCoarsening}/BlockMatrixClustering/blockMatrixClusterings.C + ${BlockMatrixCoarsening}/BlockMatrixSelection/blockMatrixSelections.C ) set(BlockLduPrecons matrices/blockLduMatrix/BlockLduPrecons) @@ -869,6 +936,9 @@ list(APPEND SOURCES ${BlockLduPrecons}/BlockCholeskyPrecon/tensorBlockCholeskyPrecon.C ${BlockLduPrecons}/BlockCholeskyPrecon/blockCholeskyPrecons.C ${BlockLduPrecons}/BlockAMGPrecon/blockAMGPrecons.C + ${BlockLduPrecons}/BlockILUC0Precon/scalarBlockILUC0Precon.C + ${BlockLduPrecons}/BlockILUC0Precon/tensorBlockILUC0Precon.C + ${BlockLduPrecons}/BlockILUC0Precon/blockILUC0Precons.C ${BlockLduPrecons}/BlockILUCpPrecon/scalarBlockILUCpPrecon.C ${BlockLduPrecons}/BlockILUCpPrecon/tensorBlockILUCpPrecon.C ${BlockLduPrecons}/BlockILUCpPrecon/blockILUCpPrecons.C @@ -879,6 +949,7 @@ list(APPEND SOURCES ${BlockLduSmoothers}/BlockLduSmoother/blockLduSmoothers.C ${BlockLduSmoothers}/BlockGaussSeidelSmoother/blockGaussSeidelSmoothers.C ${BlockLduSmoothers}/BlockILUSmoother/blockILUSmoothers.C + ${BlockLduSmoothers}/BlockILUC0Smoother/blockILUC0Smoothers.C ${BlockLduSmoothers}/BlockILUCpSmoother/blockILUCpSmoothers.C ) @@ -888,6 +959,7 @@ list(APPEND SOURCES ${BlockLduSolvers}/BlockLduSolver/blockLduSolvers.C ${BlockLduSolvers}/BlockDiagonal/blockDiagonalSolvers.C ${BlockLduSolvers}/BlockGaussSeidel/blockGaussSeidelSolvers.C + ${BlockLduSolvers}/BlockILU/blockILUSolvers.C ${BlockLduSolvers}/BlockCG/blockCGSolvers.C ${BlockLduSolvers}/BlockBiCGStab/blockBiCGStabSolvers.C ${BlockLduSolvers}/BlockGMRES/blockGMRESSolvers.C @@ -897,5 +969,5 @@ list(APPEND SOURCES add_foam_library(foam SHARED ${SOURCES}) -target_link_libraries(foam OSspecific mpi ZLIB::ZLIB) +target_link_libraries(foam PUBLIC OSspecific mpi ZLIB::ZLIB) add_dependencies(foam getGitVersion) diff --git a/src/foam/global/global.C b/src/foam/global/global.C deleted file mode 100644 index 8ebb26dfe..000000000 --- a/src/foam/global/global.C +++ /dev/null @@ -1,80 +0,0 @@ -/*-------------------------------*- C++ -*-----------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 3.2 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Description - Define the globals used in the OpenFOAM library. - It is important that these are constructed in the appropriate order to - avoid the use of unconstructed data in the global namespace. - - This file has the extension .Cver to trigger a Makefile rule that converts - 'VERSION\_STRING' and 'BUILD\_STRING' into the appropriate strings. - -\*---------------------------------------------------------------------------*/ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "foamVersion.H" - -const char* const Foam::FOAMversion = "v4.0-4-a743de9-dirty"; -const char* const Foam::FOAMbuild = "4.0"; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Setup an error handler for the global new operator - -#include "new.C" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Global IO streams - -#include "IOstreams.C" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "JobInfo.H" -bool Foam::JobInfo::constructed = false; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Global error definitions (initialised by construction) - -#include "messageStream.C" -#include "error.C" -#include "IOerror.C" -#include "token.C" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Read the debug and info switches - -#include "debug.C" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Read and set cell models - -#include "globalCellModeller.C" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Create the jobInfo file in the $FOAM_JOB_DIR/runningJobs directory - -#include "JobInfo.C" - -// ************************************************************************* // diff --git a/src/foam/global/global.C.in b/src/foam/global/global.C.in index 3ae15e5bb..d01506162 100644 --- a/src/foam/global/global.C.in +++ b/src/foam/global/global.C.in @@ -44,6 +44,11 @@ const char* const Foam::FOAMbuild = "@FOAM_VERSION@"; #include "new.C" +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Create the nullObject singleton + +#include "nullObject.C" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Global IO streams @@ -52,7 +57,7 @@ const char* const Foam::FOAMbuild = "@FOAM_VERSION@"; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "JobInfo.H" -bool Foam::JobInfo::constructed = false; +bool Foam::JobInfo::constructed(false); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Global error definitions (initialised by construction) diff --git a/src/fvAgglomerationMethods/CMakeLists.txt b/src/fvAgglomerationMethods/CMakeLists.txt index 289ca930f..42759d5ab 100644 --- a/src/fvAgglomerationMethods/CMakeLists.txt +++ b/src/fvAgglomerationMethods/CMakeLists.txt @@ -31,3 +31,4 @@ # -------------------------------------------------------------------------- add_subdirectory(MGridGenGamgAgglomeration) +add_subdirectory(pairPatchAgglomeration) diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/CMakeLists.txt b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/CMakeLists.txt index ac1f5b675..5ac8e244b 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/CMakeLists.txt +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/CMakeLists.txt @@ -37,4 +37,4 @@ list(APPEND SOURCES add_foam_library(MGridGenGAMGAgglomeration SHARED ${SOURCES}) -target_link_libraries(MGridGenGAMGAgglomeration finiteVolume parmgridgen) +target_link_libraries(MGridGenGAMGAgglomeration PUBLIC finiteVolume parmgridgen) diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/CMakeLists.txt b/src/fvAgglomerationMethods/pairPatchAgglomeration/CMakeLists.txt new file mode 100644 index 000000000..ee7e8d1ee --- /dev/null +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/CMakeLists.txt @@ -0,0 +1,39 @@ +# -------------------------------------------------------------------------- +# ======== | +# \ / F ield | foam-extend: Open Source CFD +# \ / O peration | Version: 4.1 +# \ / A nd | Web: http://www.foam-extend.org +# \/ M anipulation | For copyright notice see file Copyright +# -------------------------------------------------------------------------- +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or {at your +# option} any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Description +# CMakeLists.txt file for libraries and applications +# +# Author +# Henrik Rusche, Wikki GmbH, 2017. All rights reserved +# +# +# -------------------------------------------------------------------------- + +list(APPEND SOURCES + pairPatchAgglomeration.C +) + +add_foam_library(pairPatchAgglomeration SHARED ${SOURCES}) + +target_link_libraries(pairPatchAgglomeration PUBLIC foam) diff --git a/src/immersedBoundary/CMakeLists.txt b/src/immersedBoundary/CMakeLists.txt index 893bbeb74..262b48c47 100644 --- a/src/immersedBoundary/CMakeLists.txt +++ b/src/immersedBoundary/CMakeLists.txt @@ -30,7 +30,5 @@ # # -------------------------------------------------------------------------- -add_subdirectory(immersedBoundaryForce) add_subdirectory(immersedBoundary) -add_subdirectory(immersedBoundaryTurbulence) -add_subdirectory(immersedBoundaryDynamicMesh) \ No newline at end of file +add_subdirectory(immersedBoundaryDynamicMesh) diff --git a/src/immersedBoundary/immersedBoundary/CMakeLists.txt b/src/immersedBoundary/immersedBoundary/CMakeLists.txt index 08aa07ccc..595d713ff 100644 --- a/src/immersedBoundary/immersedBoundary/CMakeLists.txt +++ b/src/immersedBoundary/immersedBoundary/CMakeLists.txt @@ -31,17 +31,14 @@ # -------------------------------------------------------------------------- list(APPEND SOURCES + immersedPoly/immersedPoly.C + immersedPoly/distanceFunctions/triSurfaceDistance/triSurfaceDistance.C immersedBoundaryPolyPatch/immersedBoundaryPolyPatch.C immersedBoundaryPointPatch/immersedBoundaryPointPatch.C immersedBoundaryFvPatch/immersedBoundaryFvPatch.C - immersedBoundaryFvPatch/immersedBoundaryFvPatchLeastSquaresFit.C - immersedBoundaryFvPatch/immersedBoundaryFvPatchSamplingWeights.C - immersedBoundaryFvPatch/immersedBoundaryFvPatchTriAddressing.C immersedBoundaryFvPatchField/immersedBoundaryFvPatchFields.C - immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchFields.C - immersedBoundaryAdjustPhi/immersedBoundaryAdjustPhi.C - refineImmersedBoundaryMesh/refineImmersedBoundaryMesh.C - ibSwirlFlowRateInletVelocity/ibSwirlFlowRateInletVelocityFvPatchVectorField.C + mixedIbFvPatchField/mixedIbFvPatchFields.C + movingImmersedBoundaryVelocity/movingImmersedBoundaryVelocityFvPatchVectorField.C ) add_foam_library(immersedBoundary SHARED ${SOURCES}) diff --git a/src/immersedBoundary/immersedBoundaryDynamicMesh/CMakeLists.txt b/src/immersedBoundary/immersedBoundaryDynamicMesh/CMakeLists.txt index 8664bacf8..243e7f12c 100644 --- a/src/immersedBoundary/immersedBoundaryDynamicMesh/CMakeLists.txt +++ b/src/immersedBoundary/immersedBoundaryDynamicMesh/CMakeLists.txt @@ -32,9 +32,12 @@ list(APPEND SOURCES movingImmersedBoundary/movingImmersedBoundary.C + refineImmersedBoundaryMesh/refineImmersedBoundaryMesh.C immersedBoundarySolidBodyMotionFvMesh/immersedBoundarySolidBodyMotionFvMesh.C + immersedBoundaryRefinement/immersedBoundaryRefinement.C + immersedBoundaryDynamicRefineSolidBodyMotionFvMesh/immersedBoundaryDynamicRefineSolidBodyMotionFvMesh.C ) -add_foam_library(immersedBoundaryDynamicFvMesh SHARED ${SOURCES}) +add_foam_library(immersedBoundaryDynamicMesh SHARED ${SOURCES}) -target_link_libraries(immersedBoundaryDynamicFvMesh PUBLIC immersedBoundary dynamicFvMesh solidBodyMotion) +target_link_libraries(immersedBoundaryDynamicMesh PUBLIC immersedBoundary topoChangerFvMesh solidBodyMotion) diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/CMakeLists.txt b/src/immersedBoundary/immersedBoundaryTurbulence/CMakeLists.txt deleted file mode 100644 index 0fe49dfb0..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -# -------------------------------------------------------------------------- -# ======== | -# \ / F ield | foam-extend: Open Source CFD -# \ / O peration | Version: 4.1 -# \ / A nd | Web: http://www.foam-extend.org -# \/ M anipulation | For copyright notice see file Copyright -# -------------------------------------------------------------------------- -# License -# This file is part of foam-extend. -# -# foam-extend is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or {at your -# option} any later version. -# -# foam-extend is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with foam-extend. If not, see . -# -# Description -# CMakeLists.txt file for libraries and applications -# -# Author -# Henrik Rusche, Wikki GmbH, 2017. All rights reserved -# -# -# -------------------------------------------------------------------------- - -list(APPEND SOURCES - wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.C - wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C - wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.C - wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.C -) - -add_foam_library(immersedBoundaryTurbulence SHARED ${SOURCES}) - -target_link_libraries(immersedBoundaryTurbulence immersedBoundary incompressibleRASModels incompressibleLESModels) diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/Make/files b/src/immersedBoundary/immersedBoundaryTurbulence/Make/files deleted file mode 100644 index 9621ac758..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/Make/files +++ /dev/null @@ -1,6 +0,0 @@ -wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.C -wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C -wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.C -wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.C - -LIB = $(FOAM_LIBBIN)/libimmersedBoundaryTurbulence diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/Make/options b/src/immersedBoundary/immersedBoundaryTurbulence/Make/options deleted file mode 100644 index fd05812e8..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/Make/options +++ /dev/null @@ -1,24 +0,0 @@ -EXE_INC = \ - -IlnInclude \ - -I../immersedBoundary/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/surfMesh/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude - -LIB_LIBS = \ - -limmersedBoundary \ - -lfiniteVolume \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ - -lincompressibleTransportModels \ - -lmeshTools \ - -lsurfMesh \ - -lsampling \ - -ldynamicMesh diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C deleted file mode 100644 index 9a479f37a..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,393 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H" -#include "immersedBoundaryVelocityWallFunctionFvPatchVectorField.H" -#include "RASModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -immersedBoundaryEpsilonWallFunctionFvPatchScalarField:: -immersedBoundaryEpsilonWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - immersedBoundaryWallFunctionFvPatchScalarField(p, iF), - UName_("U"), - kName_("k"), - GName_("RASModel::G"), - nuName_("nu"), - nutName_("nut"), - Cmu_(0.09), - kappa_(0.41), - E_(9.8) -{} - - -immersedBoundaryEpsilonWallFunctionFvPatchScalarField:: -immersedBoundaryEpsilonWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - immersedBoundaryWallFunctionFvPatchScalarField(p, iF, dict), - UName_(dict.lookupOrDefault("U", "U")), - kName_(dict.lookupOrDefault("k", "k")), - GName_(dict.lookupOrDefault("G", "RASModel::G")), - nuName_(dict.lookupOrDefault("nu", "nu")), - nutName_(dict.lookupOrDefault("nut", "nut")), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) -{} - - -immersedBoundaryEpsilonWallFunctionFvPatchScalarField:: -immersedBoundaryEpsilonWallFunctionFvPatchScalarField -( - const immersedBoundaryEpsilonWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - immersedBoundaryWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - UName_(ptf.UName_), - kName_(ptf.kName_), - GName_(ptf.GName_), - nuName_(ptf.nuName_), - nutName_(ptf.nutName_), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_) -{} - - -immersedBoundaryEpsilonWallFunctionFvPatchScalarField:: -immersedBoundaryEpsilonWallFunctionFvPatchScalarField -( - const immersedBoundaryEpsilonWallFunctionFvPatchScalarField& ewfpsf -) -: - immersedBoundaryWallFunctionFvPatchScalarField(ewfpsf), - UName_(ewfpsf.UName_), - kName_(ewfpsf.kName_), - GName_(ewfpsf.GName_), - nuName_(ewfpsf.nuName_), - nutName_(ewfpsf.nutName_), - Cmu_(ewfpsf.Cmu_), - kappa_(ewfpsf.kappa_), - E_(ewfpsf.E_) -{} - - -immersedBoundaryEpsilonWallFunctionFvPatchScalarField:: -immersedBoundaryEpsilonWallFunctionFvPatchScalarField -( - const immersedBoundaryEpsilonWallFunctionFvPatchScalarField& ewfpsf, - const DimensionedField& iF -) -: - immersedBoundaryWallFunctionFvPatchScalarField(ewfpsf, iF), - UName_(ewfpsf.UName_), - kName_(ewfpsf.kName_), - GName_(ewfpsf.GName_), - nuName_(ewfpsf.nuName_), - nutName_(ewfpsf.nutName_), - Cmu_(ewfpsf.Cmu_), - kappa_(ewfpsf.kappa_), - E_(ewfpsf.E_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void immersedBoundaryEpsilonWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - // If G field is not present, execute zero gradient evaluation - // HJ, 20/Mar/2011 - if (!db().foundObject(GName_)) - { - InfoIn - ( - "void immersedBoundaryEpsilonWallFunctionFvPatchScalarField::" - "updateCoeffs()" - ) << "Cannot access " << GName_ << " field. for patch " - << patch().name() << ". Evaluating as regular immersed boundary" - << endl; - - immersedBoundaryWallFunctionFvPatchScalarField::evaluate(); - - return; - } - - const vectorField& n = ibPatch().ibNormals(); - - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - - const scalar Cmu25 = pow(Cmu_, 0.25); - const scalar Cmu50 = sqrt(Cmu_); - const scalar Cmu75 = pow(Cmu_, 0.75); - - volScalarField& G = const_cast - (db().lookupObject(GName_)); - - // Grab values of other fields required for wall functions - - // Velocity - const fvPatchVectorField& Uwg = - patch().lookupPatchField(UName_); - const immersedBoundaryVelocityWallFunctionFvPatchVectorField& Uw = - refCast - ( - Uwg - ); - - // Calculate tangential component, taking into account wall velocity - const vectorField UtanOld = - (I - sqr(n)) & (Uw.ibSamplingPointValue() - Uw.ibValue()); - const scalarField magUtanOld = mag(UtanOld); - - // Tangential velocity component - scalarField& UTangentialNew = Uw.wallTangentialValue(); - - // Wall shear stress - vectorField& tauWall = Uw.tauWall(); - - // Turbulence kinetic energy - const fvPatchScalarField& kg = - patch().lookupPatchField(kName_); - const immersedBoundaryWallFunctionFvPatchScalarField& kw = - refCast(kg); - - // Current and new values of k at sampling point - scalarField k = kw.ibSamplingPointValue(); - scalarField& kNew = kw.wallValue(); - - // Laminar viscosity - const fvPatchScalarField& nuwg = - patch().lookupPatchField(nuName_); - const immersedBoundaryFvPatchScalarField& nuw = - refCast(nuwg); - scalarField nu = nuw.ibCellValue(); - - // Turbulent viscosity - const fvPatchScalarField& nutwg = - patch().lookupPatchField(nutName_); - const immersedBoundaryWallFunctionFvPatchScalarField& nutw = - refCast(nutwg); - - // New values of nut - scalarField nutOld = nutw.ibCellValue(); - scalarField& nutNew = nutw.wallValue(); - - const scalarField magGradUw = mag(Uw.ibGrad()); - - // Get the IB addressing and distance - const labelList& ibc = ibPatch().ibCells(); - - // Distance to sampling point - const scalarField& ySample = ibPatch().ibSamplingPointDelta(); - - // Distance from wall to IB point - const scalarField& y = ibPatch().ibDelta(); - - // Epsilon: store IB cell values for direct insertion - scalarField epsilonSample = this->ibSamplingPointValue(); - - scalarField& epsilonNew = this->wallValue(); - - // Mark values to be fixed - boolList wf(ibc.size(), false); - - // Calculate yPlus for sample points - scalarField ypd = Cmu25*ySample*sqrt(k)/nu; - - // Calculate wall function conditions - forAll (ibc, ibCellI) - { - const scalar nuLam = nu[ibCellI]; - - // Calculate yPlus from k and laminar viscosity for the IB point - const scalar yPlusSample = ypd[ibCellI]; - - scalar uTau; - - if (yPlusSample > yPlusLam) - { - // Calculate uTau from log-law, knowing sampled k and U - uTau = magUtanOld[ibCellI]*kappa_/log(E_*yPlusSample); - } - else - { - // Sampling point is in laminar sublayer - // Bug fix: HJ, 11/Aug/2014 - uTau = yPlusSample; - - } - - // Set wall shear stress - tauWall[ibCellI] = sqr(uTau)*UtanOld[ibCellI]/(magUtanOld[ibCellI] + SMALL); - - // Calculate yPlus for IB point -// scalar yPlusIB = uTau*y[ibCellI]/nuLam; - scalar yPlusIB = yPlusSample*y[ibCellI]/ySample[ibCellI]; - - // Calculate wall function data in the immersed boundary point - if (yPlusIB > yPlusLam) - { - // Logarithmic region - wf[ibCellI] = true; - - scalar nutw = nuLam*(yPlusIB*kappa_/log(E_*yPlusIB) - 1); - - // Fix generation even though it if is not used - G[ibc[ibCellI]] = - sqr((nutw + nuLam)*magGradUw[ibCellI])/ - (Cmu25*sqrt(k[ibCellI])*kappa_*y[ibCellI]); - - // Log-Law for tangential velocity - UTangentialNew[ibCellI] = - min - ( - magUtanOld[ibCellI], - uTau/kappa_*log(E_*yPlusIB) - ); - - // Calculate turbulent viscosity - nutNew[ibCellI] = nutw; - - // Calculate k in the IB cell from G = epsilon - kNew[ibCellI] = (nutw + nuLam)*magGradUw[ibCellI]/Cmu50; - - // Calculate epsilon from yPlus and set it - epsilonNew[ibCellI] = - Cmu75*pow(kNew[ibCellI], 1.5)/(kappa_*y[ibCellI]); - } - else - { - // Laminar sub-layer - wf[ibCellI] = false; - - // G is zero - G[ibc[ibCellI]] = 0; - - // Laminar sub-layer for tangential velocity: uPlus = yPlus - UTangentialNew[ibCellI] = min(magUtanOld[ibCellI], uTau*yPlusIB); - - // Turbulent viscosity is zero - nutNew[ibCellI] = SMALL; - - // k is zero gradient: use the sampled value - kNew[ibCellI] = k[ibCellI]; - - // Calculate epsilon from yPlus and set it. - // Note: calculating equilibrium epsilon in the sub-layer creates - // an unrealistic oscillation: use sampled value - // HJ, 27/Jul/2012 - epsilonNew[ibCellI] = epsilonSample[ibCellI]; - } - } - -// Info<< "UTangentialNew " << min(UTangentialNew) << " " << max(UTangentialNew) << endl; -// Info<< "nutNew " << min(nutNew) << " " << max(nutNew) << endl; -// Info<< "kNew " << min(kNew) << " " << max(kNew) << endl; -// Info<< "epsilonNew " << min(epsilonNew) << " " << max(epsilonNew) << endl; - - // Set the fields to calculated wall function values - Uw.wallMask() = true; - kw.wallMask() = wf; - nutw.wallMask() = true; - this->wallMask() = true; - - // Insert epsilon values into the internal field - immersedBoundaryWallFunctionFvPatchScalarField::updateCoeffs(); -} - - -void immersedBoundaryEpsilonWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes commsType -) -{ - // Insert epsilon values into the internal field - this->setIbCellValues(this->wallValue()); - - fvPatchScalarField::evaluate(commsType); -} - - -void immersedBoundaryEpsilonWallFunctionFvPatchScalarField:: -write(Ostream& os) const -{ - immersedBoundaryWallFunctionFvPatchScalarField::write(os); - writeEntryIfDifferent(os, "U", "U", UName_); - writeEntryIfDifferent(os, "k", "k", kName_); - writeEntryIfDifferent(os, "G", "RASModel::G", GName_); - writeEntryIfDifferent(os, "nu", "nu", nuName_); - writeEntryIfDifferent(os, "nut", "nut", nutName_); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - immersedBoundaryEpsilonWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H deleted file mode 100644 index 124fbddbb..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,201 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Class - Foam::incompressible::RASModels:: - immersedBoundaryEpsilonWallFunctionFvPatchScalarField - -Description - Boundary condition for epsilon when using wall functions - - calculates y+, G, tangential velocity, nut and k - - each of calculated values is handled separately by the appropriate - boundary condition - - epsilon values added directly into the field to act as a constraint - -SourceFiles - immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef immersedBoundaryEpsilonWallFunctionFvPatchScalarField_H -#define immersedBoundaryEpsilonWallFunctionFvPatchScalarField_H - -#include "immersedBoundaryWallFunctionFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class immersedBoundaryEpsilonWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class immersedBoundaryEpsilonWallFunctionFvPatchScalarField -: - public immersedBoundaryWallFunctionFvPatchScalarField -{ - // Private data - - //- Name of velocity field - word UName_; - - //- Name of turbulence kinetic energy field - word kName_; - - //- Name of turbulence generation field - word GName_; - - //- Name of laminar viscosity field - word nuName_; - - //- Name of turbulent viscosity field - word nutName_; - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - -public: - - //- Runtime type information - TypeName("immersedBoundaryEpsilonWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - immersedBoundaryEpsilonWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - immersedBoundaryEpsilonWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // immersedBoundaryEpsilonWallFunctionFvPatchScalarField - // onto a new patch - immersedBoundaryEpsilonWallFunctionFvPatchScalarField - ( - const immersedBoundaryEpsilonWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - immersedBoundaryEpsilonWallFunctionFvPatchScalarField - ( - const immersedBoundaryEpsilonWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new immersedBoundaryEpsilonWallFunctionFvPatchScalarField - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - immersedBoundaryEpsilonWallFunctionFvPatchScalarField - ( - const immersedBoundaryEpsilonWallFunctionFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new immersedBoundaryEpsilonWallFunctionFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - //- Destructor - virtual ~immersedBoundaryEpsilonWallFunctionFvPatchScalarField() - {} - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes = Pstream::blocking - ); - - - // I-O - - //- Write - void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.C b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.C deleted file mode 100644 index b1f3a6022..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,401 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "immersedBoundaryOmegaWallFunctionFvPatchScalarField.H" -#include "immersedBoundaryVelocityWallFunctionFvPatchVectorField.H" -#include "RASModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -immersedBoundaryOmegaWallFunctionFvPatchScalarField:: -immersedBoundaryOmegaWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - immersedBoundaryWallFunctionFvPatchScalarField(p, iF), - UName_("U"), - kName_("k"), - GName_("RASModel::G"), - nuName_("nu"), - nutName_("nut"), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - beta1_(0.075) -{} - - -immersedBoundaryOmegaWallFunctionFvPatchScalarField:: -immersedBoundaryOmegaWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - immersedBoundaryWallFunctionFvPatchScalarField(p, iF, dict), - UName_(dict.lookupOrDefault("U", "U")), - kName_(dict.lookupOrDefault("k", "k")), - GName_(dict.lookupOrDefault("G", "RASModel::G")), - nuName_(dict.lookupOrDefault("nu", "nu")), - nutName_(dict.lookupOrDefault("nut", "nut")), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)), - beta1_(dict.lookupOrDefault("beta1", 0.075)) -{} - - -immersedBoundaryOmegaWallFunctionFvPatchScalarField:: -immersedBoundaryOmegaWallFunctionFvPatchScalarField -( - const immersedBoundaryOmegaWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - immersedBoundaryWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - UName_(ptf.UName_), - kName_(ptf.kName_), - GName_(ptf.GName_), - nuName_(ptf.nuName_), - nutName_(ptf.nutName_), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - beta1_(ptf.beta1_) -{} - - -immersedBoundaryOmegaWallFunctionFvPatchScalarField:: -immersedBoundaryOmegaWallFunctionFvPatchScalarField -( - const immersedBoundaryOmegaWallFunctionFvPatchScalarField& owfpsf -) -: - immersedBoundaryWallFunctionFvPatchScalarField(owfpsf), - UName_(owfpsf.UName_), - kName_(owfpsf.kName_), - GName_(owfpsf.GName_), - nuName_(owfpsf.nuName_), - nutName_(owfpsf.nutName_), - Cmu_(owfpsf.Cmu_), - kappa_(owfpsf.kappa_), - E_(owfpsf.E_), - beta1_(owfpsf.beta1_) -{} - - -immersedBoundaryOmegaWallFunctionFvPatchScalarField:: -immersedBoundaryOmegaWallFunctionFvPatchScalarField -( - const immersedBoundaryOmegaWallFunctionFvPatchScalarField& owfpsf, - const DimensionedField& iF -) -: - immersedBoundaryWallFunctionFvPatchScalarField(owfpsf, iF), - UName_(owfpsf.UName_), - kName_(owfpsf.kName_), - GName_(owfpsf.GName_), - nuName_(owfpsf.nuName_), - nutName_(owfpsf.nutName_), - Cmu_(owfpsf.Cmu_), - kappa_(owfpsf.kappa_), - E_(owfpsf.E_), - beta1_(owfpsf.beta1_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void immersedBoundaryOmegaWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - // If G field is not present, execute zero gradient evaluation - // HJ, 20/Mar/2011 - if (!db().foundObject(GName_)) - { - InfoIn - ( - "void immersedBoundaryOmegaWallFunctionFvPatchScalarField::" - "updateCoeffs()" - ) << "Cannot access " << GName_ << " field. for patch " - << patch().name() << ". Evaluating as regular immersed boundary" - << endl; - - immersedBoundaryWallFunctionFvPatchScalarField::evaluate(); - - return; - } - - const vectorField& n = ibPatch().ibNormals(); - - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - - const scalar Cmu25 = pow(Cmu_, 0.25); - const scalar Cmu50 = sqrt(Cmu_); - - volScalarField& G = const_cast - (db().lookupObject(GName_)); - - // Grab values of other fields required for wall functions - - // Velocity - const fvPatchVectorField& Uwg = - patch().lookupPatchField(UName_); - const immersedBoundaryVelocityWallFunctionFvPatchVectorField& Uw = - refCast - ( - Uwg - ); - - // Calculate tangential component, taking into account wall velocity - const vectorField UtanOld = - (I - sqr(n)) & (Uw.ibSamplingPointValue() - Uw.ibValue()); - const scalarField magUtanOld = mag(UtanOld); - - // Tangential velocity component - scalarField& UTangentialNew = Uw.wallTangentialValue(); - - // Wall shear stress - vectorField& tauWall = Uw.tauWall(); - - // Turbulence kinetic energy - const fvPatchScalarField& kg = - patch().lookupPatchField(kName_); - const immersedBoundaryWallFunctionFvPatchScalarField& kw = - refCast(kg); - - // Current and new values of k at sampling point - scalarField k = kw.ibSamplingPointValue(); - scalarField& kNew = kw.wallValue(); - - // Laminar viscosity - const fvPatchScalarField& nuwg = - patch().lookupPatchField(nuName_); - const immersedBoundaryFvPatchScalarField& nuw = - refCast(nuwg); - scalarField nu = nuw.ibCellValue(); - - // Turbulent viscosity - const fvPatchScalarField& nutwg = - patch().lookupPatchField(nutName_); - const immersedBoundaryWallFunctionFvPatchScalarField& nutw = - refCast(nutwg); - - // New values of nut - scalarField nutOld = nutw.ibCellValue(); - scalarField& nutNew = nutw.wallValue(); - - const scalarField magGradUw = mag(Uw.ibGrad()); - - // Get the IB addressing and distance - const labelList& ibc = ibPatch().ibCells(); - - // Distance to sampling point - const scalarField& ySample = ibPatch().ibSamplingPointDelta(); - - // Distance from wall to IB point - const scalarField& y = ibPatch().ibDelta(); - - // Omega: store IB cell values for direct insertion - scalarField omegaSample = this->ibSamplingPointValue(); - - scalarField& omegaNew = this->wallValue(); - - // Mark values to be fixed - boolList wf(ibc.size(), false); - - // Calculate yPlus for sample points - scalarField ypd = Cmu25*ySample*sqrt(k)/nu; - - // Calculate wall function conditions - forAll (ibc, ibCellI) - { - - // Calculate yPlus from k and laminar viscosity for the IB point - const scalar yPlusSample = ypd[ibCellI]; - - scalar tauW, uTau; // wall-shear and friction velocity from LOW - - if (yPlusSample > yPlusLam) - { - // Calculate tauW from log-law using k and U at sampling point - - tauW = magUtanOld[ibCellI]*Cmu25*sqrt(k[ibCellI])*kappa_ - /log(E_*yPlusSample); - } - else - { - // Sampling point is in laminar sublayer - tauW = magUtanOld[ibCellI]*Cmu25*sqrt(k[ibCellI])/yPlusSample; - } - - // friction velocity computed from k and U at sampling point - uTau = sqrt(tauW); - - tauWall[ibCellI] = tauW*UtanOld[ibCellI]/(magUtanOld[ibCellI] + SMALL); - - // Calculate yPlus for IB point - - scalar yPlusIB = yPlusSample*y[ibCellI]/ySample[ibCellI]; - - // Calculate wall function data in the immersed boundary point - if (yPlusIB > yPlusLam) - { - const scalar nuLam = nu[ibCellI]; - // Logarithmic region - wf[ibCellI] = true; - - // turbulent viscosity at IB cell and at wall - scalar nutw = nuLam*(yPlusIB*kappa_/log(E_*yPlusIB) - 1); - - // Fix generation even though it if is not used - G[ibc[ibCellI]] = - sqr((nutw + nuLam)*magGradUw[ibCellI])/ - (Cmu25*sqrt(k[ibCellI])*kappa_*y[ibCellI]); - - // Compute k at the IB cell - kNew[ibCellI] = tauW/Cmu50; // equilibrium boundary layer - // kNew[ibCellI] = k[ibCellI]; // zero-Gradient (less stable) - - // Compute omega at the IB cell - omegaNew[ibCellI] = sqrt(kNew[ibCellI])/(Cmu25*kappa_*y[ibCellI]); - - // Log-Law for tangential velocity - uTau = Cmu25*sqrt(kNew) - UTangentialNew[ibCellI] = uTau/kappa_*log(E_*yPlusIB); - - // Calculate turbulent viscosity - nutNew[ibCellI] = nutw; - } - else - { - // Laminar sub-layer - wf[ibCellI] = false; - - // G is zero - immaterial! - // G[ibc[ibCellI]] = 0; - - // quadratic fit - kNew[ibCellI] = k[ibCellI]*sqr(yPlusIB/yPlusLam); - - // Compute omega at the IB cell - omegaNew[ibCellI] = 6.0*nu[ibCellI]/(beta1_*sqr(y[ibCellI])); - - // Bugfix - set zeroGradient bc for large omega values at ib boundary - // to avoid k unboundedness (IG 30/OCT/2015), not - // sure if this is a good criteria - if(omegaNew[ibCellI] > 10.0) - { - wf[ibCellI] = true; - } - - // Laminar sub-layer for tangential velocity: uPlus = yPlus - UTangentialNew[ibCellI] = uTau*yPlusIB; - - // Turbulent viscosity is zero - nutNew[ibCellI] = SMALL; - } - } - -// Info<< "UTangentialNew " << min(UTangentialNew) << " " << max(UTangentialNew) << endl; -// Info<< "nutNew " << min(nutNew) << " " << max(nutNew) << endl; -// Info<< "kNew " << min(kNew) << " " << max(kNew) << endl; -// Info<< "epsilonNew " << min(epsilonNew) << " " << max(epsilonNew) << endl; - - // Set the fields to calculated wall function values - Uw.wallMask() = true; - kw.wallMask() = wf; - nutw.wallMask() = true; - this->wallMask() = true; - - // Insert epsilon values into the internal field - immersedBoundaryWallFunctionFvPatchScalarField::updateCoeffs(); -} - - -void immersedBoundaryOmegaWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes commsType -) -{ - // Insert epsilon values into the internal field - this->setIbCellValues(this->wallValue()); - - fvPatchScalarField::evaluate(commsType); -} - - -void immersedBoundaryOmegaWallFunctionFvPatchScalarField:: -write(Ostream& os) const -{ - immersedBoundaryWallFunctionFvPatchScalarField::write(os); - writeEntryIfDifferent(os, "U", "U", UName_); - writeEntryIfDifferent(os, "k", "k", kName_); - writeEntryIfDifferent(os, "G", "RASModel::G", GName_); - writeEntryIfDifferent(os, "nu", "nu", nuName_); - writeEntryIfDifferent(os, "nut", "nut", nutName_); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - os.writeKeyword("beta1") << beta1_ << token::END_STATEMENT << nl; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - immersedBoundaryOmegaWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.H b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.H deleted file mode 100644 index e153fe7f4..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,216 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Class - Foam::incompressible::RASModels:: - immersedBoundaryOmegaWallFunctionFvPatchScalarField - -Description - Provides a wall function boundary condition/constraint on omega - - Computed value is: - - omega = sqrt(omega_vis^2 + omega_log^2) - - where - omega_vis = omega in viscous region - omega_log = omega in logarithmic region - - Model described by Eq.(15) of: - @verbatim - Menter, F., Esch, T. - "Elements of Industrial Heat Transfer Prediction" - 16th Brazilian Congress of Mechanical Engineering (COBEM), - Nov. 2001 - @endverbatim - -SourceFiles - immersedBoundaryOmegaWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef immersedBoundaryOmegaWallFunctionFvPatchScalarField_H -#define immersedBoundaryOmegaWallFunctionFvPatchScalarField_H - -#include "immersedBoundaryWallFunctionFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class immersedBoundaryOmegaWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class immersedBoundaryOmegaWallFunctionFvPatchScalarField -: - public immersedBoundaryWallFunctionFvPatchScalarField -{ - // Private data - - //- Name of velocity field - word UName_; - - //- Name of turbulence kinetic energy field - word kName_; - - //- Name of turbulence generation field - word GName_; - - //- Name of laminar viscosity field - word nuName_; - - //- Name of turbulent viscosity field - word nutName_; - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- beta1 coefficient - scalar beta1_; - - -public: - - //- Runtime type information - TypeName("immersedBoundaryOmegaWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - immersedBoundaryOmegaWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - immersedBoundaryOmegaWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // immersedBoundaryOmegaWallFunctionFvPatchScalarField - // onto a new patch - immersedBoundaryOmegaWallFunctionFvPatchScalarField - ( - const immersedBoundaryOmegaWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - immersedBoundaryOmegaWallFunctionFvPatchScalarField - ( - const immersedBoundaryOmegaWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new immersedBoundaryOmegaWallFunctionFvPatchScalarField - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - immersedBoundaryOmegaWallFunctionFvPatchScalarField - ( - const immersedBoundaryOmegaWallFunctionFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new immersedBoundaryOmegaWallFunctionFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - //- Destructor - virtual ~immersedBoundaryOmegaWallFunctionFvPatchScalarField() - {} - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes = Pstream::blocking - ); - - - // I-O - - //- Write - void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.C b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.C deleted file mode 100644 index 37f117a43..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.C +++ /dev/null @@ -1,294 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "immersedBoundaryVelocityWallFunctionFvPatchVectorField.H" -#include "immersedBoundaryWallFunctionFvPatchFields.H" -#include "RASModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -void immersedBoundaryVelocityWallFunctionFvPatchVectorField::setIbCellValues -( - const vectorField& ibcValues -) const -{ - const labelList& ibc = ibPatch().ibCells(); - - if (ibcValues.size() != ibc.size()) - { - FatalErrorIn - ( - "void immersedBoundaryVelocityWallFunctionFvPatchVectorField::" - "setIbCellValues\n" - "(\n" - " const vectorField& ibcValues\n" - ") const" - ) << "Size of ibcValues field not equal to the number of IB cells." - << nl << "ibcValues: " << ibcValues.size() - << " ibc: " << ibc.size() - << abort(FatalError); - } - - // Get non-const access to internal field - vectorField& psiI = const_cast(this->internalField()); - - immersedBoundaryFvPatchVectorField::setIbCellValues(ibcValues); - - if (wallTangentialValue_.empty() || wallMask_.empty()) - { - immersedBoundaryFvPatchVectorField::setIbCellValues(ibcValues); - } - else - { - const vectorField& n = ibPatch().ibNormals(); - - // Calculate tangential component taking into account wall velocity - scalarField UtanOld = mag((I - sqr(n)) & this->ibCellValue()); - - vectorField Uwall = this->ibValue(); - - forAll (ibcValues, cellI) - { - // If mask is set, correct the velocity for the - // tangential wall value, otherwise use the fitted value - if (wallMask_[cellI]) - { - // Decompose fitted velocity into the normal and - // tangential components - const vector& curN = n[cellI]; - const vector curU = psiI[ibc[cellI]]; - - scalar ibcNormal = curN & ibcValues[cellI]; - - // Get tangential velocity and direction - vector ibcTangential = (I - sqr(curN)) & curU; - ibcTangential /= mag(ibcTangential) + SMALL; - - // Reconstruct the velocity, imposing the magnitude of - // tangential value and add wall velocity - psiI[ibc[cellI]] = curN*ibcNormal - + ibcTangential*wallTangentialValue_[cellI] - + Uwall[cellI]; - } - else - { - psiI[ibc[cellI]] = ibcValues[cellI]; - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -immersedBoundaryVelocityWallFunctionFvPatchVectorField:: -immersedBoundaryVelocityWallFunctionFvPatchVectorField -( - const fvPatch& p, - const DimensionedField& iF -) -: - immersedBoundaryFvPatchVectorField(p, iF), - wallTangentialValue_(), - tauWall_(), - wallMask_() -{} - - -immersedBoundaryVelocityWallFunctionFvPatchVectorField:: -immersedBoundaryVelocityWallFunctionFvPatchVectorField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - immersedBoundaryFvPatchVectorField(p, iF, dict), - wallTangentialValue_(), - tauWall_(), - wallMask_() -{} - - -immersedBoundaryVelocityWallFunctionFvPatchVectorField:: -immersedBoundaryVelocityWallFunctionFvPatchVectorField -( - const immersedBoundaryVelocityWallFunctionFvPatchVectorField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - immersedBoundaryFvPatchVectorField(ptf, p, iF, mapper), - wallTangentialValue_(), - tauWall_(), - wallMask_() -{} - - -immersedBoundaryVelocityWallFunctionFvPatchVectorField:: -immersedBoundaryVelocityWallFunctionFvPatchVectorField -( - const immersedBoundaryVelocityWallFunctionFvPatchVectorField& ewfpsf -) -: - immersedBoundaryFvPatchVectorField(ewfpsf), - wallTangentialValue_(), - tauWall_(), - wallMask_() -{} - - -immersedBoundaryVelocityWallFunctionFvPatchVectorField:: -immersedBoundaryVelocityWallFunctionFvPatchVectorField -( - const immersedBoundaryVelocityWallFunctionFvPatchVectorField& ewfpsf, - const DimensionedField& iF -) -: - immersedBoundaryFvPatchVectorField(ewfpsf, iF), - wallTangentialValue_(), - tauWall_(), - wallMask_() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -const vectorField& -immersedBoundaryVelocityWallFunctionFvPatchVectorField::wallShearStress() const -{ - if (tauWall_.empty()) - { - FatalErrorIn - ( - "const vectorField& " - "immersedBoundaryVelocityWallFunctionFvPatchVectorField::" - "wallShearStress() const" - ) << "tauWall not set for IB patch " << patch().name() - << " for field " << dimensionedInternalField().name() - << abort(FatalError); - } - - return tauWall_; -} - -Foam::scalarField& -immersedBoundaryVelocityWallFunctionFvPatchVectorField::wallTangentialValue() const -{ - // Bugfix 30/OCT/2015 - check if the mesh is moving - - const immersedBoundaryFvPatch& ibFvP = - immersedBoundaryFvPatchVectorField::ibPatch(); - if - ( - wallTangentialValue_.empty() - || (ibFvP.movingIb() || ibFvP.boundaryMesh().mesh().moving()) - ) - { - wallTangentialValue_.setSize - ( - this->ibPatch().ibCells().size(), - 0 - ); - } - - return wallTangentialValue_; -} - - -Foam::vectorField& -immersedBoundaryVelocityWallFunctionFvPatchVectorField::tauWall() const -{ - // Bugfix 30/OCT/2015 - check if the mesh is moving - - const immersedBoundaryFvPatch& ibFvP = - immersedBoundaryFvPatchVectorField::ibPatch(); - if - ( - tauWall_.empty() - || (ibFvP.movingIb() || ibFvP.boundaryMesh().mesh().moving()) - ) - { - tauWall_.setSize - ( - this->ibPatch().ibCells().size(), - vector::zero - ); - } - - return tauWall_; -} - - -Foam::boolList& -immersedBoundaryVelocityWallFunctionFvPatchVectorField::wallMask() const -{ - // Bugfix 30/OCT/2015 - check if the mesh is moving - - const immersedBoundaryFvPatch& ibFvP = - immersedBoundaryFvPatchVectorField::ibPatch(); - if - ( - wallMask_.empty() - || (ibFvP.movingIb() || ibFvP.boundaryMesh().mesh().moving()) - ) - { - wallMask_.setSize - ( - this->ibPatch().ibCells().size(), - false - ); - } - - return wallMask_; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchVectorField, - immersedBoundaryVelocityWallFunctionFvPatchVectorField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.H b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.H deleted file mode 100644 index e2c8d44b4..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.H +++ /dev/null @@ -1,192 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Class - Foam::incompressible::RASModels:: - immersedBoundaryVelocityWallFunctionFvPatchVectorField - -Description - Boundary condition for velocity when using wall functions - - uses tangential velocity as prescribed by the epsilon boundary condition - to enforce into the fit - -SourceFiles - immersedBoundaryVelocityWallFunctionFvPatchVectorField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef immersedBoundaryVelocityWallFunctionFvPatchVectorField_H -#define immersedBoundaryVelocityWallFunctionFvPatchVectorField_H - -#include "fvPatchFields.H" -#include "immersedBoundaryFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class immersedBoundaryVelocityWallFunctionFvPatchVectorField Declaration -\*---------------------------------------------------------------------------*/ - -class immersedBoundaryVelocityWallFunctionFvPatchVectorField -: - public immersedBoundaryFvPatchVectorField -{ - // Private data - - //- Tangential velocity value to fix in IB cell - mutable scalarField wallTangentialValue_; - - //- Wall shear stress - mutable vectorField tauWall_; - - //- Indicator on values to fix - mutable boolList wallMask_; - - -protected: - - // Protected Member Functions - - //- Set IB cell values: contains data manipulation - virtual void setIbCellValues(const vectorField&) const; - - -public: - - //- Runtime type information - TypeName("immersedBoundaryVelocityWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - immersedBoundaryVelocityWallFunctionFvPatchVectorField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - immersedBoundaryVelocityWallFunctionFvPatchVectorField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // immersedBoundaryVelocityWallFunctionFvPatchVectorField - // onto a new patch - immersedBoundaryVelocityWallFunctionFvPatchVectorField - ( - const immersedBoundaryVelocityWallFunctionFvPatchVectorField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - immersedBoundaryVelocityWallFunctionFvPatchVectorField - ( - const immersedBoundaryVelocityWallFunctionFvPatchVectorField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new immersedBoundaryVelocityWallFunctionFvPatchVectorField - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - immersedBoundaryVelocityWallFunctionFvPatchVectorField - ( - const immersedBoundaryVelocityWallFunctionFvPatchVectorField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new immersedBoundaryVelocityWallFunctionFvPatchVectorField - ( - *this, - iF - ) - ); - } - - - //- Destructor - virtual ~immersedBoundaryVelocityWallFunctionFvPatchVectorField() - {} - - - // Member functions - - // Access - - //- Access to tangential velocity value to fix in IB cell - // Note non-const access - scalarField& wallTangentialValue() const; - - //- Return wall shear stress - const vectorField& wallShearStress() const; - - //- Access to wall shear stress in IB cell - // Note non-const access - vectorField& tauWall() const; - - //- Access to indicator on fixed values. Note non-const access - boolList& wallMask() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.C b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.C deleted file mode 100644 index db3db4342..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.C +++ /dev/null @@ -1,233 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "immersedBoundaryWallFunctionFvPatchField.H" -#include "fvPatchFieldMapper.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // - - - -template -void immersedBoundaryWallFunctionFvPatchField::setIbCellValues -( - const Field& ibcValues -) const -{ - const labelList& ibc = this->ibPatch().ibCells(); - - if (ibcValues.size() != ibc.size()) - { - FatalErrorIn - ( - "template\n" - "void immersedBoundaryWallFunctionFvPatchField::" - "setIbCellValues\n" - "(\n" - " const Field& ibcValues\n" - ") const" - ) << "Size of ibcValues field not equal to the number of IB cells." - << nl << "ibcValues: " << ibcValues.size() - << " ibc: " << ibc.size() - << abort(FatalError); - } - - // Get non-const access to internal field - Field& psiI = const_cast&>(this->internalField()); - - if (wallValue_.empty() || wallMask_.empty()) - { - immersedBoundaryFvPatchField::setIbCellValues(ibcValues); - } - else - { - forAll (ibcValues, cellI) - { - // If mask is set use the wall value, otherwise use the - // fitted value - if (wallMask_[cellI]) - { - psiI[ibc[cellI]] = wallValue_[cellI]; - } - else - { - psiI[ibc[cellI]] = ibcValues[cellI]; - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -immersedBoundaryWallFunctionFvPatchField:: -immersedBoundaryWallFunctionFvPatchField -( - const fvPatch& p, - const DimensionedField& iF -) -: - immersedBoundaryFvPatchField(p, iF), - wallValue_(), - wallMask_() -{} - - -template -immersedBoundaryWallFunctionFvPatchField:: -immersedBoundaryWallFunctionFvPatchField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - immersedBoundaryFvPatchField(p, iF, dict), - wallValue_(), - wallMask_() -{} - - -template -immersedBoundaryWallFunctionFvPatchField:: -immersedBoundaryWallFunctionFvPatchField -( - const immersedBoundaryWallFunctionFvPatchField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - immersedBoundaryFvPatchField(ptf, p, iF, mapper), - wallValue_(), - wallMask_() -{} - - -template -immersedBoundaryWallFunctionFvPatchField:: -immersedBoundaryWallFunctionFvPatchField -( - const immersedBoundaryWallFunctionFvPatchField& tkqrwfpf -) -: - immersedBoundaryFvPatchField(tkqrwfpf), - wallValue_(), - wallMask_() -{} - - -template -immersedBoundaryWallFunctionFvPatchField:: -immersedBoundaryWallFunctionFvPatchField -( - const immersedBoundaryWallFunctionFvPatchField& tkqrwfpf, - const DimensionedField& iF -) -: - immersedBoundaryFvPatchField(tkqrwfpf, iF), - wallValue_(), - wallMask_() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -Foam::Field& immersedBoundaryWallFunctionFvPatchField::wallValue() const -{ - // Note: on a moving mesh, the intersection has changed and - // wallValue fields should be cleared and recalculated. - // This should happen only once, but I cannot see the mechanism - // HJ, 17/Oct/2012 - // Bugfix 30/OCT/2015 - check if the mesh is moving - - const immersedBoundaryFvPatch& ibFvP = - immersedBoundaryFvPatchField::ibPatch(); - - if - ( - wallValue_.empty() - || (ibFvP.movingIb() || ibFvP.boundaryMesh().mesh().moving()) - ) - { - wallValue_.setSize - ( - this->ibPatch().ibCells().size(), - pTraits::zero - ); - } - - return wallValue_; -} - - -template -Foam::boolList& immersedBoundaryWallFunctionFvPatchField::wallMask() const -{ - // Note: on a moving mesh, the intersection has changed and - // wallValue fields should be cleared and recalculated. - // This should happen only once, but I cannot see the mechanism - // HJ, 17/Oct/2012 - // Bugfix 30/OCT/2015 - check if the mesh is moving - const immersedBoundaryFvPatch& ibFvP = - immersedBoundaryFvPatchField::ibPatch(); - - if - ( - wallMask_.empty() - || (ibFvP.movingIb() || ibFvP.boundaryMesh().mesh().moving()) - ) - { - wallMask_.setSize - ( - this->ibPatch().ibCells().size(), - false - ); - } - - return wallMask_; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.H b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.H deleted file mode 100644 index 5b54df76b..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.H +++ /dev/null @@ -1,195 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Class - Foam::incompressible::RASModels::immersedBoundaryWallFunctionFvPatchField - -Description - Boundary condition for passive turbulence variables (U, k, q, R, nut) - when using wall functions on an immersed boundary patch - - Apart form standard immersed boundary capability, the patch field allows - only some values to be fixed, as defined by the wall function calculation. - - This is handled using the ibWallValue and ibWallMask arrays, corresponding - to the number of ibCells - - The implementation of wall functions on an immersed boundary will fix - the values of k, epsilon, nut and tangential velocity in cells within - the log-law layer. For the cells in the laminar sublayer, k and epsilon - (omega) will be calculated using a zero gradient condition, - nut will be set to zero and the tangential component of the - velocity will be corrected. - -Author - Hrvoje Jasak, Wikki Ltd. All rights reserved - -SourceFiles - immersedBoundaryWallFunctionFvPatchField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef immersedBoundaryWallFunctionFvPatchField_H -#define immersedBoundaryWallFunctionFvPatchField_H - -#include "fvPatchFields.H" -#include "immersedBoundaryFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class immersedBoundaryWallFunctionFvPatchField Declaration -\*---------------------------------------------------------------------------*/ - -template -class immersedBoundaryWallFunctionFvPatchField -: - public immersedBoundaryFvPatchField -{ - // Private data - - //- Value to fix in IB cell - mutable Field wallValue_; - - //- Indicator on values to fix - mutable boolList wallMask_; - - -protected: - - // Protected Member Functions - - //- Set IB cell values: contains data manipulation - virtual void setIbCellValues(const Field&) const; - - -public: - - //- Runtime type information - TypeName("immersedBoundaryWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - immersedBoundaryWallFunctionFvPatchField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - immersedBoundaryWallFunctionFvPatchField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // immersedBoundaryWallFunctionFvPatchField - // onto a new patch - immersedBoundaryWallFunctionFvPatchField - ( - const immersedBoundaryWallFunctionFvPatchField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - immersedBoundaryWallFunctionFvPatchField - ( - const immersedBoundaryWallFunctionFvPatchField& - ); - - //- Construct and return a clone - virtual tmp > clone() const - { - return tmp > - ( - new immersedBoundaryWallFunctionFvPatchField(*this) - ); - } - - //- Construct as copy setting internal field reference - immersedBoundaryWallFunctionFvPatchField - ( - const immersedBoundaryWallFunctionFvPatchField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp > clone - ( - const DimensionedField& iF - ) const - { - return tmp > - ( - new immersedBoundaryWallFunctionFvPatchField(*this, iF) - ); - } - - - //- Destructor - virtual ~immersedBoundaryWallFunctionFvPatchField() - {} - - - // Member functions - - // Access - - //- Access to value to fix in IB cell. Note non-const access - Field& wallValue() const; - - //- Access to indicator on fixed values. Note non-const access - boolList& wallMask() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "immersedBoundaryWallFunctionFvPatchField.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.C b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.C deleted file mode 100644 index 105954cbc..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.C +++ /dev/null @@ -1,50 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "immersedBoundaryWallFunctionFvPatchFields.H" -#include "fvPatchFields.H" -#include "addToRunTimeSelectionTable.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makePatchFields(immersedBoundaryWallFunction); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.H b/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.H deleted file mode 100644 index 668153faf..000000000 --- a/src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.H +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#ifndef immersedBoundaryWallFunctionFvPatchFields_H -#define immersedBoundaryWallFunctionFvPatchFields_H - -#include "immersedBoundaryWallFunctionFvPatchField.H" -#include "fieldTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeFieldTypedefs(immersedBoundaryWallFunction) - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/dsmc/CMakeLists.txt b/src/lagrangian/dsmc/CMakeLists.txt index b86810741..3433febdf 100644 --- a/src/lagrangian/dsmc/CMakeLists.txt +++ b/src/lagrangian/dsmc/CMakeLists.txt @@ -50,4 +50,4 @@ list(APPEND SOURCES add_foam_library(dsmc SHARED ${SOURCES}) -target_link_libraries(dsmc finiteVolume lagrangianBasic) +target_link_libraries(dsmc PUBLIC finiteVolume lagrangianBasic) diff --git a/src/lduSolvers/CMakeLists.txt b/src/lduSolvers/CMakeLists.txt index e6350938f..f984650ce 100644 --- a/src/lduSolvers/CMakeLists.txt +++ b/src/lduSolvers/CMakeLists.txt @@ -30,11 +30,6 @@ # # -------------------------------------------------------------------------- -list(APPEND SOURCES - crMatrix/crAddressing.C - crMatrix/crMatrix.C -) - set(lduPrecon lduPrecon) list(APPEND SOURCES ${lduPrecon}/CholeskyPrecon/CholeskyPrecon.C @@ -49,6 +44,7 @@ set(lduSmoother lduSmoother) list(APPEND SOURCES ${lduSmoother}/symGaussSeidelSmoother/symGaussSeidelSmoother.C ${lduSmoother}/iluSmoother/iluSmoother.C + ${lduSmoother}/iluC0Smoother/iluC0Smoother.C ) set(lduSolver lduSolver) @@ -75,6 +71,8 @@ set(amgPolicy ${amg}/amgPolicy) list(APPEND SOURCES ${amgPolicy}/amgPolicy.C ${amgPolicy}/pamgPolicy.C + ${amgPolicy}/clusterAmgPolicy.C + ${amgPolicy}/selectionAmgPolicy.C ) add_foam_library(lduSolvers SHARED ${SOURCES}) diff --git a/src/mesh/extrudeModel/CMakeLists.txt b/src/mesh/extrudeModel/CMakeLists.txt index e7c237ad3..9bbbdf0ff 100644 --- a/src/mesh/extrudeModel/CMakeLists.txt +++ b/src/mesh/extrudeModel/CMakeLists.txt @@ -34,6 +34,7 @@ list(APPEND SOURCES extrudeModel/extrudeModel.C extrudeModel/newExtrudeModel.C linearNormal/linearNormal.C + gradedNormal/gradedNormal.C linearRadial/linearRadial.C sigmaRadial/sigmaRadial.C wedge/wedge.C @@ -41,4 +42,4 @@ list(APPEND SOURCES add_foam_library(extrudeModel SHARED ${SOURCES}) -target_link_libraries(extrudeModel PUBLIC dynamicMesh) +target_link_libraries(extrudeModel PUBLIC dynamicMesh ODE) diff --git a/src/meshTools/readSTLASCII.C b/src/meshTools/readSTLASCII.C deleted file mode 100644 index 384420a7c..000000000 --- a/src/meshTools/readSTLASCII.C +++ /dev/null @@ -1,2272 +0,0 @@ -#line 2 "/home/henrus/OpenFOAM/foam-extend-4.0/src/meshTools/readSTLASCII.C" - -#line 4 "/home/henrus/OpenFOAM/foam-extend-4.0/src/meshTools/readSTLASCII.C" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 0 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - - /* The c++ scanner is a mess. The FlexLexer.h header file relies on the - * following macro. This is required in order to pass the c++-multiple-scanners - * test in the regression suite. We get reports that it breaks inheritance. - * We will address this in a future release of flex, or omit the C++ scanner - * altogether. - */ - #define yyFlexLexer yyFlexLexer - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* begin standard C++ headers. */ -#include -#include -#include -#include -#include -/* end standard C++ headers. */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t yyleng; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - - std::streambuf* yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -void *yyalloc (yy_size_t ); -void *yyrealloc (void *,yy_size_t ); -void yyfree (void * ); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -#define yytext_ptr yytext -#define YY_INTERACTIVE - -#include - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 19 -#define YY_END_OF_BUFFER 20 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[278] = - { 0, - 15, 15, 2, 2, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 20, 17, 15, 16, 17, 17, - 17, 17, 17, 17, 17, 17, 2, 3, 2, 15, - 17, 17, 17, 17, 17, 17, 15, 17, 17, 17, - 15, 17, 17, 17, 17, 15, 17, 17, 10, 17, - 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, - 2, 2, 2, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, - - 0, 0, 0, 15, 0, 0, 10, 10, 11, 10, - 11, 0, 18, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, - 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, - 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, - 0, 0, 5, 1, 0, 0, 6, 0, 0, 0, - - 0, 0, 7, 7, 7, 7, 0, 0, 9, 0, - 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 7, 12, 9, 0, 0, 0, 0, 0, - 14, 13, 0, 0, 0, 7, 12, 0, 0, 0, - 0, 0, 0, 14, 13, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 14, 8, 8, 0, 0, 0, - 4, 0, 0, 8, 0, 0, 4, 4, 4, 4, - 0, 0, 0, 4, 0, 4, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 5, 4, 5, 6, 4, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, - 4, 4, 4, 4, 8, 9, 10, 11, 12, 13, - 9, 9, 14, 9, 9, 15, 16, 17, 18, 19, - 9, 20, 21, 22, 23, 24, 9, 25, 9, 9, - 4, 4, 4, 4, 4, 4, 26, 9, 27, 28, - - 29, 30, 9, 9, 31, 9, 9, 32, 33, 34, - 35, 36, 9, 37, 38, 39, 40, 41, 9, 42, - 9, 9, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[43] = - { 0, - 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2 - } ; - -static yyconst flex_uint16_t yy_base[285] = - { 0, - 0, 37, 3, 6, 74, 108, 12, 29, 39, 41, - 54, 82, 20, 22, 550, 551, 142, 551, 531, 531, - 539, 528, 510, 510, 517, 507, 43, 551, 539, 88, - 523, 521, 515, 503, 501, 495, 67, 48, 527, 92, - 95, 516, 520, 497, 501, 125, 72, 522, 127, 0, - 526, 0, 509, 509, 517, 506, 488, 488, 495, 485, - 504, 507, 507, 501, 483, 486, 486, 480, 93, 551, - 99, 110, 509, 133, 493, 491, 474, 472, 466, 494, - 484, 481, 474, 464, 461, 159, 108, 492, 171, 179, - 146, 182, 190, 21, 191, 481, 485, 462, 466, 483, - - 473, 464, 454, 199, 134, 483, 205, 216, 214, 487, - 223, 76, 0, 486, 469, 465, 473, 470, 448, 444, - 452, 449, 466, 462, 465, 446, 442, 445, 111, 140, - 466, 234, 465, 9, 456, 448, 437, 429, 144, 465, - 459, 172, 445, 446, 441, 451, 424, 425, 420, 430, - 449, 448, 435, 428, 427, 415, 444, 188, 242, 235, - 251, 248, 152, 432, 437, 413, 418, 439, 192, 443, - 429, 441, 440, 409, 430, 424, 436, 410, 404, 433, - 191, 203, 427, 260, 426, 222, 414, 406, 395, 387, - 263, 414, 425, 424, 394, 412, 421, 18, 393, 229, - - 414, 231, 272, 273, 418, 274, 283, 386, 402, 367, - 207, 395, 285, 390, 370, 375, 394, 377, 355, 358, - 288, 385, 292, 388, 386, 298, 304, 313, 305, 291, - 385, 369, 333, 307, 321, 306, 307, 316, 276, 266, - 323, 252, 324, 249, 237, 208, 146, 169, 330, 334, - 336, 348, 337, 317, 168, 158, 551, 340, 350, 131, - 362, 121, 360, 104, 86, 368, 370, 371, 69, 377, - 353, 354, 55, 378, 45, 379, 551, 406, 409, 412, - 414, 46, 417, 35 - } ; - -static yyconst flex_int16_t yy_def[285] = - { 0, - 278, 278, 279, 279, 278, 278, 278, 278, 278, 278, - 278, 278, 280, 280, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 281, 277, 282, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 283, - 283, 17, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 281, 277, - 281, 281, 282, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 283, 283, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 284, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 284, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 0, 277, 277, 277, - 277, 277, 277, 277 - } ; - -static yyconst flex_uint16_t yy_nxt[594] = - { 0, - 277, 17, 18, 16, 27, 28, 16, 27, 28, 19, - 92, 20, 21, 37, 18, 134, 38, 39, 40, 198, - 22, 51, 18, 51, 18, 133, 23, 134, 24, 25, - 37, 18, 218, 38, 39, 40, 255, 26, 17, 18, - 41, 18, 41, 18, 69, 70, 19, 73, 20, 21, - 42, 276, 42, 88, 90, 46, 18, 22, 47, 48, - 49, 274, 43, 23, 43, 24, 25, 44, 86, 44, - 269, 87, 88, 89, 26, 30, 18, 106, 108, 45, - 141, 45, 142, 46, 18, 31, 47, 48, 49, 74, - 32, 33, 266, 92, 69, 70, 95, 93, 89, 75, - - 72, 277, 34, 94, 76, 264, 96, 35, 36, 30, - 18, 72, 277, 88, 90, 157, 77, 158, 97, 31, - 94, 78, 79, 98, 32, 33, 104, 263, 110, 105, - 106, 107, 111, 107, 74, 99, 34, 268, 112, 106, - 108, 35, 36, 52, 75, 131, 159, 92, 168, 76, - 169, 53, 91, 54, 55, 112, 185, 129, 186, 264, - 86, 77, 56, 87, 88, 89, 78, 79, 57, 244, - 58, 59, 92, 140, 129, 249, 93, 89, 142, 60, - 92, 257, 94, 92, 93, 90, 130, 131, 132, 92, - 129, 92, 95, 140, 158, 201, 91, 202, 169, 94, - - 104, 129, 96, 105, 106, 107, 110, 129, 183, 203, - 111, 107, 212, 226, 97, 140, 112, 110, 129, 98, - 109, 111, 108, 161, 140, 139, 256, 139, 186, 109, - 200, 99, 161, 112, 139, 161, 161, 202, 245, 162, - 132, 160, 139, 161, 139, 163, 181, 162, 159, 161, - 244, 139, 161, 181, 160, 182, 183, 184, 243, 181, - 220, 205, 163, 181, 191, 206, 184, 211, 212, 213, - 181, 207, 251, 205, 205, 205, 181, 206, 203, 204, - 204, 240, 250, 221, 221, 221, 228, 222, 207, 223, - 229, 213, 235, 205, 236, 242, 230, 243, 223, 228, - - 221, 221, 221, 229, 226, 228, 228, 205, 237, 238, - 227, 227, 236, 230, 228, 238, 238, 239, 240, 241, - 248, 262, 249, 263, 252, 228, 238, 236, 253, 241, - 243, 228, 238, 238, 254, 252, 249, 252, 252, 253, - 250, 247, 251, 251, 265, 258, 266, 258, 258, 252, - 246, 254, 259, 260, 261, 260, 267, 273, 275, 274, - 276, 252, 258, 269, 258, 258, 263, 270, 261, 252, - 245, 269, 269, 271, 266, 270, 267, 268, 269, 269, - 269, 272, 272, 268, 274, 276, 244, 225, 272, 237, - 271, 223, 234, 232, 233, 217, 232, 231, 272, 272, - - 231, 227, 224, 225, 224, 272, 16, 16, 16, 29, - 29, 29, 50, 50, 50, 71, 71, 113, 113, 205, - 202, 219, 217, 216, 215, 194, 193, 214, 209, 210, - 209, 208, 186, 204, 200, 197, 199, 198, 197, 196, - 195, 194, 193, 192, 191, 169, 190, 189, 188, 187, - 158, 180, 179, 178, 177, 176, 175, 173, 172, 174, - 170, 173, 172, 171, 170, 142, 140, 167, 166, 165, - 164, 134, 160, 156, 155, 154, 153, 152, 151, 150, - 149, 148, 147, 146, 145, 144, 143, 114, 110, 109, - 138, 137, 136, 135, 103, 102, 101, 100, 91, 128, - - 127, 126, 125, 124, 123, 85, 84, 83, 81, 80, - 72, 122, 121, 120, 119, 118, 117, 116, 115, 68, - 67, 66, 65, 64, 63, 62, 61, 114, 109, 103, - 102, 101, 100, 91, 85, 84, 83, 82, 81, 80, - 72, 68, 67, 66, 65, 64, 63, 62, 61, 277, - 15, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277 - - } ; - -static yyconst flex_int16_t yy_chk[594] = - { 0, - 0, 1, 1, 3, 3, 3, 4, 4, 4, 1, - 134, 1, 1, 7, 7, 134, 7, 7, 7, 198, - 1, 13, 13, 14, 14, 94, 1, 94, 1, 1, - 8, 8, 198, 8, 8, 8, 284, 1, 2, 2, - 9, 9, 10, 10, 27, 27, 2, 282, 2, 2, - 9, 275, 10, 38, 38, 11, 11, 2, 11, 11, - 11, 273, 9, 2, 10, 2, 2, 9, 37, 10, - 269, 37, 37, 37, 2, 5, 5, 47, 47, 9, - 112, 10, 112, 12, 12, 5, 12, 12, 12, 30, - 5, 5, 265, 40, 69, 69, 41, 40, 40, 30, - - 71, 71, 5, 40, 30, 264, 41, 5, 5, 6, - 6, 72, 72, 87, 87, 129, 30, 129, 41, 6, - 40, 30, 30, 41, 6, 6, 46, 262, 49, 46, - 46, 46, 49, 49, 74, 41, 6, 260, 49, 105, - 105, 6, 6, 17, 74, 130, 130, 91, 139, 74, - 139, 17, 91, 17, 17, 49, 163, 91, 163, 256, - 86, 74, 17, 86, 86, 86, 74, 74, 17, 255, - 17, 17, 89, 142, 91, 248, 89, 89, 142, 17, - 90, 247, 89, 92, 90, 90, 92, 92, 92, 158, - 90, 93, 95, 169, 158, 181, 93, 181, 169, 89, - - 104, 93, 95, 104, 104, 104, 107, 90, 182, 182, - 107, 107, 211, 211, 95, 109, 107, 108, 93, 95, - 109, 108, 108, 186, 111, 109, 246, 108, 186, 111, - 200, 95, 202, 107, 111, 132, 160, 202, 245, 132, - 132, 160, 109, 159, 108, 132, 160, 159, 159, 162, - 244, 111, 161, 159, 162, 161, 161, 161, 242, 162, - 200, 184, 132, 160, 191, 184, 184, 191, 191, 191, - 159, 184, 240, 203, 204, 206, 162, 203, 203, 204, - 206, 239, 239, 203, 204, 206, 213, 207, 184, 207, - 213, 213, 221, 223, 221, 230, 213, 230, 223, 226, - - 203, 204, 206, 226, 226, 227, 229, 236, 237, 226, - 227, 229, 236, 213, 228, 227, 229, 228, 228, 228, - 238, 254, 238, 254, 241, 243, 226, 235, 241, 241, - 243, 249, 227, 229, 241, 250, 249, 251, 253, 250, - 250, 234, 251, 253, 258, 250, 258, 251, 253, 252, - 233, 241, 252, 252, 252, 259, 259, 271, 272, 271, - 272, 263, 250, 261, 251, 253, 263, 261, 261, 266, - 232, 267, 268, 261, 266, 267, 267, 268, 270, 274, - 276, 267, 268, 270, 274, 276, 231, 225, 270, 224, - 261, 222, 220, 219, 218, 217, 216, 215, 267, 268, - - 214, 212, 210, 209, 208, 270, 278, 278, 278, 279, - 279, 279, 280, 280, 280, 281, 281, 283, 283, 205, - 201, 199, 197, 196, 195, 194, 193, 192, 190, 189, - 188, 187, 185, 183, 180, 179, 178, 177, 176, 175, - 174, 173, 172, 171, 170, 168, 167, 166, 165, 164, - 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, - 147, 146, 145, 144, 143, 141, 140, 138, 137, 136, - 135, 133, 131, 128, 127, 126, 125, 124, 123, 122, - 121, 120, 119, 118, 117, 116, 115, 114, 110, 106, - 103, 102, 101, 100, 99, 98, 97, 96, 88, 85, - - 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, - 73, 68, 67, 66, 65, 64, 63, 62, 61, 60, - 59, 58, 57, 56, 55, 54, 53, 51, 48, 45, - 44, 43, 42, 39, 36, 35, 34, 33, 32, 31, - 29, 26, 25, 24, 23, 22, 21, 20, 19, 15, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277 - - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "triSurface/triSurface/interfaces/STL/readSTLASCII.L" -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.0 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ -#line 27 "triSurface/triSurface/interfaces/STL/readSTLASCII.L" - -#undef yyFlexLexer - - /* ------------------------------------------------------------------------ *\ - ------ local definitions - \* ------------------------------------------------------------------------ */ - -#include "IFstream.H" -#include "triSurface.H" -#include "STLpoint.H" -#include "OSspecific.H" - -using namespace Foam; - -// Dummy yyFlexLexer::yylex() to keep the linker happy. It is not called -//! @cond dummy -int yyFlexLexer::yylex() -{ - FatalErrorIn("yyFlexLexer::yylex()") - << "Should not have called this function" - << abort(FatalError); - return 0; -} -//! @endcond dummy - -// Dummy yywrap to keep yylex happy at compile time. -// It is called by yylex but is not used as the mechanism to change file. -// See <> -//! @cond dummy -#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 -extern "C" int yywrap() -#else -int yyFlexLexer::yywrap() -#endif -{ - return 1; -} -//! @endcond dummy - - -class STLLexer -: - public yyFlexLexer -{ - // Private data - - label nTriangles_; - short region_; // current region - short maxRegion_; // max region - - label lineNo_; - word startError_; - - DynamicList STLpoints_; - //DynamicList STLnormals_; - DynamicList