From ab2fb727610d3d3a35a6ba9b025babb6687772a2 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 26 Jan 2024 10:03:24 +0000 Subject: [PATCH] createRegionMesh.H, createRegionMeshNoChangers.H: New include files to construct a region mesh --- .../test/fvMeshStitcher/Test-fvMeshStitcher.C | 4 +-- .../advanced/refineHexMesh/refineHexMesh.C | 4 +-- .../mesh/generation/extrudeMesh/extrudeMesh.C | 4 +-- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 4 +-- .../createBaffles/createBaffles.C | 4 +-- .../createNonConformalCouples.C | 4 +-- .../manipulation/mergeBaffles/mergeBaffles.C | 4 +-- .../manipulation/renumberMesh/renumberMesh.C | 4 +-- .../singleCellMesh/singleCellMesh.C | 4 +-- .../manipulation/splitBaffles/splitBaffles.C | 4 +-- .../splitMeshRegions/splitMeshRegions.C | 4 +-- .../mesh/manipulation/stitchMesh/stitchMesh.C | 2 +- .../mesh/manipulation/subsetMesh/subsetMesh.C | 4 +-- .../transformPoints/transformPoints.C | 4 +-- .../miscellaneous/patchSummary/patchSummary.C | 4 +-- .../foamToEnsight/foamToEnsight.C | 4 +-- .../foamToEnsightParts/foamToEnsightParts.C | 4 +-- .../foamToTecplot360/foamToTecplot360.C | 4 +-- .../dataConversion/foamToVTK/foamToVTK.C | 4 +-- .../particleTracks/particleTracks.C | 4 +-- .../steadyParticleTracks.C | 4 +-- .../temporalInterpolate/temporalInterpolate.C | 4 +-- .../changeDictionary/changeDictionary.C | 4 +-- .../createExternalCoupledPatchGeometry.C | 4 +-- .../faceAgglomerate/faceAgglomerate.C | 4 +-- .../setAtmBoundaryLayer/setAtmBoundaryLayer.C | 4 +-- .../preProcessing/setFields/setFields.C | 4 +-- .../preProcessing/setWaves/setWaves.C | 4 +-- .../viewFactorsGen/viewFactorsGen.C | 4 +-- src/OpenFOAM/include/createRegionMesh.H | 26 +++++++++++++++++++ ...medMesh.H => createRegionMeshNoChangers.H} | 0 .../Test-fvMeshTools/Test-fvMeshTools.C | 4 +-- 32 files changed, 85 insertions(+), 59 deletions(-) create mode 100644 src/OpenFOAM/include/createRegionMesh.H rename src/OpenFOAM/include/{createNamedMesh.H => createRegionMeshNoChangers.H} (100%) diff --git a/applications/test/fvMeshStitcher/Test-fvMeshStitcher.C b/applications/test/fvMeshStitcher/Test-fvMeshStitcher.C index 52d3c6b5d5..71ca0fe7ee 100644 --- a/applications/test/fvMeshStitcher/Test-fvMeshStitcher.C +++ b/applications/test/fvMeshStitcher/Test-fvMeshStitcher.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTimeNoFunctionObjects.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const bool write = args.optionFound("write"); const bool overwrite = args.optionFound("overwrite"); diff --git a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C index 46be859401..259151a42b 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C +++ b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) const bool minSet = args.optionFound("minSet"); const bool fields = !args.optionFound("noFields"); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const word oldInstance = mesh.pointsInstance(); word cellSetName(args.args()[1]); diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index 3be78dd9f3..815d04107c 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -301,7 +301,7 @@ int main(int argc, char *argv[]) sourceCaseDir ); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const polyBoundaryMesh& patches = mesh.boundaryMesh(); diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C index f02fc36103..7359168580 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1036,7 +1036,7 @@ int main(int argc, char *argv[]) #include "addDictOption.H" #include "setRootCase.H" #include "createTime.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" if (mesh.boundaryMesh().checkParallelSync(true)) { diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 671f1b722d..9e11a66e1c 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -353,7 +353,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTimeNoFunctionObjects.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); diff --git a/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C b/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C index 90467ad61a..613942151c 100644 --- a/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C +++ b/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -186,7 +186,7 @@ int main(int argc, char *argv[]) Foam::word meshRegionName = polyMesh::defaultRegion; args.optionReadIfPresent("region", meshRegionName); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const polyBoundaryMesh& patches = mesh.boundaryMesh(); diff --git a/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C b/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C index e460a0bc9f..a64a9e50f1 100644 --- a/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -177,7 +177,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTimeNoFunctionObjects.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const bool overwrite = args.optionFound("overwrite"); const bool fields = args.optionFound("fields"); diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 0e3c5dbeec..b3c94522cc 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -632,7 +632,7 @@ int main(int argc, char *argv[]) // Get times list const instantList Times = timeSelector::select0(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const word oldInstance = mesh.pointsInstance(); const bool readDict = args.optionFound("dict"); diff --git a/applications/utilities/mesh/manipulation/singleCellMesh/singleCellMesh.C b/applications/utilities/mesh/manipulation/singleCellMesh/singleCellMesh.C index 4cfd129645..b0d50495c1 100644 --- a/applications/utilities/mesh/manipulation/singleCellMesh/singleCellMesh.C +++ b/applications/utilities/mesh/manipulation/singleCellMesh/singleCellMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) const instantList timeDirs = timeSelector::select0(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" if (regionName == singleCellName) { diff --git a/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C b/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C index 4dc9ab81f7..4a56274a70 100644 --- a/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C +++ b/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTimeNoFunctionObjects.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const bool overwrite = args.optionFound("overwrite"); const bool fields = args.optionFound("fields"); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index e5c392653d..b942a3da00 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1420,7 +1420,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTimeNoFunctionObjects.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index c8bf6b5a06..e060f6d1e4 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) // Select time if specified timeSelector::selectIfPresent(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const scalar snapTol = args.optionLookupOrDefault("tol", 1e-4); const bool overwrite = args.optionFound("overwrite"); diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C index b924461d0e..93932b0590 100644 --- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C +++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -220,7 +220,7 @@ int main(int argc, char *argv[]) Foam::word meshRegionName = polyMesh::defaultRegion; args.optionReadIfPresent("region", meshRegionName); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const word setName = args[1]; diff --git a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C index f2811f918c..6b7132cd3a 100644 --- a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C +++ b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,7 +102,7 @@ void readAndRotateFields void rotateFields(const argList& args, const Time& runTime, const tensor& T) { - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" // Read objects in time directory IOobjectList objects(mesh, runTime.name()); diff --git a/applications/utilities/miscellaneous/patchSummary/patchSummary.C b/applications/utilities/miscellaneous/patchSummary/patchSummary.C index 3f8f68c22e..bdca4ce6d4 100644 --- a/applications/utilities/miscellaneous/patchSummary/patchSummary.C +++ b/applications/utilities/miscellaneous/patchSummary/patchSummary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) const bool expand = args.optionFound("expand"); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const polyBoundaryMesh& bm = mesh.boundaryMesh(); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C index 6048d07ba5..c2e966812f 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -158,7 +158,7 @@ int main(int argc, char *argv[]) instantList Times = timeSelector::select0(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" // Mesh instance (region0 gets filtered out) fileName regionPrefix = ""; diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C index b1c583449d..adc031f76f 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -181,7 +181,7 @@ int main(int argc, char *argv[]) mkDir(ensightDir); mkDir(dataDir); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" // Mesh instance (region0 gets filtered out) fileName regionPrefix; diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C index 7865086e27..7fbd1fdf91 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -272,7 +272,7 @@ int main(int argc, char *argv[]) const instantList timeDirs = timeSelector::select0(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" // TecplotData/ directory in the case fileName fvPath(runTime.path()/"Tecplot360"); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index 165550496c..84f84ba2cc 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -404,7 +404,7 @@ int main(int argc, char *argv[]) const instantList timeDirs = timeSelector::select0(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" // VTK/ directory in the case fileName fvPath(runTime.path()/"VTK"); diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C index 4e49e101ef..8f2ec27e7c 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) #include "createTime.H" const instantList timeDirs = timeSelector::select0(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" #include "createFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C index 4936760213..a64f439b1f 100644 --- a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) #include "createTime.H" const instantList timeDirs = timeSelector::select0(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" #include "createFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/miscellaneous/temporalInterpolate/temporalInterpolate.C b/applications/utilities/postProcessing/miscellaneous/temporalInterpolate/temporalInterpolate.C index f1768481a1..77c734c07f 100644 --- a/applications/utilities/postProcessing/miscellaneous/temporalInterpolate/temporalInterpolate.C +++ b/applications/utilities/postProcessing/miscellaneous/temporalInterpolate/temporalInterpolate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -254,7 +254,7 @@ int main(int argc, char *argv[]) ); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" Info<< "Interpolating fields for times:" << endl; diff --git a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C index b2eb4d278b..f23a4cfb6f 100644 --- a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C +++ b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -460,7 +460,7 @@ int main(int argc, char *argv[]) instance = runTime.name(); } - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const bool literalRE = args.optionFound("literalRE"); if (literalRE) diff --git a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometry.C b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometry.C index 06fde97957..db304eee4e 100644 --- a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometry.C +++ b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) argList::validArgs.append("fieldName"); #include "setRootCase.H" #include "createTime.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C index 34fee836bc..11e33d69dd 100644 --- a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C +++ b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) #include "addDictOption.H" #include "setRootCase.H" #include "createTime.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const word dictName("viewFactorsDict"); diff --git a/applications/utilities/preProcessing/setAtmBoundaryLayer/setAtmBoundaryLayer.C b/applications/utilities/preProcessing/setAtmBoundaryLayer/setAtmBoundaryLayer.C index f26e616a29..26ee815040 100644 --- a/applications/utilities/preProcessing/setAtmBoundaryLayer/setAtmBoundaryLayer.C +++ b/applications/utilities/preProcessing/setAtmBoundaryLayer/setAtmBoundaryLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) const instantList timeDirs = timeSelector::selectIfPresent(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const dictionary setAtmBoundaryLayerDict ( diff --git a/applications/utilities/preProcessing/setFields/setFields.C b/applications/utilities/preProcessing/setFields/setFields.C index f1e083315f..34a781b589 100644 --- a/applications/utilities/preProcessing/setFields/setFields.C +++ b/applications/utilities/preProcessing/setFields/setFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -409,7 +409,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" timeSelector::select0(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const dictionary setFieldsDict(systemDict("setFieldsDict", args, mesh)); diff --git a/applications/utilities/preProcessing/setWaves/setWaves.C b/applications/utilities/preProcessing/setWaves/setWaves.C index 7ca1e76080..794e3e37c1 100644 --- a/applications/utilities/preProcessing/setWaves/setWaves.C +++ b/applications/utilities/preProcessing/setWaves/setWaves.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,7 +77,7 @@ int main(int argc, char *argv[]) const instantList timeDirs = timeSelector::selectIfPresent(runTime, args); - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const dictionary setWavesDict(systemDict("setWavesDict", args, mesh)); diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index 75362d8bcf..d2b14e338c 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -256,7 +256,7 @@ int main(int argc, char *argv[]) #include "addRegionOption.H" #include "setRootCase.H" #include "createTime.H" - #include "createNamedMesh.H" + #include "createRegionMeshNoChangers.H" const polyBoundaryMesh& patches = mesh.boundaryMesh(); diff --git a/src/OpenFOAM/include/createRegionMesh.H b/src/OpenFOAM/include/createRegionMesh.H new file mode 100644 index 0000000000..ba734c9a24 --- /dev/null +++ b/src/OpenFOAM/include/createRegionMesh.H @@ -0,0 +1,26 @@ +Foam::word regionName; + +if (args.optionReadIfPresent("region", regionName)) +{ + Foam::Info + << "Create mesh " << regionName << " for time = " + << runTime.name() << Foam::nl << Foam::endl; +} +else +{ + regionName = Foam::fvMesh::defaultRegion; + Foam::Info + << "Create mesh for time = " + << runTime.name() << Foam::nl << Foam::endl; +} + +Foam::fvMesh mesh +( + Foam::IOobject + ( + regionName, + runTime.name(), + runTime, + Foam::IOobject::MUST_READ + ) +); diff --git a/src/OpenFOAM/include/createNamedMesh.H b/src/OpenFOAM/include/createRegionMeshNoChangers.H similarity index 100% rename from src/OpenFOAM/include/createNamedMesh.H rename to src/OpenFOAM/include/createRegionMeshNoChangers.H diff --git a/test/fvMeshTools/Test-fvMeshTools/Test-fvMeshTools.C b/test/fvMeshTools/Test-fvMeshTools/Test-fvMeshTools.C index d7a312ec3f..ea8c71d4ec 100644 --- a/test/fvMeshTools/Test-fvMeshTools/Test-fvMeshTools.C +++ b/test/fvMeshTools/Test-fvMeshTools/Test-fvMeshTools.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) #include "addRegionOption.H" #include "setRootCase.H" #include "createTimeNoFunctionObjects.H" - #include "createNamedMesh.H" + #include "createRegionMesh.H" // Read objects in time directory IOobjectList objects(mesh, runTime.name());