diff --git a/META-INFO/api-info b/META-INFO/api-info index 73127b748e73e1aba768ea5fd1107f0446c29581..1c8dcb8c5e52d5144f1fa851d5ae7cf9f6490b7e 100644 --- a/META-INFO/api-info +++ b/META-INFO/api-info @@ -1,2 +1,2 @@ -api=2401 +api=2402 patch=240220 diff --git a/applications/test/faMesh-try/Make/files b/applications/test/faMesh-try/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..30a5d9b42ebf1d1edf8f8a086ef71c8cfc89eca8 --- /dev/null +++ b/applications/test/faMesh-try/Make/files @@ -0,0 +1,3 @@ +Test-faMesh-try.cxx + +EXE = $(FOAM_USER_APPBIN)/Test-faMesh-try diff --git a/applications/test/faMesh-try/Make/options b/applications/test/faMesh-try/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..b5b735e54b761c89412d7e0a8b7d3928bd3c7842 --- /dev/null +++ b/applications/test/faMesh-try/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteArea/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteArea \ + -lmeshTools diff --git a/applications/test/faMesh-try/Test-faMesh-try.cxx b/applications/test/faMesh-try/Test-faMesh-try.cxx new file mode 100644 index 0000000000000000000000000000000000000000..783870b06ec4f2df3afd030773dcbad17f1055a1 --- /dev/null +++ b/applications/test/faMesh-try/Test-faMesh-try.cxx @@ -0,0 +1,63 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM 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. + + OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Application + Test-faMesh-try + +Description + Test for loading of faMesh + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "faMesh.H" +#include "polyMesh.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "addRegionOption.H" + #include "addFaRegionOption.H" + #include "setRootCase.H" + + #include "createTime.H" + #include "createNamedPolyMesh.H" + + #include "getFaRegionOption.H" + + autoPtr<faMesh> aMeshPtr = faMesh::TryNew(areaRegionName, mesh); + + Info<< "area-mesh: " << Switch::name(aMeshPtr) << nl; + + Info<< "\nEnd\n" << nl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/test/faMeshesRegistry/Make/files b/applications/test/faMeshesRegistry/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..c393033c0b7f05886698fb4230c82e321f2f399e --- /dev/null +++ b/applications/test/faMeshesRegistry/Make/files @@ -0,0 +1,3 @@ +Test-faMeshesRegistry.cxx + +EXE = $(FOAM_USER_APPBIN)/Test-faMeshesRegistry diff --git a/applications/test/faMeshesRegistry/Make/options b/applications/test/faMeshesRegistry/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..b5b735e54b761c89412d7e0a8b7d3928bd3c7842 --- /dev/null +++ b/applications/test/faMeshesRegistry/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteArea/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteArea \ + -lmeshTools diff --git a/applications/test/faMeshesRegistry/Test-faMeshesRegistry.cxx b/applications/test/faMeshesRegistry/Test-faMeshesRegistry.cxx new file mode 100644 index 0000000000000000000000000000000000000000..d58ffdad3256eb037410e614aece060b899df7fa --- /dev/null +++ b/applications/test/faMeshesRegistry/Test-faMeshesRegistry.cxx @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM 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. + + OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Application + Test-faMeshesRegistry + +Description + Basic tests for faMeshesRegistry + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "faMesh.H" +#include "faMeshesRegistry.H" +#include "polyMesh.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createPolyMesh.H" + + Info<< "mesh 0: " << mesh.sortedNames() << nl; + + faMeshesRegistry& reg = + const_cast<faMeshesRegistry&>(faMeshesRegistry::New(mesh)); + + // faMeshesRegistry faReg = faMeshesRegistry(mesh); + + faMesh mesh1(mesh, Foam::zero{}); + faMesh mesh2("mesh2", mesh, Foam::zero{}); + + reg.write(); + + Info<< "\nEnd\n" << nl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C b/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C index a31468da21f7d58f17417c928327437dab463dfc..e335c087b7c217326a8548652e6a6926193af899 100644 --- a/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C +++ b/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd - Copyright (C) 2021-2022 OpenCFD Ltd. + Copyright (C) 2021-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -77,6 +77,7 @@ int main(int argc, char *argv[]) ); #include "addRegionOption.H" + #include "addFaRegionOption.H" #include "setRootCase.H" #include "createTime.H" #include "createNamedPolyMesh.H" @@ -90,8 +91,7 @@ int main(int argc, char *argv[]) faMesh::geometryOrder(geometryOrder); } - // Create - faMesh aMesh(mesh); + #include "createNamedFaMesh.H" Info<< "Time = " << runTime.timeName() << nl << endl; diff --git a/applications/utilities/finiteArea/makeFaMesh/decomposeFaFields.H b/applications/utilities/finiteArea/makeFaMesh/decomposeFaFields.H index 1e60c422d73aad5a722b1e0cf61bf2e89e7792dc..e7110f47fb01ce13b14da8b1b879edb1414ae11f 100644 --- a/applications/utilities/finiteArea/makeFaMesh/decomposeFaFields.H +++ b/applications/utilities/finiteArea/makeFaMesh/decomposeFaFields.H @@ -70,7 +70,13 @@ do const bool oldParRun = UPstream::parRun(false); - objects = IOobjectList(serialMesh.time(), runTime.timeName()); + objects = IOobjectList + ( + serialMesh.time(), + runTime.timeName(), + serialMesh.dbDir(), + IOobjectOption::NO_REGISTER + ); UPstream::parRun(oldParRun); } diff --git a/applications/utilities/finiteArea/makeFaMesh/findMeshDefinitionDict.H b/applications/utilities/finiteArea/makeFaMesh/findMeshDefinitionDict.H index e1638a77ee85505a3f69a7de4f934a912d9b54ba..80b2b6577017a12faafe15febdb6276ba6fd0f04 100644 --- a/applications/utilities/finiteArea/makeFaMesh/findMeshDefinitionDict.H +++ b/applications/utilities/finiteArea/makeFaMesh/findMeshDefinitionDict.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2021-2022 OpenCFD Ltd. + Copyright (C) 2021-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM, distributed under GPL-3.0-or-later. @@ -18,7 +18,8 @@ Required Classes - Foam::IOdictionary Required Variables - - regionName [word] + - regionName [word] (the polyMesh region) + - areaRegionName [word] (the areaMesh region) - args [argList] - runTime [Time] @@ -35,6 +36,7 @@ autoPtr<IOdictionary> meshDictPtr; { fileName dictPath; const word& regionDir = Foam::polyMesh::regionName(regionName); + const word& areaRegionDir = Foam::polyMesh::regionName(areaRegionName); if (args.readIfPresent("dict", dictPath)) { @@ -47,38 +49,30 @@ autoPtr<IOdictionary> meshDictPtr; } else if ( - // Check global location - exists + // Dictionary under system/faMeshDefinition ? + // (v2312 and earlier) + + areaRegionDir.empty() + && exists ( - runTime.path()/runTime.caseConstant() + runTime.path()/runTime.caseSystem() / regionDir/faMesh::meshSubDir/dictName ) ) { - // Dictionary present in constant faMesh directory (old-style) - - dictPath = - ( - runTime.constant() - / regionDir/faMesh::meshSubDir/dictName - ); + // Dictionary present directly in system/ (v2312 and earlier) - // Warn that constant/faMesh/faMeshDefinition was used - // instead of system/faMeshDefinition - #if 0 - WarningIn(args.executable()) - << "Using the old faMeshDefinition location: " - << dictPath << nl - << " instead of default location: " - << runTime.system()/regionDir/dictName << nl - << endl; - #endif + dictPath = runTime.system()/regionDir/dictName; } else { - // Assume dictionary is in the system directory + // Use system/finite-area/ directory, with region qualifications - dictPath = runTime.system()/regionDir/dictName; + dictPath = + ( + runTime.system()/regionDir + / faMesh::prefix()/areaRegionDir/dictName + ); } IOobject meshDictIO diff --git a/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C b/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C index 21be51ee46d0a51335a3f88456aae4b4627dbd1c..91d74391e0553aca1fc95ae6de8525021c31209b 100644 --- a/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C +++ b/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C @@ -104,10 +104,13 @@ int main(int argc, char *argv[]) ); #include "addRegionOption.H" + #include "addFaRegionOption.H" #include "setRootCase.H" #include "createTime.H" #include "createNamedPolyMesh.H" + #include "getFaRegionOption.H" + const bool doDecompose = !args.found("no-decompose"); const bool doDecompFields = !args.found("no-fields"); @@ -133,8 +136,15 @@ int main(int argc, char *argv[]) // Preliminary checks #include "checkPatchTopology.H" + Info << "Create areaMesh"; + if (!Foam::polyMesh::regionName(areaRegionName).empty()) + { + Foam::Info << ' ' << areaRegionName; + } + Info << " for polyMesh at time = " << runTime.timeName() << nl; + // Create - faMesh aMesh(mesh, meshDefDict); + faMesh aMesh(areaRegionName, mesh, meshDefDict); // Mesh information (less verbose) faMeshTools::printMeshChecks(aMesh, 0); diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 7676ec50d168e6eb67f67c2eae44704351a1e227..1309cac153b088a937807cbba93348489cacf185 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -173,7 +173,7 @@ namespace Foam // Uses polyMesh/fvMesh meshSubDir by default autoPtr<labelIOList> procAddressing ( - const fvMesh& procMesh, + const objectRegistry& procRegistry, const word& name, const word& instance, const word& local = fvMesh::meshSubDir @@ -186,7 +186,7 @@ autoPtr<labelIOList> procAddressing name, instance, local, - procMesh, + procRegistry, IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER @@ -199,13 +199,13 @@ autoPtr<labelIOList> procAddressing // Uses the finiteArea meshSubDir autoPtr<labelIOList> faProcAddressing ( - const fvMesh& procMesh, + const objectRegistry& procRegistry, const word& name, const word& instance, const word& local = faMesh::meshSubDir ) { - return procAddressing(procMesh, name, instance, local); + return procAddressing(procRegistry, name, instance, local); } @@ -797,11 +797,22 @@ int main(int argc, char *argv[]) // Field objects at this time IOobjectList objects; + IOobjectList faObjects; if (doDecompFields) { + // List of volume mesh objects for this instance objects = IOobjectList(mesh, runTime.timeName()); + // List of area mesh objects (assuming single region) + faObjects = IOobjectList + ( + mesh.time(), + runTime.timeName(), + faMesh::dbDir(mesh, word::null), + IOobjectOption::NO_REGISTER + ); + // Ignore generated fields: (cellDist) objects.remove("cellDist"); } @@ -810,12 +821,15 @@ int main(int argc, char *argv[]) autoPtr<faMeshDecomposition> faMeshDecompPtr; if (doFiniteArea) { + const word boundaryInst = + mesh.time().findInstance(mesh.meshDir(), "boundary"); + IOobject io ( "faBoundary", - mesh.time().findInstance(mesh.meshDir(), "boundary"), - faMesh::meshSubDir, - mesh, + boundaryInst, + faMesh::meshDir(mesh, word::null), + mesh.time(), IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER @@ -1225,7 +1239,7 @@ int main(int argc, char *argv[]) if (doDecompFields) { - areaFieldCache.readAllFields(aMesh, objects); + areaFieldCache.readAllFields(aMesh, faObjects); } const label nAreaFields = areaFieldCache.size(); @@ -1293,7 +1307,7 @@ int main(int argc, char *argv[]) autoPtr<labelIOList> tfaceProcAddr = faProcAddressing ( - procFvMesh, + procMesh, "faceProcAddressing", runTime.constant() ); @@ -1302,7 +1316,7 @@ int main(int argc, char *argv[]) autoPtr<labelIOList> tboundaryProcAddr = faProcAddressing ( - procFvMesh, + procMesh, "boundaryProcAddressing", runTime.constant() ); @@ -1311,7 +1325,7 @@ int main(int argc, char *argv[]) autoPtr<labelIOList> tedgeProcAddr = faProcAddressing ( - procFvMesh, + procMesh, "edgeProcAddressing", runTime.constant() ); diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index 0dd1078dd0a5d36192d074761d54f62d7d3c2358..4d2910373d9c06e24d5444dee3ef0ff928fbe6c3 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -382,9 +382,25 @@ int main(int argc, char *argv[]) IOobjectList objects ( procMeshes.meshes()[0], - databases[0].timeName() + databases[0].timeName(), + IOobjectOption::NO_REGISTER ); + IOobjectList faObjects; + + if (doFiniteArea && doFields) + { + // List of area mesh objects (assuming single region) + // - scan on processor0 + faObjects = IOobjectList + ( + procMeshes.meshes()[0], + databases[0].timeName(), + faMesh::dbDir(word::null), // local relative to mesh + IOobjectOption::NO_REGISTER + ); + } + if (doFields) { // If there are any FV fields, reconstruct them @@ -545,12 +561,12 @@ int main(int argc, char *argv[]) } else if ( - objects.count<areaScalarField>() - || objects.count<areaVectorField>() - || objects.count<areaSphericalTensorField>() - || objects.count<areaSymmTensorField>() - || objects.count<areaTensorField>() - || objects.count<edgeScalarField>() + faObjects.count<areaScalarField>() + || faObjects.count<areaVectorField>() + || faObjects.count<areaSphericalTensorField>() + || faObjects.count<areaSymmTensorField>() + || faObjects.count<areaTensorField>() + || faObjects.count<edgeScalarField>() ) { Info << "Reconstructing FA fields" << nl << endl; @@ -568,7 +584,7 @@ int main(int argc, char *argv[]) procFaMeshes.boundaryProcAddressing() ); - reconstructor.reconstructAllFields(objects); + reconstructor.reconstructAllFields(faObjects); } else { diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 23d62c26520a081b88412a4861ec385528d5bb77..305ec95aca647db71b8c22fd6dd287d113b8b2d4 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -102,6 +102,7 @@ Usage #include "faMeshSubset.H" #include "faMeshTools.H" #include "faMeshDistributor.H" +#include "faMeshesRegistry.H" #include "parFaFieldDistributorCache.H" #include "redistributeLagrangian.H" @@ -906,12 +907,26 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite } + // If faMeshesRegistry exists, it is also owned by the polyMesh and will + // be destroyed by clearGeom() in fvMeshDistribute::distribute() + // + // Rescue faMeshesRegistry from destruction by temporarily moving + // it to be locally owned. + std::unique_ptr<faMeshesRegistry> faMeshesRegistry_saved + ( + faMeshesRegistry::Release(mesh) + ); + // Mesh distribution engine fvMeshDistribute distributor(mesh); // Do all the distribution of mesh and fields autoPtr<mapDistributePolyMesh> distMap = distributor.distribute(decomp); + // Restore ownership onto the polyMesh + faMeshesRegistry::Store(std::move(faMeshesRegistry_saved)); + + // Print some statistics InfoOrPout<< "After distribution:" << endl; printMeshData(mesh); @@ -1598,7 +1613,8 @@ int main(int argc, char *argv[]) ); const fileName areaMeshSubDir ( - polyMesh::regionName(regionName) / faMesh::meshSubDir + // Assume single-region area mesh + faMesh::meshDir(regionName, word::null) ); InfoOrPout @@ -2501,7 +2517,8 @@ int main(int argc, char *argv[]) ); const fileName areaMeshSubDir ( - polyMesh::regionName(regionName) / faMesh::meshSubDir + // Assume single-region area mesh + faMesh::meshDir(regionName, word::null) ); InfoOrPout diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkFieldAvailability.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkFieldAvailability.H index a51456de2d8b565d8910dfe1f9259adf52dec500..b9adb4990a9b590b3b0dae9dcbf3b0c0103d912a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkFieldAvailability.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkFieldAvailability.H @@ -21,29 +21,38 @@ Requires // Initially all possible objects that are available at the final time List<wordHashSet> availableRegionObjectNames(meshes.size()); +List<wordHashSet> availableFaRegionObjectNames(meshes.size()); forAll(meshes, regioni) { const auto& mesh = meshes[regioni]; IOobjectList objects; + IOobjectList faObjects; if (doConvertFields && !timeDirs.empty()) { + // List of volume mesh objects for this instance objects = IOobjectList(mesh, timeDirs.back().name()); - if (fieldSelector && !fieldSelector().empty()) - { - objects.filterObjects(fieldSelector()); - } + // List of area mesh objects (assuming single region) + faObjects = IOobjectList + ( + mesh.time(), + timeDirs.back().name(), + faMesh::dbDir(mesh, word::null), + IOobjectOption::NO_REGISTER + ); if (fieldSelector && !fieldSelector().empty()) { objects.filterObjects(fieldSelector()); + faObjects.filterObjects(fieldSelector()); } // Remove "*_0" restart fields objects.prune_0(); + faObjects.prune_0(); if (!doPointValues) { @@ -59,12 +68,38 @@ forAll(meshes, regioni) } } - wordList objectNames(objects.sortedNames()); + // Volume fields + if (!objects.empty()) + { + wordList objectNames(objects.sortedNames()); - // Check availability for all times... - checkData(mesh, timeDirs, objectNames); + // Check availability for all times... + checkData + ( + mesh.thisDb(), + timeDirs, + objectNames + ); - availableRegionObjectNames[regioni] = objectNames; + availableRegionObjectNames[regioni] = objectNames; + } + + // Area fields + if (!faObjects.empty()) + { + wordList objectNames(faObjects.sortedNames()); + + // Check availability for all times... (assuming single region) + checkData + ( + mesh.time(), + timeDirs, + objectNames, + faMesh::dbDir(mesh, word::null) + ); + + availableFaRegionObjectNames[regioni] = objectNames; + } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertAreaFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertAreaFields.H index 5f2ef2455f5a37dbb8223ee884d315477d227266..ad2cc771877e81e863e8a3f91b269f32ba99b16e 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertAreaFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertAreaFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2021 OpenCFD Ltd. + Copyright (C) 2021-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM, distributed under GPL-3.0-or-later. @@ -14,6 +14,8 @@ Description Code chunk for converting area fields included by foamToEnsight. + Possible objects to convert are given in faObjects + \*---------------------------------------------------------------------------*/ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -23,7 +25,7 @@ if (doFiniteArea && ensFaCasePtr && ensFaMeshPtr) { Info<< " area field ("; - writeAllAreaFields(*ensFaCasePtr, *ensFaMeshPtr, objects); + writeAllAreaFields(*ensFaCasePtr, *ensFaMeshPtr, faObjects); Info<< " )" << nl; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C index d47e941ee097c369b7e488419031f6028c3b0a86..c9b6456ba1dce9b518aded701e63e9df00869fdd 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C @@ -577,6 +577,20 @@ int main(int argc, char *argv[]) // Volume, internal, point fields #include "convertVolumeFields.H" + // The finite-area objects at this time + IOobjectList faObjects; + + if (ensFaMeshPtr) + { + faObjects = + IOobjectList(ensFaMeshPtr->mesh(), runTime.timeName()); + + faObjects.filterObjects + ( + availableFaRegionObjectNames[regioni] + ); + } + // The finiteArea fields #include "convertAreaFields.H" diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/getTimeIndex.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/getTimeIndex.H index 5fa3c329c18163241556d44fbc7f5f5d822d0273..224ef692aa492500be195c99fb9d028a846355fe 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/getTimeIndex.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/getTimeIndex.H @@ -55,7 +55,7 @@ label timeIndex = 0; else { goodTimeIndex = false; - Info<< "skip ... missing entry " << io.objectPath() << endl; + Info<< "skip ... missing file: " << io.objectRelPath() << endl; } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.C index a9e92f80ad032d9769736f007d710930f9b4cd58..0d895f9e8a09bfd98d044e9ef73e6b29c0b805b6 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2022 OpenCFD Ltd. + Copyright (C) 2018-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -32,9 +32,10 @@ License Foam::label Foam::checkData ( - const fvMesh& mesh, + const objectRegistry& obr, const instantList& timeDirs, - wordList& objectNames + wordList& objectNames, + const fileName& local ) { // Assume prune_0() was used prior to calling this @@ -43,6 +44,9 @@ Foam::label Foam::checkData for (const word& fieldName : objectNames) { + // // If prune_0() not previously used... + // if (objectNames.ends_with("_0")) continue; + bool good = false; for (const instant& inst : timeDirs) @@ -52,7 +56,8 @@ Foam::label Foam::checkData ( fieldName, inst.name(), - mesh, + local, + obr, IOobject::NO_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.H index eee09efd9ecb5334c77d1ecf6c40b6c11fad6682..716e5134f62e6f9d78063c39fa76f427684c57e9 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.H @@ -164,9 +164,10 @@ tmp<VolumeField<Type>> makeZeroGradientField // ignore fields that are not available for all time-steps label checkData ( - const fvMesh& mesh, + const objectRegistry& obr, const instantList& timeDirs, - wordList& objectNames + wordList& objectNames, + const fileName& local = fileName::null ); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertAreaFields.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertAreaFields.H index 7d8f467ab7a779ba65480ed535be3d6018888935..766ffb7f6c54a9d439e142f766f5086cc3bff929 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/convertAreaFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/convertAreaFields.H @@ -29,7 +29,7 @@ if (doFiniteArea) autoPtr<faMesh> faMeshPtr; const label nAreaFields = - objects.count(stringListOps::foundOp<word>(fieldTypes::area)); + faObjects.count(stringListOps::foundOp<word>(fieldTypes::area)); if (nAreaFields || withMeshIds) { @@ -40,7 +40,7 @@ if (doFiniteArea) { const faMesh& areaMesh = faMeshPtr(); - reportFields::area(Info, objects); + reportFields::area(Info, faObjects); const auto& pp = faMeshPtr->patch(); @@ -97,7 +97,7 @@ if (doFiniteArea) ( writer, areaMesh, - objects, + faObjects, true // syncPar ); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index b831277343ce404d4c0b2470e43862cbf9beba60..ca7782f713edd916e67a981d5bf77fa2688cbdee 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2022 OpenCFD Ltd. + Copyright (C) 2016-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -781,20 +781,33 @@ int main(int argc, char *argv[]) } IOobjectList objects; + IOobjectList faObjects; if (doConvertFields) { - // List of objects for this time + // List of volume mesh objects for this instance objects = IOobjectList(meshProxy.baseMesh(), runTime.timeName()); + // List of area mesh objects (assuming single region) + faObjects = + IOobjectList + ( + runTime, + runTime.timeName(), + faMesh::dbDir(meshProxy.baseMesh(), word::null), + IOobjectOption::NO_REGISTER + ); + if (fieldSelector && !fieldSelector().empty()) { objects.filterObjects(fieldSelector()); + faObjects.filterObjects(fieldSelector()); } // Remove "*_0" restart fields objects.prune_0(); + faObjects.prune_0(); if (!doPointValues) { diff --git a/bin/foamUpgradeFiniteArea b/bin/foamUpgradeFiniteArea new file mode 100755 index 0000000000000000000000000000000000000000..f481f47b5f0c95005f92bfa4321f8ce25411e828 --- /dev/null +++ b/bin/foamUpgradeFiniteArea @@ -0,0 +1,322 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | www.openfoam.com +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# Copyright (C) 2023-2024 OpenCFD Ltd. +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. +# +# Script +# foamUpgradeFiniteArea +# +# Description +# Relocate finite-area files to new sub-directory locations +# +#------------------------------------------------------------------------------ +printHelp() { + cat <<USAGE + +Usage: ${0##*/} [OPTION] +options: + -case=DIR Specify starting directory, default is cwd + -dry-run | -n Test without performing actions + -verbose | -v Additional verbosity + -force (currently ignored) + -link-back Link back from new finite-area/ to old locations + -no-mesh Do not move system/faMeshDefinition + -git Use 'git mv' when making changes + -help Print help and exit + +Relocate finite-area files to new sub-directory locations + +Equivalent options: + | -case=DIR | -case DIR | + +USAGE + exit 0 # A clean exit +} + +# Report error and exit +die() +{ + exec 1>&2 + echo + echo "Error encountered:" + while [ "$#" -ge 1 ]; do echo " $1"; shift; done + echo + echo "See '${0##*/} -help' for usage" + echo + exit 1 +} + +#------------------------------------------------------------------------------ + +# Parse options +unset caseDir optDryRun optGit optVerbose optLink optMeshDef hadError + +while [ "$#" -gt 0 ] +do + case "$1" in + (- | --) + shift + break # Stop option parsing + ;; + (-h | -help*) printHelp ;; + + (-n | -dry-run) optDryRun="(dry-run) " ;; + (-v | -verbose) optVerbose=true ;; + (-f | -force) echo "Ignored option: ${1%%=*}" 1>&2 ;; + (-link-back) optLink=back ;; +# (-link-only) optLink=forward ;; + (-no-mesh) optMeshDef=false ;; + (-git) optGit=true ;; + + (-case=*) + caseDir="${1#*=}" + ;; + (-case) + caseDir="$2" + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + shift + ;; + + (-*) die "unknown option: $1" ;; + (*) die "unknown argument: $1" ;; + + esac + shift +done + +if [ -n "$caseDir" ] +then + cd "$caseDir" 2>/dev/null || { + echo "${0##*/}: No such directory $caseDir" 1>&2 + exit 2 + } +fi + +#------------------------------------------------------------------------------ + +# Proper umask +umask 022 + +# The commands +copy_cmd="cp -a${optVerbose:+ -v}" +move_cmd="mv${optVerbose:+ -v}" +link_cmd="ln -sf${optVerbose:+ -v}" +mkdir_cmd="mkdir -p" + +if [ -n "$optDryRun" ] +then + if [ -n "$optVerbose" ] + then + copy_cmd="echo cp -a" + move_cmd="echo mv" + link_cmd="echo ln -sf" + mkdir_cmd="echo mkdir -p" + else + copy_cmd=true + move_cmd=true + link_cmd=true + mkdir_cmd=true + fi +elif [ -n "$optGit" ] +then + move_cmd="git mv" + link_cmd="echo no symlink for git:" +fi + +regionDir="finite-area" + +#------------------------------------------------------------------------------ +# Various script parts +# +# awk : scan file for FoamFile { ... class NAME; } + +read -d '' getClass_awk << 'AWK_CONTENT' +BEGIN { state = 0 } # 0=begin, 1=header, 2=done + +/FoamFile/ { if (!state) { state = 1; next; } exit; } + +# FoamFile begin contents +/\{/ { if (state == 1) state = 2; next; } + +# FoamFile end contents +/\}/ { if (state == 2) exit; next; } + +/^[ ]*class[ ]/ { + if (state == 2) + { + sub("^[ ]*class[ ]+", "") + sub("[ ;]*$", "") + print + exit + } + next +} +AWK_CONTENT + + +# Check for FoamFile and return extracted 'class' +getFoamFile_class() +{ + local file="$1" + local class + + if grep -q FoamFile "$file" 2>/dev/null + then + # class="$(foamDictionary -disableFunctionEntries -entry FoamFile/class -value "$file" 2> stderr)" + class="$(awk -- "$getClass_awk" "$file")" + fi + echo "$class" +} + + +# Check if class corresponds to an finite-area field +# eg, areaScalarField, ... edgeVectorField +isAreaFieldClass() +{ + case "$1" in + (area*Field | edge*Field) return 0 ;; + esac + + return 1 +} + + +#------------------------------------------------------------------------------ + +#Debug# getFoamFile_class "system/faSchemes" + +#------------------------------------------------------------------------------ + +# Link back from the local finite-area/ directory to the current directory +# variables +# - regionDir = "finite-area" +# +performLinkBack() +{ + local file + + if [ -d "$regionDir" ] + then + find "$regionDir" -maxdepth 1 -type f 2>/dev/null | while read file + do + file="${file#*/}" + + if [ -f "$regionDir/$file" ] && [ ! -f "$file" ] + then + echo "${optDryRun} ln -s $regionDir/$file $file" 1>&2 + $link_cmd "$regionDir/$file" "$file" + fi + done + fi +} + + +# Move from current directory to local finite-area/ directory +# variables +# - regionDir = "finite-area" +# +performMove() +{ + local file="$1" + + if [ -f "$regionDir/$file" ] + then + echo "${optDryRun} already: $regionDir/$file" 1>&2 + elif [ -f "$file" ] + then + $mkdir_cmd "$regionDir" + echo "${optDryRun} mv $file -> $regionDir/" 1>&2 + $move_cmd "$file" "$regionDir/$file" + elif [ -n "$file" ] + then + echo "${optDryRun} no $file" 1>&2 + fi +} + + +#------------------------------------------------------------------------------ + +# system +# ---- +if [ -d system ] +then +( + cd system || exit + currDir="system" + + echo "${optDryRun}Examining files in $currDir/" 1>&2 + + performMove faSchemes + performMove faSolution + + if [ "$optMeshDef" = false ] + then + echo "${optDryRun} ignore: faMeshDefinition" 1>&2 + else + performMove faMeshDefinition + fi + + if [ -d "$regionDir" ] && [ "$optLink" = back ] + then + performLinkBack + fi +) +else + echo "${optDryRun}No system/ directory..." 1>&2 +fi + + +#------------------------------------------------------------------------------ + +# time dirs (initial conditions) +# ---- + +for timeDir in 0 0.orig +do + if [ -d "$timeDir" ] + then + ( + cd "$timeDir" || exit + currDir="$timeDir" + + echo "${optDryRun}Examining $currDir/" 1>&2 + + find . -maxdepth 1 -type f | while read file + do + file="${file#*/}" + + case "$file" in + (*.gz) + echo "${optDryRun} ignoring compressed file: $file" 1>&2 + continue + ;; + esac + + className="$(getFoamFile_class "$file")" + + if isAreaFieldClass "$className" + then + performMove "$file" + fi + done + + if [ -d "$regionDir" ] && [ "$optLink" = back ] + then + performLinkBack + fi + ) + else + echo "${optDryRun}No $timeDir/ directory..." 1>&2 + fi +done + + +#------------------------------------------------------------------------------ diff --git a/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C b/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C index bc97ae9c80fc93d1648b60de9cb1678353fa289a..015aa5757112b417e672c2b79abacc4900e56315 100644 --- a/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C +++ b/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C @@ -512,7 +512,7 @@ void Foam::interfaceTrackingFvMesh::makeBulkSurfactConc() const mesh().time().startTime().value() ), // mesh().time().timeName(), - aMesh().thisDb(), + mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), diff --git a/src/finiteArea/Make/files b/src/finiteArea/Make/files index 803c8df34f99713d3e2dfbf378aa9e261228da83..c318012d210ffcf347cf003fc8761b8c38fe1719 100644 --- a/src/finiteArea/Make/files +++ b/src/finiteArea/Make/files @@ -1,4 +1,6 @@ faMesh/faGlobalMeshData/faGlobalMeshData.C +faMesh/faMeshesRegistry.C +faMesh/faMeshRegistry.C faMesh/faMesh.C faMesh/faMeshNew.C faMesh/faMeshDemandDrivenData.C diff --git a/src/finiteArea/faMesh/faMesh.C b/src/finiteArea/faMesh/faMesh.C index 49c518363d5b3461ce1bb549bae08bf341fb665c..1770da3b1e47423e34298281cc55caf1b2542e31 100644 --- a/src/finiteArea/faMesh/faMesh.C +++ b/src/finiteArea/faMesh/faMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd - Copyright (C) 2020-2023 OpenCFD Ltd. + Copyright (C) 2020-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,29 +61,135 @@ namespace Foam } -const Foam::word Foam::faMesh::prefix("finite-area"); +const Foam::word Foam::faMesh::prefix_("finite-area"); -Foam::word Foam::faMesh::meshSubDir = "faMesh"; +Foam::word Foam::faMesh::meshSubDir("faMesh"); const int Foam::faMesh::quadricsFit_ = 0; // Tuning (experimental) // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // +const Foam::word& Foam::faMesh::prefix() noexcept +{ + return prefix_; +} + + +Foam::fileName Foam::faMesh::dbDir(const word& areaRegion) +{ + if (areaRegion.empty() || areaRegion == polyMesh::defaultRegion) + { + return faMesh::prefix(); + } + + return (faMesh::prefix() / areaRegion); +} + + +Foam::fileName Foam::faMesh::dbDir +( + const word& volRegion, + const word& areaRegion +) +{ + return + ( + polyMesh::regionName(volRegion) + / faMesh::prefix() + / polyMesh::regionName(areaRegion) + ); +} + + +Foam::fileName Foam::faMesh::dbDir +( + const polyMesh& pMesh, + const word& areaRegion +) +{ + return faMesh::dbDir(pMesh.regionName(), areaRegion); +} + + +Foam::fileName Foam::faMesh::meshDir(const word& areaRegion) +{ + if (areaRegion.empty() || areaRegion == polyMesh::defaultRegion) + { + return faMesh::meshSubDir; + } + + return (areaRegion / faMesh::meshSubDir); +} + + +Foam::fileName Foam::faMesh::meshDir +( + const word& volRegion, + const word& areaRegion +) +{ + return + ( + polyMesh::regionName(volRegion) + / faMesh::prefix() + / polyMesh::regionName(areaRegion) + / faMesh::meshSubDir + ); +} + + +Foam::fileName Foam::faMesh::meshDir +( + const polyMesh& pMesh, + const word& areaRegion +) +{ + return faMesh::meshDir(pMesh.regionName(), areaRegion); +} + + const Foam::objectRegistry* Foam::faMesh::registry(const polyMesh& pMesh) { - // This will change in the near future - return &static_cast<const objectRegistry&>(pMesh); + return pMesh.cfindObject<objectRegistry>(faMesh::prefix()); } +// const Foam::objectRegistry* Foam::faMesh::registry(const objectRegistry& obr) +// { +// return obr.cfindObject<objectRegistry>(faMesh::prefix()); +// } + + const Foam::faMesh& Foam::faMesh::mesh ( const polyMesh& pMesh ) { - // This will change in the near future - return pMesh.lookupObject<faMesh>("faMesh"); + return faMesh::mesh(pMesh, polyMesh::defaultRegion); +} + + +const Foam::faMesh& Foam::faMesh::mesh +( + const polyMesh& pMesh, + const word& areaRegion +) +{ + const objectRegistry* obr = faMesh::registry(pMesh); + + if (!obr) + { + // Fallback - not really valid, but will fail at the next stage + obr = &(pMesh.thisDb()); + } + + if (areaRegion.empty()) + { + return obr->lookupObject<faMesh>(polyMesh::defaultRegion); + } + + return obr->lookupObject<faMesh>(areaRegion); } @@ -340,19 +446,85 @@ bool Foam::faMesh::init(const bool doInit) } -Foam::faMesh::faMesh(const polyMesh& pMesh, const Foam::zero) +// * * * * * * * * * * * * * Forwarding Constructors * * * * * * * * * * * * // + +Foam::faMesh::faMesh +( + const word& meshName, + const polyMesh& pMesh, + Foam::zero +) +: + faMesh(meshName, pMesh, labelList()) +{} + + +Foam::faMesh::faMesh +( + const polyMesh& pMesh, + Foam::zero +) +: + faMesh(polyMesh::defaultRegion, pMesh, labelList()) +{} + + +Foam::faMesh::faMesh(const polyMesh& pMesh, const bool doInit) +: + faMesh(polyMesh::defaultRegion, pMesh, doInit) +{} + + +Foam::faMesh::faMesh +( + const word& meshName, + const faMesh& baseMesh, + Foam::zero +) : - faMesh(pMesh, labelList(), static_cast<IOobjectOption>(pMesh)) + faMesh(meshName, baseMesh, labelList()) {} -Foam::faMesh::faMesh(const faMesh& baseMesh, const Foam::zero) +Foam::faMesh::faMesh +( + const faMesh& baseMesh, + Foam::zero +) +: + faMesh(polyMesh::defaultRegion, baseMesh, labelList()) +{} + + +Foam::faMesh::faMesh +( + const word& meshName, + const faMesh& baseMesh, + labelList&& faceLabels +) : faMesh ( + meshName, baseMesh, - labelList(), - IOobjectOption(IOobjectOption::NO_READ, IOobjectOption::NO_WRITE) + std::move(faceLabels), + static_cast<IOobjectOption>(baseMesh.thisDb()) + ) +{} + + +Foam::faMesh::faMesh +( + const faMesh& baseMesh, + labelList&& faceLabels +) +: + faMesh + ( + polyMesh::defaultRegion, + baseMesh, + std::move(faceLabels), + static_cast<IOobjectOption>(baseMesh.thisDb()) ) {} @@ -360,13 +532,78 @@ Foam::faMesh::faMesh(const faMesh& baseMesh, const Foam::zero) Foam::faMesh::faMesh ( const polyMesh& pMesh, + labelList&& faceLabels, + IOobjectOption ioOpt +) +: + faMesh + ( + polyMesh::defaultRegion, + pMesh, + std::move(faceLabels), + ioOpt + ) +{} + + +Foam::faMesh::faMesh +( + const polyMesh& pMesh, + labelList&& faceLabels +) +: + faMesh(polyMesh::defaultRegion, pMesh, std::move(faceLabels)) +{} + + +Foam::faMesh::faMesh +( + const polyPatch& pp, + const bool doInit +) +: + faMesh(polyMesh::defaultRegion, pp, doInit) +{} + + +Foam::faMesh::faMesh +( + const polyMesh& pMesh, + const dictionary& faMeshDefinition, const bool doInit ) : - MeshObject<polyMesh, Foam::UpdateableMeshObject, faMesh>(pMesh), - faSchemes(mesh()), + faMesh + ( + polyMesh::defaultRegion, + pMesh, + faMeshDefinition, + doInit + ) +{} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faMesh::faMesh +( + const word& meshName, + const polyMesh& pMesh, + const bool doInit +) +: + faMeshRegistry(meshName, pMesh), + faSchemes + ( + faMesh::thisDb(), + IOobjectOption::MUST_READ + ), + faSolution + ( + faMesh::thisDb(), + IOobjectOption::MUST_READ + ), edgeInterpolation(*this), - faSolution(mesh()), faceLabels_ ( IOobject @@ -418,7 +655,7 @@ Foam::faMesh::faMesh IOobject rio ( - "name", + "any-name", time().timeName(), faMesh::meshSubDir, faMesh::thisDb(), @@ -444,36 +681,89 @@ Foam::faMesh::faMesh Foam::faMesh::faMesh ( + const word& meshName, const polyMesh& pMesh, labelList&& faceLabels ) : - faMesh + faMeshRegistry(meshName, pMesh), + faSchemes ( - pMesh, - std::move(faceLabels), - static_cast<IOobjectOption>(pMesh) - ) -{} + faMesh::thisDb(), + IOobjectOption::MUST_READ + ), + faSolution + ( + faMesh::thisDb(), + IOobjectOption::MUST_READ + ), + edgeInterpolation(*this), + faceLabels_ + ( + IOobject + ( + "faceLabels", + pMesh.facesInstance(), + faMesh::meshSubDir, + faMesh::thisDb(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + std::move(faceLabels) + ), + boundary_ + ( + IOobject + ( + "faBoundary", + faceLabels_.instance(), + faMesh::meshSubDir, + faMesh::thisDb(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + *this, + Foam::zero{} + ), + comm_(UPstream::worldComm), + curTimeIndex_(time().timeIndex()) +{ + // Not yet much for primitive mesh data possible... + nPoints_ = 0; + nEdges_ = 0; + nInternalEdges_ = 0; + nFaces_ = faceLabels_.size(); + // TDB: can we make a NO_READ readOption persistent for + // faSchemes/faSolution? Or not needed anymore? +} Foam::faMesh::faMesh ( + const word& meshName, const polyMesh& pMesh, labelList&& faceLabels, IOobjectOption ioOpt ) : - MeshObject<polyMesh, Foam::UpdateableMeshObject, faMesh>(pMesh), - faSchemes(mesh(), ioOpt.readOpt()), + faMeshRegistry(meshName, pMesh), + faSchemes + ( + faMesh::thisDb(), + ioOpt.readOpt() + ), + faSolution + ( + faMesh::thisDb(), + ioOpt.readOpt() + ), edgeInterpolation(*this), - faSolution(mesh(), ioOpt.readOpt()), faceLabels_ ( IOobject ( "faceLabels", - mesh().facesInstance(), + pMesh.facesInstance(), faMesh::meshSubDir, faMesh::thisDb(), IOobject::NO_READ, @@ -486,14 +776,14 @@ Foam::faMesh::faMesh IOobject ( "faBoundary", - mesh().facesInstance(), + faceLabels_.instance(), faMesh::meshSubDir, faMesh::thisDb(), IOobject::NO_READ, IOobject::NO_WRITE ), *this, - label(0) + Foam::zero{} ), comm_(UPstream::worldComm), curTimeIndex_(time().timeIndex()) @@ -503,36 +793,43 @@ Foam::faMesh::faMesh nEdges_ = 0; nInternalEdges_ = 0; nFaces_ = faceLabels_.size(); + + // TDB: can we make a NO_READ readOption persistent for + // faSchemes/faSolution? Or not needed anymore? } +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + Foam::faMesh::faMesh ( + const word& meshName, const faMesh& baseMesh, labelList&& faceLabels, IOobjectOption ioOpt ) : - MeshObject<polyMesh, Foam::UpdateableMeshObject, faMesh>(baseMesh.mesh()), + faMeshRegistry(meshName, baseMesh.mesh()), faSchemes ( faMesh::thisDb(), ioOpt.readOpt(), static_cast<const dictionary*>(baseMesh.hasSchemes()) ), - edgeInterpolation(*this), faSolution ( faMesh::thisDb(), ioOpt.readOpt(), static_cast<const dictionary*>(baseMesh.hasSolution()) ), + edgeInterpolation(*this), faceLabels_ ( IOobject ( "faceLabels", - mesh().facesInstance(), + // Topological instance from polyMesh + baseMesh.mesh().facesInstance(), faMesh::meshSubDir, faMesh::thisDb(), IOobject::NO_READ, @@ -545,14 +842,14 @@ Foam::faMesh::faMesh IOobject ( "faBoundary", - mesh().facesInstance(), + faceLabels_.instance(), faMesh::meshSubDir, faMesh::thisDb(), IOobject::NO_READ, IOobject::NO_WRITE ), *this, - label(0) + Foam::zero{} ), comm_(UPstream::worldComm), curTimeIndex_(time().timeIndex()) @@ -565,10 +862,16 @@ Foam::faMesh::faMesh } -Foam::faMesh::faMesh(const polyPatch& pp, const bool doInit) +Foam::faMesh::faMesh +( + const word& meshName, + const polyPatch& pp, + const bool doInit +) : faMesh ( + meshName, pp.boundaryMesh().mesh(), identity(pp.range()) ) @@ -594,6 +897,7 @@ Foam::faMesh::faMesh(const polyPatch& pp, const bool doInit) Foam::faMesh::faMesh ( + const word& meshName, const polyMesh& pMesh, const dictionary& faMeshDefinition, const bool doInit @@ -601,6 +905,7 @@ Foam::faMesh::faMesh : faMesh ( + meshName, pMesh, selectPatchFaces ( @@ -639,7 +944,7 @@ Foam::faMesh::faMesh IOobject rio ( - "name", + "any-name", time().timeName(), faMesh::meshSubDir, faMesh::thisDb(), @@ -709,15 +1014,21 @@ Foam::faSolution& Foam::faMesh::solution() } +const Foam::polyMesh& Foam::faMesh::mesh() const +{ + return refCast<const polyMesh>(faMeshRegistry::parent().parent()); +} + + Foam::fileName Foam::faMesh::meshDir() const { - return mesh().dbDir()/faMesh::meshSubDir; + return dbDir()/faMesh::meshSubDir; } const Foam::Time& Foam::faMesh::time() const { - return mesh().time(); + return faMeshRegistry::time(); } @@ -733,21 +1044,9 @@ const Foam::fileName& Foam::faMesh::facesInstance() const } -bool Foam::faMesh::hasDb() const -{ - return true; -} - - -const Foam::objectRegistry& Foam::faMesh::thisDb() const -{ - return mesh().thisDb(); -} - - const Foam::word& Foam::faMesh::regionName() const { - return polyMesh::regionName(thisDb().name()); + return polyMesh::regionName(objectRegistry::name()); } @@ -874,7 +1173,7 @@ Foam::faMesh::S00() const ( "S00", time().timeName(), - faMesh::thisDb(), + *this, IOobject::NO_READ, IOobject::NO_WRITE ), @@ -1008,7 +1307,7 @@ bool Foam::faMesh::movePoints() ( "S0", time().timeName(), - faMesh::thisDb(), + *this, IOobject::NO_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER diff --git a/src/finiteArea/faMesh/faMesh.H b/src/finiteArea/faMesh/faMesh.H index 34e1352250faaa7c8ca26b3d3ad4357cb74661d6..95d564df4c179e4ec03f4eaac174b1d165cea8ef 100644 --- a/src/finiteArea/faMesh/faMesh.H +++ b/src/finiteArea/faMesh/faMesh.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd - Copyright (C) 2021-2023 OpenCFD Ltd. + Copyright (C) 2021-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +56,6 @@ Author #ifndef Foam_faMesh_H #define Foam_faMesh_H -#include "MeshObject.H" #include "polyMesh.H" #include "lduMesh.H" #include "faBoundaryMesh.H" @@ -85,17 +84,52 @@ class faMeshLduAddressing; class faMeshMapper; class faPatchData; +/*---------------------------------------------------------------------------*\ + Class faMeshRegistry Declaration +\*---------------------------------------------------------------------------*/ + +//- The objectRegistry for faMesh. +// This is a separate class to ensure it will be fully constructed before +// other data members use it, which ensures that its virtual methods are +// callable during construction (gcc). +class faMeshRegistry +: + public objectRegistry +{ +public: + + // Constructors + + //- Construct an objectRegistry for given area region name. + // Uses faMeshesRegistry internally + faMeshRegistry(const word& areaRegion, const polyMesh& mesh); + + + // Member Functions + + //- True - thisDb() is a valid registry + virtual bool hasDb() const { return true; } + + //- Reference to the mesh database + virtual const objectRegistry& thisDb() const { return *this; } + + //- Local directory path of the objectRegistry relative to Time + //- with override for the single-region case + virtual const fileName& dbDir() const; +}; + + /*---------------------------------------------------------------------------*\ Class faMesh Declaration \*---------------------------------------------------------------------------*/ class faMesh : - public MeshObject<polyMesh, Foam::UpdateableMeshObject, faMesh>, + public faMeshRegistry, public lduMesh, public faSchemes, - public edgeInterpolation, // may need input from faSchemes - public faSolution + public faSolution, + public edgeInterpolation // may need input from faSchemes { // Private (internal) classes/structures @@ -327,6 +361,9 @@ class faMesh // Static Private Data + //- The prefix to local: %finite-area + static const word prefix_; + //- Quadrics fit for pointAreaNormals (experimental) static const int quadricsFit_; @@ -356,7 +393,7 @@ class faMesh ) const; - // Private member functions to calculate demand driven data + // Private Member Functions to calculate demand driven data //- Calculate ldu addressing void calcLduAddressing() const; @@ -486,11 +523,18 @@ class faMesh // Static Functions //- Test if faSchemes/faSolution files are available - static bool hasSystemFiles(const polyMesh& pMesh); - - //- Test if all files needed for read construction are available - static bool hasFiles(const polyMesh& pMesh); + static bool hasSystemFiles + ( + const word& meshName, + const polyMesh& pMesh + ); + //- Test if mesh files needed for read construction are available + static bool hasMeshFiles + ( + const word& meshName, + const polyMesh& pMesh + ); public: @@ -512,8 +556,8 @@ public: //- Runtime type information TypeName("faMesh"); - //- The prefix to local: %finite-area - static const word prefix; + //- The prefix to the parent registry name: %finite-area + static const word& prefix() noexcept; //- The mesh sub-directory name (usually "faMesh") static word meshSubDir; @@ -530,29 +574,27 @@ public: // Constructors - //- Read construct from polyMesh, using its IOobject properties - explicit faMesh(const polyMesh& pMesh, const bool doInit = true); - //- Construct zero-sized from polyMesh // Boundary is added using addFaPatches() member function - faMesh(const polyMesh& pMesh, const Foam::zero); + faMesh(const word& meshName, const polyMesh&, Foam::zero); - //- Construct as copy (for dictionaries) and zero-sized - //- without boundary. + //- Construct zero-sized from polyMesh // Boundary is added using addFaPatches() member function - faMesh(const faMesh& baseMesh, const Foam::zero); + faMesh(const polyMesh&, Foam::zero); - //- Construct as copy (for dictionaries) and faceLabels - //- without boundary, using read properties from baseMesh. - // Boundary is added using addFaPatches() member function - faMesh(const faMesh& baseMesh, labelList&& faceLabels); + //- Read construct from polyMesh, using its IOobject properties + faMesh(const word& meshName, const polyMesh&, const bool doInit = true); - //- Construct as copy (for dictionaries) and faceLabels - //- without boundary, using specified read properties. + //- Read construct from polyMesh, using its IOobject properties + explicit faMesh(const polyMesh&, const bool doInit = true); + + //- Construct from components (face labels) without boundary, + //- using specified read properties. // Boundary is added using addFaPatches() member function. faMesh ( - const faMesh& baseMesh, + const word& meshName, + const polyMesh& pMesh, labelList&& faceLabels, IOobjectOption ioOpt ); @@ -560,21 +602,84 @@ public: //- Construct from components (face labels) without boundary, //- using IOobject properties from polyMesh. // Boundary is added using addFaPatches() member function. - faMesh(const polyMesh& pMesh, labelList&& faceLabels); + faMesh(const word& meshName, const polyMesh&, labelList&& faceLabels); //- Construct from components (face labels) without boundary, //- using specified read properties. // Boundary is added using addFaPatches() member function. + faMesh(const polyMesh&, labelList&& faceLabels, IOobjectOption ioOpt); + + //- Construct from components (face labels) without boundary, + //- using IOobject properties from polyMesh. + // Boundary is added using addFaPatches() member function. + faMesh(const polyMesh&, labelList&& faceLabels); + + //- Construct as copy (for dictionaries) and zero-sized + //- without boundary. + // Boundary is added using addFaPatches() member function + faMesh(const word& meshName, const faMesh& baseMesh, Foam::zero); + + //- Construct as copy (for dictionaries) and zero-sized + //- without boundary, using IOobject properties from polyMesh. + // Boundary is added using addFaPatches() member function + faMesh(const faMesh& baseMesh, Foam::zero); + + //- Construct as copy (for dictionaries) and faceLabels + //- without boundary, using specified read properties. + // Boundary is added using addFaPatches() member function faMesh ( - const polyMesh& pMesh, + const word& meshName, + const faMesh& baseMesh, labelList&& faceLabels, IOobjectOption ioOpt ); + //- Construct as copy (for dictionaries) and faceLabels + //- without boundary, using specified read properties. + // Boundary is added using addFaPatches() member function + faMesh + ( + const faMesh& baseMesh, + labelList&& faceLabels, + IOobjectOption ioOpt + ); + + //- Construct as copy (for dictionaries) and faceLabels + //- without boundary, using IOobject properties from polyMesh. + // Boundary is added using addFaPatches() member function + faMesh + ( + const word& meshName, + const faMesh& baseMesh, + labelList&& faceLabels + ); + + //- Construct as copy (for dictionaries) and faceLabels + //- without boundary, using read properties from baseMesh. + // Boundary is added using addFaPatches() member function + faMesh(const faMesh& baseMesh, labelList&& faceLabels); + + //- Construct from single polyPatch + faMesh + ( + const word& meshName, + const polyPatch& pp, + const bool doInit = true + ); + //- Construct from single polyPatch explicit faMesh(const polyPatch& pp, const bool doInit = true); + //- Construct from definition + faMesh + ( + const word& meshName, + const polyMesh& pMesh, + const dictionary& faMeshDefinition, + const bool doInit = true + ); + //- Construct from definition faMesh ( @@ -606,6 +711,13 @@ public: return old; } + //- Read construction from polyMesh if all files are available + static autoPtr<faMesh> TryNew + ( + const word& meshName, + const polyMesh& pMesh + ); + //- Read construction from polyMesh if all files are available static autoPtr<faMesh> TryNew(const polyMesh& pMesh); @@ -646,8 +758,12 @@ public: //- Uses lookupObject semantics - Fatal if non-existent static const faMesh& mesh(const polyMesh& pMesh); + //- The single-region or specified finite-area region on the polyMesh. + //- Uses lookupObject semantics - Fatal if non-existent + static const faMesh& mesh(const polyMesh&, const word& areaRegion); + //- Return access to polyMesh - inline const polyMesh& mesh() const; + const polyMesh& mesh() const; //- Return the local mesh directory (dbDir()/meshSubDir) fileName meshDir() const; @@ -751,22 +867,64 @@ public: // Database - //- Return true if thisDb() is a valid DB - virtual bool hasDb() const; + //- True - thisDb() is a valid registry + virtual bool hasDb() const { return true; } + + //- Reference to the mesh database + virtual const objectRegistry& thisDb() const + { + return faMeshRegistry::thisDb(); + } - //- Return reference to the mesh database - virtual const objectRegistry& thisDb() const; + //- Local directory path of the objectRegistry relative to Time + //- with override for the single-region case + virtual const fileName& dbDir() const + { + return faMeshRegistry::dbDir(); + } //- Name function is needed to disambiguate those inherited //- from base classes const word& name() const { - return thisDb().name(); + return faMeshRegistry::thisDb().name(); } // Regions + //- Local registry directory path (relative to Time) for specified + //- area mesh (of a single-region volume mesh) + static fileName dbDir(const word& areaRegion); + + //- Local registry directory path (relative to Time) for specified + //- volume mesh and area mesh combination + static fileName dbDir(const word& volRegion, const word& areaRegion); + + //- Local registry directory path (relative to Time) for specified + //- volume mesh and area mesh combination + static fileName dbDir + ( + const polyMesh& pMesh, + const word& areaRegion = word::null + ); + + //- The local mesh directory name (eg, "faMesh") for specified + //- area mesh (of a single-region volume mesh) + static fileName meshDir(const word& areaRegion); + + //- The local mesh directory name (eg, "faMesh") for specified + //- volume mesh and area mesh combination + static fileName meshDir(const word& volRegion, const word& areaRegion); + + //- The local mesh directory name (eg, "faMesh") for specified + //- volume mesh and area mesh combination + static fileName meshDir + ( + const polyMesh& pMesh, + const word& areaRegion = word::null + ); + //- The mesh region name or word::null if polyMesh::defaultRegion const word& regionName() const; diff --git a/src/finiteArea/faMesh/faMeshI.H b/src/finiteArea/faMesh/faMeshI.H index c04646d04caa7b1b1028baeb0d07d7c944ac4c6a..bfa5614d1dc723e041e1bdf74f865c9b152ebade 100644 --- a/src/finiteArea/faMesh/faMeshI.H +++ b/src/finiteArea/faMesh/faMeshI.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd - Copyright (C) 2021-2022 OpenCFD Ltd. + Copyright (C) 2021-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,13 +28,6 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline const Foam::polyMesh& Foam::faMesh::mesh() const -{ - return - MeshObject<polyMesh, Foam::UpdateableMeshObject, faMesh>::mesh(); -} - - inline const Foam::faBoundaryMesh& Foam::faMesh::boundary() const noexcept { return boundary_; diff --git a/src/finiteArea/faMesh/faMeshNew.C b/src/finiteArea/faMesh/faMeshNew.C index dcc6c2afec5534c5369c7ff9367a41d2d7ccd196..bbbf40b471909a9e199e7e1a0f1a846aae57a72c 100644 --- a/src/finiteArea/faMesh/faMeshNew.C +++ b/src/finiteArea/faMesh/faMeshNew.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2022 OpenCFD Ltd. + Copyright (C) 2022-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,11 +31,34 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -bool Foam::faMesh::hasSystemFiles(const polyMesh& pMesh) +bool Foam::faMesh::hasSystemFiles +( + const word& meshName, + const polyMesh& pMesh +) { // Expect - // - system/faSchemes - // - system/faSolution + // - system/finite-area/<region>/faSchemes + // - system/finite-area/<region>/faSolution + + // The directory relative to polyMesh (not Time) + const fileName relativeDir + ( + faMesh::prefix() / polyMesh::regionName(meshName) + ); + + DebugInfo<< "check system files: " << relativeDir << nl; + + IOobject systemIOobject + ( + "any-name", + pMesh.time().system(), + relativeDir, + pMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + IOobject::NO_REGISTER + ); const fileOperation& fp = Foam::fileHandler(); @@ -52,20 +75,14 @@ bool Foam::faMesh::hasSystemFiles(const polyMesh& pMesh) }) ) { + systemIOobject.resetHeader(expect); + fileName found ( fp.filePath ( true, // global - IOobject - ( - expect, - pMesh.time().system(), - pMesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - IOobject::NO_REGISTER - ), + systemIOobject, expect // typeName (ununsed?) ) ); @@ -83,18 +100,34 @@ bool Foam::faMesh::hasSystemFiles(const polyMesh& pMesh) } -bool Foam::faMesh::hasFiles(const polyMesh& pMesh) +bool Foam::faMesh::hasMeshFiles +( + const word& meshName, + const polyMesh& pMesh +) { - // As well as system/{faSchemes,faSolution} + // As well as system/finite-area/{faSchemes,faSolution} // // expect these: - // - instance/faMesh/faceLabels - // - instance/faMesh/faBoundary + // - instance/finite-area/<region>/faMesh/faceLabels + // - instance/finite-area/<region>/faMesh/faBoundary + - bool looksValid = hasSystemFiles(pMesh); + // Not required... + // bool looksValid = hasSystemFiles(meshName, pMesh); + + bool looksValid = true; + + // The mesh directory relative to polyMesh (not Time) + const fileName relativeDir + ( + faMesh::meshDir(word::null, meshName) + ); if (looksValid) { + DebugInfo<< "check mesh files: " << relativeDir << nl; + const fileOperation& fp = Foam::fileHandler(); // The geometry instance for faMesh/faceLabels @@ -102,11 +135,23 @@ bool Foam::faMesh::hasFiles(const polyMesh& pMesh) const word instance = pMesh.time().findInstance ( - pMesh.dbDir()/faMesh::meshSubDir, + // Searching from Time, so need polyMesh region too + pMesh.regionName()/relativeDir, "faceLabels", IOobject::READ_IF_PRESENT ); + IOobject meshIOobject + ( + "any-name", + instance, + relativeDir, + pMesh, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE, + IOobject::NO_REGISTER + ); + for ( const wordPair& expect @@ -120,21 +165,14 @@ bool Foam::faMesh::hasFiles(const polyMesh& pMesh) const word& dataFile = expect.first(); const word& dataClass = expect.second(); + meshIOobject.resetHeader(dataFile); + fileName found ( fp.filePath ( false, // non-global - IOobject - ( - dataFile, - instance, - faMesh::meshSubDir, - pMesh, - IOobject::READ_IF_PRESENT, - IOobject::NO_WRITE, - IOobject::NO_REGISTER - ), + meshIOobject, dataClass // typeName (ununsed?) ) ); @@ -153,15 +191,28 @@ bool Foam::faMesh::hasFiles(const polyMesh& pMesh) } -Foam::autoPtr<Foam::faMesh> Foam::faMesh::TryNew(const polyMesh& pMesh) +Foam::autoPtr<Foam::faMesh> Foam::faMesh::TryNew +( + const word& meshName, + const polyMesh& pMesh +) { - if (faMesh::hasFiles(pMesh)) + if (faMesh::hasMeshFiles(meshName, pMesh)) { - return autoPtr<faMesh>::New(pMesh); + return autoPtr<faMesh>::New(meshName, pMesh); } return nullptr; } +Foam::autoPtr<Foam::faMesh> Foam::faMesh::TryNew +( + const polyMesh& pMesh +) +{ + return TryNew(polyMesh::defaultRegion, pMesh); +} + + // ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshRegistry.C b/src/finiteArea/faMesh/faMeshRegistry.C new file mode 100644 index 0000000000000000000000000000000000000000..892156f19ffe1a6725164dbd728052eeeec28d31 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshRegistry.C @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2024 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM 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. + + OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "faMeshesRegistry.H" +#include "Time.H" +#include "polyMesh.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faMeshRegistry::faMeshRegistry +( + const word& areaRegion, + const polyMesh& mesh +) +: + objectRegistry + ( + IOobject + ( + areaRegion, + faMeshesRegistry::New(mesh).thisDb(), + IOobjectOption::NO_READ, + IOobjectOption::AUTO_WRITE, + IOobjectOption::REGISTER + ) + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::fileName& Foam::faMeshRegistry::dbDir() const +{ + // In the usual case, the objectRegistry::dbDir() will be something + // like finite-area/{region0,film} etc with the "finite-area/" + // prefix coming from the enclosing registry of registries. + // + // So always check the name() portion, not the dbDir() itself + // - either, objectRegistry::dbDir().name() + // - or (same), objectRegistry::name() + + if (objectRegistry::name() == polyMesh::defaultRegion) + { + return objectRegistry::parent().dbDir(); + } + + return objectRegistry::dbDir(); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshTools/faMeshTools.C b/src/finiteArea/faMesh/faMeshTools/faMeshTools.C index 0154e9929801ec02a2bdf74dc15147a48a5d47b6..439d24fc31e236b205e56dd80efe0defedb03b13 100644 --- a/src/finiteArea/faMesh/faMeshTools/faMeshTools.C +++ b/src/finiteArea/faMesh/faMeshTools/faMeshTools.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2015-2023 OpenCFD Ltd. + Copyright (C) 2015-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -77,12 +77,10 @@ Foam::faMeshTools::newMesh const bool verbose ) { - // Region name - // ~~~~~~~~~~~ - + // The mesh directory (assuming single area region), relative to Time const fileName meshSubDir ( - pMesh.regionName() / faMesh::meshSubDir + faMesh::meshDir(pMesh, word::null) ); @@ -111,7 +109,7 @@ Foam::faMeshTools::newMesh "faBoundary", facesInstance, meshSubDir, - io.db(), + io.time(), IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER @@ -133,15 +131,15 @@ Foam::faMeshTools::newMesh // Dummy meshes // ~~~~~~~~~~~~ - // Set up to read-if-present. Note: does not search for mesh so set - // instance explicitly + // Fake read-if-present behaviour to obtain the faceLabels IOobject meshIO(io); meshIO.instance() = facesInstance; meshIO.readOpt(IOobject::READ_IF_PRESENT); // For mesh components (faceLabels, ...) - IOobject cmptIO(meshIO, "faceLabels", meshSubDir); + IOobject cmptIO(io.time(), "faceLabels", meshSubDir); + cmptIO.instance() = facesInstance; cmptIO.readOpt(IOobject::MUST_READ); cmptIO.writeOpt(IOobject::NO_WRITE); cmptIO.registerObject(IOobject::NO_REGISTER); @@ -261,12 +259,10 @@ Foam::faMeshTools::loadOrCreateMeshImpl const bool verbose ) { - // Region name - // ~~~~~~~~~~~ - + // The mesh directory (assuming single area region), relative to Time const fileName meshSubDir ( - pMesh.regionName() / faMesh::meshSubDir + faMesh::meshDir(pMesh, word::null) ); @@ -288,7 +284,7 @@ Foam::faMeshTools::loadOrCreateMeshImpl "faBoundary", io.instance(), meshSubDir, - io.db(), + io.time(), IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER @@ -359,7 +355,7 @@ Foam::faMeshTools::loadOrCreateMeshImpl new faMesh ( pMesh, - labelList(), + labelList(), // Similar to Foam::zero{} IOobject(io, IOobject::NO_READ, IOobject::AUTO_WRITE) ) ); diff --git a/src/finiteArea/faMesh/faMeshTools/faMeshTools.H b/src/finiteArea/faMesh/faMeshTools/faMeshTools.H index ee63b1b3053fb0e5d901d5a7bf18c8ef888fd7b4..148494d2a009473bba06a88a09c01f725bf4499d 100644 --- a/src/finiteArea/faMesh/faMeshTools/faMeshTools.H +++ b/src/finiteArea/faMesh/faMeshTools/faMeshTools.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2022-2023 OpenCFD Ltd. + Copyright (C) 2022-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -99,6 +99,7 @@ public: // if not present static autoPtr<faMesh> newMesh ( + //! The IOobject describes the base polyMesh const IOobject& io, const polyMesh& pMesh, const bool masterOnlyReading, @@ -111,6 +112,7 @@ public: // - io.instance() set to facesInstance static autoPtr<faMesh> loadOrCreateMesh ( + //! The IOobject describes the base polyMesh const IOobject& io, const polyMesh& pMesh, const bool decompose, @@ -123,6 +125,7 @@ public: // - io.instance() set to facesInstance static autoPtr<faMesh> loadOrCreateMesh ( + //! The IOobject describes the base polyMesh const IOobject& io, const polyMesh& pMesh, //! Non-null reference if a mesh exists on given processor diff --git a/src/finiteArea/faMesh/faMeshesRegistry.C b/src/finiteArea/faMesh/faMeshesRegistry.C new file mode 100644 index 0000000000000000000000000000000000000000..cfdf7128fd5c4265870e7a5ad3882de1661c6240 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshesRegistry.C @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023-2024 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM 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. + + OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "faMeshesRegistry.H" +#include "faMesh.H" +#include "polyMesh.H" +#include "mapPolyMesh.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(faMeshesRegistry, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faMeshesRegistry::faMeshesRegistry(const polyMesh& mesh) +: + MeshObject_type(mesh), + objects_ + ( + IOobject + ( + faMesh::prefix(), + mesh.time().timeName(), + mesh.thisDb(), + IOobjectOption::NO_READ, + IOobjectOption::AUTO_WRITE, + IOobjectOption::REGISTER + ) + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::faMeshesRegistry::movePoints() +{ + for (faMesh& m : objects_.sorted<faMesh>()) + { + m.movePoints(); + } + + return true; +} + + +void Foam::faMeshesRegistry::updateMesh(const mapPolyMesh& mpm) +{ + for (faMesh& m : objects_.sorted<faMesh>()) + { + m.updateMesh(mpm); + } +} + + +bool Foam::faMeshesRegistry::writeObject +( + IOstreamOption streamOpt, + const bool writeOnProc +) const +{ + // for (const faMesh& m : objects_.csorted<faMesh>()) + // { + // m.write(writeOnProc); + // } + // + // return true; + + return objects_.writeObject(streamOpt, writeOnProc); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshesRegistry.H b/src/finiteArea/faMesh/faMeshesRegistry.H new file mode 100644 index 0000000000000000000000000000000000000000..e3b78e7b8c1ecd00f35a68bdf4ca66ce35f5dee3 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshesRegistry.H @@ -0,0 +1,194 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2023-2024 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM 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. + + OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::faMeshesRegistry + +Description + A MeshObject registry on top of a polyMesh that provides + an objectRegistry for holding multiple faMesh objects. + + Directory structure for fields/meshes (default region): + \verbatim + . + |-- constant + | `-- finite-area + | `-- faMesh + | |-- faceLabels + | |-- ... + | `-- faBoundary + |-- system + | `-- finite-area + | |-- faMeshDefiniton + | |-- faSchemes + | `-- faSolution + `-- instance + `-- finite-area + |-- U + |-- p + `-- ... + \endverbatim + + Directory structure for fields/meshes (multi-regions): + \verbatim + . + |-- constant + | `-- finite-area + | |-- regionName1 + | | `-- faMesh + | | `-- ... + | `-- regionNameN + | `-- faMesh + | `-- ... + |-- system + | `-- finite-area + | |-- regionName1 + | | |-- faMeshDefiniton + | | |-- faSchemes + | | `-- faSolution + | `-- regionNameN + | `-- ... + | + `-- instance + `-- finite-area + |-- regionName1 + | `-- ... + `-- regionNameN + `-- ... + \endverbatim + +SourceFiles + faMeshesRegistry.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Foam_faMeshesRegistry_H +#define Foam_faMeshesRegistry_H + +#include "MeshObject.H" +#include "polyMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward Declarations +class faMesh; + +/*---------------------------------------------------------------------------*\ + Class faMeshesRegistry Declaration +\*---------------------------------------------------------------------------*/ + +class faMeshesRegistry +: + public MeshObject<polyMesh, UpdateableMeshObject, faMeshesRegistry> +{ + // Data Types + + //- The MeshObject type + typedef MeshObject + < + polyMesh, + UpdateableMeshObject, + faMeshesRegistry + > MeshObject_type; + + + // Private Member Data + + //- The sub-registry of finite-area objects (meshes), + //- anchored on the polyMesh parent. Name: "finite-area", + objectRegistry objects_; + + +public: + + //- Runtime type information. + TypeName("faMeshesRegistry"); + + // Generated Methods + + //- No copy construct + faMeshesRegistry(const faMeshesRegistry&) = delete; + + //- No copy assignment + void operator=(const faMeshesRegistry&) = delete; + + + // Constructors + + //- Construct as singleton on the polyMesh registry + explicit faMeshesRegistry(const polyMesh& mesh); + + + // Database + + //- Return the object registry + const objectRegistry& thisDb() const noexcept + { + return objects_; + } + + //- The polyMesh reference + const polyMesh& mesh() const noexcept + { + return MeshObject_type::mesh(); + } + + + // Topological Change + + //- Is mesh moving - ie, is polyMesh moving + bool moving() const { return MeshObject_type::mesh().moving(); } + + //- Update after mesh motion + virtual bool movePoints(); + + //- Update after topo change + virtual void updateMesh(const mapPolyMesh& mpm); + + + // Write + + //- Write items (eg, faMesh) held in the registry + virtual bool writeObject + ( + IOstreamOption streamOpt, + const bool writeOnProc = true + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/adjointSensitivity/shape/surface/sensitivitySurface.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/adjointSensitivity/shape/surface/sensitivitySurface.C index 3d1b1dfd898fe2c79c0d970e7469660330d96c07..94c7b26562b8ef526ad9ba5292658ac001bf5a3a 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/adjointSensitivity/shape/surface/sensitivitySurface.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/adjointSensitivity/shape/surface/sensitivitySurface.C @@ -74,55 +74,70 @@ void sensitivitySurface::smoothSensitivities() // Read in parameters const label iters(dict().getOrDefault<label>("iters", 500)); const scalar tolerance(dict().getOrDefault<scalar>("tolerance", 1.e-06)); - autoPtr<faMesh> aMeshPtr(nullptr); - IOobject faceLabels - ( - "faceLabels", - mesh_.time().findInstance - ( - mesh_.dbDir()/faMesh::meshSubDir, - "faceLabels", - IOobject::READ_IF_PRESENT - ), - faMesh::meshSubDir, - mesh_, - IOobject::READ_IF_PRESENT, - IOobject::NO_WRITE - ); + autoPtr<faMesh> aMeshPtr = faMesh::TryNew(mesh_); - // If the faMesh already exists, read it - if (faceLabels.typeHeaderOk<labelIOList>(false)) + if (aMeshPtr) { - Info<< "Reading the already constructed faMesh" << endl; - aMeshPtr.reset(new faMesh(mesh_)); + Info<< "Loaded the existing faMesh" << nl; } else { // Dictionary used to construct the faMesh dictionary faMeshDefinition; - IOobject faMeshDefinitionDict - ( - "faMeshDefinition", - mesh_.time().caseSystem(), - mesh_, - IOobject::MUST_READ, - IOobject::NO_WRITE - ); + // Check and read system/faMeshDefinition + { + IOobject io + ( + "faMeshDefinition", + mesh_.time().caseSystem(), + mesh_, + IOobject::MUST_READ, + IOobject::NO_WRITE, + IOobject::NO_REGISTER + ); + + if (io.typeHeaderOk<IOdictionary>(false)) + { + Info<< "Using system/faMeshDefinition" << nl; + faMeshDefinition = IOdictionary(io); + } + else if (debug) + { + Info<< "No " << io.name() << " in " << io.path() << nl; + } + } - // If the faMeshDefinitionDict exists, use it to construct the mesh - if (faMeshDefinitionDict.typeHeaderOk<IOdictionary>(false)) + // Check and read system/finite-area/faMeshDefinition + if (faMeshDefinition.empty()) { - Info<< "Reading faMeshDefinition from system " << endl; - faMeshDefinition = IOdictionary(faMeshDefinitionDict); + IOobject io + ( + "faMeshDefinition", + mesh_.time().caseSystem()/faMesh::prefix(), + mesh_, + IOobject::MUST_READ, + IOobject::NO_WRITE, + IOobject::NO_REGISTER + ); + + if (io.typeHeaderOk<IOdictionary>(false)) + { + Info<< "Using system/finite-area/faMeshDefinition" << nl; + faMeshDefinition = IOdictionary(io); + } + else if (debug) + { + Info<< "No " << io.name() << " in " << io.path() << nl; + } } - // Otherwise, faMesh is generated from all patches on which we compute - // sensitivities - else + + // No specified faMeshDefinition? + // - generate faMesh from all patches on which we compute sensitivities + + if (faMeshDefinition.empty()) { - Info<< "Constructing faMeshDefinition from sensitivity patches" - << endl; wordList polyMeshPatches(sensitivityPatchIDs_.size()); label i(0); for (const label patchID : sensitivityPatchIDs_) @@ -131,13 +146,22 @@ void sensitivitySurface::smoothSensitivities() } faMeshDefinition.add<wordList>("polyMeshPatches", polyMeshPatches); (void)faMeshDefinition.subDictOrAdd("boundary"); - Info<< faMeshDefinition << endl; + + // TBD: Place all edges into the "defaultPatch" ? + // faMeshDefinition.subDictOrAdd("defaultPatch") + // .add("name", "undefined"); + + Info<< "Create faMeshDefinition from sensitivity patches" + << nl << nl; + + faMeshDefinition.writeEntry("faMeshDefinition", Info); } - // Construct faMesh + // Construct faMesh from faMeshDefinition aMeshPtr.reset(new faMesh(mesh_, faMeshDefinition)); } - faMesh& aMesh = aMeshPtr.ref(); + faMesh& aMesh = *aMeshPtr; + // Physical radius of the smoothing, provided either directly or computed // based on the average 'length' of boundary faces @@ -154,7 +178,7 @@ void sensitivitySurface::smoothSensitivities() "RpdeSqr", dimArea, sqr(Rphysical/(2.*::sqrt(3.))) ); - dimensionedScalar one("1", dimless, 1.); + dimensionedScalar one(dimless, Foam::one{}); // Mapping engine volSurfaceMapping vsm(aMesh); @@ -162,16 +186,9 @@ void sensitivitySurface::smoothSensitivities() // Source term in faMatrix needs to be an areaField areaVectorField sens ( - IOobject - ( - "sens", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + aMesh.newIOobject("sens"), aMesh, - dimensionedVector(dimless, Zero), + dimensionedVector(dimless, Foam::zero{}), faPatchFieldBase::zeroGradientType() ); @@ -220,14 +237,7 @@ void sensitivitySurface::smoothSensitivities() // Write normal, regularised sensitivities to file volScalarField volSmoothedSens ( - IOobject - ( - "smoothedSurfaceSens" + suffix_, - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + mesh_.newIOobject("smoothedSurfaceSens" + suffix_), mesh_, dimensionedScalar(dimless, Zero) ); diff --git a/src/regionFaModels/liquidFilm/subModels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionFaModels/liquidFilm/subModels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index de6effd2c94018c18208ef20d2bfcb138a745d9e..dd3f931c23a8a0ead04fa5215e434c305cff7dbf 100644 --- a/src/regionFaModels/liquidFilm/subModels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionFaModels/liquidFilm/subModels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -130,21 +130,17 @@ tmp<scalarField> curvatureSeparation::calcCosAngle // checks if (debug && mesh.time().writeTime()) { - areaScalarField volCosAngle - ( - IOobject + { + areaScalarField volCosAngle ( - "cosAngle", - mesh.time().timeName(), - mesh.thisDb(), - IOobject::NO_READ - ), - mesh, - dimensionedScalar(dimless, Zero) - ); - volCosAngle.primitiveFieldRef() = cosAngle; - volCosAngle.correctBoundaryConditions(); - volCosAngle.write(); + mesh.newIOobject("cosAngle"), + mesh, + dimensionedScalar(dimless, Zero) + ); + volCosAngle.primitiveFieldRef() = cosAngle; + volCosAngle.correctBoundaryConditions(); + volCosAngle.write(); + } } return clamp(cosAngle, scalarMinMax(-1, 1)); @@ -249,65 +245,49 @@ void curvatureSeparation::correct if (debug && mesh.time().writeTime()) { - areaScalarField volFnet - ( - IOobject + { + areaScalarField volFnet ( - "Fnet", - mesh.time().timeName(), - mesh.thisDb(), - IOobject::NO_READ - ), - mesh, - dimensionedScalar(dimForce, Zero) - ); - volFnet.primitiveFieldRef() = Fnet; - volFnet.write(); - - areaScalarField areaSeparated - ( - IOobject + mesh.newIOobject("Fnet"), + mesh, + dimensionedScalar(dimForce, Zero) + ); + volFnet.primitiveFieldRef() = Fnet; + volFnet.write(); + } + + { + areaScalarField areaSeparated ( - "separated", - mesh.time().timeName(), - mesh.thisDb(), - IOobject::NO_READ - ), - mesh, - dimensionedScalar(dimMass, Zero) - ); - areaSeparated.primitiveFieldRef() = separated; - areaSeparated.write(); - - areaScalarField areaMassToInject - ( - IOobject + mesh.newIOobject("separated"), + mesh, + dimensionedScalar(dimMass, Zero) + ); + areaSeparated.primitiveFieldRef() = separated; + areaSeparated.write(); + } + + { + areaScalarField areaMassToInject ( - "massToInject", - mesh.time().timeName(), - mesh.thisDb(), - IOobject::NO_READ - ), - mesh, - dimensionedScalar(dimMass, Zero) - ); - areaMassToInject.primitiveFieldRef() = massToInject; - areaMassToInject.write(); - - areaScalarField areaInvR1 - ( - IOobject + mesh.newIOobject("massToInject"), + mesh, + dimensionedScalar(dimMass, Zero) + ); + areaMassToInject.primitiveFieldRef() = massToInject; + areaMassToInject.write(); + } + + { + areaScalarField areaInvR1 ( - "InvR1", - mesh.time().timeName(), - mesh.thisDb(), - IOobject::NO_READ - ), - mesh, - dimensionedScalar(inv(dimLength), Zero) - ); - areaInvR1.primitiveFieldRef() = invR1; - areaInvR1.write(); + mesh.newIOobject("InvR1"), + mesh, + dimensionedScalar(inv(dimLength), Zero) + ); + areaInvR1.primitiveFieldRef() = invR1; + areaInvR1.write(); + } } injectionModel::correct(); diff --git a/tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/h_vibrationShell b/tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/finite-area/h_vibrationShell similarity index 100% rename from tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/h_vibrationShell rename to tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/finite-area/h_vibrationShell diff --git a/tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/ps_vibrationShell b/tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/finite-area/ps_vibrationShell similarity index 100% rename from tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/ps_vibrationShell rename to tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/finite-area/ps_vibrationShell diff --git a/tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/ws_vibrationShell b/tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/finite-area/ws_vibrationShell similarity index 100% rename from tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/ws_vibrationShell rename to tutorials/compressible/acousticFoam/obliqueAirJet/main/0.orig/finite-area/ws_vibrationShell diff --git a/tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faMeshDefinition b/tutorials/compressible/acousticFoam/obliqueAirJet/main/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faMeshDefinition rename to tutorials/compressible/acousticFoam/obliqueAirJet/main/system/finite-area/faMeshDefinition diff --git a/tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faSchemes b/tutorials/compressible/acousticFoam/obliqueAirJet/main/system/finite-area/faSchemes similarity index 100% rename from tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faSchemes rename to tutorials/compressible/acousticFoam/obliqueAirJet/main/system/finite-area/faSchemes diff --git a/tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faSolution b/tutorials/compressible/acousticFoam/obliqueAirJet/main/system/finite-area/faSolution similarity index 100% rename from tutorials/compressible/acousticFoam/obliqueAirJet/main/system/faSolution rename to tutorials/compressible/acousticFoam/obliqueAirJet/main/system/finite-area/faSolution diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/Us b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/finite-area/Us similarity index 100% rename from tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/Us rename to tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/finite-area/Us diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/h b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/finite-area/h similarity index 100% rename from tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/h rename to tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/finite-area/h diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/manningField b/tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/finite-area/manningField similarity index 100% rename from tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/manningField rename to tutorials/finiteArea/liquidFilmFoam/cylinder/0.orig/finite-area/manningField diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faMeshDefinition b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/finiteArea/liquidFilmFoam/cylinder/system/faMeshDefinition rename to tutorials/finiteArea/liquidFilmFoam/cylinder/system/finite-area/faMeshDefinition diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSchemes b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/finite-area/faSchemes similarity index 100% rename from tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSchemes rename to tutorials/finiteArea/liquidFilmFoam/cylinder/system/finite-area/faSchemes diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSolution b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/finite-area/faSolution similarity index 100% rename from tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSolution rename to tutorials/finiteArea/liquidFilmFoam/cylinder/system/finite-area/faSolution diff --git a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cs b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/finite-area/Cs similarity index 100% rename from tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/Cs rename to tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/0.orig/finite-area/Cs diff --git a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faMeshDefinition b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faMeshDefinition rename to tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/finite-area/faMeshDefinition diff --git a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faSchemes b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/finite-area/faSchemes similarity index 100% rename from tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faSchemes rename to tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/finite-area/faSchemes diff --git a/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faSolution b/tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/finite-area/faSolution similarity index 100% rename from tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/faSolution rename to tutorials/finiteArea/sphereSurfactantFoam/sphereTransport/system/finite-area/faSolution diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Cs b/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/finite-area/Cs similarity index 100% rename from tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Cs rename to tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/finite-area/Cs diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Us b/tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/finite-area/Us similarity index 100% rename from tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/Us rename to tutorials/finiteArea/surfactantFoam/planeTransport/0.orig/finite-area/Us diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/faMeshDefinition b/tutorials/finiteArea/surfactantFoam/planeTransport/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/finiteArea/surfactantFoam/planeTransport/system/faMeshDefinition rename to tutorials/finiteArea/surfactantFoam/planeTransport/system/finite-area/faMeshDefinition diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/faSchemes b/tutorials/finiteArea/surfactantFoam/planeTransport/system/finite-area/faSchemes similarity index 100% rename from tutorials/finiteArea/surfactantFoam/planeTransport/system/faSchemes rename to tutorials/finiteArea/surfactantFoam/planeTransport/system/finite-area/faSchemes diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/faSolution b/tutorials/finiteArea/surfactantFoam/planeTransport/system/finite-area/faSolution similarity index 100% rename from tutorials/finiteArea/surfactantFoam/planeTransport/system/faSolution rename to tutorials/finiteArea/surfactantFoam/planeTransport/system/finite-area/faSolution diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/0/Ts_ceilingShell b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/0/finite-area/Ts_ceilingShell similarity index 100% rename from tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/0/Ts_ceilingShell rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/0/finite-area/Ts_ceilingShell diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/0/h_ceilingShell b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/0/finite-area/h_ceilingShell similarity index 100% rename from tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/0/h_ceilingShell rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/0/finite-area/h_ceilingShell diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/faMeshDefinition b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/faMeshDefinition rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/finite-area/faMeshDefinition diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/faSchemes b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/finite-area/faSchemes similarity index 100% rename from tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/faSchemes rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/finite-area/faSchemes diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/faSolution b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/finite-area/faSolution similarity index 100% rename from tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/faSolution rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/system/finite-area/faSolution diff --git a/tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike/system/faSchemes b/tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike/system/finite-area/faSchemes similarity index 100% rename from tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike/system/faSchemes rename to tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike/system/finite-area/faSchemes diff --git a/tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike/system/faSolution b/tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike/system/finite-area/faSolution similarity index 100% rename from tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike/system/faSolution rename to tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike/system/finite-area/faSolution diff --git a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/0.orig/contactAngle b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/0.orig/finite-area/contactAngle similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/0.orig/contactAngle rename to tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/0.orig/finite-area/contactAngle diff --git a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/faMeshDefinition rename to tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/finite-area/faMeshDefinition diff --git a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/faSchemes b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/finite-area/faSchemes similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/faSchemes rename to tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/finite-area/faSchemes diff --git a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/faSolution b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/finite-area/faSolution similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/faSolution rename to tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/system/finite-area/faSolution diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/0.orig/Cs b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/0.orig/finite-area/Cs similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/0.orig/Cs rename to tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/0.orig/finite-area/Cs diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/faMeshDefinition rename to tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/finite-area/faMeshDefinition diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/faSchemes b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/finite-area/faSchemes similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/faSchemes rename to tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/finite-area/faSchemes diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/faSolution b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/finite-area/faSolution similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/faSolution rename to tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/finite-area/faSolution diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/Uf_film b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/finite-area/Uf_film similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/Uf_film rename to tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/finite-area/Uf_film diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/hf_film b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/finite-area/hf_film similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/hf_film rename to tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/finite-area/hf_film diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faMeshDefinition rename to tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/finite-area/faMeshDefinition diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSchemes b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/finite-area/faSchemes similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSchemes rename to tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/finite-area/faSchemes diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSolution b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/finite-area/faSolution similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSolution rename to tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/finite-area/faSolution diff --git a/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/0/Uf_film b/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/0/finite-area/Uf_film similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/0/Uf_film rename to tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/0/finite-area/Uf_film diff --git a/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/0/hf_film b/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/0/finite-area/hf_film similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/0/hf_film rename to tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/0/finite-area/hf_film diff --git a/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/faMeshDefinition rename to tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/finite-area/faMeshDefinition diff --git a/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/faSchemes b/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/finite-area/faSchemes similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/faSchemes rename to tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/finite-area/faSchemes diff --git a/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/faSolution b/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/finite-area/faSolution similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/faSolution rename to tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/system/finite-area/faSolution diff --git a/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/faMeshDefinition rename to tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/finite-area/faMeshDefinition diff --git a/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/faSchemes b/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/finite-area/faSchemes similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/faSchemes rename to tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/finite-area/faSchemes diff --git a/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/faSolution b/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/finite-area/faSolution similarity index 100% rename from tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/faSolution rename to tutorials/incompressible/pimpleFoam/laminar/sloshing2D/system/finite-area/faSolution diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/faMeshDefinition b/tutorials/incompressible/simpleFoam/motorBike/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/system/faMeshDefinition rename to tutorials/incompressible/simpleFoam/motorBike/system/finite-area/faMeshDefinition diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/faSchemes b/tutorials/incompressible/simpleFoam/motorBike/system/finite-area/faSchemes similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/system/faSchemes rename to tutorials/incompressible/simpleFoam/motorBike/system/finite-area/faSchemes diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/faSolution b/tutorials/incompressible/simpleFoam/motorBike/system/finite-area/faSolution similarity index 100% rename from tutorials/incompressible/simpleFoam/motorBike/system/faSolution rename to tutorials/incompressible/simpleFoam/motorBike/system/finite-area/faSolution diff --git a/tutorials/lagrangian/kinematicParcelFoam/drippingChair/0/Uf_film b/tutorials/lagrangian/kinematicParcelFoam/drippingChair/0/finite-area/Uf_film similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/drippingChair/0/Uf_film rename to tutorials/lagrangian/kinematicParcelFoam/drippingChair/0/finite-area/Uf_film diff --git a/tutorials/lagrangian/kinematicParcelFoam/drippingChair/0/hf_film b/tutorials/lagrangian/kinematicParcelFoam/drippingChair/0/finite-area/hf_film similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/drippingChair/0/hf_film rename to tutorials/lagrangian/kinematicParcelFoam/drippingChair/0/finite-area/hf_film diff --git a/tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/faMeshDefinition b/tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/faMeshDefinition rename to tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/finite-area/faMeshDefinition diff --git a/tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/faSchemes b/tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/finite-area/faSchemes similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/faSchemes rename to tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/finite-area/faSchemes diff --git a/tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/faSolution b/tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/finite-area/faSolution similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/faSolution rename to tutorials/lagrangian/kinematicParcelFoam/drippingChair/system/finite-area/faSolution diff --git a/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/0/Uf_film b/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/0/finite-area/Uf_film similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/0/Uf_film rename to tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/0/finite-area/Uf_film diff --git a/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/0/hf_film b/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/0/finite-area/hf_film similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/0/hf_film rename to tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/0/finite-area/hf_film diff --git a/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/faMeshDefinition b/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/faMeshDefinition rename to tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/finite-area/faMeshDefinition diff --git a/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/faSchemes b/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/finite-area/faSchemes similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/faSchemes rename to tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/finite-area/faSchemes diff --git a/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/faSolution b/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/finite-area/faSolution similarity index 100% rename from tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/faSolution rename to tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/system/finite-area/faSolution diff --git a/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/0/Uf_film b/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/0/finite-area/Uf_film similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/0/Uf_film rename to tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/0/finite-area/Uf_film diff --git a/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/0/hf_film b/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/0/finite-area/hf_film similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/0/hf_film rename to tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/0/finite-area/hf_film diff --git a/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/faMeshDefinition b/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/faMeshDefinition rename to tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/finite-area/faMeshDefinition diff --git a/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/faSchemes b/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/finite-area/faSchemes similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/faSchemes rename to tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/finite-area/faSchemes diff --git a/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/faSolution b/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/finite-area/faSolution similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/faSolution rename to tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/system/finite-area/faSolution diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/Tf_film b/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/finite-area/Tf_film similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/Tf_film rename to tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/finite-area/Tf_film diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/Uf_film b/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/finite-area/Uf_film similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/Uf_film rename to tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/finite-area/Uf_film diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/hf_film b/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/finite-area/hf_film similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/hf_film rename to tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/0.orig/finite-area/hf_film diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/faMeshDefinition b/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/finite-area/faMeshDefinition similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/faMeshDefinition rename to tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/finite-area/faMeshDefinition diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/faSchemes b/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/finite-area/faSchemes similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/faSchemes rename to tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/finite-area/faSchemes diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/faSolution b/tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/finite-area/faSolution similarity index 100% rename from tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/faSolution rename to tutorials/lagrangian/reactingParcelFoam/splashPanelFilm/system/finite-area/faSolution diff --git a/wmake/rules/General/general b/wmake/rules/General/general index eb0547fa53c6de9bd853614933630823462fc643..7d7ff8d3da4112d836d02883a224a7ef4c06924b 100644 --- a/wmake/rules/General/general +++ b/wmake/rules/General/general @@ -1,5 +1,5 @@ #-------------------------------*- makefile -*--------------------------------- -WM_VERSION = OPENFOAM=2401 +WM_VERSION = OPENFOAM=2402 AR = ar ARFLAGS = cr