diff --git a/META-INFO/.gitignore b/META-INFO/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..eddcd9578643248753009044feae8951cddddd1b --- /dev/null +++ b/META-INFO/.gitignore @@ -0,0 +1,5 @@ +# Do not track build information +build-info + +# Do not track time-stamp +time-stamp diff --git a/META-INFO/README.md b/META-INFO/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3ac2880aa310a394da57faf408cca5f50406a102 --- /dev/null +++ b/META-INFO/README.md @@ -0,0 +1,84 @@ +# META-INFO + +Meta-information is for OpenFOAM internal use only. + +Do not rely on any files or any file contents in this directory, +or even the existence of this directory. + +The format, content and meaning may be changed at anytime without +notice. + +The information is provided here for internal documentation purposes. + +## api-info + +This file and its contents are to be tracked by git. + +- File content (api) generated by wmakeBuildInfo from OPENFOAM define + in `wmake/rules/General/general` + +- File content (patch) is manually generated content. + + +## build-info + +This file is *never* to be tracked by git, but may be present in shipped +source archives. + +- File content (branch, build) generated by wmakeBuildInfo from git + information and cached from previous wmake (api) + + +## Content types + +### api + +- 4-digit year-month (YYMM) integer corresponding to the major + release or in unusual cases an intermediate release. + +- Format is year-month, as per `date +%y%m`. + Eg, `1712` for the Dec-2017 release. + + +### patch + +- 6-digit year-month-day (YYMMDD) integer corresponding to a patch-level + for the given **released** API. + Development branches have a patch value of `0`. + +- Format is year-month-day, as per `date +%y%m%d`. + +- The first release is by definition unpatched, and thus carries + a patch value of `0`. If this release were to be patched the following + day, the patch level would jump accordingly. + +The patch value is only meaningful together with the api value. + + +## Flow of information + +Changes in the build information must be reflected in information +available in the final binaries. Conversely, it is necessary for later +distributions to have a record of the same information. + +| property | source | saved | +|-----------|---------------------------|------------| +| api | wmake/rules | api-info | +| patch | manual (api-info) | build-info | +| branch | git | build-info | +| build | git | build-info | + + +The command `wmakeBuildInfo -check` is used to determine if +the saved information needs synchronization. The command +`wmakeBuildInfo -update` preforms the synchronitzation. + + +## Notes + +The saved information is split into two separate files. The `api-info` +contains more permanent information, whereas the `build-info` is more +transient in nature. + +---- +2018-11-29 diff --git a/META-INFO/api-info b/META-INFO/api-info new file mode 100644 index 0000000000000000000000000000000000000000..dc411fce20c7b5dd46662152a593060176b32d63 --- /dev/null +++ b/META-INFO/api-info @@ -0,0 +1,2 @@ +api=1811 +patch=0 diff --git a/applications/test/decomposePar/Test-decomposePar.C b/applications/test/decomposePar/Test-decomposePar.C index 26673bf6b1729bea026799b0267ab16dfc2ac0b3..4747c4e9ca153b8de1512136e47619c5b321c75f 100644 --- a/applications/test/decomposePar/Test-decomposePar.C +++ b/applications/test/decomposePar/Test-decomposePar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,32 +22,13 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Application - decomposePar + Test-decomposePar Group grpParallelUtilities Description - Automatically decomposes a mesh and fields of a case for parallel - execution of OpenFOAM. - -Usage - \b decomposePar [OPTION] - - Options: - - \par -region \<regionName\> - Decompose named region. Does not check for existence of processor*. - - - \par -allRegions - Decompose all regions in regionProperties. Does not check for - existence of processor*. - - - \par -constant - - - \par -time xxx:yyy - Override controlDict settings and decompose selected times. Does not - re-decompose the mesh i.e. does not handle moving mesh or changing - mesh cases. + Like decomposePar -dry-run, but with additional options \*---------------------------------------------------------------------------*/ @@ -65,7 +46,10 @@ int main(int argc, char *argv[]) { argList::addNote ( - "decompose a mesh and fields of a case for parallel execution" + "Special-purpose version of decomposePar with additional" + " -domain and -method options." + " The '-dry-run' and '-cellDist' are implicit.\n" + "NB: The -domain/-method overrides may not work very well with regions" ); argList::noParallel(); @@ -79,33 +63,38 @@ int main(int argc, char *argv[]) argList::addBoolOption ( "allRegions", - "operate on all regions in regionProperties" + "Operate on all regions in regionProperties" ); argList::addBoolOption ( "verbose", - "more information about decomposition" + "Additional verbosity" ); argList::addOption ( "domains", "N", - "override numberOfSubdomains" + "Override numberOfSubdomains" ); argList::addOption ( "method", "name", - "override method" + "Override decomposition method" ); + + // These are implicit so just ignore them + argList::ignoreOptionCompat({"dry-run", 0}, false); + argList::ignoreOptionCompat({"cellDist", 0}, false); + // Include explicit constant options, have zero from time range timeSelector::addOptions(true, false); #include "setRootCase.H" - const bool region = args.found("region"); + const bool optRegion = args.found("region"); const bool allRegions = args.found("allRegions"); const bool verbose = args.found("verbose"); diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index c9fee2364d274fad9ee02ecfa3aabec38ea73889..7ec94c7e6f7a2c15a88fe1a2d5dfddf80fca306b 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -964,6 +964,13 @@ Foam::label Foam::checkGeometry : patchWriter() ); + // Currently only do AMI checks + + const fileName outputDir + ( + mesh.time().globalPath()/functionObject::outputPrefix/"checkMesh" + ); + forAll(pbm, patchi) { if (isA<cyclicAMIPolyPatch>(pbm[patchi])) @@ -1021,8 +1028,11 @@ Foam::label Foam::checkGeometry { wr.write ( - functionObject::outputPrefix, - "src_" + tmName, + outputDir, + ( + "patch" + Foam::name(cpp.index()) + + "-src_" + tmName + ), meshedSurfRef ( mergedPoints, @@ -1054,8 +1064,11 @@ Foam::label Foam::checkGeometry { wr.write ( - functionObject::outputPrefix, - "src_" + tmName, + outputDir, + ( + "patch" + Foam::name(cpp.index()) + + "-src_" + tmName + ), meshedSurfRef ( mergedPoints, @@ -1109,8 +1122,11 @@ Foam::label Foam::checkGeometry { wr.write ( - functionObject::outputPrefix, - "tgt_" + tmName, + outputDir, + ( + "patch" + Foam::name(cpp.index()) + + "-tgt_" + tmName + ), meshedSurfRef ( mergedPoints, @@ -1142,8 +1158,11 @@ Foam::label Foam::checkGeometry { wr.write ( - functionObject::outputPrefix, - "tgt_" + tmName, + outputDir, + ( + "patch" + Foam::name(cpp.index()) + + "-tgt_" + tmName + ), meshedSurfRef ( mergedPoints, diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C index 76e4fc5b18cdcfa602cdd962d64f16634284445b..29d24377673ac670b3892095319e61589d21dd7a 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C @@ -284,8 +284,7 @@ void Foam::mergeAndWrite fileName outputDir ( - set.time().path() - / (Pstream::parRun() ? ".." : "") + set.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance() / set.name() @@ -378,8 +377,7 @@ void Foam::mergeAndWrite fileName outputDir ( - set.time().path() - / (Pstream::parRun() ? ".." : "") + set.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance() / set.name() @@ -478,8 +476,7 @@ void Foam::mergeAndWrite // postProcessing/<time>/p0.vtk fileName outputDir ( - set.time().path() - / (Pstream::parRun() ? ".." : "") + set.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance() // set.name() diff --git a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C index 531721b32def97d1c76011110db9082cafa9c3bf..a56d685d0f3a1ce6d284fdb425655d72ec9cb172 100644 --- a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C +++ b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C @@ -116,6 +116,11 @@ void writeWeights void writeWeights(const polyMesh& mesh) { + const fileName outputDir + ( + mesh.time().globalPath()/functionObject::outputPrefix/"checkAMI" + ); + for (const polyPatch& pp : mesh.boundaryMesh()) { if (isA<cyclicAMIPolyPatch>(pp)) @@ -137,8 +142,8 @@ void writeWeights(const polyMesh& mesh) mesh, ami.tgtWeightsSum(), cpp.neighbPatch(), - functionObject::outputPrefix, - "tgt", + outputDir, + "patch" + Foam::name(pp.index()) + "-tgt", mesh.time() ); writeWeights @@ -146,8 +151,8 @@ void writeWeights(const polyMesh& mesh) mesh, ami.srcWeightsSum(), cpp, - functionObject::outputPrefix, - "src", + outputDir, + "patch" + Foam::name(pp.index()) + "-src", mesh.time() ); } @@ -170,7 +175,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createNamedDynamicFvMesh.H" - const bool checkAMI = args.found("checkAMI"); + const bool checkAMI = args.found("checkAMI"); if (checkAMI) { diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists-Project.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists-Project.txt index 9b8673260d47913d75aadc0b27394dbdfa9c7d28..119caee55ca3b97049b7f1b680231377bd48e244 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists-Project.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists-Project.txt @@ -6,6 +6,7 @@ link_directories( ) include_directories( + ${LIB_SRC}/OpenFOAM/include ${LIB_SRC}/OpenFOAM/lnInclude ${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude ${LIB_SRC}/fileFormats/lnInclude diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists-Project.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists-Project.txt index 1b35d22bbe459641e4aa1ae97a6e7fefc20abfdf..f75b0db94bc82a5e1b6822223d5d6f1db21a733e 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists-Project.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists-Project.txt @@ -6,6 +6,7 @@ link_directories( ) include_directories( + ${LIB_SRC}/OpenFOAM/include ${LIB_SRC}/OpenFOAM/lnInclude ${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude ${LIB_SRC}/meshing/blockMesh/lnInclude diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamFieldTemplates.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamFieldTemplates.C index 40802fdb7ce86c705a6bc302f98a29779acb7038..6cb7a81cde77fe360d6e787af557cfd7c4079cdb 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamFieldTemplates.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamFieldTemplates.C @@ -40,11 +40,11 @@ InClass #include "areaFaMesh.H" #include "areaFields.H" -// vtk includes -#include "vtkFloatArray.h" -#include "vtkCellData.h" -#include "vtkPointData.h" -#include "vtkSmartPointer.h" +// VTK includes +#include <vtkFloatArray.h> +#include <vtkCellData.h> +#include <vtkPointData.h> +#include <vtkSmartPointer.h> // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // @@ -68,10 +68,8 @@ void Foam::vtkPVFoam::convertVolField autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr; if (interpField) { - if (debug) - { - Info<< "convertVolField interpolating:" << fld.name() << nl; - } + DebugInfo + << "convertVolField interpolating:" << fld.name() << nl; ptfPtr.reset ( @@ -102,7 +100,7 @@ void Foam::vtkPVFoam::convertVolField foamVtpData& vtpData = iter.object(); auto dataset = vtpData.dataset; - const labelList& patchIds = vtpData.additionalIds(); + const labelUList& patchIds = vtpData.additionalIds(); if (patchIds.empty()) { @@ -291,13 +289,13 @@ void Foam::vtkPVFoam::convertVolFields catch (Foam::IOerror& ioErr) { ioErr.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } catch (Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } // Restore previous exception throwing state @@ -373,13 +371,13 @@ void Foam::vtkPVFoam::convertDimFields catch (Foam::IOerror& ioErr) { ioErr.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } catch (Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } // Restore previous exception throwing state @@ -501,13 +499,13 @@ void Foam::vtkPVFoam::convertAreaFields catch (Foam::IOerror& ioErr) { ioErr.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } catch (Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } // Restore previous exception throwing state @@ -545,10 +543,8 @@ void Foam::vtkPVFoam::convertPointFields continue; } - if (debug) - { - Info<< "convertPointFields : " << fieldName << nl; - } + DebugInfo + << "convertPointFields : " << fieldName << nl; // Throw FatalError, FatalIOError as exceptions const bool throwingError = FatalError.throwExceptions(); @@ -581,7 +577,7 @@ void Foam::vtkPVFoam::convertPointFields foamVtpData& vtpData = iter.object(); auto dataset = vtpData.dataset; - const labelList& patchIds = vtpData.additionalIds(); + const labelUList& patchIds = vtpData.additionalIds(); if (patchIds.size() != 1) { continue; @@ -645,13 +641,13 @@ void Foam::vtkPVFoam::convertPointFields catch (Foam::IOerror& ioErr) { ioErr.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } catch (Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } // Restore previous exception throwing state @@ -706,7 +702,6 @@ vtkSmartPointer<vtkFloatArray> Foam::vtkPVFoam::convertPointField const foamVtuData& vtuData ) { - const int nComp(pTraits<Type>::nComponents); const labelUList& addPointCellLabels = vtuData.additionalIds(); const labelUList& pointMap = vtuData.pointMap(); @@ -714,7 +709,7 @@ vtkSmartPointer<vtkFloatArray> Foam::vtkPVFoam::convertPointField const label nPoints = (pointMap.size() ? pointMap.size() : pfld.size()); auto data = vtkSmartPointer<vtkFloatArray>::New(); - data->SetNumberOfComponents(nComp); + data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents)); data->SetNumberOfTuples(nPoints + addPointCellLabels.size()); // Note: using the name of the original volField @@ -729,75 +724,54 @@ vtkSmartPointer<vtkFloatArray> Foam::vtkPVFoam::convertPointField data->SetName(pfld.name().c_str()); } - if (debug) - { - Info<< "convert Point field: " - << pfld.name() - << " size=" << (nPoints + addPointCellLabels.size()) - << " (" << nPoints << " + " << addPointCellLabels.size() - << ") nComp=" << nComp << nl; - } + DebugInfo + << "Convert point field: " << pfld.name() + << " size=" << (nPoints + addPointCellLabels.size()) + << " (" << nPoints << " + " << addPointCellLabels.size() + << ") nComp=" << static_cast<int>(pTraits<Type>::nComponents) << nl; + - float vec[nComp]; + float scratch[pTraits<Type>::nComponents]; - label pointi = 0; + vtkIdType pointi = 0; if (pointMap.size()) { - forAll(pointMap, i) + for (const label meshPointi : pointMap) { - const Type& t = pfld[pointMap[i]]; - for (direction d=0; d<nComp; ++d) - { - vec[d] = component(t, d); - } - remapTuple<Type>(vec); - - data->SetTuple(pointi++, vec); + vtk::Tools::foamToVtkTuple(scratch, pfld[meshPointi]); + data->SetTuple(pointi++, scratch); } } else { - forAll(pfld, i) + for (const Type& val : pfld) { - const Type& t = pfld[i]; - for (direction d=0; d<nComp; ++d) - { - vec[d] = component(t, d); - } - remapTuple<Type>(vec); - - data->SetTuple(pointi++, vec); + vtk::Tools::foamToVtkTuple(scratch, val); + data->SetTuple(pointi++, scratch); } } // Continue with additional points + // - correspond to cell centres if (notNull(vfld)) { - forAll(addPointCellLabels, apI) + for (const label meshCelli : addPointCellLabels) { - const Type& t = vfld[addPointCellLabels[apI]]; - for (direction d=0; d<nComp; ++d) - { - vec[d] = component(t, d); - } - remapTuple<Type>(vec); - - data->SetTuple(pointi++, vec); + vtk::Tools::foamToVtkTuple(scratch, vfld[meshCelli]); + data->SetTuple(pointi++, scratch); } } else { - forAll(addPointCellLabels, apI) + for (const label meshCelli : addPointCellLabels) { - Type t = interpolatePointToCell(pfld, addPointCellLabels[apI]); - for (direction d=0; d<nComp; ++d) - { - vec[d] = component(t, d); - } - remapTuple<Type>(vec); - - data->SetTuple(pointi++, vec); + vtk::Tools::foamToVtkTuple + ( + scratch, + interpolatePointToCell(pfld, meshCelli) + ); + data->SetTuple(pointi++, scratch); } } @@ -846,13 +820,13 @@ void Foam::vtkPVFoam::convertLagrangianFields catch (Foam::IOerror& ioErr) { ioErr.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } catch (Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); - Info << nl << endl; + Info<< nl << endl; } // Restore previous exception throwing state @@ -876,53 +850,44 @@ Foam::vtkPVFoam::convertFaceFieldToVTK const labelUList& faceLabels ) const { - if (debug) - { - Info<< "convert face field: " - << fld.name() - << " size=" << faceLabels.size() - << " nComp=" << int(pTraits<Type>::nComponents) << nl; - } + DebugInfo + << "Convert face field: " << fld.name() + << " size=" << faceLabels.size() + << " nComp=" << static_cast<int>(pTraits<Type>::nComponents) << nl; const fvMesh& mesh = fld.mesh(); - const int nComp(pTraits<Type>::nComponents); const label nInternalFaces = mesh.nInternalFaces(); - const labelList& faceOwner = mesh.faceOwner(); - const labelList& faceNeigh = mesh.faceNeighbour(); + const labelUList& faceOwner = mesh.faceOwner(); + const labelUList& faceNeigh = mesh.faceNeighbour(); auto data = vtkSmartPointer<vtkFloatArray>::New(); data->SetName(fld.name().c_str()); - data->SetNumberOfComponents(nComp); + data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents)); data->SetNumberOfTuples(faceLabels.size()); - float scratch[nComp]; - // Interior faces: average owner/neighbour // Boundary faces: the owner value - forAll(faceLabels, idx) + + float scratch[pTraits<Type>::nComponents]; + + vtkIdType faceId = 0; + for (const label meshFacei : faceLabels) { - const label faceNo = faceLabels[idx]; - if (faceNo < nInternalFaces) + if (meshFacei < nInternalFaces) { - Type t = 0.5*(fld[faceOwner[faceNo]] + fld[faceNeigh[faceNo]]); + Type val = + 0.5*(fld[faceOwner[meshFacei]] + fld[faceNeigh[meshFacei]]); - for (direction d=0; d<nComp; ++d) - { - scratch[d] = component(t, d); - } + vtk::Tools::foamToVtkTuple(scratch, val); } else { - const Type& t = fld[faceOwner[faceNo]]; - for (direction d=0; d<nComp; ++d) - { - scratch[d] = component(t, d); - } + const Type& val = fld[faceOwner[meshFacei]]; + vtk::Tools::foamToVtkTuple(scratch, val); } - remapTuple<Type>(scratch); - data->SetTuple(idx, scratch); + data->SetTuple(faceId++, scratch); } return data; @@ -937,35 +902,26 @@ Foam::vtkPVFoam::convertVolFieldToVTK const foamVtuData& vtuData ) const { - const int nComp(pTraits<Type>::nComponents); const labelUList& cellMap = vtuData.cellMap(); auto data = vtkSmartPointer<vtkFloatArray>::New(); data->SetName(fld.name().c_str()); - data->SetNumberOfComponents(nComp); + data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents)); data->SetNumberOfTuples(cellMap.size()); - if (debug) - { - Info<< "convert volField: " - << fld.name() - << " size=" << cellMap.size() - << " (" << fld.size() << " + " - << (cellMap.size() - fld.size()) - << ") nComp=" << nComp << nl; - } + DebugInfo + << "Convert volField: " << fld.name() << " size=" + << cellMap.size() << " (field " + << fld.size() << ") nComp=" + << static_cast<int>(pTraits<Type>::nComponents) << nl; - float scratch[nComp]; - forAll(cellMap, idx) - { - const Type& t = fld[cellMap[idx]]; - for (direction d=0; d<nComp; ++d) - { - scratch[d] = component(t, d); - } - remapTuple<Type>(scratch); + float scratch[pTraits<Type>::nComponents]; - data->SetTuple(idx, scratch); + vtkIdType celli = 0; + for (const label meshCelli : cellMap) + { + vtk::Tools::foamToVtkTuple(scratch, fld[meshCelli]); + data->SetTuple(celli++, scratch); } return data; diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMesh.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMesh.C index 7a29072240d3446618c49a124988cf609cbd9156..eeb3bfab1ec7474ae1840992834e18373b4efa25 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMesh.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMesh.C @@ -172,7 +172,7 @@ void Foam::vtkPVFoam::convertMeshPatches() { // Point movement on single patch is OK - const labelList& patchIds = vtpData.additionalIds(); + const labelUList& patchIds = vtpData.additionalIds(); if (patchIds.size() == 1) { vtkgeom = vtpData.getCopy(); diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C index 7ef9e570ffbff1df50145d0d556666c4d37b1a8c..28d304f51c40694dcd07ab4107327b050e337244 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C @@ -49,23 +49,21 @@ vtkSmartPointer<vtkPoints> Foam::vtkPVFoam::foamVtuData::points const pointField& pts = mesh.points(); // Additional cell centres - const labelList& addPoints = this->additionalIds(); + const labelUList& addPoints = this->additionalIds(); vtkpoints->SetNumberOfPoints(pts.size() + addPoints.size()); // Normal points - label pointId = 0; + vtkIdType pointId = 0; for (const point& p : pts) { - vtkpoints->SetPoint(pointId, p.v_); - ++pointId; + vtkpoints->SetPoint(pointId++, p.v_); } // Cell centres - for (const label ptId : addPoints) + for (const label meshCelli : addPoints) { - vtkpoints->SetPoint(pointId, mesh.C()[ptId].v_); - ++pointId; + vtkpoints->SetPoint(pointId++, mesh.cellCentres()[meshCelli].v_); } return vtkpoints; @@ -85,23 +83,21 @@ vtkSmartPointer<vtkPoints> Foam::vtkPVFoam::foamVtuData::points const pointField& pts = mesh.points(); // Additional cell centres - const labelList& addPoints = this->additionalIds(); + const labelUList& addPoints = this->additionalIds(); vtkpoints->SetNumberOfPoints(pointMap.size() + addPoints.size()); // Normal points - label pointId = 0; - for (const label ptId : pointMap) + vtkIdType pointId = 0; + for (const label meshPointi : pointMap) { - vtkpoints->SetPoint(pointId, pts[ptId].v_); - ++pointId; + vtkpoints->SetPoint(pointId++, pts[meshPointi].v_); } // Cell centres - for (const label ptId : addPoints) + for (const label meshCelli : addPoints) { - vtkpoints->SetPoint(pointId, mesh.C()[ptId].v_); - ++pointId; + vtkpoints->SetPoint(pointId++, mesh.cellCentres()[meshCelli].v_); } return vtkpoints; diff --git a/bin/foamEtcFile b/bin/foamEtcFile index 1239d83e7ea24a66047749dd6c591ac6ead973f2..e45a7fd86df0a04dd2e963e3d5fe609299759f0e 100755 --- a/bin/foamEtcFile +++ b/bin/foamEtcFile @@ -24,21 +24,20 @@ # \endcode # # The -mode option can also be used when chaining settings. -# For example, in the user ~/.OpenFOAM/<VERSION>/config.sh/compiler +# For example, in the user ~/.OpenFOAM/config.sh/compiler # \code # eval $(foamEtcFile -sh -mode=go config.sh/compiler) # \endcode # # Environment -# - WM_PROJECT (unset defaults to OpenFOAM) -# - WM_PROJECT_VERSION (unset defaults to detect from path) -# - WM_PROJECT_SITE (unset defaults to PREFIX/site) +# - WM_PROJECT_SITE (unset defaults to PROJECT/site) # # Note -# This script must exist in one of these locations: -# - PREFIX/OpenFOAM-<VERSION>/bin -# - PREFIX/openfoam-<VERSION>/bin -# - PREFIX/openfoam<VERSION>/bin +# This script must exist in the project 'bin' directory +# +# The '-show-api' and '-show-patch' options implement partial logic +# from wmake/wmakeBuildInfo. +# Make sure that any changes there are also reflected here. # #------------------------------------------------------------------------------- printHelp() { @@ -52,8 +51,6 @@ options: -list (-l) List directories or files to be checked -list-test List (existing) directories or files to be checked -mode=MODE Any combination of u(user), g(group), o(other) - -prefix=DIR Specify an alternative installation prefix - -version=VER Specify alternative OpenFOAM version (eg, 1712, 1806, ...) -csh Produce 'source FILE' output for a csh eval -sh Produce '. FILE' output for a sh eval -csh-verbose As per -csh, with additional verbosity @@ -61,6 +58,9 @@ options: -config Add config directory prefix for shell type: with -csh* for a config.csh/ prefix with -sh* for a config.sh/ prefix + -show-api Print api value from wmake/rules, or meta-info and exit + -show-patch Print patch value from meta-info and exit + -with-api=NUM Specify alternative api value to search with -quiet (-q) Suppress all normal output -silent (-s) Suppress stderr, except -csh-verbose, -sh-verbose output -help Print the usage @@ -70,8 +70,8 @@ Locate user/group/other file as per '#includeEtc' Do not group single character options. Equivalent options: | -mode=MODE | -mode MODE | -m MODE - | -prefix=DIR | -prefix DIR | -p DIR - | -version=VER | -version VER | -v VER + | -prefix=DIR | -prefix DIR | -p DIR [obsolete 1812] + | -version=VER | -version VER | -v VER [obsolete 1812] Exit status 0 when the file is found. Print resolved path to stdout. @@ -98,80 +98,71 @@ die() } #------------------------------------------------------------------------------- -binDir="${0%/*}" # The bin dir -projectDir="${binDir%/bin}" # The project dir -prefixDir="${projectDir%/*}" # The prefix dir (same as $WM_PROJECT_INST_DIR) +binDir="${0%/*}" # The bin dir +projectDir="$(\cd $(dirname $binDir) && \pwd -L)" # Project dir -# Could not resolve projectDir, prefixDir? (eg, called as ./bin/foamEtcFile) -if [ "$prefixDir" = "$projectDir" ] -then - binDir="$(cd $binDir && pwd -L)" - projectDir="${binDir%/bin}" - prefixDir="${projectDir%/*}" -fi -projectDirName="${projectDir##*/}" # The project directory name - -projectVersion="$WM_PROJECT_VERSION" # Empty? - will be treated later -userDir="$HOME/.OpenFOAM" # Hard-coded as per foamVersion.H +userDir="$HOME/.OpenFOAM" # As per foamVersion.H +groupDir="${WM_PROJECT_SITE:-$projectDir/site}" # As per foamVersion.H #------------------------------------------------------------------------------- -# Guess project version or simply get the stem part of the projectDirName. -# Handle standard naming conventions: +# The API locations. See wmake/wmakeBuildInfo +rulesFile="$projectDir/wmake/rules/General/general" +metaInfoDir="$projectDir/META-INFO" + +# Get api from rules/General/general # -# * OpenFOAM-<version>[-extra...] -# * openfoam-<version>[-extra...] -# * openfoam<digits> +# Failure modes: +# - No api information (can't find file etc). +# -> Fatal for building, but could be OK for a stripped down version # -# - projectVersion: update unless already set +# Fallback. Get from api-info # -# Helper variables: -# - dirBase (for reassembling name) == projectDirName without the version -unset dirBase -guessVersion() +getApi() { - local version - - case "$projectDirName" in - (OpenFOAM-* | openfoam-*) - # Dashed naming: OpenFOAM-<VERSION> or openfoam-<VERSION> - dirBase="${projectDirName%%-*}-" - version="${projectDirName#*-}" - version="${version%%*-}" # Extra safety, eg openfoam-version-packager - ;; - - (openfoam[0-9]*) - # Debian-style naming: openfoam<VERSION> - dirBase="openfoam" - version="${projectDirName#openfoam}" - ;; + local value - (*) - die "unknown/unsupported naming convention for '$projectDirName'" - ;; - esac + value="$(sed -ne '/^ *#/!{ /WM_VERSION.*OPENFOAM=/{ s@^.*OPENFOAM= *\([0-9][0-9]*\).*@\1@p; q }}' $rulesFile 2>/dev/null)" + if [ -z "$value" ] && [ -f "$metaInfoDir/api-info" ] + then + # Fallback. Get from api-info + value="$(sed -ne 's@^ *api *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)" + fi - # Set projectVersion if required - : ${projectVersion:=$version} + if [ -n "$value" ] + then + echo "$value" + else + return 1 + fi } -# Set projectVersion and update versionNum, projectDirName accordingly -setVersion() +# Get patch from meta-info / api-info +# +# Failure modes: +# - No patch information (can't find file etc). +# +getPatchLevel() { - projectVersion="$1" + local value - # Need dirBase when reassembling projectDirName - [ -n "$dirBase" ] || guessVersion + # Fallback. Get from api-info + value="$(sed -ne 's@^ *patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)" - projectDirName="$dirBase$projectVersion" + if [ -n "$value" ] + then + echo "$value" + else + return 1 + fi } #------------------------------------------------------------------------------- optMode=ugo # Default mode is always 'ugo' unset shellOutput verboseOutput -unset optAll optConfig optList optVersion +unset optAll optConfig optList projectApi # Parse options while [ "$#" -gt 0 ] @@ -180,6 +171,19 @@ do -h | -help*) printHelp ;; + -show-api) + # Show API and exit + getApi + exit $? + ;; + -show-patch) + # Show patch level and exit + getPatchLevel + exit $? + ;; + -with-api=*) + projectApi="${1#*=}" + ;; -a | -all) optAll=true unset shellOutput verboseOutput @@ -204,13 +208,6 @@ do -mode=[ugo]*) optMode="${1#*=}" ;; - -prefix=/*) - prefixDir="${1#*=}" - prefixDir="${prefixDir%/}" - ;; - -version=*) - optVersion="${1#*=}" - ;; -m | -mode) optMode="$2" shift @@ -223,22 +220,23 @@ do ;; esac ;; - -p | -prefix) - [ "$#" -ge 2 ] || die "'$1' option requires an argument" - prefixDir="${2%/}" - shift - ;; -q | -quiet) optQuiet=true ;; -s | -silent) optSilent=true ;; - -v | -version) + + -prefix=* | -version=*) + echo "ignored defunct option '${1%%=*}'" 1>&2 + ;; + -p | -prefix | -v | -version) + # Ignored, but still need to check/discard its argument [ "$#" -ge 2 ] || die "'$1' option requires an argument" - optVersion="$2" + echo "ignored defunct option '$1'" 1>&2 shift ;; + --) shift break @@ -255,6 +253,10 @@ done #------------------------------------------------------------------------------- +# Establish the API value +[ -n "$projectApi" ] || projectApi=$(getApi) + + # Split arguments into filename (for searching) and trailing bits for shell eval # Silently remove leading ~OpenFOAM/ (as per Foam::findEtcFile) nArgs=$# @@ -279,25 +281,9 @@ then fi -# Get version information -if [ -n "$optVersion" ] -then - setVersion $optVersion -elif [ -z "$projectVersion" ] -then - guessVersion -fi - -# Updates: -# - projectDir for changes via -prefix or -version -# - groupDir for changes via -prefix -projectDir="$prefixDir/$projectDirName" -groupDir="${WM_PROJECT_SITE:-$prefixDir/site}" - - # Debugging: # echo "Installed locations:" 1>&2 -# for i in projectDir prefixDir projectDirName projectVersion +# for i in projectDir # do # eval echo "$i=\$$i" 1>&2 # done @@ -305,12 +291,12 @@ groupDir="${WM_PROJECT_SITE:-$prefixDir/site}" # Define the various places to be searched: unset dirList case "$optMode" in (*u*) # (U)ser - dirList="$dirList $userDir/$projectVersion $userDir" + dirList="$dirList $userDir/$projectApi $userDir" ;; esac case "$optMode" in (*g*) # (G)roup == site - dirList="$dirList $groupDir/$projectVersion/etc $groupDir/etc" + dirList="$dirList $groupDir/$projectApi/etc $groupDir/etc" ;; esac diff --git a/bin/foamExec b/bin/foamExec deleted file mode 100755 index 85b20547e14936f248f140bb21b33503f5b573bb..0000000000000000000000000000000000000000 --- a/bin/foamExec +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------ -# ========= | -# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox -# \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2018 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/>. -# -# Script -# foamExec -# -# Description -# Usage: foamExec [-version=foamVersion] <foamCommand> ... -# -# Runs the <foamVersion> version of executable <foamCommand> -# with the rest of the arguments. -# -# Can also be used for parallel runs. For example, -# \code -# mpirun -np <nProcs> \ -# foamExec -version=VERSION <foamCommand> ... -parallel -# \endcode -# -# Note -# This script must exist in $WM_PROJECT_INST_DIR/OpenFOAM-<VERSION>/bin -# or $WM_PROJECT_INST_DIR/openfoam<VERSION>/bin (debian) -# -# foamEtcFile located in the same directory as this script -# -# See also -# foamEtcFile -# -#------------------------------------------------------------------------------ -usage() { - exec 1>&2 - while [ "$#" -ge 1 ]; do echo "$1"; shift; done - cat<<USAGE - -Usage: ${0##*/} [OPTION] <application> ... - -options: - -mode=MODE Any combination of u(user), g(group), o(other) - -prefix=DIR Specify an alternative installation prefix - pass through to foamEtcFile - -version=VER Specify alternative OpenFOAM version (eg, 3.0, 1612, ...) - pass through to foamEtcFile - -help Print the usage - -Run a particular OpenFOAM version of <APPLICATION> - -USAGE - exit 1 -} - -#------------------------------------------------------------------------------- -binDir="${0%/*}" # The bin dir -projectDir="${binDir%/bin}" # The project dir -# prefixDir="${projectDir%/*}" # The prefix dir (same as $WM_PROJECT_INST_DIR) - -projectVersion="${WM_PROJECT_VERSION:-unknown}" - -unset etcOpts -# parse options -while [ "$#" -gt 0 ] -do - case "$1" in - -h | -help*) - usage - ;; - -mode=*) - etcOpts="$etcOpts $1" # pass-thru to foamEtcFile - ;; - -prefix=/*) - etcOpts="$etcOpts $1" # pass-thru to foamEtcFile - ;; - -version=*) - etcOpts="$etcOpts $1" # pass-thru to foamEtcFile - projectVersion="${1#*=}" # for reporting - ;; - -m | -mode) - [ "$#" -ge 2 ] || usage "'$1' option requires an argument" - etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile - shift - ;; - -p | -prefix) - [ "$#" -ge 2 ] || usage "'$1' option requires an argument" - etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile - shift - ;; - -v | -version) - [ "$#" -ge 2 ] || usage "'$1' option requires an argument" - etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile - projectVersion="$2" # for reporting - shift - ;; - --) - shift - break - ;; - -*) - usage "invalid option '$1'" - ;; - *) - break - ;; - esac - shift -done - - -# Find and source the OpenFOAM <etc/bashrc> -# placed in function to preserve command-line arguments -sourceBashrc() -{ - rcFile="$($binDir/foamEtcFile $etcOpts bashrc)" || { - echo "Error: bashrc file could not be found for OpenFOAM-$projectVersion" 1>&2 - exit 2 - } - - . $rcFile $FOAM_SETTINGS -} - - -[ "$#" -ge 1 ] || usage "no application specified" - -sourceBashrc -exec "$@" - -#------------------------------------------------------------------------------ diff --git a/bin/foamInstallationTest b/bin/foamInstallationTest index 286bd3292c5e6f2dbf00a6860d0138e94acdac5e..0aa8a5edc1c4ca6705cd1437afa985dc066c0ff1 100755 --- a/bin/foamInstallationTest +++ b/bin/foamInstallationTest @@ -297,9 +297,7 @@ reportExecutable() checkOpenFOAMEnvironment() { - [ -d "$WM_PROJECT_INST_DIR" ] && \ - [ -d "$WM_PROJECT_DIR" ] && \ - [ -d "$WM_THIRD_PARTY_DIR" ] || { + [ -d "$WM_PROJECT_DIR" ] && [ -d "$WM_THIRD_PARTY_DIR" ] || { echo "" echo "FATAL ERROR: OpenFOAM environment not configured." echo "" @@ -389,7 +387,6 @@ COL5="Crit" hline echo "$COL1 $COL2 $COL3 $COL5" hline -reportEnv '$WM_PROJECT_INST_DIR' noPath yes reportEnv '$WM_PROJECT_USER_DIR' noPath no reportEnv '$WM_THIRD_PARTY_DIR' noPath yes hline @@ -415,11 +412,12 @@ hline reportEnv '$FOAM_LIBBIN' '$LD_LIBRARY_PATH' yes reportEnv '$FOAM_SITE_LIBBIN' '$LD_LIBRARY_PATH' no reportEnv '$FOAM_USER_LIBBIN' '$LD_LIBRARY_PATH' no +reportEnv '$FOAM_EXT_LIBBIN' '$LD_LIBRARY_PATH' maybe reportEnv '$MPI_ARCH_PATH' '$LD_LIBRARY_PATH' yes hline #------------------------------------------------------------------------------ -heading "Third-party software" +heading "Software Components" hline echo "$(fixlen Software 9) $(fixlen Version 10) $(fixlen Location 10)" hline diff --git a/bin/foamLog b/bin/foamLog index b3beddcbb059cb4dd81e5cf9a98480a7292962d3..260383230944da60f51bfd66ea21df954548009a 100755 --- a/bin/foamLog +++ b/bin/foamLog @@ -28,11 +28,16 @@ # Description # Extract data for each time-step from a log file for graphing. # +# Environment +# WM_PROJECT_API +# WM_PROJECT_DIR +# WM_PROJECT_SITE +# #------------------------------------------------------------------------------ -Script=${0##*/} -toolsDir=${0%/*}/tools -siteDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-<unknown>}/site}" -userDir=$HOME/.OpenFOAM +Script="${0##*/}" +toolsDir="${0%/*}/tools" +groupDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-<unknown>}/site}" +userDir="$HOME/.OpenFOAM" usage() { exec 1>&2 @@ -85,11 +90,11 @@ cat <<HELP The database ($Script.db) will taken from these locations: . - $userDir/$WM_PROJECT_VERSION - $userDir - $siteDir/$WM_PROJECT_VERSION - $siteDir - $WM_PROJECT_DIR/etc + $userDir/$WM_PROJECT_API/ + $userDir/ + $groupDir/$WM_PROJECT_API/etc/ + $groupDir/etc/ + $WM_PROJECT_DIR/etc/ $toolsDir option -quiet : suppresses the default information and only prints the diff --git a/bin/foamNewCase b/bin/foamNewCase index 902b082ca1db63b1a044cc05d7719c9a4a2b5585..9565606a1b429c959c0e06e936fd231f1075aca2 100755 --- a/bin/foamNewCase +++ b/bin/foamNewCase @@ -4,7 +4,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation -# \\/ M anipulation | +# \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. #------------------------------------------------------------------------------- # License # This file is part of OpenFOAM. @@ -29,10 +29,15 @@ # Create a new case from a template for particular applications # - requires rsync # +# Environment +# WM_PROJECT_API +# WM_PROJECT_DIR +# WM_PROJECT_SITE +# #------------------------------------------------------------------------------ -siteDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-<unknown>}/site}" +groupDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-<unknown>}/site}" userDir="$HOME/.OpenFOAM" -version="${WM_PROJECT_VERSION:-unknown}" +projectApi="${WM_PROJECT_API:-unknown}" templateDir="appTemplates" @@ -44,20 +49,22 @@ usage() { Usage: ${0##*/} [OPTION] options: - -app <name> specify the application to use - -case <dir> specify alternative case directory, default is the cwd + -app NAME specify the application to use + -case DIR specify alternative case directory, default is the cwd -list list the applications available - -version <ver> specify an alternative version (default: '$WM_PROJECT_VERSION') + -with-api=NUM specify alternative api to use (default: \$WM_PROJECT_API) + -version VER [obsolete] + -help Print the usage clone initial application settings to the specified case from - $userDir/$templateDir/{$version,}/<APP> - $siteDir/$templateDir/{$version,}/<APP> + $userDir/$templateDir/{$projectApi,}/APP + $groupDir/$templateDir/{$projectApi,}/APP USAGE exit 1 } #------------------------------------------------------------------------------ -unset appName caseName listOpt +unset appName caseName optList # parse options while [ "$#" -gt 0 ] @@ -69,21 +76,23 @@ do -app) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" appName="$2" - shift 2 + shift ;; -case) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" caseName="$2" - shift 2 + shift ;; -l | -list) - listOpt=true - shift + optList=true ;; -v | -ver | -version) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" - version="$2" - shift 2 + echo "ignored defunct option -version" 1>&2 + shift + ;; + -with-api=*) + projectApi="${1#*=}" ;; -*) usage "unknown option: '$*'" @@ -92,19 +101,16 @@ do usage "unexpected argument: '$*'" ;; esac + shift done # need rsync, except for when listing -type rsync >/dev/null 2>&1 || [ "$listOpt" = true ] || usage "Error: 'rsync' seems to be missing" +command -v rsync >/dev/null 2>&1 || \ + [ "$optList" = true ] || usage "Error: 'rsync' seems to be missing" #------------------------------------------------------------------------------ -[ -n "$version" ] || { - echo "Error: no -version specified and \$WM_PROJECT_VERSION is not set" - exit 1 -} - # # find apps in current directory # considered an app if it has constant/ and system/ directories @@ -113,18 +119,23 @@ findApps() { for app in $(/bin/ls -d * 2>/dev/null) do - [ -d "$app/constant" -a -d "$app/system" ] && echo $app + [ -d "$app/constant" -a -d "$app/system" ] && echo "$app" done } appList=$( - for dir in $userDir/$templateDir $siteDir/$templateDir + for dir in "$userDir/$templateDir" "$groupDir/$templateDir" do - if cd $dir 2>/dev/null + if cd "$dir" 2>/dev/null then findApps ## generic - cd $version 2>/dev/null && findApps ## version-specific + + ## version-specific + if [ -n "$projectApi" ] + then + cd "$projectApi" 2>/dev/null && findApps + fi fi done | sort | uniq ) @@ -142,7 +153,7 @@ listApps() } -if [ "$listOpt" = true ] +if [ "$optList" = true ] then listApps exit 0 @@ -160,11 +171,11 @@ fi # get the corresponding srcDir name srcDir=$( - for dir in $userDir/$templateDir $siteDir/$templateDir + for dir in "$userDir/$templateDir" "$groupDir/$templateDir" do if [ -d $dir ] then - for appDir in $dir/$version/$appName $dir/$appName + for appDir in "$dir/$projectApi/$appName" "$dir/$appName" do if [ -d $appDir -a -d $appDir/constant -a -d $appDir/system ] then @@ -211,21 +222,6 @@ echo " syncing ..." # sync updated files only, itemize changes so we know what is going on rsync -aui $srcDir/ $newDir - -# -# reuse or create new FOAM_SETTINGS (useful for queuing systems) -# -if [ -e "$newDir/FOAM_SETTINGS" ] -then - echo " retaining FOAM_SETTINGS" -else - echo " creating FOAM_SETTINGS" - cat << SETTINGS > "$newDir/FOAM_SETTINGS" -APPLICATION=$appName -FOAM_VERSION=OpenFOAM-$version -SETTINGS -fi - echo Done #------------------------------------------------------------------------------ diff --git a/bin/foamUpdateCaseFileHeader b/bin/foamUpdateCaseFileHeader index 23a87a0c55e01674aae5892c092802f927c3250f..11f110a045d0679e96f799ad4f6b13540cafc480 100755 --- a/bin/foamUpdateCaseFileHeader +++ b/bin/foamUpdateCaseFileHeader @@ -4,7 +4,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | +# \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. @@ -44,7 +44,7 @@ options: -help print the usage Updates the header of application files and removes consecutive blank lines. - By default, writes current OpenFOAM version in the header. + By default, writes current OpenFOAM API number version in the header. An alternative version can be specified with the -version option. USAGE @@ -74,8 +74,12 @@ do esac done -# constant width for version - default to WM_PROJECT_VERSION -version=$(printf %-36s ${version:-$WM_PROJECT_VERSION}) +# Constant width for version - default to WM_PROJECT_API + +: ${version:=$WM_PROJECT_API} +: ${version:=$WM_PROJECT_VERSION} + +version=$(printf %-36s ${version:-OPENFOAM}) [ $# -ge 1 ] || usage diff --git a/bin/tools/change-sitedir.sh b/bin/tools/change-sitedir.sh index 220f1225d225a5ebe6fe625478995d6a22562312..f66504a2255ea2424f732a60c738d52f35a2d378 100644 --- a/bin/tools/change-sitedir.sh +++ b/bin/tools/change-sitedir.sh @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -25,7 +25,7 @@ # . change-sitedir.sh PREFIX [SUFFIX] # # Shortcuts (prefix) -# -prefix "$WM_PROJECT_INST_DIR/site" +# -prefix "$WM_PROJECT_DIR/../site" # -project "$WM_PROJECT_DIR/site" # -none remove from environment # @@ -46,7 +46,7 @@ # # corresponds to the standard site location: # -# $WM_PROJECT_DIR/site{/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS} +# $WM_PROJECT_DIR/site{/$WM_PROJECT_API/platforms/$WM_OPTIONS} # #------------------------------------------------------------------------------ @@ -56,7 +56,7 @@ then suffix="$2" foamOldDirs="$FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN \ - $WM_PROJECT_SITE $WM_PROJECT_INST_DIR/site $WM_PROJECT_DIR/site" + $WM_PROJECT_SITE $WM_PROJECT_DIR/site" foamClean=$WM_PROJECT_DIR/bin/foamCleanPath if [ -x "$foamClean" ] then @@ -66,12 +66,12 @@ then fi case "$suffix" in - -plat*) suffix="platforms/$WM_OPTIONS" ;; + -plat*) suffix="platforms/$WM_OPTIONS" ;; esac case "$prefix" in - -prefix) prefix="$WM_PROJECT_INST_DIR/site" ;; - -project) prefix="$WM_PROJECT_DIR/site" ;; - -none) unset prefix ;; + -prefix) prefix="${WM_PROJECT_DIR%/*}/site" ;; + -project) prefix="$WM_PROJECT_DIR/site" ;; + -none) unset prefix ;; esac if [ -n "$prefix" ] diff --git a/bin/tools/change-userdir.sh b/bin/tools/change-userdir.sh index d126fcfe5d14f3f41845f2598ccf0e885d710608..06df062b6323b18614527f4b5cff5a4924193d57 100644 --- a/bin/tools/change-userdir.sh +++ b/bin/tools/change-userdir.sh @@ -69,8 +69,8 @@ then -plat*) suffix="platforms/$WM_OPTIONS" ;; esac case "$prefix" in - -home) prefix="$HOME/OpenFOAM/$USER-${WM_PROJECT_VERSION:-unknown}" ;; - -none) unset prefix ;; + -home) prefix="$HOME/OpenFOAM/$USER-${WM_PROJECT_VERSION:-unknown}" ;; + -none) unset prefix ;; esac if [ -n "$prefix" ] diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths index ad0ea898873d89744c4fc9bcb95596525c3900fb..6890d35ed0d48220537f68515a5706d4d23dcfe1 100755 --- a/bin/tools/foamConfigurePaths +++ b/bin/tools/foamConfigurePaths @@ -25,9 +25,8 @@ usage() { usage: ${0##*/} options Basic - -prefix DIR specify installation directory (eg, /opt) - -version VER specify project version (eg, 1612) - -projectName NAME specify project directory name (eg, openfoam1612) + -project-path DIR specify 'WM_PROJECT_DIR' (eg, /opt/openfoam1806-patch1) + -version VER specify project version (eg, v1806) -archOption 32|64 specify 'WM_ARCH_OPTION' architecture option -SP | -float32 specify 'WM_PRECISION_OPTION' for single precision -DP | -float64 specify 'WM_PRECISION_OPTION' for double precision @@ -61,31 +60,26 @@ Components -metis ver specify 'METIS_VERSION' -metis-path DIR specify 'METIS_ARCH_PATH' -scotch VER specify 'SCOTCH_VERSION' (eg, scotch_6.0.4) - -scotch-path DIR specify 'SCOTCH_ARCH_PATH' (eg, /opt/OpenFOAM-scotch_6.0.4) + -scotch-path DIR specify 'SCOTCH_ARCH_PATH' (eg, /opt/scotch_6.0.4) Graphics -paraview VER specify 'ParaView_VERSION' (eg, 5.4.1) + -paraview-qt VER specify 'ParaView_QT' (eg, qt-system) -paraview-path DIR specify 'ParaView_DIR' (eg, /opt/ParaView-5.4.1) -vtk VER specify 'vtk_version' (eg, VTK-7.1.0) -mesa VER specify 'mesa_version' (eg, mesa-13.0.1) Misc - -default-third default ThirdParty location: PREFIX/ThirdParty-VERSION - -no-third use PROJECT/ThirdParty for ThirdParty location - -third-path DIR specify 'WM_THIRD_PARTY_DIR' - -default-site set PREFIX/site as fallback for WM_PROJECT_SITE - -no-site use PROJECT/site as fallback for WM_PROJECT_SITE - - -sigfpe | -no-sigfpe [defunct - now under etc/controlDict] + -foamInstall DIR [obsolete] + -projectName NAME [obsolete] + -sigfpe|-no-sigfpe [obsolete - now under etc/controlDict] Adjusts hardcoded versions and installation paths (for bash, POSIX shell). Equivalent options: - -prefix -foamInstall --foamInstall - -version -foamVersion --projectVersion - -projectName --projectName + -version -foamVersion --projectVersion -archOption --archOption -third -ThirdParty -paraview --paraviewVersion | -paraviewVersion @@ -186,6 +180,31 @@ replace() done } +# Standard <key> <val> type of replacements. +# replace <file> <key1> <val1> .. <keyN> <valN> +# looks for "setenv KEYWORD value" +# but avoids "setenv KEYWORD" without a value +replaceCsh() +{ + local file="$1" + shift + + local key val + + while [ "$#" -ge 2 ] + do + key=$1 + val=$2 + shift 2 + + _inlineSed \ + "$file" \ + "setenv *$key [^ #]*" \ + "setenv $key $val" \ + "Replaced $key setenv by '$val'" + done +} + # Get the option's value (argument). # Die if the argument doesn't exist or is empty # $1 option @@ -196,13 +215,14 @@ getOptionValue() echo "$2" } -# Remove BASH_SOURCE and FOAM_INST_DIR=... magic that looks like this: + +# Remove BASH_SOURCE and projectDir=... magic that looks like this: # ---- -# variable=$BASH_SOURCE -# [ -n "$variable" ] && FOAM_INST_DIR= ... -# FOAM_INST_DIR=... +# projectDir=$BASH_SOURCE +# [ -n "$projectDir" ] && projectDir= ... +# projectDir=... # ---- -removeMagic() +removeBashMagic() { local file="$1" @@ -211,10 +231,33 @@ removeMagic() exit 2 # Fatal } - echo " Remove default FOAM_INST_DIR setting ($file)" + echo " Remove automatic projectDir setting ($file)" sed -i \ - -e '/^ *#/!{/\(BASH_SOURCE\|FOAM_INST_DIR=\)/s/^/##IGNORE## /}' \ + -e '/^ *#/!{/\(BASH_SOURCE\|projectDir=\)/s/^/##IGNORE## /}' \ + "$file" +} + + +# Remove set projectName=, set projectDir= magic that looks like this: +# ---- +# set projectName="$WM_PROJECT" +# set projectDir=`lsof +p $$ |& \ +# sed -n -e 's@^[^/]*@@; s@\(/'"$projectName"'[^/]*\)/etc/cshrc[^/]*@\1@p'` +# ---- +removeCshMagic() +{ + local file="$1" + + [ -f "$file" ] || { + echo "Missing file: $file" + exit 2 # Fatal + } + + echo " Remove automatic projectDir setting ($file)" + + sed -i \ + -e '/^ *#/!{\@\(projectName=\|projectDir=\|/etc/cshrc\)@s/^/##IGNORE## /}' \ "$file" } @@ -235,23 +278,15 @@ do ## Basic ## - -prefix | -foamInstall | --foamInstall) - # Replace WM_PROJECT_INST_DIR, disable FOAM_INST_DIR discovery + -project-path) + # Replace WM_PROJECT_DIR=... optionValue=$(getOptionValue "$@") - removeMagic etc/bashrc - replace etc/bashrc WM_PROJECT_INST_DIR "$optionValue" - adjusted=true - shift - ;; + replace etc/bashrc WM_PROJECT_DIR "\"$optionValue\"" + replaceCsh etc/cshrc WM_PROJECT_DIR "\"$optionValue\"" + + removeBashMagic etc/bashrc + removeCshMagic etc/cshrc - -projectName | --projectName) - # Replace basename part of WM_PROJECT_DIR=... - optionValue=$(getOptionValue "$@") - _inlineSed \ - etc/bashrc \ - 'WM_PROJECT_DIR=.*' \ - 'WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/'"$optionValue" \ - "Replaced WM_PROJECT_DIR basename by $optionValue" adjusted=true shift ;; @@ -259,7 +294,8 @@ do -version | -foamVersion | --projectVersion) # Replace WM_PROJECT_VERSION=... optionValue=$(getOptionValue "$@") - replace etc/bashrc WM_PROJECT_VERSION "$optionValue" + replace etc/bashrc WM_PROJECT_VERSION "$optionValue" + replaceCsh etc/cshrc WM_PROJECT_VERSION "$optionValue" adjusted=true shift ;; @@ -275,7 +311,8 @@ do echo "WM_ARCH_OPTION already set to $optionValue" : ${adjusted:=false} else - replace etc/bashrc WM_ARCH_OPTION "$optionValue" + replace etc/bashrc WM_ARCH_OPTION "$optionValue" + replaceCsh etc/cshrc WM_ARCH_OPTION "$optionValue" adjusted=true fi shift @@ -283,20 +320,23 @@ do -SP | -float32) # Replace WM_PRECISION_OPTION=... - replace etc/bashrc WM_PRECISION_OPTION "SP" + replace etc/bashrc WM_PRECISION_OPTION "SP" + replaceCsh etc/cshrc WM_PRECISION_OPTION "SP" adjusted=true ;; -DP | -float64) # Replace WM_PRECISION_OPTION=... - replace etc/bashrc WM_PRECISION_OPTION "DP" + replace etc/bashrc WM_PRECISION_OPTION "DP" + replaceCsh etc/cshrc WM_PRECISION_OPTION "DP" adjusted=true ;; -int32 | -int64) # Replace WM_LABEL_SIZE=... optionValue="${1#-int}" - replace etc/bashrc WM_LABEL_SIZE "$optionValue" + replace etc/bashrc WM_LABEL_SIZE "$optionValue" + replaceCsh etc/cshrc WM_LABEL_SIZE "$optionValue" adjusted=true ;; @@ -306,7 +346,8 @@ do -clang) # Replace clang_version=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/compiler clang_version "$optionValue" + replace etc/config.sh/compiler clang_version "$optionValue" + replace etc/config.csh/compiler clang_version "$optionValue" adjusted=true shift ;; @@ -314,7 +355,8 @@ do -gcc) # Replace gcc_version=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/compiler gcc_version "$optionValue" + replace etc/config.sh/compiler gcc_version "$optionValue" + replace etc/config.csh/compiler gcc_version "$optionValue" adjusted=true shift ;; @@ -325,6 +367,9 @@ do replace etc/bashrc \ WM_COMPILER_TYPE system \ WM_COMPILER "$optionValue" + replaceCsh etc/cshrc \ + WM_COMPILER_TYPE system \ + WM_COMPILER "$optionValue" adjusted=true shift ;; @@ -335,25 +380,31 @@ do replace etc/bashrc \ WM_COMPILER_TYPE ThirdParty \ WM_COMPILER "$optionValue" + replaceCsh etc/cshrc \ + WM_COMPILER_TYPE ThirdParty \ + WM_COMPILER "$optionValue" adjusted=true shift ;; gmp-[4-9]* | gmp-system) # gcc-related package - replace etc/config.sh/compiler gmp_version "$1" + replace etc/config.sh/compiler gmp_version "$1" + replace etc/config.csh/compiler gmp_version "$1" adjusted=true ;; mpfr-[2-9]* | mpfr-system) # gcc-related package - replace etc/config.sh/compiler mpfr_version "$1" + replace etc/config.sh/compiler mpfr_version "$1" + replace etc/config.csh/compiler mpfr_version "$1" adjusted=true ;; mpc-[0-9]* | mpc-system) # gcc-related package - replace etc/config.sh/compiler mpc_version "$1" + replace etc/config.sh/compiler mpc_version "$1" + replace etc/config.csh/compiler mpc_version "$1" adjusted=true ;; @@ -363,7 +414,8 @@ do -mpi) # Explicitly set WM_MPLIB=... optionValue=$(getOptionValue "$@") - replace etc/bashrc WM_MPLIB "$optionValue" + replace etc/bashrc WM_MPLIB "$optionValue" + replaceCsh etc/bashrc WM_MPLIB "$optionValue" optMpi=system adjusted=true shift @@ -383,21 +435,29 @@ do "FOAM_MPI=$optMpi" \ "Replaced 'FOAM_MPI=$expected' setting by 'FOAM_MPI=$optMpi'" - replace etc/bashrc WM_MPLIB OPENMPI + _inlineSed etc/config.csh/mpi \ + "FOAM_MPI $expected" \ + "FOAM_MPI $optMpi" \ + "Replaced 'FOAM_MPI $expected' setting by 'FOAM_MPI $optMpi'" + + replace etc/bashrc WM_MPLIB OPENMPI + replaceCsh etc/cshrc WM_MPLIB OPENMPI adjusted=true shift ;; -openmpi-system) # Explicitly set WM_MPLIB=SYSTEMOPENMPI - replace etc/bashrc WM_MPLIB SYSTEMOPENMPI + replace etc/bashrc WM_MPLIB SYSTEMOPENMPI + replaceCsh etc/cshrc WM_MPLIB SYSTEMOPENMPI optMpi=system adjusted=true ;; -openmpi-third) # Explicitly set WM_MPLIB=OPENMPI, using default setting for openmpi - replace etc/bashrc WM_MPLIB OPENMPI + replace etc/bashrc WM_MPLIB OPENMPI + replaceCsh etc/cshrc WM_MPLIB OPENMPI optMpi=third adjusted=true ;; @@ -408,7 +468,8 @@ do -boost) # Replace boost_version=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/CGAL boost_version "$optionValue" + replace etc/config.sh/CGAL boost_version "$optionValue" + replace etc/config.csh/CGAL boost_version "$optionValue" adjusted=true shift ;; @@ -416,7 +477,8 @@ do -boost-path) # Replace BOOST_ARCH_PATH=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/CGAL BOOST_ARCH_PATH "$optionValue" + replace etc/config.sh/CGAL BOOST_ARCH_PATH "\"$optionValue\"" + replaceCsh etc/config.csh/CGAL BOOST_ARCH_PATH "\"$optionValue\"" adjusted=true shift ;; @@ -424,7 +486,8 @@ do -cgal) # Replace cgal_version=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/CGAL cgal_version "$optionValue" + replace etc/config.sh/CGAL cgal_version "$optionValue" + replace etc/config.csh/CGAL cgal_version "$optionValue" adjusted=true shift ;; @@ -432,7 +495,8 @@ do -cgal-path) # Replace CGAL_ARCH_PATH=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/CGAL CGAL_ARCH_PATH "$optionValue" + replace etc/config.sh/CGAL CGAL_ARCH_PATH "$optionValue" + replaceCsh etc/config.csh/CGAL CGAL_ARCH_PATH "$optionValue" adjusted=true shift ;; @@ -440,7 +504,8 @@ do -fftw) # Replace fftw_version=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/FFTW fftw_version "$optionValue" + replace etc/config.sh/FFTW fftw_version "$optionValue" + replace etc/config.csh/FFTW fftw_version "$optionValue" adjusted=true shift ;; @@ -448,7 +513,8 @@ do -fftw-path) # Replace FFTW_ARCH_PATH=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/FFTW FFTW_ARCH_PATH "$optionValue" + replace etc/config.sh/FFTW FFTW_ARCH_PATH "\"$optionValue\"" + replaceCsh etc/config.csh/FFTW FFTW_ARCH_PATH "\"$optionValue\"" adjusted=true shift ;; @@ -456,7 +522,8 @@ do -cmake) # Replace cmake_version=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/paraview cmake_version "$optionValue" + replace etc/config.sh/paraview cmake_version "$optionValue" + replace etc/config.csh/paraview cmake_version "$optionValue" adjusted=true shift ;; @@ -472,7 +539,7 @@ do -kahip-path) # Replace KAHIP_ARCH_PATH=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/kahip KAHIP_ARCH_PATH "$optionValue" + replace etc/config.sh/kahip KAHIP_ARCH_PATH "\"$optionValue\"" adjusted=true shift ;; @@ -488,7 +555,7 @@ do -metis-path) # Replace METIS_ARCH_PATH=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/metis METIS_ARCH_PATH "$optionValue" + replace etc/config.sh/metis METIS_ARCH_PATH "\"$optionValue\"" adjusted=true shift ;; @@ -504,7 +571,7 @@ do -scotch-path | -scotchArchPath | --scotchArchPath) # Replace SCOTCH_ARCH_PATH=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/scotch SCOTCH_ARCH_PATH "$optionValue" + replace etc/config.sh/scotch SCOTCH_ARCH_PATH "\"$optionValue\"" adjusted=true shift ;; @@ -519,7 +586,17 @@ do _matches "$optionValue" "$expected" || \ die "'$1' has bad value: '$optionValue'" - replace etc/config.sh/paraview ParaView_VERSION "$optionValue" + replace etc/config.sh/paraview ParaView_VERSION "$optionValue" + replaceCsh etc/config.csh/paraview ParaView_VERSION "$optionValue" + adjusted=true + shift + ;; + + -paraview-qt) + # Replace ParaView_QT=... + optionValue=$(getOptionValue "$@") + replace etc/config.sh/paraview ParaView_QT "$optionValue" + replace etc/config.csh/paraview ParaView_QT "$optionValue" adjusted=true shift ;; @@ -527,7 +604,8 @@ do -paraview-path | -paraviewInstall | --paraviewInstall) # Replace ParaView_DIR=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/paraview ParaView_DIR "$optionValue" + replace etc/config.sh/paraview ParaView_DIR \""$optionValue\"" + replaceCsh etc/config.csh/paraview ParaView_DIR \""$optionValue\"" adjusted=true shift ;; @@ -535,7 +613,8 @@ do -vtk) # Replace vtk_version=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/vtk vtk_version "$optionValue" + replace etc/config.sh/vtk vtk_version "$optionValue" + replace etc/config.csh/vtk vtk_version "$optionValue" adjusted=true shift ;; @@ -543,7 +622,8 @@ do -mesa) # Replace mesa_version=... optionValue=$(getOptionValue "$@") - replace etc/config.sh/vtk mesa_version "$optionValue" + replace etc/config.sh/vtk mesa_version "$optionValue" + replace etc/config.csh/vtk mesa_version "$optionValue" adjusted=true shift ;; @@ -551,55 +631,17 @@ do ## Misc ## - -no-third) - # Replace WM_THIRD_PARTY_DIR=... with location within the project dir - replace etc/bashrc WM_THIRD_PARTY_DIR '$WM_PROJECT_DIR/ThirdParty' - adjusted=true - shift - ;; - - -default-third) - # Replace WM_THIRD_PARTY_DIR=... with default location/naming - replace etc/bashrc WM_THIRD_PARTY_DIR \ - '$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION' - adjusted=true - shift + -sigfpe | -no-sigfpe) + echo "Enable/disable FOAM_SIGFPE now via controlDict" 1>&2 ;; - -third-path) - # Replace WM_THIRD_PARTY_DIR=... + -foamInstall | --foamInstall | -projectName | --projectName) + # Removed for 1812 optionValue=$(getOptionValue "$@") - replace etc/bashrc WM_THIRD_PARTY_DIR "$optionValue" - adjusted=true - shift - ;; - - -no-site) - # Replace fallback value for site within the project dir - _inlineSed \ - etc/config.sh/settings \ - '^ *siteDir=.*\/site' \ - 'siteDir=$WM_PROJECT_DIR/site' \ - "Setting fallback site-dir '\$WM_PROJECT_DIR/site'" - adjusted=true + echo "Ignoring obsolete option $1" 1>&2 shift ;; - -default-site) - # Replace WM_THIRD_PARTY_DIR=... with standard location - _inlineSed \ - etc/config.sh/settings \ - '^ *siteDir=.*\/site' \ - 'siteDir=$WM_PROJECT_INST_DIR/site' \ - "Setting fallback site-dir '\$WM_PROJECT_INST_DIR/site'" - adjusted=true - shift - ;; - - -sigfpe | -no-sigfpe) - echo "Enable/disable FOAM_SIGFPE now via controlDict" 1>&2 - ;; - *) die "unknown option/argument: '$1'" ;; diff --git a/bin/tools/foamCreateCompletionCache b/bin/tools/foamCreateCompletionCache index cf1bcdef5076674007c01413e0c116f0fbb82674..0e1e81bf1e9e2da3de744faebbd7fc91288f519f 100755 --- a/bin/tools/foamCreateCompletionCache +++ b/bin/tools/foamCreateCompletionCache @@ -27,11 +27,12 @@ usage() { Usage: ${0##*/} [OPTION] [appName .. [appNameN]] options: - -d dir | -dir dir Directory to process - -u | -user Add \$FOAM_USER_APPBIN to the search directories - -no-header Suppress header generation - -o FILE Write to alternative output - -h | -help Print the usage + -dir DIR Directory to process + -user Add \$FOAM_USER_APPBIN to the search directories + -no-header Suppress header generation + -output FILE, -o FILE + Write to alternative output + -h | -help Print the usage Create cache of bash completion values for OpenFOAM applications. The cached values are typically used by the tcsh completion wrapper. @@ -68,13 +69,13 @@ do -h | -help*) usage ;; - -d | -dir) + -dir) [ "$#" -ge 2 ] || die "'$1' option requires an argument" searchDirs="$2" [ -d "$searchDirs" ] || die "directory not found '$searchDirs'" shift ;; - -u | -user) + -user) searchDirs="$searchDirs $FOAM_USER_APPBIN" ;; -no-head*) @@ -116,8 +117,8 @@ echo 1>&2 # Header not disabled [ "$optHeader" = true ] && cat << HEADER #----------------------------------*-sh-*-------------------------------------- -# Cached options for bash completion of OpenFOAM applications, primarily for -# use with the tcsh completion mechanism. +# Cached options for bash completion of OpenFOAM applications, +# primarily for use with the tcsh completion mechanism. # These are the values expected by the '_of_complete_' function # # Recreate with "${0##*/}" @@ -140,7 +141,12 @@ HEADER # -opt1 descrip # -opt2 <arg> descrip # -help-full -# Ignore -help-man (internal option). +# +# Ignores +# -help-man Internal option +# -hostRoots Advanced distributed run option +# -roots Advanced distributed run option +# # Terminate parsing on first appearance of -help-full. # - options with '=' (eg, -mode=ugo) are not handled very well at all. # - alternatives (eg, -a, -all) are not handled nicely either, @@ -150,6 +156,7 @@ extractOptions() local appName="$1" local helpText=$($appName -help-full 2>/dev/null | \ sed -ne 's/^ *//; /^$/d; /^[^-]/d; /^--/d; /^-help-man/d;' \ + -e '/^-hostRoots /d; /^-roots /d;' \ -e 'y/,/ /; s/=.*$/=/;' \ -e '/^-[^ ]* </{ s/^\(-[^ ]* <\).*$/\1/; p; d }' \ -e 's/^\(-[^ ]*\).*$/\1/; p; /^-help-full/q;' \ diff --git a/bin/tools/foamCreateModuleInclude b/bin/tools/foamCreateModuleInclude index f8e8775ed3614f76325e39336dc7ed16711b3c80..d79865fd69f4203c7d1892067b88244a7ffc8432 100755 --- a/bin/tools/foamCreateModuleInclude +++ b/bin/tools/foamCreateModuleInclude @@ -85,10 +85,10 @@ do --recursive-backend--) optBackend=true ;; - --output=*) + -output=*) moduleOutput="${1#*=}" ;; - --tmpdir=*) + -tmpdir=*) moduleTmpDir="${1#*=}" ;; -*) @@ -219,7 +219,7 @@ echo "Using openfoam: $WM_PROJECT_DIR" 1>&2 echo "==> $moduleOutput" 1>&2 # Remove some cruft -unset FOAM_JOB_DIR FOAM_RUN FOAM_SETTINGS FOAM_INST_DIR +unset FOAM_JOB_DIR FOAM_RUN FOAM_SETTINGS FOAM_INST_DIR WM_PROJECT_INST_DIR unset WM_PROJECT_USER_DIR WM_THIRD_PARTY_DIR unset SCOTCH_VERSION diff --git a/etc/README.md b/etc/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d638115c48f8007315ff0a9d7b86087b42fa1fe4 --- /dev/null +++ b/etc/README.md @@ -0,0 +1,29 @@ +OpenFOAM Configuration +---------------------- + +The main OpenFOAM settings are located in the parent `etc/` directory. +Both POSIX (bash, dash,...) and csh shells are supported. +To configure OpenFOAM, source either the `etc/bashrc` or the +`etc/cshrc` file, as appropriate for your shell. + +These source the following files in the `config.sh/` or +`config.csh/` directories: + +* `setup` : finalize setup of OpenFOAM environment (called by bashrc,cshrc) +* `settings` : core settings +* `aliases` : aliases for interactive shells +* `unset` : sourced to clear as many OpenFOAM environment settings as possible +* `mpi` : MPI communications library settings +* `ensight` : application settings for EnSight +* `paraview` : application settings for ParaView +* `scotch` : application settings for compiling against scotch +* `metis` : application settings for compiling against metis + +The `config.*/example` directories contain additional example configuration +files for the corresponding shell: + +* `compiler` : an example of fine tuning ThirdParty compiler settings +* `openmpi` : an example of fine tuning openmpi settings for OpenFOAM +* `paraview` : an example of chaining to the standard config/paraview + with a different ParaView_VERSION +* `prefs`: an example of supplying alternative site-defined settings diff --git a/etc/README.org b/etc/README.org deleted file mode 100644 index 60029da36aa877944599c3a749fcca7aaf4dc91f..0000000000000000000000000000000000000000 --- a/etc/README.org +++ /dev/null @@ -1,21 +0,0 @@ -* OpenFOAM Configuration - The main OpenFOAM settings are located in the parent etc/ directory. The bash - and csh shells are supported and to configure OpenFOAM source etc/bashrc or - etc/cshrc respectively which source the following files in the config.sh or - config.csh respectively: - + =settings=: core settings - + =aliases=: aliases for interactive shells - + =unset=: sourced to clear as many OpenFOAM environment settings as possible - + =mpi=: MPI communications library settings - + =ensight=: application settings for EnSight - + =paraview=: application settings for ParaView - + =scotch=: application settings for compiling against scotch - + =metis=: application settings for compiling against metis 5 - - The config.*/example directories contains various example configuration files - for the corresponding shell: - + =compiler=: an example of fine tuning ThirdParty compiler settings - + =openmpi=: an example of fine tuning openmpi settings for OpenFOAM - + =paraview=: an example of chaining to the standard config/paraview with a - different ParaView_VERSION - + =prefs=: an example of supplying alternative site-defined settings diff --git a/etc/bashrc b/etc/bashrc index 3a5262af78831221ca5b2a6725c2c2f9fb4f97e9..b38f5f5b141a7894e3b4fbb34095af144ade3bb7 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -22,9 +22,9 @@ # - $WM_PROJECT_DIR/etc/prefs.sh # # - User or group values (first file found): -# - ~/.OpenFOAM/$WM_PROJECT_VERSION/prefs.sh +# - ~/.OpenFOAM/$WM_PROJECT_API/prefs.sh # - ~/.OpenFOAM/prefs.sh -# - $WM_PROJECT_SITE/$WM_PROJECT_VERSION/etc/prefs.sh +# - $WM_PROJECT_SITE/$WM_PROJECT_API/etc/prefs.sh # - $WM_PROJECT_SITE/etc/prefs.sh # # Environment @@ -43,21 +43,22 @@ export WM_PROJECT=OpenFOAM export WM_PROJECT_VERSION=plus -# [FOAM_INST_DIR] - parent directory containing the OpenFOAM installation. +# [projectDir] - directory containing this OpenFOAM version. # \- When this file is located as $WM_PROJECT_DIR/etc/bashrc, the next lines # should work when sourced by BASH or ZSH shells. If this however fails, # set one of the fallback values to an appropriate path. -# -- -rc="${BASH_SOURCE:-${ZSH_NAME:+$0}}" -[ -n "$rc" ] && FOAM_INST_DIR="$(\cd $(dirname $rc)/../.. && \pwd -L)" || \ -FOAM_INST_DIR="$HOME/$WM_PROJECT" -# FOAM_INST_DIR="/opt/$WM_PROJECT" -# FOAM_INST_DIR="/usr/local/$WM_PROJECT" # +# This can be removed if an absolute path is provided for WM_PROJECT_DIR +# later on in this file +# -- +projectDir="${BASH_SOURCE:-${ZSH_NAME:+$0}}"; +[ -n "$projectDir" ] && projectDir="$(\cd $(dirname $projectDir)/.. && \pwd -L)" ||\ +projectDir="$HOME/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION" +# projectDir="/opt/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION" +# projectDir="/usr/local/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION" # END OF (NORMAL) USER EDITABLE PART ################################################################################ : # Safety statement (if the user removed all fallback values) -unset rc # Configuration environment variables. # Should override via <prefs.sh> file instead of editing this file. @@ -127,113 +128,31 @@ foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR \ $HOME/$WM_PROJECT/$USER $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \ $WM_PROJECT_SITE $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN" -# Location of installation and third-party software -export WM_PROJECT_INST_DIR=$FOAM_INST_DIR -export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION -export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION +# [WM_PROJECT_DIR] - Location of this OpenFOAM version +export WM_PROJECT_DIR="$projectDir" # [WM_PROJECT_USER_DIR] - Location of user files -export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION +export WM_PROJECT_USER_DIR="$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION" # [WM_PROJECT_SITE] - Location of site-specific (group) files # Default (unset) implies WM_PROJECT_DIR/site # Normally defined in calling environment -if [ -d "$WM_PROJECT_SITE" ] -then - export WM_PROJECT_SITE -else - unset WM_PROJECT_SITE -fi - -# Load shell functions -unset WM_SHELL_FUNCTIONS -. $WM_PROJECT_DIR/etc/config.sh/functions - -# Overrides via <prefs.sh> -# 1. other (system) values -_foamEtc -mode=o prefs.sh -# 2. user or group values (unless disabled) -[ -z "$FOAM_CONFIG_NOUSER" ] && _foamEtc -mode=ug prefs.sh - -# Evaluate command-line parameters and record settings for later. -# These can be used to set/unset values, specify additional files etc. -FOAM_SETTINGS="$@" -if [ -z "$FOAM_SETTINGS" ] +# Finalize setup of OpenFOAM environment for POSIX shell +if [ -d "$WM_PROJECT_DIR" ] then - unset FOAM_SETTINGS + if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ] + then + echo "source $WM_PROJECT_DIR/etc/config.sh/setup" 1>&2 + fi + . "$WM_PROJECT_DIR/etc/config.sh/setup" "$@" else - export FOAM_SETTINGS - _foamEval "$@" -fi - -# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH) -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -export PATH MANPATH LD_LIBRARY_PATH -_foamClean PATH "$foamOldDirs" -_foamClean MANPATH "$foamOldDirs" -_foamClean LD_LIBRARY_PATH "$foamOldDirs" - -# Setup for OpenFOAM compilation etc -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamEtc -config settings - -# Setup for third-party packages -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamEtc -config mpi -_foamEtc -config paraview -- "$@" # Pass through for evaluation -_foamEtc -config vtk -_foamEtc -config ensight -_foamEtc -config gperftools -## _foamEtc -config ADIOS -## _foamEtc -config ADIOS2 -_foamEtc -config CGAL -_foamEtc -config scotch -_foamEtc -config FFTW - -if [ -d "$WM_PROJECT_DIR/doc/man1" ] -then - _foamAddMan "$WM_PROJECT_DIR/doc" -fi - -# Interactive shell -if /usr/bin/tty -s 2>/dev/null -then - _foamEtc -config aliases - [ "${BASH_VERSINFO:-0}" -ge 4 ] && _foamEtc -config bash_completion -fi - - -# Clean environment paths again. Only remove duplicates -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -export PATH MANPATH LD_LIBRARY_PATH - -_foamClean PATH -_foamClean MANPATH -_foamClean LD_LIBRARY_PATH - -# Add trailing ':' for system manpages -if [ -n "$MANPATH" ] -then - MANPATH="${MANPATH}:" + echo "Error: did not locate installation path for $WM_PROJECT-$WM_PROJECT_VERSION" 1>&2 + echo "No directory: $WM_PROJECT_DIR" 1>&2 fi -if [ -n "$LD_PRELOAD" ] -then - export LD_PRELOAD - _foamClean LD_PRELOAD -fi - - -# Cleanup temporary information -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Unload shell functions -. $WM_PROJECT_DIR/etc/config.sh/functions - -# Variables (done as the last statement for a clean exit code) -unset FOAM_INST_DIR # Old variable name (OpenFOAM-v1606) - now unneeded -unset cleaned foamOldDirs +# Cleanup variables (done as final statement for a clean exit code) +unset foamOldDirs projectDir #------------------------------------------------------------------------------ diff --git a/etc/config.csh/functions b/etc/config.csh/functions index 7365e632bc831cf6b3075bc57f1a0db2c583d245..f78a161f744e12b871138682361be33835cbfaf5 100644 --- a/etc/config.csh/functions +++ b/etc/config.csh/functions @@ -33,6 +33,13 @@ alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}' # $2 = fallback libname ('lib' or 'lib64') alias _foamAddLibAuto 'eval `$WM_PROJECT_DIR/bin/tools/lib-dir -csh \!*`' +# Echo values when FOAM_VERBOSE is on, no-op otherwise +if ($?FOAM_VERBOSE && $?prompt) then + alias _foamEcho 'echo \!*' +else + alias _foamEcho 'true' +endif + # Source an etc file, possibly with some verbosity if ($?FOAM_VERBOSE && $?prompt) then if ($?FOAM_CONFIG_NOUSER) then diff --git a/etc/config.csh/settings b/etc/config.csh/settings index e865f46af23d9dcb07c5b94e17fd93d4d88bb09d..ac09ece5bd33628bbe388e3cff45a50bf9f50cc1 100644 --- a/etc/config.csh/settings +++ b/etc/config.csh/settings @@ -147,9 +147,6 @@ setenv WM_OPTIONS "$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_C setenv FOAM_APPBIN "$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin" setenv FOAM_LIBBIN "$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib" -# External (ThirdParty) libraries -setenv FOAM_EXT_LIBBIN "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib" - # Site-specific (group) files # Default @@ -173,7 +170,7 @@ setenv FOAM_USER_LIBBIN "$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib" # Prepend wmake to the path - not required for runtime-only environment set foundDir="${WM_PROJECT_DIR}/wmake" if ( $?WM_DIR ) then - if ( -d "${WM_DIR}" ) foundDir="${WM_DIR}" + if ( -d "${WM_DIR}" ) set foundDir="${WM_DIR}" endif if ( -d "$foundDir" ) then setenv PATH "${foundDir}:${PATH}" @@ -189,8 +186,8 @@ setenv PATH "${WM_PROJECT_DIR}/bin:${PATH}" if ( -d "$siteDir/bin" ) then # Generic _foamAddPath "$siteDir/bin" endif -if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then # Version-specific - _foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin" +if ( -d "$siteDir/$WM_PROJECT_API/bin" ) then # API-specific + _foamAddPath "$siteDir/$WM_PROJECT_API/bin" endif # OpenFOAM executables (user, group, standard) @@ -200,8 +197,11 @@ _foamAddPath "${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}" _foamAddLib "$FOAM_LIBBIN/dummy" # External (ThirdParty) libraries. Also allowed to be unset -if ( $?FOAM_EXT_LIBBIN ) then - _foamAddLib $FOAM_EXT_LIBBIN +if ( -d "$WM_THIRD_PARTY_DIR" ) then + setenv FOAM_EXT_LIBBIN "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib" + _foamAddLib "$FOAM_EXT_LIBBIN" +else + unsetenv FOAM_EXT_LIBBIN endif # OpenFOAM libraries (user, group, standard) diff --git a/etc/config.csh/setup b/etc/config.csh/setup new file mode 100644 index 0000000000000000000000000000000000000000..7f02c0dcb6ecbefa8d08e162d9f9791e3d26a35d --- /dev/null +++ b/etc/config.csh/setup @@ -0,0 +1,187 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM, licensed under GNU General Public License +# <http://www.gnu.org/licenses/>. +# +# File +# etc/config.csh/setup +# - sourced by OpenFOAM-*/etc/cshrc +# +# Description +# Finalize setup of OpenFOAM environment for C-shell (csh, tcsh) +# +# Environment +# FOAM_VERBOSE (set/unset) +# - add extra verbosity when sourcing files +# FOAM_CONFIG_NOUSER (set/unset) +# - suppress use of user/group configuration files +# +#------------------------------------------------------------------------------ + +# [WM_PROJECT_API] - The API level for the project +setenv WM_PROJECT_API `$WM_PROJECT_DIR/bin/foamEtcFile -show-api` + +# The installation parent directory +set prefixDir="${WM_PROJECT_DIR:h}" + +# Load shell "functions" (actually aliases) +source "$WM_PROJECT_DIR/etc/config.csh/functions" + + +# [WM_THIRD_PARTY_DIR] - Location of third-party software components +# \- This may be installed in a directory parallel to the OpenFOAM project +# directory, with the same version name or using the API value. +# It may also not be required at all, in which case a dummy "ThirdParty" +# directory inside of the OpenFOAM project directory. +# +# Note: only accept if the directory exists and contains a "Allwmake" file + +setenv WM_THIRD_PARTY_DIR +set foundDir='' +_foamEcho "Locating ThirdParty directory" +foreach WM_THIRD_PARTY_DIR (\ + "$WM_PROJECT_DIR/ThirdParty" \ + "$prefixDir/ThirdParty-$WM_PROJECT_VERSION" \ + "$prefixDir/ThirdParty-v$WM_PROJECT_API" \ + "$prefixDir/ThirdParty-$WM_PROJECT_API" \ + "$prefixDir/ThirdParty-common" \ +) + _foamEcho "... $WM_THIRD_PARTY_DIR" + if ( -d "$WM_THIRD_PARTY_DIR" ) then + if ( -f "$WM_THIRD_PARTY_DIR/Allwmake" || -d "$WM_THIRD_PARTY_DIR/platforms" ) then + set foundDir=true + break + endif + endif +end + +if ( "${%foundDir}" ) then + _foamEcho "Using $WM_THIRD_PARTY_DIR" +else + # Dummy fallback value + setenv WM_THIRD_PARTY_DIR "$WM_PROJECT_DIR/ThirdParty" + _foamEcho "Dummy $WM_THIRD_PARTY_DIR" +endif +# Done with ThirdParty discovery + + +# Overrides via <prefs.csh> +# 1. other (system) values +_foamEtc -mode=o prefs.csh + +# 2. user or group values (unless disabled) +if (! $?FOAM_CONFIG_NOUSER ) then + _foamEtc -mode=ug prefs.csh +endif + + +# Capture and evaluate any command-line parameters +# These can be used to set/unset values, specify additional files etc. +setenv FOAM_SETTINGS "${*}" + +while ( $#argv > 0 ) + switch ($argv[1]) + case -*: + # Stray option (not meant for us here) -> get out + break + breaksw + case *=: + # name= -> unsetenv name + _foamEcho "unsetenv $argv[1]:s/=//" + eval "unsetenv $argv[1]:s/=//" + breaksw + case *=*: + # name=value -> setenv name value + _foamEcho "setenv $argv[1]:s/=/ /" + eval "setenv $argv[1]:s/=/ /" + breaksw + default: + # Filename: source it + if ( -f "$argv[1]" ) then + _foamEcho "Using: $argv[1]" + source "$argv[1]" + else + _foamEtc -silent "$argv[1]" + endif + breaksw + endsw + shift +end + + +# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH) +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Prevent local variables from shadowing setenv variables +unset PATH MANPATH LD_LIBRARY_PATH LD_PRELOAD +if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH +if (! $?MANPATH ) setenv MANPATH + +_foamClean PATH "$foamOldDirs" +_foamClean MANPATH "$foamOldDirs" +_foamClean LD_LIBRARY_PATH "$foamOldDirs" + +# Setup for OpenFOAM compilation etc +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +_foamEtc -config settings + +# Setup for third-party packages +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +_foamEtc -config mpi +_foamEtc -config paraview -- "$FOAM_SETTINGS" # Pass through for evaluation +_foamEtc -config vtk +_foamEtc -config ensight +## _foamEtc -config ADIOS +## _foamEtc -config ADIOS2 +_foamEtc -config CGAL +_foamEtc -config FFTW + +if ( -d "$WM_PROJECT_DIR/doc/man1" ) then + _foamAddMan "$WM_PROJECT_DIR/doc" +endif + +# Interactive shell +if ($?prompt) then + _foamEtc -config aliases + _foamEtc -config tcsh_completion +endif + + +# Clean environment paths again. Only remove duplicates +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +_foamClean PATH +_foamClean MANPATH +_foamClean LD_LIBRARY_PATH + +# Add trailing ':' for system manpages +if ( $?MANPATH ) then + setenv MANPATH "${MANPATH}:" +endif + +if ( $?LD_PRELOAD ) then + _foamClean LD_PRELOAD +endif + + +# Cleanup temporary information +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Unload shell "functions" +unalias _foamClean +unalias _foamEcho +unalias _foamEtc +unalias _foamAddPath +unalias _foamAddMan +unalias _foamAddLib +unalias _foamAddLibAuto + +# Variables (done as final statement for a clean exit code) +unset cleaned foamOldDirs foundDir prefixDir + +#------------------------------------------------------------------------------ diff --git a/etc/config.csh/unset b/etc/config.csh/unset index 7769d74e6100cfff00e4cbf0171c2959eaf65e16..b35cef97ef9c0e0f865f7af1d1c9ddf39b2742b3 100644 --- a/etc/config.csh/unset +++ b/etc/config.csh/unset @@ -59,6 +59,7 @@ unsetenv WM_OPTIONS unsetenv WM_OSTYPE unsetenv WM_PRECISION_OPTION unsetenv WM_PROJECT +unsetenv WM_PROJECT_API unsetenv WM_PROJECT_DIR unsetenv WM_PROJECT_INST_DIR unsetenv WM_PROJECT_SITE diff --git a/etc/config.csh/vtk b/etc/config.csh/vtk index 1ca8836fd78f4dd94333b72089fd4fd2ccf636c7..aaeccc386159b48d9ddbf93c19276e84b734eadb 100644 --- a/etc/config.csh/vtk +++ b/etc/config.csh/vtk @@ -30,7 +30,7 @@ #------------------------------------------------------------------------------ # USER EDITABLE PART: Changes made here may be lost with the next upgrade -set vtk_version=VTK-9.0.0 +set vtk_version=VTK-8.2.0 set mesa_version=mesa-17.1.1 setenv VTK_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version diff --git a/etc/config.sh/completion_cache b/etc/config.sh/completion_cache index baf888895604de12f0fb634d08e90bf35b737763..3d0553007e24845a05edf2705bd6949ce7bb20cb 100644 --- a/etc/config.sh/completion_cache +++ b/etc/config.sh/completion_cache @@ -1,6 +1,6 @@ #----------------------------------*-sh-*-------------------------------------- -# Cached options for bash completion of OpenFOAM applications, primarily for -# use with the tcsh completion mechanism. +# Cached options for bash completion of OpenFOAM applications, +# primarily for use with the tcsh completion mechanism. # These are the values expected by the '_of_complete_' function # # Recreate with "foamCreateCompletionCache" @@ -13,230 +13,231 @@ _of_complete_cache_=() #------------------------------------------------------------------------------ _of_complete_cache_[adiabaticFlameT]="-case -fileHandler | -doc -doc-source -help" -_of_complete_cache_[adjointShapeOptimizationFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[adjointShapeOptimizationFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[ansysToFoam]="-case -fileHandler -scale | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[applyBoundaryLayer]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots -ybl | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -write-nut -doc -doc-source -help" +_of_complete_cache_[applyBoundaryLayer]="-Cbl -case -decomposeParDict -fileHandler -region -ybl | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -write-nut -doc -doc-source -help" _of_complete_cache_[attachMesh]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -doc -doc-source -help" _of_complete_cache_[autoPatch]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -doc -doc-source -help" _of_complete_cache_[blockMesh]="-case -dict -fileHandler -region -time | -blockTopology -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noClean -noFunctionObjects -sets -doc -doc-source -help" -_of_complete_cache_[boundaryFoam]="-case -fileHandler -listScalarBCs -listVectorBCs | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[boxTurb]="-case -fileHandler -listScalarBCs -listVectorBCs | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[buoyantBoussinesqPimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[buoyantBoussinesqSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[buoyantPimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[buoyantSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[cartesian2DMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[cartesianMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[cavitatingDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[cavitatingFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[boundaryFoam]="-case -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -doc -doc-source -help" +_of_complete_cache_[boxTurb]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -doc -doc-source -help" +_of_complete_cache_[buoyantBoussinesqPimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[buoyantBoussinesqSimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[buoyantPimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[buoyantSimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[cartesian2DMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[cartesianMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[cavitatingDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[cavitatingFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[cfx4ToFoam]="-case -fileHandler -scale | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[changeDictionary]="-case -decomposeParDict -dict -fileHandler -hostRoots -instance -listScalarBCs -listVectorBCs -region -roots -subDict -time | -constant -disablePatchGroups -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -literalRE -noFunctionObjects -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[checkFaMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[checkMesh]="-case -decomposeParDict -fileHandler -hostRoots -region -roots -time -writeFields -writeSets | -allGeometry -allTopology -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -meshQuality -noFunctionObjects -noTopology -noZero -parallel -writeAllFields -doc -doc-source -help" +_of_complete_cache_[changeDictionary]="-case -decomposeParDict -dict -fileHandler -instance -region -subDict -time | -constant -disablePatchGroups -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -literalRE -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[checkFaMesh]="-case -decomposeParDict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[checkMesh]="-case -decomposeParDict -fileHandler -region -time -writeFields -writeSets | -allGeometry -allTopology -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -meshQuality -noFunctionObjects -noTopology -noZero -parallel -writeAllFields -doc -doc-source -help" _of_complete_cache_[checkSurfaceMesh]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[chemFoam]="-case -fileHandler -listScalarBCs -listVectorBCs | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -postProcess -doc -doc-source -help" +_of_complete_cache_[chemFoam]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -postProcess -doc -doc-source -help" _of_complete_cache_[chemkinToFoam]="-case -fileHandler | -newFormat -doc -doc-source -help" -_of_complete_cache_[chtMultiRegionFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[chtMultiRegionSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[coalChemistryFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[coldEngineFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[collapseEdges]="-case -collapseFaceSet -decomposeParDict -dict -fileHandler -hostRoots -roots -time | -collapseFaces -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[combinePatchFaces]="-case -concaveAngle -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -meshQuality -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[compressibleInterDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[compressibleInterFilmFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[compressibleInterFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[compressibleMultiphaseInterFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[chtMultiRegionFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[chtMultiRegionSimpleFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[coalChemistryFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[coldEngineFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[collapseEdges]="-case -collapseFaceSet -decomposeParDict -dict -fileHandler -time | -collapseFaces -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[combinePatchFaces]="-case -concaveAngle -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -meshQuality -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[compressibleInterDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[compressibleInterFilmFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[compressibleInterFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[compressibleMultiphaseInterFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[copySurfaceParts]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[createBaffles]="-case -decomposeParDict -dict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[createExternalCoupledPatchGeometry]="-case -commsDir -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -regions -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[createPatch]="-case -decomposeParDict -dict -fileHandler -hostRoots -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -writeObj -doc -doc-source -help" -_of_complete_cache_[createZeroDirectory]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots -templateDir | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[createBaffles]="-case -decomposeParDict -dict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[createExternalCoupledPatchGeometry]="-case -commsDir -decomposeParDict -fileHandler -region -regions | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[createPatch]="-case -decomposeParDict -dict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -writeObj -doc -doc-source -help" +_of_complete_cache_[createZeroDirectory]="-case -decomposeParDict -fileHandler -templateDir | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[datToFoam]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[decomposePar]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -time | -allRegions -cellDist -constant -copyUniform -copyZero -dry-run -fields -force -ifRequired -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noSets -noZero -verbose -doc -doc-source -help" -_of_complete_cache_[deformedGeom]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[dnsFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[DPMDyMFoam]="-case -cloudName -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[DPMFoam]="-case -cloud -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[driftFluxFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[dsmcFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[dsmcInitialise]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[electrostaticFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[engineCompRatio]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[engineFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[engineSwirl]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[decomposePar]="-case -decomposeParDict -fileHandler -region -time | -allRegions -cellDist -constant -copyUniform -copyZero -dry-run -fields -force -ifRequired -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noSets -noZero -verbose -doc -doc-source -help" +_of_complete_cache_[deformedGeom]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[dnsFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[DPMDyMFoam]="-case -cloudName -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[DPMFoam]="-case -cloud -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[driftFluxFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[dsmcFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[dsmcInitialise]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[electrostaticFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[engineCompRatio]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[engineFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[engineSwirl]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[equilibriumCO]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -doc -doc-source -help" _of_complete_cache_[equilibriumFlameT]="-case -fileHandler | -doc -doc-source -help" -_of_complete_cache_[extrude2DMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[extrude2DMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" _of_complete_cache_[extrudeEdgesInto2DSurface]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[extrudeMesh]="-case -decomposeParDict -fileHandler -hostRoots -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[extrudeToRegionMesh]="-case -decomposeParDict -dict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[faceAgglomerate]="-case -decomposeParDict -dict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[faSavageHutterFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[financialFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[fireFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[extrudeMesh]="-case -decomposeParDict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[extrudeToRegionMesh]="-case -decomposeParDict -dict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[faceAgglomerate]="-case -decomposeParDict -dict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[faSavageHutterFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[financialFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[fireFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[fireToFoam]="-case -fileHandler -scale | -ascii -check -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[flattenMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[flattenMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[FLMAToSurface]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[fluent3DMeshToFoam]="-case -fileHandler -ignoreCellGroups -ignoreFaceGroups -scale | -cubit -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[fluentMeshToFoam]="-case -fileHandler -scale | -noFunctionObjects -writeSets -writeZones -doc -doc-source -help" +_of_complete_cache_[fluentMeshToFoam]="-2D -case -fileHandler -scale | -noFunctionObjects -writeSets -writeZones -doc -doc-source -help" _of_complete_cache_[FMSToSurface]="-case -fileHandler | -exportFeatureEdges -exportSubsets -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[FMSToVTK]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[foamDataToFluent]="-case -fileHandler -listScalarBCs -listVectorBCs -time | -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -doc -doc-source -help" -_of_complete_cache_[foamDictionary]="-add -case -decomposeParDict -diff -diff-etc -entry -fileHandler -hostRoots -roots -set | -disableFunctionEntries -expand -includes -keywords -noFunctionObjects -parallel -remove -value -doc -doc-source -help" -_of_complete_cache_[foamFormatConvert]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noConstant -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[foamDataToFluent]="-case -fileHandler -time | -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -doc -doc-source -help" +_of_complete_cache_[foamDictionary]="-add -case -decomposeParDict -diff -diff-etc -entry -fileHandler -set | -disableFunctionEntries -expand -includes -keywords -noFunctionObjects -parallel -remove -value -doc -doc-source -help" +_of_complete_cache_[foamFormatConvert]="-case -decomposeParDict -fileHandler -region -time | -constant -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noConstant -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[foamHelp]="-case -decomposeParDict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[foamListRegions]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -doc -doc-source -help" _of_complete_cache_[foamListTimes]="-case -fileHandler -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -processor -rm -verbose -withZero -doc -doc-source -help" _of_complete_cache_[foamMeshToFluent]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[foamRestoreFields]="-case -decomposeParDict -fileHandler -hostRoots -method -roots -time | -constant -dry-run -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -parallel -processor -verbose -withZero -doc -doc-source -help" -_of_complete_cache_[foamToEnsight]="-case -cellZone -decomposeParDict -faceZones -fields -fileHandler -hostRoots -listScalarBCs -listVectorBCs -name -patches -region -roots -time -width | -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noLagrangian -noPatches -noZero -nodeValues -parallel -doc -doc-source -help" -_of_complete_cache_[foamToEnsightParts]="-case -fileHandler -index -listScalarBCs -listVectorBCs -name -time -width | -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noLagrangian -noMesh -noZero -doc -doc-source -help" +_of_complete_cache_[foamRestoreFields]="-case -decomposeParDict -fileHandler -method -time | -constant -dry-run -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -parallel -processor -verbose -withZero -doc -doc-source -help" +_of_complete_cache_[foamToEnsight]="-case -cellZone -decomposeParDict -faceZones -fields -fileHandler -name -patches -region -time -width | -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -no-boundary -no-internal -no-lagrangian -noFunctionObjects -noZero -nodeValues -parallel -doc -doc-source -help" +_of_complete_cache_[foamToEnsightParts]="-case -fields -fileHandler -index -name -region -time -width | -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -no-lagrangian -no-mesh -noFunctionObjects -noZero -doc -doc-source -help" _of_complete_cache_[foamToFireMesh]="-case -fileHandler -scale -time | -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -doc -doc-source -help" -_of_complete_cache_[foamToGMV]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[foamToGMV]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[foamToStarMesh]="-case -fileHandler -scale -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noBnd -noFunctionObjects -noZero -doc -doc-source -help" _of_complete_cache_[foamToSurface]="-case -fileHandler -scale -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -tri -doc -doc-source -help" -_of_complete_cache_[foamToTetDualMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[foamToVTK]="-case -cellSet -cellZone -decomposeParDict -excludePatches -faceSet -fields -fileHandler -hostRoots -listScalarBCs -listVectorBCs -name -pointSet -region -roots -time | -allPatches -ascii -constant -finiteAreaFields -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -nearCellValue -noFaceZones -noFunctionObjects -noInternal -noLagrangian -noLinks -noPointValues -noZero -parallel -poly -surfaceFields -useTimeName -xml -doc -doc-source -help" -_of_complete_cache_[foamUpgradeCyclics]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -dry-run -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[foamyHexMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -checkGeometry -conformationOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -parallel -doc -doc-source -help" +_of_complete_cache_[foamToTetDualMesh]="-case -decomposeParDict -fileHandler -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[foamToVTK]="-case -cellSet -cellZone -decomposeParDict -excludePatches -faceSet -fields -fileHandler -name -patches -pointSet -region -regions -time | -allRegions -ascii -constant -finiteAreaFields -latestTime -legacy -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -nearCellValue -no-boundary -no-internal -no-lagrangian -no-point-data -noFaceZones -noFunctionObjects -noZero -one-boundary -overwrite -parallel -poly-decomp -surfaceFields -doc -doc-source -help" +_of_complete_cache_[foamUpgradeCyclics]="-case -decomposeParDict -fileHandler -region -time | -constant -dry-run -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[foamyHexMesh]="-case -decomposeParDict -fileHandler | -checkGeometry -conformationOnly -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -parallel -doc -doc-source -help" _of_complete_cache_[foamyQuadMesh]="-case -fileHandler -pointsFile | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -doc -doc-source -help" _of_complete_cache_[gambitToFoam]="-case -fileHandler -scale | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[generateBoundaryLayers]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[generateBoundaryLayers]="-case -decomposeParDict -fileHandler | -2DLayers -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[gmshToFoam]="-case -fileHandler -region | -keepOrientation -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[icoFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[icoReactingMultiphaseInterFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[icoUncoupledKinematicParcelDyMFoam]="-case -cloud -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[icoUncoupledKinematicParcelFoam]="-case -cloud -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[icoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[icoReactingMultiphaseInterFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[icoUncoupledKinematicParcelDyMFoam]="-case -cloud -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[icoUncoupledKinematicParcelFoam]="-case -cloud -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[ideasUnvToFoam]="-case -fileHandler | -dump -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[importSurfaceAsSubset]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[improveMeshQuality]="-case -constrainedCellsSet -decomposeParDict -fileHandler -hostRoots -nIterations -nLoops -nSurfaceIterations -qualityThreshold -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[improveSymmetryPlanes]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[insideCells]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[interCondensatingEvaporatingFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[interFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[interIsoFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[interMixingFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[interPhaseChangeDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[interPhaseChangeFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[improveMeshQuality]="-case -constrainedCellsSet -decomposeParDict -fileHandler -nIterations -nLoops -nSurfaceIterations -qualityThreshold | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[improveSymmetryPlanes]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[insideCells]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[interCondensatingEvaporatingFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[interFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[interIsoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[interMixingFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[interPhaseChangeDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[interPhaseChangeFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[kivaToFoam]="-case -file -fileHandler -version -zHeadMin | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[laplacianFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[liquidFilmFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[lumpedPointForces]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -parallel -vtk -doc -doc-source -help" +_of_complete_cache_[laplacianFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[liquidFilmFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[lumpedPointForces]="-case -decomposeParDict -fileHandler -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noZero -parallel -vtk -doc -doc-source -help" _of_complete_cache_[lumpedPointMovement]="-case -fileHandler -max -scale -span | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -removeLock -slave -doc -doc-source -help" _of_complete_cache_[lumpedPointZones]="-case -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -verbose -doc -doc-source -help" -_of_complete_cache_[magneticFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noB -noFunctionObjects -noH -parallel -doc -doc-source -help" +_of_complete_cache_[magneticFoam]="-case -decomposeParDict -fileHandler | -HdotGradH -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noB -noFunctionObjects -noH -parallel -doc -doc-source -help" _of_complete_cache_[makeFaMesh]="-case -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[mapFields]="-case -fileHandler -mapMethod -sourceDecomposeParDict -sourceRegion -sourceTime -targetDecomposeParDict -targetRegion | -consistent -noFunctionObjects -parallelSource -parallelTarget -subtract -doc -doc-source -help" -_of_complete_cache_[mapFieldsPar]="-case -decomposeParDict -fields -fileHandler -hostRoots -mapMethod -patchMapMethod -procMapMethod -roots -sourceRegion -sourceTime -targetRegion | -consistent -noFunctionObjects -noLagrangian -parallel -subtract -doc -doc-source -help" -_of_complete_cache_[mdEquilibrationFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[mdFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[mdInitialise]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[mergeMeshes]="-addRegion -case -decomposeParDict -fileHandler -hostRoots -masterRegion -resultTime -roots | -noFunctionObjects -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[mergeOrSplitBaffles]="-case -decomposeParDict -dict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -detectOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -split -doc -doc-source -help" +_of_complete_cache_[mapFieldsPar]="-case -decomposeParDict -fields -fileHandler -mapMethod -patchMapMethod -procMapMethod -sourceRegion -sourceTime -targetRegion | -consistent -noFunctionObjects -noLagrangian -parallel -subtract -doc -doc-source -help" +_of_complete_cache_[mdEquilibrationFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[mdFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[mdInitialise]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[mergeMeshes]="-addRegion -case -decomposeParDict -fileHandler -masterRegion -resultTime | -noFunctionObjects -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[mergeOrSplitBaffles]="-case -decomposeParDict -dict -fileHandler -region | -detectOnly -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -overwrite -parallel -split -doc -doc-source -help" _of_complete_cache_[mergeSurfacePatches]="-case -fileHandler -output -patchIdRange -patchIds -patchNames | -keep -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[meshToFPMA]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[mhdFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[mirrorMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[meshToFPMA]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[mhdFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[mirrorMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -doc -doc-source -help" _of_complete_cache_[mixtureAdiabaticFlameT]="-case -fileHandler | -doc -doc-source -help" -_of_complete_cache_[modifyMesh]="-case -decomposeParDict -dict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[moveDynamicMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -checkAMI -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[moveEngineMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[moveMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[MPPICDyMFoam]="-case -cloudName -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[MPPICFoam]="-case -cloud -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[MPPICInterFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[modifyMesh]="-case -decomposeParDict -dict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[moveDynamicMesh]="-case -decomposeParDict -fileHandler -region | -checkAMI -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[moveEngineMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[moveMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[MPPICDyMFoam]="-case -cloudName -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[MPPICFoam]="-case -cloud -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[MPPICInterFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[mshToFoam]="-case -fileHandler | -hex -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[multiphaseEulerFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[multiphaseInterFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[netgenNeutralToFoam]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[noise]="-case -decomposeParDict -dict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[nonNewtonianIcoFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[multiphaseEulerFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[multiphaseInterFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[netgenNeutralToFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[noise]="-case -decomposeParDict -dict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[nonNewtonianIcoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[objToVTK]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[orientFaceZone]="-case -decomposeParDict -fileHandler -hostRoots -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[overInterDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[overLaplacianDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[overPimpleDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[overPotentialFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -pName -roots | -initialiseUBCs -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -withFunctionObjects -writePhi -writep -doc -doc-source -help" -_of_complete_cache_[overRhoPimpleDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[overRhoSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[overSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[particleTracks]="-case -decomposeParDict -fileHandler -hostRoots -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[orientFaceZone]="-case -decomposeParDict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[overInterDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[overLaplacianDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[overPimpleDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[overPotentialFoam]="-case -decomposeParDict -fileHandler -pName | -initialiseUBCs -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -withFunctionObjects -writePhi -writep -doc -doc-source -help" +_of_complete_cache_[overRhoPimpleDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[overRhoSimpleFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[overSimpleFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[particleTracks]="-case -decomposeParDict -fileHandler -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -doc -doc-source -help" _of_complete_cache_[patchesToSubsets]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[patchSummary]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -expand -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[pdfPlot]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[PDRFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[PDRMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[pimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[pisoFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[plot3dToFoam]="-case -fileHandler -scale | -noBlank -noFunctionObjects -singleBlock -doc -doc-source -help" -_of_complete_cache_[pMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[polyDualMesh]="-case -fileHandler -listScalarBCs -listVectorBCs | -concaveMultiCells -doNotPreserveFaceZones -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -splitAllFaces -doc -doc-source -help" -_of_complete_cache_[porousSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[postChannel]="-case -fileHandler -listScalarBCs -listVectorBCs -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -doc -doc-source -help" -_of_complete_cache_[postProcess]="-case -decomposeParDict -dict -field -fields -fileHandler -func -funcs -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -list -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -profiling -doc -doc-source -help" -_of_complete_cache_[potentialFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -pName -roots | -dry-run -dry-run-write -initialiseUBCs -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -withFunctionObjects -writePhi -writep -doc -doc-source -help" -_of_complete_cache_[potentialFreeSurfaceDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[potentialFreeSurfaceFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[patchSummary]="-case -decomposeParDict -fileHandler -region -time | -constant -expand -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[pdfPlot]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[PDRFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[PDRMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[pimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[pisoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[plot3dToFoam]="-2D -case -fileHandler -scale | -noBlank -noFunctionObjects -singleBlock -doc -doc-source -help" +_of_complete_cache_[pMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[polyDualMesh]="-case -fileHandler | -concaveMultiCells -doNotPreserveFaceZones -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -overwrite -splitAllFaces -doc -doc-source -help" +_of_complete_cache_[porousSimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[postChannel]="-case -fileHandler -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -doc -doc-source -help" +_of_complete_cache_[postProcess]="-case -decomposeParDict -dict -field -fields -fileHandler -func -funcs -region -time | -constant -latestTime -list -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -parallel -profiling -doc -doc-source -help" +_of_complete_cache_[potentialFoam]="-case -decomposeParDict -fileHandler -pName | -dry-run -dry-run-write -initialiseUBCs -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -withFunctionObjects -writePhi -writep -doc -doc-source -help" +_of_complete_cache_[potentialFreeSurfaceDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[potentialFreeSurfaceFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[preparePar]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[profilingSummary]="-case -fileHandler -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -withZero -doc -doc-source -help" -_of_complete_cache_[reactingFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[reactingMultiphaseEulerFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[reactingParcelFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[reactingTwoPhaseEulerFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[reconstructPar]="-case -fields -fileHandler -lagrangianFields -listScalarBCs -listVectorBCs -region -time | -allRegions -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFields -noFunctionObjects -noLagrangian -noSets -noZero -withZero -doc -doc-source -help" -_of_complete_cache_[reconstructParMesh]="-case -fileHandler -listScalarBCs -listVectorBCs -mergeTol -region -time | -cellDist -constant -fullMatch -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -withZero -doc -doc-source -help" -_of_complete_cache_[redistributePar]="-case -decomposeParDict -fileHandler -hostRoots -mergeTol -region -roots -time | -allRegions -cellDist -constant -decompose -dry-run -latestTime -newTimes -noZero -overwrite -parallel -reconstruct -withZero -doc -doc-source -help" -_of_complete_cache_[refineHexMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -minSet -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[refinementLevel]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -readLevel -doc -doc-source -help" -_of_complete_cache_[refineMesh]="-case -decomposeParDict -dict -fileHandler -hostRoots -region -roots | -all -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[refineWallLayer]="-case -decomposeParDict -fileHandler -hostRoots -roots -useSet | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[releaseAreaMapping]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[removeFaces]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[reactingFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[reactingMultiphaseEulerFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[reactingParcelFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[reactingTwoPhaseEulerFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[reconstructPar]="-case -fields -fileHandler -lagrangianFields -region -time | -allRegions -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -newTimes -noFields -noFunctionObjects -noLagrangian -noSets -noZero -withZero -doc -doc-source -help" +_of_complete_cache_[reconstructParMesh]="-case -fileHandler -mergeTol -region -time | -cellDist -constant -fullMatch -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -withZero -doc -doc-source -help" +_of_complete_cache_[redistributePar]="-case -decomposeParDict -fileHandler -mergeTol -region -time | -allRegions -cellDist -constant -decompose -dry-run -latestTime -newTimes -noZero -overwrite -parallel -reconstruct -withZero -doc -doc-source -help" +_of_complete_cache_[refineHexMesh]="-case -decomposeParDict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -minSet -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[refinementLevel]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -readLevel -doc -doc-source -help" +_of_complete_cache_[refineMesh]="-case -decomposeParDict -dict -fileHandler -region | -all -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[refineWallLayer]="-case -decomposeParDict -fileHandler -useSet | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[releaseAreaMapping]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[removeFaces]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -overwrite -parallel -doc -doc-source -help" _of_complete_cache_[removeSurfaceFacets]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[renumberMesh]="-case -decomposeParDict -dict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -frontWidth -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -overwrite -parallel -doc -doc-source -help" -_of_complete_cache_[rhoCentralDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[rhoCentralFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[rhoPimpleAdiabaticFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[rhoPimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[rhoPorousSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[rhoReactingBuoyantFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[rhoReactingFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[rhoSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[rotateMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[scalarTransportFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[scaleMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[renumberMesh]="-case -decomposeParDict -dict -fileHandler -region -time | -constant -frontWidth -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noZero -overwrite -parallel -doc -doc-source -help" +_of_complete_cache_[rhoCentralDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[rhoCentralFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[rhoPimpleAdiabaticFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[rhoPimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[rhoPorousSimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[rhoReactingBuoyantFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[rhoReactingFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[rhoSimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[rotateMesh]="-case -decomposeParDict -fileHandler -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[scalarTransportFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[scaleMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[scaleSurfaceMesh]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[selectCells]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[setAlphaField]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[setFields]="-case -decomposeParDict -dict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[setSet]="-batch -case -decomposeParDict -fileHandler -hostRoots -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -loop -noFunctionObjects -noSync -noVTK -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[setsToZones]="-case -decomposeParDict -fileHandler -hostRoots -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFlipMap -noFunctionObjects -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[shallowWaterFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[simpleCoalParcelFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[simpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[simpleReactingParcelFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[simpleSprayFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[singleCellMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[slopeMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[setAlphaField]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[setFields]="-case -decomposeParDict -dict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[setSet]="-batch -case -decomposeParDict -fileHandler -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -loop -noFunctionObjects -noSync -noVTK -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[setsToZones]="-case -decomposeParDict -fileHandler -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFlipMap -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[shallowWaterFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[simpleCoalParcelFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[simpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[simpleReactingParcelFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[simpleSprayFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[singleCellMesh]="-case -decomposeParDict -fileHandler -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[slopeMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[smapToFoam]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[snappyHexMesh]="-case -decomposeParDict -dict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -outFile -patches -region -roots -surfaceSimplify | -checkGeometry -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -profiling -doc -doc-source -help" +_of_complete_cache_[snappyHexMesh]="-case -decomposeParDict -dict -fileHandler -outFile -patches -region -surfaceSimplify | -checkGeometry -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -overwrite -parallel -profiling -doc -doc-source -help" _of_complete_cache_[snappyRefineMesh]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[solidDisplacementFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[solidEquilibriumDisplacementFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[sonicDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[sonicFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[sonicLiquidFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[sphereSurfactantFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[solidDisplacementFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[solidEquilibriumDisplacementFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[sonicDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[sonicFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[sonicLiquidFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[sphereSurfactantFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[splitCells]="-case -fileHandler -set -tol | -geometry -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -doc -doc-source -help" _of_complete_cache_[splitMesh]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -doc -doc-source -help" -_of_complete_cache_[splitMeshRegions]="-blockedFaces -case -cellZonesFileOnly -decomposeParDict -fileHandler -hostRoots -insidePoint -listScalarBCs -listVectorBCs -region -roots | -cellZones -cellZonesOnly -detectOnly -largestOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -makeCellZones -overwrite -parallel -prefixRegion -sloppyCellZones -useFaceZones -doc -doc-source -help" -_of_complete_cache_[sprayDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[sprayFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[SRFPimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[SRFSimpleFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[splitMeshRegions]="-blockedFaces -case -cellZonesFileOnly -decomposeParDict -fileHandler -insidePoint -region | -cellZones -cellZonesOnly -detectOnly -largestOnly -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -makeCellZones -overwrite -parallel -prefixRegion -sloppyCellZones -useFaceZones -doc -doc-source -help" +_of_complete_cache_[sprayDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[sprayFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[SRFPimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[SRFSimpleFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" _of_complete_cache_[star4ToFoam]="-case -fileHandler -scale | -ascii -noFunctionObjects -solids -doc -doc-source -help" _of_complete_cache_[steadyParticleTracks]="-case -dict -fileHandler -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -doc -doc-source -help" -_of_complete_cache_[stitchMesh]="-case -dict -fileHandler -listScalarBCs -listVectorBCs -region -toleranceDict | -integral -intermediate -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -partial -perfect -doc -doc-source -help" -_of_complete_cache_[subsetMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -patch -patches -region -resultTime -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -zone -doc -doc-source -help" +_of_complete_cache_[stitchMesh]="-case -dict -fileHandler -region -toleranceDict | -integral -intermediate -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -overwrite -partial -perfect -doc -doc-source -help" +_of_complete_cache_[subsetMesh]="-case -decomposeParDict -fileHandler -patch -patches -region -resultTime | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -overwrite -parallel -zone -doc -doc-source -help" _of_complete_cache_[subsetToPatch]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceAdd]="-case -fileHandler -points -scale | -mergeRegions -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceBooleanFeatures]="-case -fileHandler -scale -trim | -invertedSpace -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -perturb -surf1Baffle -surf2Baffle -doc -doc-source -help" @@ -257,11 +258,11 @@ _of_complete_cache_[surfaceMeshConvert]="-case -dict -fileHandler -from -scaleIn _of_complete_cache_[surfaceMeshExport]="-case -dict -fileHandler -from -name -scaleIn -scaleOut -to | -clean -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceMeshImport]="-case -dict -fileHandler -from -name -scaleIn -scaleOut -to | -clean -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceMeshInfo]="-case -fileHandler -scale | -areas -noFunctionObjects -xml -doc -doc-source -help" -_of_complete_cache_[surfaceMeshTriangulate]="-case -decomposeParDict -faceZones -fileHandler -hostRoots -patches -region -roots -time | -constant -excludeProcPatches -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[surfaceMeshTriangulate]="-case -decomposeParDict -faceZones -fileHandler -patches -region -time | -constant -excludeProcPatches -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -doc -doc-source -help" _of_complete_cache_[surfaceOrient]="-case -fileHandler -scale | -inside -noFunctionObjects -usePierceTest -doc -doc-source -help" _of_complete_cache_[surfacePatch]="-case -dict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfacePointMerge]="-case -fileHandler -scale | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[surfaceRedistributePar]="-case -decomposeParDict -fileHandler -hostRoots -roots | -keepNonMapped -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[surfaceRedistributePar]="-case -decomposeParDict -fileHandler | -keepNonMapped -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[surfaceRefineRedGreen]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceSplitByPatch]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceSplitByTopology]=" | -doc -doc-source -help" @@ -270,25 +271,26 @@ _of_complete_cache_[surfaceSubset]="-case -fileHandler | -noFunctionObjects -doc _of_complete_cache_[surfaceToFMS]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceToPatch]="-case -faceSet -fileHandler -tol | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" _of_complete_cache_[surfaceTransformPoints]="-case -fileHandler -origin -rollPitchYaw -rotate -rotate-angle -scale -translate -yawPitchRoll | -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[surfactantFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[temporalInterpolate]="-case -decomposeParDict -divisions -fields -fileHandler -hostRoots -interpolationType -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[tetgenToFoam]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFaceFile -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[tetMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[thermoFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[topoSet]="-case -decomposeParDict -dict -fileHandler -hostRoots -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noSync -noZero -parallel -doc -doc-source -help" -_of_complete_cache_[transformPoints]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -origin -region -rollPitchYaw -roots -rotate -rotate-angle -scale -translate -yawPitchRoll | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -rotateFields -doc -doc-source -help" -_of_complete_cache_[twoLiquidMixingFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[twoPhaseEulerFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[uncoupledKinematicParcelDyMFoam]="-case -cloudName -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[uncoupledKinematicParcelFoam]="-case -cloud -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[viewFactorsGen]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[surfactantFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[temporalInterpolate]="-case -decomposeParDict -divisions -fields -fileHandler -interpolationType -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[Test-decomposePar]="-case -decomposeParDict -domains -fileHandler -method -region -time | -allRegions -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -noZero -verbose -doc -doc-source -help" +_of_complete_cache_[tetgenToFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFaceFile -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[tetMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[thermoFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[topoSet]="-case -decomposeParDict -dict -fileHandler -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noSync -noZero -parallel -doc -doc-source -help" +_of_complete_cache_[transformPoints]="-case -decomposeParDict -fileHandler -origin -region -rollPitchYaw -rotate -rotate-angle -scale -translate -yawPitchRoll | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -rotateFields -doc -doc-source -help" +_of_complete_cache_[twoLiquidMixingFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[twoPhaseEulerFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[uncoupledKinematicParcelDyMFoam]="-case -cloudName -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[uncoupledKinematicParcelFoam]="-case -cloud -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[viewFactorsGen]="-case -decomposeParDict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[vtkUnstructuredToFoam]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -doc -doc-source -help" -_of_complete_cache_[wallFunctionTable]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" -_of_complete_cache_[writeMeshObj]="-case -cell -cellSet -decomposeParDict -face -faceSet -fileHandler -hostRoots -point -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -parallel -patchEdges -patchFaces -doc -doc-source -help" -_of_complete_cache_[XiDyMFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[XiEngineFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[XiFoam]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -doc -doc-source -help" -_of_complete_cache_[zipUpMesh]="-case -decomposeParDict -fileHandler -hostRoots -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[wallFunctionTable]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -doc -doc-source -help" +_of_complete_cache_[writeMeshObj]="-case -cell -cellSet -decomposeParDict -face -faceSet -fileHandler -point -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -parallel -patchEdges -patchFaces -doc -doc-source -help" +_of_complete_cache_[XiDyMFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[XiEngineFoam]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[XiFoam]="-case -decomposeParDict -fileHandler | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help" +_of_complete_cache_[zipUpMesh]="-case -decomposeParDict -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help" _of_complete_cache_[paraFoam]="-case -region | -block -touch -touch-all -touch-proc -vtk -help" #------------------------------------------------------------------------------ diff --git a/etc/config.sh/functions b/etc/config.sh/functions index eef3d9941d9b947b6f50187b42ad12f3d1338908..ead80710543d74d14c261a31fd4318aa5fb73e99 100644 --- a/etc/config.sh/functions +++ b/etc/config.sh/functions @@ -40,6 +40,15 @@ then unset "foamVar_name" } + # Echo values to stderr when FOAM_VERBOSE is on, no-op otherwise + unset -f _foamEcho 2>/dev/null + if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ] + then + _foamEcho() { echo "$@" 1>&2; } + else + _foamEcho() { true; } + fi + # Source an etc file, possibly with some verbosity # - use eval to avoid intermediate variables (ksh doesn't have 'local') unset -f _foamEtc 2>/dev/null @@ -216,7 +225,7 @@ else # Was previously loaded/defined - now unset unset -f _foamAddPath _foamAddMan _foamAddLib _foamAddLibAuto 2>/dev/null - unset -f _foamClean _foamEtc _foamEval 2>/dev/null + unset -f _foamClean _foamEcho _foamEtc _foamEval 2>/dev/null unset foamClean unset WM_SHELL_FUNCTIONS diff --git a/etc/config.sh/settings b/etc/config.sh/settings index ae63d010fe2a9a8a2f5985f588046cf7657bc948..23aec009a36c376deab3a9b929303ef559ca5981 100644 --- a/etc/config.sh/settings +++ b/etc/config.sh/settings @@ -140,9 +140,6 @@ export WM_OPTIONS="$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_C export FOAM_APPBIN="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin" export FOAM_LIBBIN="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib" -# External (ThirdParty) libraries -export FOAM_EXT_LIBBIN="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib" - # Site-specific (group) files # Default @@ -187,9 +184,9 @@ if [ -d "$siteDir/bin" ] # Generic then _foamAddPath "$siteDir/bin" fi -if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ] # Version-specific +if [ -d "$siteDir/$WM_PROJECT_API/bin" ] # API-specific then - _foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin" + _foamAddPath "$siteDir/$WM_PROJECT_API/bin" fi # OpenFOAM executables (user, group, standard) @@ -198,10 +195,13 @@ _foamAddPath "$FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN" # Dummy versions of external libraries. To be found last in LD_LIBRARY_PATH _foamAddLib "$FOAM_LIBBIN/dummy" -# External libraries (allowed to be unset) -if [ -n "$FOAM_EXT_LIBBIN" ] +# External (ThirdParty) libraries. Also allowed to be unset +if [ -d "$WM_THIRD_PARTY_DIR" ] then - _foamAddLib $FOAM_EXT_LIBBIN + export FOAM_EXT_LIBBIN="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib" + _foamAddLib "$FOAM_EXT_LIBBIN" +else + unset FOAM_EXT_LIBBIN fi # OpenFOAM libraries (user, group, standard) diff --git a/etc/config.sh/setup b/etc/config.sh/setup new file mode 100644 index 0000000000000000000000000000000000000000..423605ce920c9863926b1bf7d344e74c98aef18a --- /dev/null +++ b/etc/config.sh/setup @@ -0,0 +1,171 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM, licensed under GNU General Public License +# <http://www.gnu.org/licenses/>. +# +# File +# etc/config.sh/setup +# - sourced by OpenFOAM-*/etc/bashrc +# +# Description +# Finalize setup of OpenFOAM environment for POSIX shell. +# +# Environment +# FOAM_VERBOSE (set/unset) +# - add extra verbosity when sourcing files +# FOAM_CONFIG_NOUSER (set/unset) +# - suppress use of user/group configuration files +# +#------------------------------------------------------------------------------ + +# [WM_PROJECT_API] - The API level for the project +export WM_PROJECT_API="$($WM_PROJECT_DIR/bin/foamEtcFile -show-api)" + +# The installation parent directory +prefixDir="${WM_PROJECT_DIR%/*}" + +# Load shell functions +unset WM_SHELL_FUNCTIONS +. "$WM_PROJECT_DIR/etc/config.sh/functions" + + +# [WM_THIRD_PARTY_DIR] - Location of third-party software components +# \- This may be installed in a directory parallel to the OpenFOAM project +# directory, with the same version name or using the API value. +# It may also not be required at all, in which case a dummy "ThirdParty" +# directory inside of the OpenFOAM project directory. +# +# Note: only accept if the directory exists and contains a "Allwmake" file +export WM_THIRD_PARTY_DIR +unset foundDir + +_foamEcho "Locating ThirdParty directory" + +for WM_THIRD_PARTY_DIR in \ + "$WM_PROJECT_DIR/ThirdParty" \ + "$prefixDir/ThirdParty-$WM_PROJECT_VERSION" \ + "$prefixDir/ThirdParty-v$WM_PROJECT_API" \ + "$prefixDir/ThirdParty-$WM_PROJECT_API" \ + "$prefixDir/ThirdParty-common" \ + ; +do + _foamEcho "... $WM_THIRD_PARTY_DIR" + if [ -d "$WM_THIRD_PARTY_DIR" ] + then + if [ -f "$WM_THIRD_PARTY_DIR/Allwmake" ] || \ + [ -d "$WM_THIRD_PARTY_DIR/platforms" ] + then + foundDir=true + break + fi + fi +done + +if [ -n "$foundDir" ] +then + _foamEcho "Using $WM_THIRD_PARTY_DIR" +else + # Dummy fallback value + WM_THIRD_PARTY_DIR="$WM_PROJECT_DIR/ThirdParty" + _foamEcho "Dummy $WM_THIRD_PARTY_DIR" +fi +# Done with ThirdParty discovery + + +# Overrides via <prefs.sh> +# 1. other (system) values +_foamEtc -mode=o prefs.sh + +# 2. user or group values (unless disabled) +[ -z "$FOAM_CONFIG_NOUSER" ] && _foamEtc -mode=ug prefs.sh + + +# Capture and evaluate any command-line parameters +# These can be used to set/unset values, specify additional files etc. +FOAM_SETTINGS="$@" + +# Evaluate the command-line parameters, which were saved as FOAM_SETTINGS. +# These can be used to set/unset values, specify additional files etc. +if [ -z "$FOAM_SETTINGS" ] +then + unset FOAM_SETTINGS +else + export FOAM_SETTINGS + _foamEval "$@" +fi + + +# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH) +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export PATH MANPATH LD_LIBRARY_PATH +_foamClean PATH "$foamOldDirs" +_foamClean MANPATH "$foamOldDirs" +_foamClean LD_LIBRARY_PATH "$foamOldDirs" + +# Setup for OpenFOAM compilation etc +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +_foamEtc -config settings + +# Setup for third-party packages +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +_foamEtc -config mpi +_foamEtc -config paraview -- "$@" # Pass through for evaluation +_foamEtc -config vtk +_foamEtc -config ensight +_foamEtc -config gperftools +## _foamEtc -config ADIOS +## _foamEtc -config ADIOS2 +_foamEtc -config CGAL +_foamEtc -config scotch +_foamEtc -config FFTW + +if [ -d "$WM_PROJECT_DIR/doc/man1" ] +then + _foamAddMan "$WM_PROJECT_DIR/doc" +fi + +# Interactive shell +if /usr/bin/tty -s 2>/dev/null +then + _foamEtc -config aliases + [ "${BASH_VERSINFO:-0}" -ge 4 ] && _foamEtc -config bash_completion +fi + + +# Clean environment paths again. Only remove duplicates +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export PATH MANPATH LD_LIBRARY_PATH + +_foamClean PATH +_foamClean MANPATH +_foamClean LD_LIBRARY_PATH + +# Add trailing ':' for system manpages +if [ -n "$MANPATH" ] +then + MANPATH="${MANPATH}:" +fi + +if [ -n "$LD_PRELOAD" ] +then + export LD_PRELOAD + _foamClean LD_PRELOAD +fi + + +# Cleanup temporary information +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Unload shell functions +. "$WM_PROJECT_DIR/etc/config.sh/functions" + +# Variables (done as the last statement for a clean exit code) +unset cleaned foamOldDirs foundDir prefixDir + +#------------------------------------------------------------------------------ diff --git a/etc/config.sh/unset b/etc/config.sh/unset index 4ebfe761851d3067c02503ca0391aa5310d8bb59..4d3c5fd0e410a089790bedaeee7d73d3f891a2d4 100644 --- a/etc/config.sh/unset +++ b/etc/config.sh/unset @@ -50,6 +50,7 @@ unset WM_OPTIONS unset WM_OSTYPE unset WM_PRECISION_OPTION unset WM_PROJECT +unset WM_PROJECT_API unset WM_PROJECT_DIR unset WM_PROJECT_INST_DIR unset WM_PROJECT_SITE diff --git a/etc/config.sh/vtk b/etc/config.sh/vtk index 242407e977973e55c8eaac53cd029f4a81ed75c9..782fcc43e40dd5081b14cf9a55fbf7f8a1580604 100644 --- a/etc/config.sh/vtk +++ b/etc/config.sh/vtk @@ -31,7 +31,7 @@ #------------------------------------------------------------------------------ # USER EDITABLE PART: Changes made here may be lost with the next upgrade -vtk_version=VTK-9.0.0 +vtk_version=VTK-8.2.0 mesa_version=mesa-17.1.1 export VTK_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version diff --git a/etc/cshrc b/etc/cshrc index 28b93b5ef97f127ab7bd06aaaa22b60b87586546..971041cfa836c8f29ee5fafd805a3c5dc29a1fb3 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -22,10 +22,10 @@ # - $WM_PROJECT_DIR/etc/prefs.csh # # - User or group values (first file found): -# - ~/.OpenFOAM/$WM_PROJECT_VERSION/prefs.csh +# - ~/.OpenFOAM/$WM_PROJECT_API/prefs.csh # - ~/.OpenFOAM/prefs.csh -# - $WM_PROJECT_SITE/$WM_PROJECT_VERSION/etc/prefs.csh -# - $WM_PROJECT_SITE/etc/prefs.csh +# - $WM_PROJECT_SITE/$WM_PROJECT_API/etc/prefs.csh +# - $WM_PROJECT_SITE/prefs.csh # # Environment # FOAM_VERBOSE (set/unset) @@ -43,17 +43,22 @@ setenv WM_PROJECT OpenFOAM setenv WM_PROJECT_VERSION plus -# [FOAM_INST_DIR] - parent directory containing the OpenFOAM installation. +# [projectDir] - parent directory containing the OpenFOAM installation. # \- When this file is located as $WM_PROJECT_DIR/etc/cshrc, the next lines # should work when sourced by CSH or TCSH shells. If this however fails, # set one of the fallback values to an appropriate path. -# -- -set FOAM_INST_DIR=`lsof +p $$ |& \ - sed -n -e 's@[^/]*@@' -e 's@/'$WM_PROJECT'[^/]*/etc/cshrc.*@@p'` -# set FOAM_INST_DIR=$HOME/$WM_PROJECT -# set FOAM_INST_DIR=/opt/$WM_PROJECT -# set FOAM_INST_DIR=/usr/local/$WM_PROJECT # +# This can be removed if an absolute path is provided for WM_PROJECT_DIR +# later on in this file. +# -- +# If the directory naming does not match WM_PROJECT, need to change here +set projectName="$WM_PROJECT" +set projectDir=`lsof +p $$ |& \ + sed -n -e 's@^[^/]*@@; s@\(/'"$projectName"'[^/]*\)/etc/cshrc[^/]*@\1@p'` + +# set projectDir="$HOME/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION" +# set projectDir="/opt/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION" +# set projectDir="/usr/local/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION" # END OF (NORMAL) USER EDITABLE PART ################################################################################ @@ -138,10 +143,8 @@ if ( $?FOAM_SITE_LIBBIN ) then set foamOldDirs="$foamOldDirs $FOAM_SITE_LIBBIN" endif -# Location of installation and third-party software -setenv WM_PROJECT_INST_DIR $FOAM_INST_DIR -setenv WM_PROJECT_DIR $WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION -setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION +# [WM_PROJECT_DIR] - Location of this OpenFOAM version +setenv WM_PROJECT_DIR "$projectDir" # [WM_PROJECT_USER_DIR] - Location of user files setenv WM_PROJECT_USER_DIR "$HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION" @@ -157,118 +160,17 @@ else unsetenv WM_PROJECT_SITE endif -# Load shell "functions" (actually aliases) -source $WM_PROJECT_DIR/etc/config.csh/functions - -# Overrides via <prefs.csh> -# 1. other (system) values -_foamEtc -mode=o prefs.csh - -# 2. user or group values (unless disabled) -if (! $?FOAM_CONFIG_NOUSER ) then - _foamEtc -mode=ug prefs.csh -endif - -# Evaluate command-line parameters and record settings for later. -# These can be used to set/unset values, specify additional files etc. -setenv FOAM_SETTINGS "${*}" -while ( $#argv > 0 ) - switch ($argv[1]) - case -*: - # Stray option (not meant for us here) -> get out - break - breaksw - case *=: - # name= -> unsetenv name - if ($?FOAM_VERBOSE && $?prompt) echo "unsetenv $argv[1]:s/=//" - eval "unsetenv $argv[1]:s/=//" - breaksw - case *=*: - # name=value -> setenv name value - if ($?FOAM_VERBOSE && $?prompt) echo "setenv $argv[1]:s/=/ /" - eval "setenv $argv[1]:s/=/ /" - breaksw - default: - # Filename: source it - if ( -f "$argv[1]" ) then - if ($?FOAM_VERBOSE && $?prompt) echo "Using: $argv[1]" - source "$argv[1]" - else - _foamEtc -silent "$argv[1]" - endif - breaksw - endsw - shift -end - - -# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH) -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Prevent local variables from shadowing setenv variables -unset PATH MANPATH LD_LIBRARY_PATH LD_PRELOAD -if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH -if (! $?MANPATH ) setenv MANPATH - -_foamClean PATH "$foamOldDirs" -_foamClean MANPATH "$foamOldDirs" -_foamClean LD_LIBRARY_PATH "$foamOldDirs" - -# Setup for OpenFOAM compilation etc -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamEtc -config settings - -# Setup for third-party packages -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamEtc -config mpi -_foamEtc -config paraview -- "$FOAM_SETTINGS" # Pass through for evaluation -_foamEtc -config vtk -_foamEtc -config ensight -## _foamEtc -config ADIOS -## _foamEtc -config ADIOS2 -_foamEtc -config CGAL -_foamEtc -config FFTW - -if ( -d "$WM_PROJECT_DIR/doc/man1" ) then - _foamAddMan "$WM_PROJECT_DIR/doc" -endif - -# Interactive shell -if ($?prompt) then - _foamEtc -config aliases - _foamEtc -config tcsh_completion -endif - - -# Clean environment paths again. Only remove duplicates -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -_foamClean PATH -_foamClean MANPATH -_foamClean LD_LIBRARY_PATH -# Add trailing ':' for system manpages -if ( $?MANPATH ) then - setenv MANPATH "${MANPATH}:" -endif - -if ( $?LD_PRELOAD ) then - _foamClean LD_PRELOAD +# Finalize setup of OpenFOAM environment +if ( -d "$WM_PROJECT_DIR" ) then + if ($?FOAM_VERBOSE && $?prompt) echo "source $WM_PROJECT_DIR/etc/config.csh/setup" + source "$WM_PROJECT_DIR/etc/config.csh/setup" "${*}" +else + echo "Error: did not locate installation path for $WM_PROJECT-$WM_PROJECT_VERSION" + echo "No directory: $WM_PROJECT_DIR" endif - -# Cleanup temporary information -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Unload shell "functions" -unalias _foamClean -unalias _foamEtc -unalias _foamAddPath -unalias _foamAddMan -unalias _foamAddLib -unalias _foamAddLibAuto - -# Variables (done as the last statement for a clean exit code) -unset FOAM_INST_DIR # Old variable name (OpenFOAM-v1606) - now unneeded -unset cleaned foamOldDirs +# Cleanup variables (done as final statement for a clean exit code) +unset foamOldDirs projectDir projectName #------------------------------------------------------------------------------ diff --git a/modules/catalyst b/modules/catalyst index 0e65a8c91644587ddfb0b38abf4bdd5771fbc82d..f0c9f44bcb94a2bdb195fb60ccf32a9615f05ff1 160000 --- a/modules/catalyst +++ b/modules/catalyst @@ -1 +1 @@ -Subproject commit 0e65a8c91644587ddfb0b38abf4bdd5771fbc82d +Subproject commit f0c9f44bcb94a2bdb195fb60ccf32a9615f05ff1 diff --git a/modules/cfmesh b/modules/cfmesh index 101a4d03cb7ff08da3bc9cde4ad62a15692eef7c..024454c8dbef41a19d4e401b2c32ca4f03090d00 160000 --- a/modules/cfmesh +++ b/modules/cfmesh @@ -1 +1 @@ -Subproject commit 101a4d03cb7ff08da3bc9cde4ad62a15692eef7c +Subproject commit 024454c8dbef41a19d4e401b2c32ca4f03090d00 diff --git a/src/Allwmake b/src/Allwmake index bb96a5400453fe833015e9f1843d459fca0f5e60..7742d3502c06d1b0a3123669893e47a9a7c8a3cf 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -16,7 +16,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR/src" 2>/dev/null || { #------------------------------------------------------------------------------ # Trigger update of version strings as required -wmakePrintBuild -check || wrmo OpenFOAM/global/global.o 2>/dev/null +wmakeBuildInfo -check || wrmo OpenFOAM/global/global.o 2>/dev/null wmakeLnInclude -u OpenFOAM wmakeLnInclude -u OSspecific/"${WM_OSTYPE:-POSIX}" diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C index 6e564d58c693fc8ddf52873016c15e2baf7291ae..0e92a02440333590377b077d723c8bf50e43a2d6 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C @@ -81,6 +81,7 @@ void Foam::dynamicCode::checkSecurity << " allowSystemOperations 1" << nl << nl << "to the InfoSwitches setting in the system controlDict." << nl << "The system controlDict is any of" << nl << nl + << " ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl << " ~/.OpenFOAM/controlDict" << nl << " $WM_PROJECT_DIR/etc/controlDict" << nl << endl << exit(FatalIOError); diff --git a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C index 23265362793e78e6552af6c0b9edaa7f9519e391..3f1cc7c03567107d8d5aa68eb44b82e6589cef77 100644 --- a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C +++ b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C @@ -46,18 +46,14 @@ void Foam::functionObjects::writeFile::initStream(Ostream& os) const Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const { - fileName baseDir = fileObr_.time().path(); + // Put in undecomposed case + // (Note: gives problems for distributed data running) - if (Pstream::parRun()) - { - // Put in undecomposed case (Note: gives problems for - // distributed data running) - baseDir = baseDir/".."/functionObject::outputPrefix; - } - else - { - baseDir = baseDir/functionObject::outputPrefix; - } + fileName baseDir = + ( + fileObr_.time().globalPath() + / functionObject::outputPrefix + ); // Append mesh name if not default region if (isA<polyMesh>(fileObr_)) @@ -65,12 +61,11 @@ Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const const polyMesh& mesh = refCast<const polyMesh>(fileObr_); if (mesh.name() != polyMesh::defaultRegion) { - baseDir = baseDir/mesh.name(); + baseDir /= mesh.name(); } } - // Remove any ".." - baseDir.clean(); + baseDir.clean(); // Remove unneeded ".." return baseDir; } @@ -85,15 +80,18 @@ Foam::fileName Foam::functionObjects::writeFile::baseTimeDir() const Foam::autoPtr<Foam::OFstream> Foam::functionObjects::writeFile::createFile ( const word& name, - const scalar time + const scalar time0 ) const { autoPtr<OFstream> osPtr; if (Pstream::master() && writeToFile_) { - const scalar userTime = fileObr_.time().timeToUserTime(time); - const word timeName = Time::timeName(userTime); + const scalar time = useUserTime_ ? + fileObr_.time().timeToUserTime(time0) + : time0; + + const word timeName = Time::timeName(time); fileName outputDir(baseFileDir()/prefix_/timeName); @@ -164,6 +162,7 @@ Foam::functionObjects::writeFile::writeFile writePrecision_(IOstream::defaultPrecision()), writeToFile_(true), writtenHeader_(false), + useUserTime_(true), startTime_(obr.time().startTime().value()) {} @@ -183,6 +182,7 @@ Foam::functionObjects::writeFile::writeFile writePrecision_(IOstream::defaultPrecision()), writeToFile_(true), writtenHeader_(false), + useUserTime_(true), startTime_(obr.time().startTime().value()) { read(dict); @@ -205,6 +205,9 @@ bool Foam::functionObjects::writeFile::read(const dictionary& dict) writeToFile_ = dict.lookupOrDefault("writeToFile", true); writeToFile_ = writeToFile_ && Pstream::master(); + // Use user time, e.g. CA deg in preference to seconds + useUserTime_ = dict.lookupOrDefault("useUserTime", true); + return true; } @@ -277,7 +280,10 @@ void Foam::functionObjects::writeFile::writeHeader void Foam::functionObjects::writeFile::writeTime(Ostream& os) const { - const scalar timeNow = fileObr_.time().timeOutputValue(); + scalar timeNow = useUserTime_ ? + fileObr_.time().timeOutputValue() + : fileObr_.time().value(); + os << setw(charWidth()) << Time::timeName(timeNow); } diff --git a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.H b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.H index 3dcc397ff69f410434752b721a484f16969354a6..d430f0c34033b8601f3026dce75f6b39586d14b0 100644 --- a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.H +++ b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.H @@ -82,6 +82,10 @@ protected: //- Flag to identify whether the header has been written bool writtenHeader_; + //- Flag to use the specified user time, e.g. CA deg instead + //- of seconds. Default = true + bool useUserTime_; + //- Start time value scalar startTime_; diff --git a/src/OpenFOAM/global/etcFiles/etcFiles.C b/src/OpenFOAM/global/etcFiles/etcFiles.C index 68cdfd067b0c386c0c1dbe54c67fe30073aebbd2..c192baab4c251f7605d5bfc655504a7577003c7d 100644 --- a/src/OpenFOAM/global/etcFiles/etcFiles.C +++ b/src/OpenFOAM/global/etcFiles/etcFiles.C @@ -119,18 +119,8 @@ Foam::fileNameList searchEtc bool (*accept)(const Foam::fileName&) ) { - Foam::fileName version(Foam::getEnv("WM_PROJECT_VERSION")); - - // Fallback when WM_PROJECT_VERSION is unset - if (version.empty()) - { - #if OPENFOAM - version.assign(std::to_string(OPENFOAM)); - #else - version.assign(foamVersion::version); - #endif - } - + // Could use foamVersion::api, but this more direct. + const Foam::fileName version(std::to_string(OPENFOAM)); Foam::fileNameList list; Foam::fileName dir, candidate; diff --git a/src/OpenFOAM/global/global.Cver b/src/OpenFOAM/global/global.Cver index 5e8e56ad5a0c9f32c32ce767e7cd79fb888a67c8..1f27a0f91b2571bfcd9e1e302159f0d9e2203aec 100644 --- a/src/OpenFOAM/global/global.Cver +++ b/src/OpenFOAM/global/global.Cver @@ -26,8 +26,8 @@ Description It is important that these are constructed in the appropriate order to avoid the use of unconstructed data in the global namespace. - This file has the extension .Cver to trigger a Makefile rule that converts - 'VERSION\_STRING' and 'BUILD\_STRING' into the appropriate strings. + This file has a '.Cver' extension to trigger a Makefile rule to replace + 'BUILD', 'VERSION' tags with the corresponding strings. \*---------------------------------------------------------------------------*/ @@ -48,14 +48,14 @@ const int Foam::foamVersion::api // Value of PATCH generated by the build-script const std::string Foam::foamVersion::patch ( - "" + "@PATCH@" ); // Value of the BUILD generated by the build-script const std::string Foam::foamVersion::build ( - "BUILD_STRING" + "@BUILD@" ); @@ -78,7 +78,7 @@ const std::string Foam::foamVersion::buildArch // Only required for compatibility const std::string Foam::foamVersion::version ( - "VERSION_STRING" + "@VERSION@" ); diff --git a/src/conversion/vtk/adaptor/foamVtkTools.H b/src/conversion/vtk/adaptor/foamVtkTools.H index e73dd87832843abff932774130d623cb03763691..f52d3f190549649c3c9455f4e72d11b904786ccc 100644 --- a/src/conversion/vtk/adaptor/foamVtkTools.H +++ b/src/conversion/vtk/adaptor/foamVtkTools.H @@ -49,6 +49,7 @@ SourceFiles #include "pointField.H" #include "symmTensor.H" +// VTK includes #include <vtkCellArray.h> #include <vtkFloatArray.h> #include <vtkDoubleArray.h> @@ -209,13 +210,36 @@ public: //- Remapping for some OpenFOAM data types (eg, symmTensor) + // \param data[in,out] The data to be remapped in-place template<class Type> inline static void remapTuple(float data[]) {} //- Remapping for some OpenFOAM data types (eg, symmTensor) + // \param data[in,out] The data to be remapped in-place template<class Type> inline static void remapTuple(double data[]) {} + //- Copy/transcribe OpenFOAM data types to VTK format + // This allows a change of data type (float vs double) as well as + // addressing any swapping issues (eg, symmTensor) + // + // \param output[out] The output scratch space. Must be long enough + // to hold the result. + // \param val[in] The input data to copy/transcribe + template<class Type> + inline static void foamToVtkTuple(float output[], const Type& val); + + //- Copy/transcribe OpenFOAM data types to VTK format + // This allows a change of data type (float vs double) as well as + // addressing any swapping issues (eg, symmTensor) + // + // \param output[out] The output scratch space. Must be long enough + // to hold the result. + // \param val[in] The input data to copy/transcribe + template<class Type> + inline static void foamToVtkTuple(double output[], const Type& val); + + // Field Conversion Functions //- Copy list to pre-allocated vtk array. @@ -225,7 +249,7 @@ public: ( vtkFloatArray* array, const UList<Type>& input, - const label start = 0 + vtkIdType start = 0 //!< The write offset into output array ); //- Create named field initialized to zero @@ -270,7 +294,6 @@ inline void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(double data[]) } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace vtk diff --git a/src/conversion/vtk/adaptor/foamVtkToolsI.H b/src/conversion/vtk/adaptor/foamVtkToolsI.H index f93b2c7d5567fb5d18cdadaaac5f71413adcb7b7..e151f1a7d1d5edc50e88cb6b5a383fa381809407 100644 --- a/src/conversion/vtk/adaptor/foamVtkToolsI.H +++ b/src/conversion/vtk/adaptor/foamVtkToolsI.H @@ -87,4 +87,34 @@ inline vtkSmartPointer<vtkCellArray> Foam::vtk::Tools::identityVertices }; +template<class Type> +inline void Foam::vtk::Tools::foamToVtkTuple +( + float output[], + const Type& val +) +{ + for (direction cmpt=0; cmpt < pTraits<Type>::nComponents; ++cmpt) + { + output[cmpt] = component(val, cmpt); + } + remapTuple<Type>(output); +} + + +template<class Type> +inline void Foam::vtk::Tools::foamToVtkTuple +( + double output[], + const Type& val +) +{ + for (direction cmpt=0; cmpt < pTraits<Type>::nComponents; ++cmpt) + { + output[cmpt] = component(val, cmpt); + } + remapTuple<Type>(output); +} + + // ************************************************************************* // diff --git a/src/conversion/vtk/adaptor/foamVtkToolsTemplates.C b/src/conversion/vtk/adaptor/foamVtkToolsTemplates.C index 3a7b653869099e18df15ee5f0cd50de25d625e89..5049e67ff88ae3d54c0644eafd8519c9130bf003 100644 --- a/src/conversion/vtk/adaptor/foamVtkToolsTemplates.C +++ b/src/conversion/vtk/adaptor/foamVtkToolsTemplates.C @@ -50,12 +50,11 @@ Foam::vtk::Tools::Patch::points(const PatchType& p) auto vtkpoints = vtkSmartPointer<vtkPoints>::New(); vtkpoints->SetNumberOfPoints(pts.size()); - vtkIdType pointId = 0; + vtkIdType pointId = 0; for (const point& p : pts) { - vtkpoints->SetPoint(pointId, p.v_); - ++pointId; + vtkpoints->SetPoint(pointId++, p.v_); } return vtkpoints; @@ -127,8 +126,7 @@ Foam::vtk::Tools::Patch::faceNormals(const PatchType& p) vtkIdType faceId = 0; for (const vector& n : norms) { - array->SetTuple(faceId, n.v_); - ++faceId; + array->SetTuple(faceId++, n.v_); } return array; @@ -145,7 +143,7 @@ Foam::label Foam::vtk::Tools::transcribeFloatData ( vtkFloatArray* array, const UList<Type>& input, - const label start + vtkIdType start ) { const int nComp(pTraits<Type>::nComponents); @@ -162,7 +160,7 @@ Foam::label Foam::vtk::Tools::transcribeFloatData } const vtkIdType maxSize = array->GetNumberOfTuples(); - const vtkIdType endPos = vtkIdType(start) + vtkIdType(input.size()); + const vtkIdType endPos = start + vtkIdType(input.size()); if (!maxSize) { @@ -174,7 +172,7 @@ Foam::label Foam::vtk::Tools::transcribeFloatData WarningInFunction << "vtk array '" << array->GetName() << "' copy with out-of-range [0," << long(maxSize) << ")" - << " starting at " << start + << " starting at " << long(start) << nl; return 0; @@ -185,23 +183,18 @@ Foam::label Foam::vtk::Tools::transcribeFloatData << "vtk array '" << array->GetName() << "' copy ends out-of-range (" << long(maxSize) << ")" << " using sizing (start,size) = (" - << start << "," << input.size() << ")" + << long(start) << "," << input.size() << ")" << nl; return 0; } - float scratch[nComp]; - forAll(input, idx) - { - const Type& t = input[idx]; - for (direction d=0; d<nComp; ++d) - { - scratch[d] = component(t, d); - } - remapTuple<Type>(scratch); + float scratch[pTraits<Type>::nComponents]; - array->SetTuple(start+idx, scratch); + for (const Type& val : input) + { + foamToVtkTuple(scratch, val); + array->SetTuple(start++, scratch); } return input.size(); @@ -219,7 +212,7 @@ Foam::vtk::Tools::zeroField auto data = vtkSmartPointer<vtkFloatArray>::New(); data->SetName(name.c_str()); - data->SetNumberOfComponents(int(pTraits<Type>::nComponents)); + data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents)); data->SetNumberOfTuples(size); data->Fill(0); @@ -239,7 +232,7 @@ Foam::vtk::Tools::convertFieldToVTK auto data = vtkSmartPointer<vtkFloatArray>::New(); data->SetName(name.c_str()); - data->SetNumberOfComponents(int(pTraits<Type>::nComponents)); + data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents)); data->SetNumberOfTuples(fld.size()); transcribeFloatData(data, fld); diff --git a/src/conversion/vtk/output/foamVtkInternalWriter.C b/src/conversion/vtk/output/foamVtkInternalWriter.C index 11864207b10ab371b35b2ce38a1d58ccd7328e50..1179b8971fe310923523e38d35350cfab922a951 100644 --- a/src/conversion/vtk/output/foamVtkInternalWriter.C +++ b/src/conversion/vtk/output/foamVtkInternalWriter.C @@ -123,10 +123,7 @@ void Foam::vtk::internalWriter::writePoints() } -void Foam::vtk::internalWriter::writeCellsLegacy -( - const globalIndex& pointOffsets -) +void Foam::vtk::internalWriter::writeCellsLegacy(const label pointOffset) { const List<uint8_t>& cellTypes = vtuCells_.cellTypes(); const labelList& vertLabels = vtuCells_.vertLabels(); @@ -165,7 +162,7 @@ void Foam::vtk::internalWriter::writeCellsLegacy vtk::vtuSizing::copyVertLabelsLegacy ( vertLabels, - pointOffsets.localStart() + pointOffset ) ); } @@ -206,10 +203,7 @@ void Foam::vtk::internalWriter::writeCellsLegacy } -void Foam::vtk::internalWriter::writeCellsConnectivity -( - const globalIndex& pointOffsets -) +void Foam::vtk::internalWriter::writeCellsConnectivity(const label pointOffset) { // // 'connectivity' @@ -239,7 +233,7 @@ void Foam::vtk::internalWriter::writeCellsConnectivity vtk::vtuSizing::copyVertLabelsXml ( vertLabels, - pointOffsets.localStart() + pointOffset ) ); } @@ -263,12 +257,6 @@ void Foam::vtk::internalWriter::writeCellsConnectivity const labelList& vertOffsets = vtuCells_.vertOffsets(); label nOffs = vertOffsets.size(); - // global connectivity offsets - const globalIndex procOffset - ( - vertOffsets.empty() ? 0 : vertOffsets.last() - ); - if (parallel_) { reduce(nOffs, sumOp<label>()); @@ -285,6 +273,12 @@ void Foam::vtk::internalWriter::writeCellsConnectivity if (parallel_) { + // processor-local connectivity offsets + const globalIndex procOffset + ( + vertOffsets.empty() ? 0 : vertOffsets.last() + ); + vtk::writeListParallel(format_.ref(), vertOffsets, procOffset); } else @@ -347,10 +341,7 @@ void Foam::vtk::internalWriter::writeCellsConnectivity } -void Foam::vtk::internalWriter::writeCellsFaces -( - const globalIndex& pointOffsets -) +void Foam::vtk::internalWriter::writeCellsFaces(const label pointOffset) { label nFaceLabels = vtuCells_.faceLabels().size(); @@ -393,7 +384,7 @@ void Foam::vtk::internalWriter::writeCellsFaces vtk::vtuSizing::copyFaceLabelsXml ( faceLabels, - pointOffsets.localStart() + pointOffset ) ); } @@ -578,12 +569,15 @@ bool Foam::vtk::internalWriter::writeGeometry() writePoints(); - // With addPointCellLabels for the point offsets - const globalIndex globalPointOffset(vtuCells_.nFieldPoints()); + // Include addPointCellLabels for the point offsets + const label pointOffset = + ( + parallel_ ? globalIndex(vtuCells_.nFieldPoints()).localStart() : 0 + ); if (legacy()) { - writeCellsLegacy(globalPointOffset); + writeCellsLegacy(pointOffset); return true; } @@ -592,8 +586,8 @@ bool Foam::vtk::internalWriter::writeGeometry() format().tag(vtk::fileTag::CELLS); } - writeCellsConnectivity(globalPointOffset); - writeCellsFaces(globalPointOffset); + writeCellsConnectivity(pointOffset); + writeCellsFaces(pointOffset); if (format_) { diff --git a/src/conversion/vtk/output/foamVtkInternalWriter.H b/src/conversion/vtk/output/foamVtkInternalWriter.H index 75969204e4c47bac3b2fc95e0d52de2c3687f770..695bb086f9cfdffed7ad21ebc28d1da0ee710a9c 100644 --- a/src/conversion/vtk/output/foamVtkInternalWriter.H +++ b/src/conversion/vtk/output/foamVtkInternalWriter.H @@ -58,7 +58,6 @@ namespace Foam { // Forward declarations -class globalIndex; class volPointInterpolation; namespace vtk @@ -96,13 +95,16 @@ class internalWriter void writePoints(); //- Write cells (connectivity and type), legacy format - void writeCellsLegacy(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writeCellsLegacy(const label pointOffset); //- Write cells connectivity - void writeCellsConnectivity(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writeCellsConnectivity(const label pointOffset); //- Write cells face streams - void writeCellsFaces(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writeCellsFaces(const label pointOffset); //- No copy construct diff --git a/src/conversion/vtk/output/foamVtkPatchWriter.C b/src/conversion/vtk/output/foamVtkPatchWriter.C index 1bc43447065d9c1cad8f86060e3f272861c20a9e..6b1f796cae47485834c86ca9e6a324e080120ffb 100644 --- a/src/conversion/vtk/output/foamVtkPatchWriter.C +++ b/src/conversion/vtk/output/foamVtkPatchWriter.C @@ -171,10 +171,7 @@ void Foam::vtk::patchWriter::writePoints() } -void Foam::vtk::patchWriter::writePolysLegacy -( - const globalIndex& pointOffsets -) +void Foam::vtk::patchWriter::writePolysLegacy(const label pointOffset) { const polyBoundaryMesh& patches = mesh_.boundaryMesh(); @@ -207,7 +204,7 @@ void Foam::vtk::patchWriter::writePolysLegacy auto iter = vertLabels.begin(); - label off = pointOffsets.localStart(); + label off = pointOffset; for (const label patchId : patchIDs_) { @@ -245,10 +242,7 @@ void Foam::vtk::patchWriter::writePolysLegacy } -void Foam::vtk::patchWriter::writePolys -( - const globalIndex& pointOffsets -) +void Foam::vtk::patchWriter::writePolys(const label pointOffset) { if (format_) { @@ -285,7 +279,7 @@ void Foam::vtk::patchWriter::writePolys auto iter = vertLabels.begin(); - label off = pointOffsets.localStart(); + label off = pointOffset; for (const label patchId : patchIDs_) { @@ -328,9 +322,6 @@ void Foam::vtk::patchWriter::writePolys labelList vertOffsets(nLocalFaces_); label nOffs = vertOffsets.size(); - // global connectivity offsets - const globalIndex procOffset(nLocalVerts_); - if (parallel_) { reduce(nOffs, sumOp<label>()); @@ -346,7 +337,12 @@ void Foam::vtk::patchWriter::writePolys } - label off = procOffset.localStart(); + // processor-local connectivity offsets + label off = + ( + parallel_ ? globalIndex(nLocalVerts_).localStart() : 0 + ); + auto iter = vertOffsets.begin(); @@ -517,15 +513,18 @@ bool Foam::vtk::patchWriter::writeGeometry() writePoints(); - const globalIndex globalPointOffset(nLocalPoints_); + const label pointOffset = + ( + parallel_ ? globalIndex(nLocalPoints_).localStart() : 0 + ); if (legacy()) { - writePolysLegacy(globalPointOffset); + writePolysLegacy(pointOffset); } else { - writePolys(globalPointOffset); + writePolys(pointOffset); } return true; diff --git a/src/conversion/vtk/output/foamVtkPatchWriter.H b/src/conversion/vtk/output/foamVtkPatchWriter.H index 98ad8c32d2ecd01e7f484181d8c30c231af0718a..3f19285ff0fc64c438f385462c58193747463b24 100644 --- a/src/conversion/vtk/output/foamVtkPatchWriter.H +++ b/src/conversion/vtk/output/foamVtkPatchWriter.H @@ -55,10 +55,6 @@ SourceFiles namespace Foam { - -// Forward declarations -class globalIndex; - namespace vtk { @@ -107,10 +103,12 @@ class patchWriter void writePoints(); //- Write patch faces, legacy format - void writePolysLegacy(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writePolysLegacy(const label pointOffset); //- Write patch faces - void writePolys(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writePolys(const label pointOffset); //- No copy construct diff --git a/src/fileFormats/vtk/file/foamVtkFileWriter.C b/src/fileFormats/vtk/file/foamVtkFileWriter.C index b2e5d398045ab2b280fbff7daa6836149f555091..524446cffed396256feb9b8de0c3ff366d45ecef 100644 --- a/src/fileFormats/vtk/file/foamVtkFileWriter.C +++ b/src/fileFormats/vtk/file/foamVtkFileWriter.C @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "foamVtkFileWriter.H" -#include "globalIndex.H" #include "OSspecific.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C index 0b772daad9bfcd23862fb3c9160bc1e05c6ba146..4d9918e62aae77de9bd575905de68fd967d61018 100644 --- a/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C +++ b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C @@ -286,7 +286,6 @@ Foam::faAreaMapper::faAreaMapper : mesh_(mesh), mpm_(mpm), - insertedFaces_(false), direct_(false), hasUnmapped_(false), sizeBeforeMapping_(mesh.nFaces()), diff --git a/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.H b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.H index e73dff11aacd27ddde9e554b1fbc6c9a5b9211c4..1ff5fa79f032058874522becfb5eee1ad1ef4600 100644 --- a/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.H +++ b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.H @@ -68,9 +68,6 @@ class faAreaMapper //- Reference to mapPolyMesh const mapPolyMesh& mpm_; - //- Are there any inserted (unmapped) faces - bool insertedFaces_; - //- Is the mapping direct bool direct_; diff --git a/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C index d3eda760aed04f55eed750355e21d06a626f03c3..f0095149dbf0c429d6fb667d561fca53d42db94c 100644 --- a/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C +++ b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C @@ -65,7 +65,7 @@ Foam::faEdgeMapper::faEdgeMapper ) : mesh_(mesh), - mpm_(mpm), +// mpm_(mpm), sizeBeforeMapping_(mesh.nInternalEdges()), hasUnmapped_(false), directAddrPtr_(nullptr) diff --git a/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.H b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.H index d9c5a9a4703513f25494c4ff24ea249209207044..c692e3d436b65ab52fb5347556dd61c027ff3443 100644 --- a/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.H +++ b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.H @@ -67,7 +67,7 @@ class faEdgeMapper const faMesh& mesh_; //- Reference to mapPolyMesh - const mapPolyMesh& mpm_; + //const mapPolyMesh& mpm_; //- Old mesh size label sizeBeforeMapping_; diff --git a/src/finiteVolume/functionObjects/volRegion/volRegion.C b/src/finiteVolume/functionObjects/volRegion/volRegion.C index 1f4779afebd605ed4f2bac46f1d72722fb36814c..c39c9cf8c5f9ad45c2124ba2e63c85da98f441be 100644 --- a/src/finiteVolume/functionObjects/volRegion/volRegion.C +++ b/src/finiteVolume/functionObjects/volRegion/volRegion.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,6 +25,7 @@ License #include "volRegion.H" #include "volMesh.H" +#include "cellSet.H" #include "globalMeshData.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -44,8 +45,9 @@ const Foam::Enum > Foam::functionObjects::volRegion::regionTypeNames_ ({ - { regionTypes::vrtCellZone, "cellZone" }, { regionTypes::vrtAll, "all" }, + { regionTypes::vrtCellSet, "cellSet" }, + { regionTypes::vrtCellZone, "cellZone" }, }); @@ -73,7 +75,7 @@ Foam::functionObjects::volRegion::volRegion const dictionary& dict ) : - mesh_(mesh), + volMesh_(mesh), regionType_ ( regionTypeNames_.lookupOrDefault @@ -83,7 +85,7 @@ Foam::functionObjects::volRegion::volRegion regionTypes::vrtAll ) ), - regionName_(polyMesh::defaultRegion), + regionName_(volMesh_.name()), regionID_(-1) { read(dict); @@ -94,12 +96,6 @@ Foam::functionObjects::volRegion::volRegion } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::functionObjects::volRegion::~volRegion() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::functionObjects::volRegion::read @@ -107,19 +103,41 @@ bool Foam::functionObjects::volRegion::read const dictionary& dict ) { + regionID_ = -1; + cellIds_.clear(); + switch (regionType_) { + case vrtCellSet: + { + dict.readEntry("name", regionName_); + + cellIds_ = cellSet(volMesh_, regionName_).sortedToc(); + + if (nCells() == 0) + { + FatalIOErrorInFunction(dict) + << regionTypeNames_[regionType_] + << "(" << regionName_ << "):" << nl + << " Region has no cells" + << exit(FatalIOError); + } + + break; + } + case vrtCellZone: { dict.readEntry("name", regionName_); - regionID_ = mesh_.cellZones().findZoneID(regionName_); + regionID_ = volMesh_.cellZones().findZoneID(regionName_); if (regionID_ < 0) { FatalIOErrorInFunction(dict) << "Unknown cell zone name: " << regionName_ - << ". Valid cell zones are: " << mesh_.cellZones().names() + << ". Valid cell zones : " + << flatOutput(volMesh_.cellZones().names()) << exit(FatalIOError); } @@ -137,6 +155,7 @@ bool Foam::functionObjects::volRegion::read case vrtAll: { + regionName_= volMesh_.name(); break; } @@ -144,7 +163,7 @@ bool Foam::functionObjects::volRegion::read { FatalIOErrorInFunction(dict) << "Unknown region type. Valid region types are:" - << regionTypeNames_.sortedToc() + << flatOutput(regionTypeNames_.names()) << nl << exit(FatalIOError); } } @@ -155,14 +174,21 @@ bool Foam::functionObjects::volRegion::read const Foam::labelList& Foam::functionObjects::volRegion::cellIDs() const { - if (regionType_ == vrtAll) - { - return labelList::null(); - } - else + switch (regionType_) { - return mesh_.cellZones()[regionID_]; + case vrtCellSet: + return cellIds_; + break; + + case vrtCellZone: + return volMesh_.cellZones()[regionID_]; + break; + + default: + break; } + + return labelList::null(); } @@ -170,7 +196,7 @@ Foam::label Foam::functionObjects::volRegion::nCells() const { if (regionType_ == vrtAll) { - return mesh_.globalData().nTotalCells(); + return volMesh_.globalData().nTotalCells(); } else { @@ -183,11 +209,17 @@ Foam::scalar Foam::functionObjects::volRegion::V() const { if (regionType_ == vrtAll) { - return gSum(mesh_.V()); + return gSum(volMesh_.V()); } else { - return gSum(scalarField(mesh_.V(), cellIDs())); + scalar vol = 0; + for (const label celli : cellIDs()) + { + vol += volMesh_.V()[celli]; + } + + return returnReduce(vol, sumOp<scalar>()); } } diff --git a/src/finiteVolume/functionObjects/volRegion/volRegion.H b/src/finiteVolume/functionObjects/volRegion/volRegion.H index f95504684d9d5e922c35b7a7169f02d40b76eab2..ef33682b94c8d13114363c9d932b85b62cd0db63 100644 --- a/src/finiteVolume/functionObjects/volRegion/volRegion.H +++ b/src/finiteVolume/functionObjects/volRegion/volRegion.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,9 +54,9 @@ Description Usage \table - Property | Description | Required | Default value - regionType | cellZone or all | no | all - name | Name of cellZone if required | no | + Property | Description | Required | Default + regionType | Selection type: all/cellSet/cellZone | no | all + name | Name of cellSet/cellZone if required | no | \endtable See also @@ -78,7 +78,7 @@ SourceFiles namespace Foam { -// Forward declaration of classes +// Forward declarations class fvMesh; namespace functionObjects @@ -90,12 +90,16 @@ namespace functionObjects class volRegion { - // Private member data + // Private Member Data - const fvMesh& mesh_; + const fvMesh& volMesh_; + + //- The cell ids, from cellSet + labelList cellIds_; // Cache integral properties of the region for writeFileHeader label nCells_; + scalar V_; @@ -106,8 +110,9 @@ public: //- Region type enumeration enum regionTypes { - vrtCellZone, //!< cell zone - vrtAll //!< all cells + vrtAll, //!< All cells + vrtCellSet, //!< A cellSet + vrtCellZone //!< A cellZone }; //- Region type names @@ -116,15 +121,15 @@ public: protected: - // Protected data + // Protected Data //- Region type regionTypes regionType_; - //- Region name (patch, zone, etc.) + //- Region name (cellSet, cellZone, ...) word regionName_; - //- Region ID (patch ID, zone ID, etc.) + //- Region ID (zone ID, ...) label regionID_; @@ -147,13 +152,13 @@ public: //- Destructor - virtual ~volRegion(); + virtual ~volRegion() = default; // Public Member Functions //- Read from dictionary - bool read(const dictionary&); + bool read(const dictionary& dict); //- Return the region type inline const regionTypes& regionType() const; @@ -161,7 +166,7 @@ public: //- Return the local list of cell IDs const labelList& cellIDs() const; - //- Return the number of cells in the region + //- Return the number of cells selected in the region label nCells() const; //- Return total volume of the region diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C index f722a5578e1c2c21c2a27a0822ef1b3701cca2a5..91b8cf92a48e28eb5190dc737864e4ee3405ac8f 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C @@ -968,15 +968,11 @@ void Foam::isoAdvection::writeIsoFaces if (!writeIsoFacesToFile_ || !mesh_.time().writeTime()) return; // Writing isofaces to obj file for inspection, e.g. in paraview - const fileName dirName + const fileName outputFile ( - Pstream::parRun() ? - mesh_.time().path()/".."/"isoFaces" - : mesh_.time().path()/"isoFaces" - ); - const word fName - ( - word::printf("isoFaces_%012d", mesh_.time().timeIndex()) + mesh_.time().globalPath() + / "isoFaces" + / word::printf("isoFaces_%012d.obj", mesh_.time().timeIndex()) ); if (Pstream::parRun()) @@ -988,8 +984,8 @@ void Foam::isoAdvection::writeIsoFaces if (Pstream::master()) { - mkDir(dirName); - OBJstream os(dirName/fName + ".obj"); + mkDir(outputFile.path()); + OBJstream os(outputFile); Info<< nl << "isoAdvection: writing iso faces to file: " << os.name() << nl << endl; @@ -1015,8 +1011,8 @@ void Foam::isoAdvection::writeIsoFaces } else { - mkDir(dirName); - OBJstream os(dirName/fName + ".obj"); + mkDir(outputFile.path()); + OBJstream os(outputFile); Info<< nl << "isoAdvection: writing iso faces to file: " << os.name() << nl << endl; diff --git a/src/functionObjects/field/Make/files b/src/functionObjects/field/Make/files index 1afdfb2ea7d2daafd0526756deb8c98eddab3761..d5aa38ee3dddab5e461818f15f825f0874bd423d 100644 --- a/src/functionObjects/field/Make/files +++ b/src/functionObjects/field/Make/files @@ -59,6 +59,7 @@ flowType/flowType.C CourantNo/CourantNo.C PecletNo/PecletNo.C blendingFactor/blendingFactor.C +momentum/momentum.C pressure/pressure.C MachNo/MachNo.C Curle/Curle.C diff --git a/src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.C b/src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.C index 37690a46f58f01863f17faa0dcf8d98b97ccb9e7..c07eae4b76779f4dec74cec8982fb9eba7634272 100644 --- a/src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.C +++ b/src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.C @@ -54,26 +54,6 @@ namespace functionObjects // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -Foam::fileName -Foam::functionObjects::extractEulerianParticles::dictBaseFileDir() const -{ - fileName baseDir(".."); // = mesh_.time().path(); - - if (Pstream::parRun()) - { - // Put in undecomposed case (Note: gives problems for - // distributed data running) - baseDir = baseDir/".."/functionObject::outputPrefix; - } - else - { - baseDir = baseDir/functionObject::outputPrefix; - } - - return baseDir; -} - - void Foam::functionObjects::extractEulerianParticles::checkFaceZone() { DebugInFunction << endl; diff --git a/src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.H b/src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.H index 4df87913c396aef89bb0144eaff4c6b93186b0d0..71f14690d9bf0051c0af183ead3ec562f76d9552 100644 --- a/src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.H +++ b/src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.H @@ -184,9 +184,6 @@ protected: // Protected Member Functions - //- Return the base directory for dictionary output - virtual fileName dictBaseFileDir() const; - //- Check that the faceZone is valid virtual void checkFaceZone(); diff --git a/src/functionObjects/field/momentum/momentum.C b/src/functionObjects/field/momentum/momentum.C new file mode 100644 index 0000000000000000000000000000000000000000..53438c91af637b765758f06379647021a0a49824 --- /dev/null +++ b/src/functionObjects/field/momentum/momentum.C @@ -0,0 +1,573 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +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 "momentum.H" +#include "fvMesh.H" +#include "volFields.H" +#include "cellSet.H" +#include "cylindricalRotation.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace functionObjects +{ + defineTypeNameAndDebug(momentum, 0); + addToRunTimeSelectionTable(functionObject, momentum, dictionary); +} +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +template<class GeoField> +Foam::autoPtr<GeoField> +Foam::functionObjects::momentum::newField +( + const word& baseName, + const dimensionSet& dims, + bool registerObject +) const +{ + return + autoPtr<GeoField>::New + ( + IOobject + ( + scopedName(baseName), + time_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + registerObject + ), + mesh_, + dimensioned<typename GeoField::value_type>(dims, Zero) + ); +} + + +void Foam::functionObjects::momentum::calc() +{ + initialise(); + + // When field writing is not enabled we need our local storage + // for the momentum and angular velocity fields + autoPtr<volVectorField> tmomentum, tAngularMom, tAngularVel; + + + // The base fields required + const auto& U = lookupObject<volVectorField>(UName_); + const auto* rhoPtr = findObject<volScalarField>(rhoName_); + + const dimensionedScalar rhoRef("rho", dimDensity, rhoRef_); + + // For quantities such as the mass-averaged angular velocity, + // we would calculate the mass per-cell here. + + // tmp<volScalarField::Internal> tmass = + // ( + // rhoPtr + // ? (mesh_.V() * (*rhoPtr)) + // : (mesh_.V() * rhoRef) + // ); + + + // Linear momentum + // ~~~~~~~~~~~~~~~ + + auto* pmomentum = getObjectPtr<volVectorField>(scopedName("momentum")); + + if (!pmomentum) + { + tmomentum = newField<volVectorField>("momentum", dimVelocity*dimMass); + pmomentum = tmomentum.get(); // get(), not release() + } + auto& momentum = *pmomentum; + + if (rhoPtr) + { + momentum.ref() = (U * mesh_.V() * (*rhoPtr)); + } + else + { + momentum.ref() = (U * mesh_.V() * rhoRef); + } + momentum.correctBoundaryConditions(); + + + // Angular momentum + // ~~~~~~~~~~~~~~~~ + + auto* pAngularMom = + getObjectPtr<volVectorField>(scopedName("angularMomentum")); + + if (hasCsys_ && !pAngularMom) + { + tAngularMom = + newField<volVectorField>("angularMomentum", dimVelocity*dimMass); + pAngularMom = tAngularMom.get(); // get(), not release() + } + else if (!pAngularMom) + { + // Angular momentum not requested, but alias to normal momentum + // to simplify logic when calculating the summations + pAngularMom = pmomentum; + } + auto& angularMom = *pAngularMom; + + + // Angular velocity + // ~~~~~~~~~~~~~~~~ + + auto* pAngularVel = + getObjectPtr<volVectorField>(scopedName("angularVelocity")); + + if (hasCsys_) + { + if (!pAngularVel) + { + tAngularVel = + newField<volVectorField>("angularVelocity", dimVelocity); + pAngularVel = tAngularVel.get(); // get(), not release() + } + auto& angularVel = *pAngularVel; + + + // Global to local + + angularVel.primitiveFieldRef() = + csys_.invTransform(mesh_.cellCentres(), U.internalField()); + + angularVel.correctBoundaryConditions(); + + if (rhoPtr) + { + angularMom.ref() = (angularVel * mesh_.V() * (*rhoPtr)); + } + else + { + angularMom.ref() = (angularVel * mesh_.V() * rhoRef); + } + + angularMom.correctBoundaryConditions(); + } + + + // Integrate the selection + + sumMomentum_ = Zero; + sumAngularMom_ = Zero; + + switch (regionType_) + { + case vrtCellSet: + case vrtCellZone: + { + for (const label celli : cellIDs()) + { + sumMomentum_ += momentum[celli]; + sumAngularMom_ += angularMom[celli]; + } + break; + } + case vrtAll: + { + for (label celli=0; celli < mesh_.nCells(); ++celli) + { + sumMomentum_ += momentum[celli]; + sumAngularMom_ += angularMom[celli]; + } + break; + } + } + + reduce(sumMomentum_, sumOp<vector>()); + reduce(sumAngularMom_, sumOp<vector>()); +} + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void Foam::functionObjects::momentum::writeFileHeader(Ostream& os) +{ + if (!writeToFile() || writtenHeader_) + { + return; + } + + if (hasCsys_) + { + writeHeader(os, "Momentum, Angular Momentum"); + writeHeaderValue(os, "origin", csys_.origin()); + writeHeaderValue(os, "axis", csys_.e3()); + } + else + { + writeHeader(os, "Momentum"); + } + + if (regionType_ != vrtAll) + { + writeHeader + ( + os, + "Selection " + regionTypeNames_[regionType_] + + " = " + regionName_ + ); + } + + writeHeader(os, ""); + writeCommented(os, "Time"); + writeTabbed(os, "(momentum_x momentum_y momentum_z)"); + + if (hasCsys_) + { + writeTabbed(os, "(momentum_r momentum_rtheta momentum_axis)"); + } + os << endl; + + + writtenHeader_ = true; +} + + +void Foam::functionObjects::momentum::initialise() +{ + if (initialised_) + { + return; + } + + if (!foundObject<volVectorField>(UName_)) + { + FatalErrorInFunction + << "Could not find U: " << UName_ << " in database" + << exit(FatalError); + } + + + const auto* pPtr = cfindObject<volScalarField>(pName_); + + if (pPtr && pPtr->dimensions() == dimPressure) + { + // Compressible - rho is mandatory + + if (!foundObject<volScalarField>(rhoName_)) + { + FatalErrorInFunction + << "Could not find rho:" << rhoName_ + << exit(FatalError); + } + } + + initialised_ = true; +} + + +void Foam::functionObjects::momentum::writeValues(Ostream& os) +{ + Log << type() << " " << name() << " write:" << nl; + + Log << " Sum of Momentum"; + + if (regionType_ != vrtAll) + { + Log << ' ' << regionTypeNames_[regionType_] + << ' ' << regionName_; + } + + Log << nl + << " linear : " << sumMomentum_ << nl; + + if (hasCsys_) + { + Log << " angular : " << sumAngularMom_ << nl; + } + + if (writeToFile()) + { + writeTime(os); + + os << tab << sumMomentum_; + + if (hasCsys_) + { + os << tab << sumAngularMom_; + } + os << endl; + } + + Log << endl; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::functionObjects::momentum::momentum +( + const word& name, + const Time& runTime, + const dictionary& dict, + bool readFields +) +: + fvMeshFunctionObject(name, runTime, dict), + volRegion(fvMeshFunctionObject::mesh_, dict), + writeFile(mesh_, name, typeName, dict), + sumMomentum_(Zero), + sumAngularMom_(Zero), + UName_(), + pName_(), + rhoName_(), + rhoRef_(1.0), + csys_(), + hasCsys_(false), + writeMomentum_(false), + writeVelocity_(false), + writePosition_(false), + initialised_(false) +{ + if (readFields) + { + read(dict); + Log << endl; + } +} + + +Foam::functionObjects::momentum::momentum +( + const word& name, + const objectRegistry& obr, + const dictionary& dict, + bool readFields +) +: + fvMeshFunctionObject(name, obr, dict), + volRegion(fvMeshFunctionObject::mesh_, dict), + writeFile(mesh_, name, typeName, dict), + sumMomentum_(Zero), + sumAngularMom_(Zero), + UName_(), + pName_(), + rhoName_(), + rhoRef_(1.0), + csys_(), + hasCsys_(false), + writeMomentum_(false), + writeVelocity_(false), + writePosition_(false), + initialised_(false) +{ + if (readFields) + { + read(dict); + Log << endl; + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::functionObjects::momentum::read(const dictionary& dict) +{ + fvMeshFunctionObject::read(dict); + volRegion::read(dict); + writeFile::read(dict); + + initialised_ = false; + + Info<< type() << " " << name() << ":" << nl; + + // Optional entries U and p + UName_ = dict.lookupOrDefault<word>("U", "U"); + pName_ = dict.lookupOrDefault<word>("p", "p"); + rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); + rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1.0); + + rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1.0); + + hasCsys_ = dict.lookupOrDefault("cylindrical", false); + + if (hasCsys_) + { + csys_ = coordSystem::cylindrical(dict); + } + + writeMomentum_ = dict.lookupOrDefault("writeMomentum", false); + writeVelocity_ = dict.lookupOrDefault("writeVelocity", false); + writePosition_ = dict.lookupOrDefault("writePosition", false); + + Info<<"Integrating for selection: " + << regionTypeNames_[regionType_] + << " (" << regionName_ << ")" << nl; + + if (writeMomentum_) + { + Info<< " Momentum fields will be written" << endl; + + mesh_.objectRegistry::store + ( + newField<volVectorField>("momentum", dimVelocity*dimMass) + ); + + if (hasCsys_) + { + mesh_.objectRegistry::store + ( + newField<volVectorField>("angularMomentum", dimVelocity*dimMass) + ); + } + } + + if (hasCsys_) + { + if (writeVelocity_) + { + Info<< " Angular velocity will be written" << endl; + + mesh_.objectRegistry::store + ( + newField<volVectorField>("angularVelocity", dimVelocity) + ); + } + + if (writePosition_) + { + Info<< " Angular position will be written" << endl; + } + } + + return true; +} + + +bool Foam::functionObjects::momentum::execute() +{ + calc(); + + if (Pstream::master()) + { + writeFileHeader(file()); + + writeValues(file()); + + Log << endl; + } + + // Write state/results information + setResult("momentum_x", sumMomentum_[0]); + setResult("momentum_y", sumMomentum_[1]); + setResult("momentum_z", sumMomentum_[2]); + + setResult("momentum_r", sumAngularMom_[0]); + setResult("momentum_rtheta", sumAngularMom_[1]); + setResult("momentum_axis", sumAngularMom_[2]); + + return true; +} + + +bool Foam::functionObjects::momentum::write() +{ + if (writeMomentum_ || (hasCsys_ && (writeVelocity_ || writePosition_))) + { + Log <<"Writing fields" << nl; + + const volVectorField* fieldPtr; + + fieldPtr = findObject<volVectorField>(scopedName("momentum")); + if (fieldPtr) fieldPtr->write(); + + fieldPtr = findObject<volVectorField>(scopedName("angularMomentum")); + if (fieldPtr) fieldPtr->write(); + + fieldPtr = findObject<volVectorField>(scopedName("angularVelocity")); + if (fieldPtr) fieldPtr->write(); + + if (hasCsys_ && writePosition_) + { + // Clunky, but currently no simple means of handling + // component-wise conversion and output + + auto cyl_r = newField<volScalarField>("cyl_r", dimLength); + auto cyl_t = newField<volScalarField>("cyl_theta", dimless); + auto cyl_z = newField<volScalarField>("cyl_z", dimLength); + + // Internal + { + const auto& pts = mesh_.cellCentres(); + const label len = pts.size(); + + UList<scalar>& r = cyl_r->primitiveFieldRef(false); + UList<scalar>& t = cyl_t->primitiveFieldRef(false); + UList<scalar>& z = cyl_z->primitiveFieldRef(false); + + for (label i=0; i < len; ++i) + { + point p(csys_.localPosition(pts[i])); + + r[i] = p.x(); + t[i] = p.y(); + z[i] = p.z(); + } + } + + // Boundary + const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); + + forAll(pbm, patchi) + { + const auto& pts = pbm[patchi].faceCentres(); + const label len = pts.size(); + + UList<scalar>& r = cyl_r->boundaryFieldRef(false)[patchi]; + UList<scalar>& t = cyl_t->boundaryFieldRef(false)[patchi]; + UList<scalar>& z = cyl_z->boundaryFieldRef(false)[patchi]; + + for (label i=0; i < len; ++i) + { + point p(csys_.localPosition(pts[i])); + + r[i] = p.x(); + t[i] = p.y(); + z[i] = p.z(); + } + } + + cyl_r->write(); + cyl_t->write(); + cyl_z->write(); + } + } + + return true; +} + + +// ************************************************************************* // diff --git a/src/functionObjects/field/momentum/momentum.H b/src/functionObjects/field/momentum/momentum.H new file mode 100644 index 0000000000000000000000000000000000000000..2da62e1ea0b7e187a3f1957c5134fcd498c49965 --- /dev/null +++ b/src/functionObjects/field/momentum/momentum.H @@ -0,0 +1,266 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +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::functionObjects::momentum + +Group + grpFieldFunctionObjects + +Description + Calculates linear/angular momentum, reporting integral values + and optionally writing the fields. + + Data is written into momentum.dat in the + postProcessing/\<functionObjectName\> directory. + +Usage + Example of function object specification: + \verbatim + momentum1 + { + type momentum; + libs ("libfieldFunctionObjects.so"); + ... + log yes; + + regionType all; + writeMomentum yes; + writePosition yes; + writeVelocity yes; + + cylindrical true; + + origin (0 0 0); + e1 (1 0 0); + e3 (0 0 1); + } + \endverbatim + + Where the entries comprise: + \table + Property | Description | Required | Default + type | Type name: momentum | yes | + log | Log information to standard output | no | no + writeMomentum | Write (linear, angular) momentum fields | no | no + writePosition | Write angular position component fields | no | no + writeVelocity | Write angular velocity fields | no | no + p | Pressure field name | no | p + U | Velocity field name | no | U + rho | Density field name | no | rho + rhoRef | Reference density (incompressible) | no | 1.0 + cylindrical | Use cylindrical coordinates | no | false + origin | Origin for cylindrical coordinates | no | + regionType | Selection type: all/cellSet/cellZone | no | all + name | Name of cellSet/cellZone if required | no | + \endtable + +Note + - For incompressible cases, the value of \c rhoRef is used. + - When specifying the cylindrical coordinate system, the rotation + can be specified directly with e1/e2/e3 axes, or via a \c rotation + sub-dictionary + For example, + \verbatim + origin (0 0 0); + rotation + { + type cylindrical; + axis (0 0 1); + } + \endverbatim + +See also + Foam::functionObject + Foam::functionObjects::fvMeshFunctionObject + Foam::functionObjects::volRegion + Foam::functionObjects::writeFile + Foam::functionObjects::timeControl + +SourceFiles + momentum.C + +\*---------------------------------------------------------------------------*/ + +#ifndef functionObjects_momentum_H +#define functionObjects_momentum_H + +#include "fvMeshFunctionObject.H" +#include "writeFile.H" +#include "cylindricalCS.H" +#include "volFieldsFwd.H" +#include "volRegion.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declarations +class dimensionSet; + +namespace functionObjects +{ + +/*---------------------------------------------------------------------------*\ + Class momentum Declaration +\*---------------------------------------------------------------------------*/ + +class momentum +: + public fvMeshFunctionObject, + public volRegion, + public writeFile +{ + // Private Member Functions + + //- Calculate the fields and integral values + void calc(); + + //- Allocate a new zero geometric field + template<class GeoField> + autoPtr<GeoField> newField + ( + const word& baseName, + const dimensionSet& dims, + bool registerObject=true + ) const; + + +protected: + + // Protected data + + //- Integral (linear) momentum + vector sumMomentum_; + + //- Integral angular momentum + vector sumAngularMom_; + + + // Read from dictionary + + //- The velocity field name (optional) + word UName_; + + //- The pressure field name (optional) + // Only used to determine incompressible/compressible + word pName_; + + //- The density field name (optional) + word rhoName_; + + //- Reference density (for incompressible) + scalar rhoRef_; + + //- Coordinate system for evaluating angular momentum + coordSystem::cylindrical csys_; + + //- Are we using the cylindrical coordinate system? + bool hasCsys_; + + //- Write fields flag + bool writeMomentum_; + + //- Write fields flag + bool writeVelocity_; + + //- Write fields flag + bool writePosition_; + + //- Initialised flag + bool initialised_; + + + // Protected Member Functions + + //- Initialise the fields + void initialise(); + + //- Output file header information + virtual void writeFileHeader(Ostream& os); + + //- Write momentum data + void writeValues(Ostream& os); + + //- No copy construct + momentum(const momentum&) = delete; + + //- No copy assignment + void operator=(const momentum&) = delete; + + +public: + + //- Runtime type information + TypeName("momentum"); + + + // Constructors + + //- Construct from Time and dictionary + momentum + ( + const word& name, + const Time& runTime, + const dictionary& dict, + const bool readFields = true + ); + + //- Construct from objectRegistry and dictionary + momentum + ( + const word& name, + const objectRegistry& obr, + const dictionary& dict, + const bool readFields = true + ); + + + //- Destructor + virtual ~momentum() = default; + + + // Member Functions + + //- Read the momentum data + virtual bool read(const dictionary&); + + //- Calculate and report the integral momentum + virtual bool execute(); + + //- Write the momentum, possibly angular momentum and velocity + virtual bool write(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace functionObjects +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/functionObjects/field/streamLine/streamLineBase.C b/src/functionObjects/field/streamLine/streamLineBase.C index 86d26c54ecb1f36f947576a1e8702fb1b5ebb16e..2b0665df23d3f11d79469fd3769e3297300e537f 100644 --- a/src/functionObjects/field/streamLine/streamLineBase.C +++ b/src/functionObjects/field/streamLine/streamLineBase.C @@ -646,9 +646,7 @@ bool Foam::functionObjects::streamLineBase::writeToFile() fileName vtkPath ( - Pstream::parRun() - ? time_.path()/".."/functionObject::outputPrefix/"sets"/name() - : time_.path()/functionObject::outputPrefix/"sets"/name() + time_.globalPath()/functionObject::outputPrefix/"sets"/name() ); if (mesh_.name() != fvMesh::defaultRegion) { diff --git a/src/functionObjects/graphics/runTimePostProcessing/CMakeLists-Project.txt b/src/functionObjects/graphics/runTimePostProcessing/CMakeLists-Project.txt index 6cd899348c0a2060ae2672a6f7f05da14942e140..d64168acbde2fd0de130c189bbef424ba4e72d64 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/CMakeLists-Project.txt +++ b/src/functionObjects/graphics/runTimePostProcessing/CMakeLists-Project.txt @@ -14,6 +14,7 @@ else() endif() include_directories( + ${LIB_SRC}/OpenFOAM/include ${LIB_SRC}/OpenFOAM/lnInclude ${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude ${LIB_SRC}/finiteVolume/lnInclude diff --git a/src/functionObjects/graphics/runTimePostProcessing/scene.C b/src/functionObjects/graphics/runTimePostProcessing/scene.C index 6af579dff4068c1ea740c3a8a555e4c661a7edb7..63b4542113cb5774ca61df589378f262acbe371a 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/scene.C +++ b/src/functionObjects/graphics/runTimePostProcessing/scene.C @@ -389,16 +389,12 @@ void Foam::functionObjects::runTimePostPro::scene::saveImage const Time& runTime = obr_.time(); - const fileName relPath + const fileName prefix ( - functionObject::outputPrefix/name_/obr_.time().timeName() - ); - - fileName prefix - ( - Pstream::parRun() ? - runTime.path()/".."/relPath - : runTime.path()/relPath + runTime.globalPath() + / functionObject::outputPrefix + / name_ + / runTime.timeName() ); mkDir(prefix); diff --git a/src/functionObjects/utilities/systemCall/systemCall.C b/src/functionObjects/utilities/systemCall/systemCall.C index 4d5c816ec7f1eaa168896e189d21b71d2a0843f1..26d19cd5587332d20b47bd37b9d5bea17066d4af 100644 --- a/src/functionObjects/utilities/systemCall/systemCall.C +++ b/src/functionObjects/utilities/systemCall/systemCall.C @@ -127,6 +127,7 @@ bool Foam::functionObjects::systemCall::read(const dictionary& dict) << " allowSystemOperations 1" << nl << nl << "to the InfoSwitches setting in the system controlDict." << nl << "The system controlDict is any of" << nl << nl + << " ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl << " ~/.OpenFOAM/controlDict" << nl << " $WM_PROJECT_DIR/etc/controlDict" << nl << endl << exit(FatalError); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C index 11edced4d811f5ef7134e060ea92198a63aa6262..f81d689dbcf64f5116fdb4d7f69a9660543faba6 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C @@ -55,28 +55,21 @@ Foam::CloudFunctionObject<CloudType>::CloudFunctionObject ) : CloudSubModelBase<CloudType>(modelName, owner, dict, typeName, objectType), - outputDir_(owner.mesh().time().path()) + outputDir_() { - const fileName relPath + // Put in undecomposed case + // (Note: gives problems for distributed data running) + + outputDir_ = ( - functionObject::outputPrefix - /cloud::prefix - /owner.name() - /this->modelName() + owner.mesh().time().globalPath() + / functionObject::outputPrefix + / cloud::prefix + / owner.name() + / this->modelName() ); - - if (Pstream::parRun()) - { - // Put in undecomposed case (Note: gives problems for - // distributed data running) - outputDir_ = outputDir_/".."/relPath; - } - else - { - outputDir_ = outputDir_/relPath; - } - outputDir_.clean(); + outputDir_.clean(); // Remove unneeded ".." } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 3a538119b5a69576097fdaa8f0c91d593b4d3ba9..117bcdb955a9de544a45dda4d36ce0d9e52abebf 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -2285,8 +2285,7 @@ Foam::label Foam::meshRefinement::findRegions if (Pstream::master()) { outputDir = - mesh.time().path() - / (Pstream::parRun() ? ".." : "") + mesh.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance(); outputDir.clean(); diff --git a/src/meshTools/output/foamVtkIndPatchWriter.C b/src/meshTools/output/foamVtkIndPatchWriter.C index bf8adcf9fcc4a191145c36a333e86a68301d8e42..1dc96724f76645dfa4ba8d418d43c82d85a7a47c 100644 --- a/src/meshTools/output/foamVtkIndPatchWriter.C +++ b/src/meshTools/output/foamVtkIndPatchWriter.C @@ -148,10 +148,7 @@ void Foam::vtk::indirectPatchWriter::writePoints() } -void Foam::vtk::indirectPatchWriter::writePolysLegacy -( - const globalIndex& pointOffsets -) +void Foam::vtk::indirectPatchWriter::writePolysLegacy(const label pointOffset) { // Connectivity count without additional storage (done internally) @@ -182,7 +179,7 @@ void Foam::vtk::indirectPatchWriter::writePolysLegacy auto iter = vertLabels.begin(); - label off = pointOffsets.localStart(); + label off = pointOffset; { for (const face& f : pp_.localFaces()) @@ -217,10 +214,7 @@ void Foam::vtk::indirectPatchWriter::writePolysLegacy } -void Foam::vtk::indirectPatchWriter::writePolys -( - const globalIndex& pointOffsets -) +void Foam::vtk::indirectPatchWriter::writePolys(const label pointOffset) { if (format_) { @@ -254,7 +248,7 @@ void Foam::vtk::indirectPatchWriter::writePolys auto iter = vertLabels.begin(); - label off = pointOffsets.localStart(); + label off = pointOffset; { for (const face& f : pp_.localFaces()) @@ -294,9 +288,6 @@ void Foam::vtk::indirectPatchWriter::writePolys labelList vertOffsets(nLocalFaces_); label nOffs = vertOffsets.size(); - // global connectivity offsets - const globalIndex procOffset(nLocalVerts_); - if (parallel_) { reduce(nOffs, sumOp<label>()); @@ -311,7 +302,11 @@ void Foam::vtk::indirectPatchWriter::writePolys } - label off = procOffset.localStart(); + // processor-local connectivity offsets + label off = + ( + parallel_ ? globalIndex(nLocalVerts_).localStart() : 0 + ); auto iter = vertOffsets.begin(); @@ -419,15 +414,18 @@ bool Foam::vtk::indirectPatchWriter::writeGeometry() writePoints(); - const globalIndex globalPointOffset(nLocalPoints_); + const label pointOffset = + ( + parallel_ ? globalIndex(nLocalPoints_).localStart() : 0 + ); if (legacy()) { - writePolysLegacy(globalPointOffset); + writePolysLegacy(pointOffset); } else { - writePolys(globalPointOffset); + writePolys(pointOffset); } return true; diff --git a/src/meshTools/output/foamVtkIndPatchWriter.H b/src/meshTools/output/foamVtkIndPatchWriter.H index c0e989dbf080ac07db65f5a609f746f5e23ce520..9f3c40fb5d7ad7cdd69f303a2f54af93bbdc5750 100644 --- a/src/meshTools/output/foamVtkIndPatchWriter.H +++ b/src/meshTools/output/foamVtkIndPatchWriter.H @@ -54,10 +54,6 @@ SourceFiles namespace Foam { - -// Forward declarations -class globalIndex; - namespace vtk { @@ -100,10 +96,12 @@ class indirectPatchWriter void writePoints(); //- Write patch faces, legacy format - void writePolysLegacy(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writePolysLegacy(const label pointOffset); //- Write patch faces - void writePolys(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writePolys(const label pointOffset); //- No copy construct diff --git a/src/meshTools/output/foamVtkSurfaceWriter.C b/src/meshTools/output/foamVtkSurfaceWriter.C index 7bf887d232f729fc750341717e1b524eb10982f0..5face8ad41c31f1e61af57592092b2952d129c8e 100644 --- a/src/meshTools/output/foamVtkSurfaceWriter.C +++ b/src/meshTools/output/foamVtkSurfaceWriter.C @@ -148,10 +148,7 @@ void Foam::vtk::surfaceWriter::writePoints() } -void Foam::vtk::surfaceWriter::writePolysLegacy -( - const globalIndex& pointOffsets -) +void Foam::vtk::surfaceWriter::writePolysLegacy(const label pointOffset) { // Connectivity count without additional storage (done internally) @@ -182,7 +179,7 @@ void Foam::vtk::surfaceWriter::writePolysLegacy auto iter = vertLabels.begin(); - label off = pointOffsets.localStart(); + label off = pointOffset; { for (const face& f : faces_) @@ -217,10 +214,7 @@ void Foam::vtk::surfaceWriter::writePolysLegacy } -void Foam::vtk::surfaceWriter::writePolys -( - const globalIndex& pointOffsets -) +void Foam::vtk::surfaceWriter::writePolys(const label pointOffset) { if (format_) { @@ -254,7 +248,7 @@ void Foam::vtk::surfaceWriter::writePolys auto iter = vertLabels.begin(); - label off = pointOffsets.localStart(); + label off = pointOffset; { for (const face& f : faces_) @@ -294,9 +288,6 @@ void Foam::vtk::surfaceWriter::writePolys labelList vertOffsets(nLocalFaces_); label nOffs = vertOffsets.size(); - // global connectivity offsets - const globalIndex procOffset(nLocalVerts_); - if (parallel_) { reduce(nOffs, sumOp<label>()); @@ -311,7 +302,12 @@ void Foam::vtk::surfaceWriter::writePolys } - label off = procOffset.localStart(); + // processor-local connectivity offsets + label off = + ( + parallel_ ? globalIndex(nLocalVerts_).localStart() : 0 + ); + auto iter = vertOffsets.begin(); @@ -438,15 +434,18 @@ bool Foam::vtk::surfaceWriter::writeGeometry() writePoints(); - const globalIndex globalPointOffset(nLocalPoints_); + const label pointOffset = + ( + parallel_ ? globalIndex(nLocalPoints_).localStart() : 0 + ); if (legacy()) { - writePolysLegacy(globalPointOffset); + writePolysLegacy(pointOffset); } else { - writePolys(globalPointOffset); + writePolys(pointOffset); } return true; diff --git a/src/meshTools/output/foamVtkSurfaceWriter.H b/src/meshTools/output/foamVtkSurfaceWriter.H index f6c373559c87494b9d702d6153bf1affca67256f..aa6348ff364ca9c3900fb0cffcb4123127a9faae 100644 --- a/src/meshTools/output/foamVtkSurfaceWriter.H +++ b/src/meshTools/output/foamVtkSurfaceWriter.H @@ -56,10 +56,6 @@ SourceFiles namespace Foam { - -// Forward declarations -class globalIndex; - namespace vtk { @@ -108,10 +104,12 @@ class surfaceWriter void writePoints(); //- Write patch faces, legacy format - void writePolysLegacy(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writePolysLegacy(const label pointOffset); //- Write patch faces - void writePolys(const globalIndex& pointOffsets); + // \param pointOffset processor-local point offset + void writePolys(const label pointOffset); //- No copy construct diff --git a/src/meshTools/output/foamVtkWriteCellSetFaces.C b/src/meshTools/output/foamVtkWriteCellSetFaces.C index 09227deb246c9ec26ca037a03772064bec2eef4a..b6323a3e3e096377383852d37eded1af47b332a7 100644 --- a/src/meshTools/output/foamVtkWriteCellSetFaces.C +++ b/src/meshTools/output/foamVtkWriteCellSetFaces.C @@ -42,8 +42,6 @@ bool Foam::vtk::writeCellSetFaces { typedef IndirectList<face> FaceListType; - const globalIndex cellIdOffset(mesh.nCells()); - indirectPrimitivePatch pp ( FaceListType(mesh.faces(), labelList()), @@ -88,22 +86,6 @@ bool Foam::vtk::writeCellSetFaces // Use these faces faces.resetAddressing(cellFaces.sortedToc()); - // For each face, the corresponding cellID - - labelList faceValues(faces.size()); - - // Cell ID - { - const labelList& faceIds = faces.addressing(); - - const label off = cellIdOffset.localStart(); - - forAll(faceValues, facei) - { - faceValues[facei] = cellFaces[faceIds[facei]] + off; - } - } - //------------------------------------------------------------------------- indirectPatchWriter writer(pp, opts); @@ -115,15 +97,32 @@ bool Foam::vtk::writeCellSetFaces //------------------------------------------------------------------------- - // CellData - cellID only + // CellData - faceID only + + writer.beginCellData(1); { - writer.beginCellData(1); + // For each face, the corresponding cellID - writer.write("faceID", faceValues); + labelList faceValues(faces.size()); + + const labelList& faceIds = faces.addressing(); + + // processor-local cellID offset + const label cellIdOffset = + ( + writer.parallel() ? globalIndex(mesh.nCells()).localStart() : 0 + ); - // End CellData/PointData is implicit + forAll(faceValues, facei) + { + faceValues[facei] = cellFaces[faceIds[facei]] + cellIdOffset; + } + + writer.write("faceID", faceValues); } + // End CellData/PointData is implicit + writer.close(); return true; diff --git a/src/meshTools/output/foamVtkWriteFaceSet.C b/src/meshTools/output/foamVtkWriteFaceSet.C index 28003c9be23712b3a89784e546e19134f3c1451b..7cc75e04fcfe72d98216befed37d30e76725cdfc 100644 --- a/src/meshTools/output/foamVtkWriteFaceSet.C +++ b/src/meshTools/output/foamVtkWriteFaceSet.C @@ -42,8 +42,6 @@ bool Foam::vtk::writeFaceSet { typedef IndirectList<face> FaceListType; - const globalIndex faceIdOffset(mesh.nFaces()); - indirectPrimitivePatch pp ( FaceListType(mesh.faces(), labelList()), @@ -69,7 +67,17 @@ bool Foam::vtk::writeFaceSet writer.beginCellData(1); labelField faceValues(faces.addressing()); - faceValues += faceIdOffset.localStart(); + + // processor-local faceID offset + const label faceIdOffset = + ( + writer.parallel() ? globalIndex(mesh.nFaces()).localStart() : 0 + ); + + if (faceIdOffset) + { + faceValues += faceIdOffset; + } writer.write("faceID", faceValues); diff --git a/src/meshTools/output/foamVtkWritePointSet.C b/src/meshTools/output/foamVtkWritePointSet.C index 1952c3a2fc4b058cd69d43921c88566da0a54c2f..667bcb3641c78f2fbe277cf3bd2f656351764154 100644 --- a/src/meshTools/output/foamVtkWritePointSet.C +++ b/src/meshTools/output/foamVtkWritePointSet.C @@ -94,8 +94,6 @@ bool Foam::vtk::writePointSet //------------------------------------------------------------------------- - const globalIndex pointIdOffset(mesh.nPoints()); - labelField pointLabels(set.sortedToc()); label numberOfPoints = pointLabels.size(); @@ -206,6 +204,8 @@ bool Foam::vtk::writePointSet if (parallel) { + const globalIndex pointIdOffset(mesh.nPoints()); + vtk::writeListParallel(format.ref(), pointLabels, pointIdOffset); } else diff --git a/src/sampling/Make/files b/src/sampling/Make/files index 3e42081cc06955e410a663bbd719680d95b609df..dbef3b398732dd14b0e76791bc91b60c81ca2d62 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -29,6 +29,7 @@ surface/cutting/cuttingSurfaceBaseSelection.C surface/distanceSurface/distanceSurface.C surface/isoSurface/isoSurface.C surface/isoSurface/isoSurfaceCell.C +surface/isoSurface/isoSurfaceTopo.C surface/thresholdCellFaces/thresholdCellFaces.C surface/triSurfaceMesh/discreteSurface.C @@ -44,6 +45,7 @@ sampledSurface/sampledPatchInternalField/sampledPatchInternalField.C sampledSurface/sampledPlane/sampledPlane.C sampledSurface/isoSurface/sampledIsoSurface.C sampledSurface/isoSurface/sampledIsoSurfaceCell.C +sampledSurface/isoSurface/sampledIsoSurfaceTopo.C sampledSurface/distanceSurface/sampledDistanceSurface.C sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C sampledSurface/sampledCuttingSurface/sampledCuttingSurface.C diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 9849cc4e292c182072b70af39545cbaf0d23865a..2035acfe132411ac2c9e0e40ab95aad21d6c26a4 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -195,26 +195,24 @@ Foam::label Foam::probes::prepare() << endl; - fileName probeDir; fileName probeSubDir = name(); if (mesh_.name() != polyMesh::defaultRegion) { probeSubDir = probeSubDir/mesh_.name(); } - probeSubDir = - functionObject::outputPrefix/probeSubDir/mesh_.time().timeName(); - if (Pstream::parRun()) - { - // Put in undecomposed case - // (Note: gives problems for distributed data running) - probeDir = mesh_.time().path()/".."/probeSubDir; - } - else - { - probeDir = mesh_.time().path()/probeSubDir; - } + // Put in undecomposed case + // (Note: gives problems for distributed data running) + + fileName probeDir = + ( + mesh_.time().globalPath() + / functionObject::outputPrefix + / probeSubDir + / mesh_.time().timeName() + ); + probeDir.clean(); // Remove unneeded ".." // ignore known fields, close streams for fields that no longer exist diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.C b/src/sampling/sampledSet/sampledSets/sampledSets.C index fe00ddd5d8f39a906ab0e9436331a5557c134c9d..7589d5b3df50fa8fd28526eab57197eb2a73c92f 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSets.C +++ b/src/sampling/sampledSet/sampledSets/sampledSets.C @@ -97,16 +97,10 @@ Foam::sampledSets::sampledSets interpolationScheme_(word::null), writeFormat_(word::null) { - const fileName relPath(functionObject::outputPrefix/name); - - if (Pstream::parRun()) - { - outputPath_ = mesh_.time().path()/".."/relPath; - } - else - { - outputPath_ = mesh_.time().path()/relPath; - } + outputPath_ = + ( + mesh_.time().globalPath()/functionObject::outputPrefix/name + ); if (mesh_.name() != fvMesh::defaultRegion) { @@ -136,16 +130,10 @@ Foam::sampledSets::sampledSets interpolationScheme_(word::null), writeFormat_(word::null) { - const fileName relPath(functionObject::outputPrefix/name); - - if (Pstream::parRun()) - { - outputPath_ = mesh_.time().path()/".."/relPath; - } - else - { - outputPath_ = mesh_.time().path()/relPath; - } + outputPath_ = + ( + mesh_.time().globalPath()/functionObject::outputPrefix/name + ); if (mesh_.name() != fvMesh::defaultRegion) { diff --git a/src/sampling/sampledSet/shortestPath/shortestPathSet.C b/src/sampling/sampledSet/shortestPath/shortestPathSet.C index bc8cd1a467e8aed33491c673004a6e532ffcaa33..4bc1df916a122d4bfcf6fb66e38da2aa50ce8975 100644 --- a/src/sampling/sampledSet/shortestPath/shortestPathSet.C +++ b/src/sampling/sampledSet/shortestPath/shortestPathSet.C @@ -844,8 +844,7 @@ Foam::shortestPathSet::shortestPathSet if (Pstream::master()) { outputDir = - mesh.time().path() - / (Pstream::parRun() ? ".." : "") + mesh.time().globalPath() / functionObject::outputPrefix / mesh.pointsInstance(); outputDir.clean(); diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.C new file mode 100644 index 0000000000000000000000000000000000000000..6f3ff764f0c0ba6abc5deacdfc8e470000907829 --- /dev/null +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.C @@ -0,0 +1,328 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | Copyright (C) 2018 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 "sampledIsoSurfaceTopo.H" +#include "dictionary.H" +#include "volFields.H" +#include "volPointInterpolation.H" +#include "addToRunTimeSelectionTable.H" +#include "fvMesh.H" +#include "isoSurfaceTopo.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(sampledIsoSurfaceTopo, 0); + addNamedToRunTimeSelectionTable + ( + sampledSurface, + sampledIsoSurfaceTopo, + word, + isoSurfaceTopo + ); +} + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +bool Foam::sampledIsoSurfaceTopo::updateGeometry() const +{ + const fvMesh& fvm = static_cast<const fvMesh&>(mesh()); + + // No update needed + if (fvm.time().timeIndex() == prevTimeIndex_) + { + return false; + } + + prevTimeIndex_ = fvm.time().timeIndex(); + + // Clear derived data + sampledSurface::clearGeom(); + + // Use field from database, or try to read it in + + const auto* cellFldPtr = fvm.findObject<volScalarField>(isoField_); + + if (debug) + { + if (cellFldPtr) + { + InfoInFunction << "Lookup " << isoField_ << endl; + } + else + { + InfoInFunction + << "Reading " << isoField_ + << " from time " << fvm.time().timeName() + << endl; + } + } + + // For holding the volScalarField read in. + autoPtr<volScalarField> fieldReadPtr; + + if (!cellFldPtr) + { + // Bit of a hack. Read field and store. + + fieldReadPtr = autoPtr<volScalarField>::New + ( + IOobject + ( + isoField_, + fvm.time().timeName(), + fvm, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ), + fvm + ); + } + + const volScalarField& cellFld = + (fieldReadPtr.valid() ? *fieldReadPtr : *cellFldPtr); + + auto tpointFld = volPointInterpolation::New(fvm).interpolate(cellFld); + + //- Direct from cell field and point field. Gives bad continuity. + isoSurfaceTopo surf + ( + fvm, + cellFld.primitiveField(), + tpointFld().primitiveField(), + isoVal_, + (regularise_ ? isoSurfaceTopo::DIAGCELL : isoSurfaceTopo::NONE) + ); + + MeshedSurface<face>& mySurface = const_cast<sampledIsoSurfaceTopo&>(*this); + + mySurface.transfer(static_cast<meshedSurface&>(surf)); + meshCells_ = std::move(surf.meshCells()); + + // triangulate uses remapFaces() + // - this is somewhat less efficient since it recopies the faces + // that we just created, but we probably don't want to do this + // too often anyhow. + if (triangulate_) + { + labelList faceMap; + mySurface.triangulate(faceMap); + meshCells_ = UIndirectList<label>(meshCells_, faceMap)(); + } + + if (debug) + { + Pout<< "sampledIsoSurfaceTopo::updateGeometry() : constructed iso:" + << nl + << " regularise : " << regularise_ << nl + << " triangulate : " << triangulate_ << nl + << " isoField : " << isoField_ << nl + << " isoValue : " << isoVal_ << nl + << " points : " << points().size() << nl + << " faces : " << MeshStorage::size() << nl + << " cut cells : " << meshCells_.size() << endl; + } + + return true; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::sampledIsoSurfaceTopo::sampledIsoSurfaceTopo +( + const word& name, + const polyMesh& mesh, + const dictionary& dict +) +: + sampledSurface(name, mesh, dict), + MeshStorage(), + isoField_(dict.get<word>("isoField")), + isoVal_(dict.get<scalar>("isoValue")), + regularise_(dict.lookupOrDefault("regularise", true)), + triangulate_(dict.lookupOrDefault("triangulate", false)), + prevTimeIndex_(-1), + meshCells_() +{ + if (triangulate_ && !regularise_) + { + FatalIOErrorInFunction(dict) << "Cannot both use regularise" + << " and triangulate" << exit(FatalIOError); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::sampledIsoSurfaceTopo::~sampledIsoSurfaceTopo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::sampledIsoSurfaceTopo::needsUpdate() const +{ + const fvMesh& fvm = static_cast<const fvMesh&>(mesh()); + + return fvm.time().timeIndex() != prevTimeIndex_; +} + + +bool Foam::sampledIsoSurfaceTopo::expire() +{ + // Clear derived data + sampledSurface::clearGeom(); + + // Already marked as expired + if (prevTimeIndex_ == -1) + { + return false; + } + + // Force update + prevTimeIndex_ = -1; + return true; +} + + +bool Foam::sampledIsoSurfaceTopo::update() +{ + return updateGeometry(); +} + + +Foam::tmp<Foam::scalarField> +Foam::sampledIsoSurfaceTopo::sample +( + const interpolation<scalar>& sampler +) const +{ + return sampleOnFaces(sampler); +} + + +Foam::tmp<Foam::vectorField> +Foam::sampledIsoSurfaceTopo::sample +( + const interpolation<vector>& sampler +) const +{ + return sampleOnFaces(sampler); +} + + +Foam::tmp<Foam::sphericalTensorField> +Foam::sampledIsoSurfaceTopo::sample +( + const interpolation<sphericalTensor>& sampler +) const +{ + return sampleOnFaces(sampler); +} + + +Foam::tmp<Foam::symmTensorField> +Foam::sampledIsoSurfaceTopo::sample +( + const interpolation<symmTensor>& sampler +) const +{ + return sampleOnFaces(sampler); +} + + +Foam::tmp<Foam::tensorField> +Foam::sampledIsoSurfaceTopo::sample +( + const interpolation<tensor>& sampler +) const +{ + return sampleOnFaces(sampler); +} + + +Foam::tmp<Foam::scalarField> +Foam::sampledIsoSurfaceTopo::interpolate +( + const interpolation<scalar>& interpolator +) const +{ + return sampleOnPoints(interpolator); +} + + +Foam::tmp<Foam::vectorField> +Foam::sampledIsoSurfaceTopo::interpolate +( + const interpolation<vector>& interpolator +) const +{ + return sampleOnPoints(interpolator); +} + +Foam::tmp<Foam::sphericalTensorField> +Foam::sampledIsoSurfaceTopo::interpolate +( + const interpolation<sphericalTensor>& interpolator +) const +{ + return sampleOnPoints(interpolator); +} + + +Foam::tmp<Foam::symmTensorField> +Foam::sampledIsoSurfaceTopo::interpolate +( + const interpolation<symmTensor>& interpolator +) const +{ + return sampleOnPoints(interpolator); +} + + +Foam::tmp<Foam::tensorField> +Foam::sampledIsoSurfaceTopo::interpolate +( + const interpolation<tensor>& interpolator +) const +{ + return sampleOnPoints(interpolator); +} + + +void Foam::sampledIsoSurfaceTopo::print(Ostream& os) const +{ + os << "sampledIsoSurfaceTopo: " << name() << " :" + << " field:" << isoField_ + << " value:" << isoVal_; + //<< " faces:" << faces().size() // possibly no geom yet + //<< " points:" << points().size(); +} + + +// ************************************************************************* // diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.H b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.H new file mode 100644 index 0000000000000000000000000000000000000000..31612b92311d09d9c4b91a9ff55dc90f28795fba --- /dev/null +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.H @@ -0,0 +1,291 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | Copyright (C) 2018 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::sampledIsoSurfaceTopo + +Description + A sampledSurface defined by a surface of iso value. + To be used in sampleSurfaces / functionObjects. Recalculates iso surface + only if time changes. + + This is often embedded as part of a sampled surfaces function object. + +Usage + Example of function object partial specification: + \verbatim + surfaces + ( + surface1 + { + type isoSurfaceTopo; + isoField p; + isoValue 0.0; + } + ); + \endverbatim + + Where the sub-entries comprise: + \table + Property | Description | Required | Default + type | isoSurfaceTopo | yes | + isoField | field name for obtaining iso-surface | yes | + isoValue | value of iso-surface | yes | + regularise | filter faces | no | true + triangulate | triangulate faces (if regularise) | no | false + \endtable + +Note + Does not currently support cell zones. + +SourceFiles + sampledIsoSurfaceTopo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef sampledIsoSurfaceTopo_H +#define sampledIsoSurfaceTopo_H + +#include "sampledSurface.H" +#include "MeshedSurface.H" +#include "MeshedSurfacesFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class sampledIsoSurfaceTopo Declaration +\*---------------------------------------------------------------------------*/ + +class sampledIsoSurfaceTopo +: + public sampledSurface, + public MeshedSurface<face> +{ + // Private typedefs for convenience + typedef MeshedSurface<face> MeshStorage; + + // Private data + + //- Field to get isoSurface of + const word isoField_; + + //- Iso value + const scalar isoVal_; + + //- Whether to coarse + const bool regularise_; + + //- Whether to triangulate + const bool triangulate_; + + // Recreated for every isoSurface + + //- Time at last call, also track it surface needs an update + mutable label prevTimeIndex_; + + //- For every triangle/face the original cell in mesh + mutable labelList meshCells_; + + + // Private Member Functions + + //- Create iso surface (if time has changed) + // Do nothing (and return false) if no update was needed + bool updateGeometry() const; + + //- Sample volume field onto surface faces + template<class Type> + tmp<Field<Type>> sampleOnFaces + ( + const interpolation<Type>& sampler + ) const; + + //- Interpolate volume field onto surface points + template<class Type> + tmp<Field<Type>> sampleOnPoints + ( + const interpolation<Type>& interpolator + ) const; + + +public: + + //- Runtime type information + TypeName("sampledIsoSurfaceTopo"); + + + // Constructors + + //- Construct from dictionary + sampledIsoSurfaceTopo + ( + const word& name, + const polyMesh& mesh, + const dictionary& dict + ); + + + //- Destructor + virtual ~sampledIsoSurfaceTopo(); + + + // Member Functions + + //- Does the surface need an update? + virtual bool needsUpdate() const; + + //- Mark the surface as needing an update. + // May also free up unneeded data. + // Return false if surface was already marked as expired. + virtual bool expire(); + + //- Update the surface as required. + // Do nothing (and return false) if no update was needed + virtual bool update(); + + + //- Points of surface + virtual const pointField& points() const + { + return MeshStorage::points(); + } + + //- Faces of surface + virtual const faceList& faces() const + { + return *this; + } + + //- Const access to per-face zone/region information + virtual const labelList& zoneIds() const + { + return Foam::emptyLabelList; + } + + //- Face area magnitudes + virtual const vectorField& Sf() const + { + return MeshStorage::Sf(); + } + + //- Face area magnitudes + virtual const scalarField& magSf() const + { + return MeshStorage::magSf(); + } + + //- Face centres + virtual const vectorField& Cf() const + { + return MeshStorage::Cf(); + } + + + // Sample + + //- Sample volume field onto surface faces + virtual tmp<scalarField> sample + ( + const interpolation<scalar>& sampler + ) const; + + //- Sample volume field onto surface faces + virtual tmp<vectorField> sample + ( + const interpolation<vector>& sampler + ) const; + + //- Sample volume field onto surface faces + virtual tmp<sphericalTensorField> sample + ( + const interpolation<sphericalTensor>& sampler + ) const; + + //- Sample volume field onto surface faces + virtual tmp<symmTensorField> sample + ( + const interpolation<symmTensor>& sampler + ) const; + + //- Sample volume field onto surface faces + virtual tmp<tensorField> sample + ( + const interpolation<tensor>& sampler + ) const; + + + // Interpolate + + //- Interpolate volume field onto surface points + virtual tmp<scalarField> interpolate + ( + const interpolation<scalar>& interpolator + ) const; + + //- Interpolate volume field onto surface points + virtual tmp<vectorField> interpolate + ( + const interpolation<vector>& interpolator + ) const; + + //- Interpolate volume field onto surface points + virtual tmp<sphericalTensorField> interpolate + ( + const interpolation<sphericalTensor>& interpolator + ) const; + + //- Interpolate volume field onto surface points + virtual tmp<symmTensorField> interpolate + ( + const interpolation<symmTensor>& interpolator + ) const; + + //- Interpolate volume field onto surface points + virtual tmp<tensorField> interpolate + ( + const interpolation<tensor>& interpolator + ) const; + + //- Write + virtual void print(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "sampledIsoSurfaceTopoTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopoTemplates.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopoTemplates.C new file mode 100644 index 0000000000000000000000000000000000000000..5517417f4767d1ac88bd0b34db9219995253dbd4 --- /dev/null +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopoTemplates.C @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | Copyright (C) 2018 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 "sampledIsoSurfaceTopo.H" +#include "isoSurface.H" +#include "volFieldsFwd.H" +#include "pointFields.H" +#include "volPointInterpolation.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class Type> +Foam::tmp<Foam::Field<Type>> +Foam::sampledIsoSurfaceTopo::sampleOnFaces +( + const interpolation<Type>& sampler +) const +{ + updateGeometry(); // Recreate geometry if time has changed + + return sampledSurface::sampleOnFaces + ( + sampler, + meshCells_, + faces(), + points() + ); +} + + +template<class Type> +Foam::tmp<Foam::Field<Type>> +Foam::sampledIsoSurfaceTopo::sampleOnPoints +( + const interpolation<Type>& interpolator +) const +{ + updateGeometry(); // Recreate geometry if time has changed + + const labelList& elements = meshCells_; + + // One value per point + auto tvalues = tmp<Field<Type>>::New(points().size()); + auto& values = tvalues.ref(); + + const faceList& fcs = faces(); + const pointField& pts = points(); + + bitSet pointDone(points().size()); + + forAll(faces(), cutFacei) + { + const face& f = fcs[cutFacei]; + const label celli = elements[cutFacei]; + + for (const label pointi : f) + { + if (pointDone.set(pointi)) + { + values[pointi] = interpolator.interpolate + ( + pts[pointi], + celli + ); + } + } + } + + return tvalues; +} + + +// ************************************************************************* // diff --git a/src/sampling/surface/isoSurface/isoSurfaceTopo.C b/src/sampling/surface/isoSurface/isoSurfaceTopo.C new file mode 100644 index 0000000000000000000000000000000000000000..fb0531e423f6966d6bd4701a8df0f391cb26dde5 --- /dev/null +++ b/src/sampling/surface/isoSurface/isoSurfaceTopo.C @@ -0,0 +1,1234 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +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 "isoSurfaceTopo.H" +#include "polyMesh.H" +#include "tetMatcher.H" +#include "tetPointRef.H" +#include "DynamicField.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(isoSurfaceTopo, 0); +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +bool Foam::isoSurfaceTopo::isTriCut +( + const triFace& tri, + const scalarField& pointValues +) const +{ + const bool aLower = (pointValues[tri[0]] < iso_); + const bool bLower = (pointValues[tri[1]] < iso_); + const bool cLower = (pointValues[tri[2]] < iso_); + + return !(aLower == bLower && aLower == cLower); +} + + +Foam::isoSurfaceTopo::cellCutType Foam::isoSurfaceTopo::calcCutType +( + const bool isTet, + const label celli +) const +{ + const cell& cFaces = mesh_.cells()[celli]; + + if (isTet) + { + for (const label facei : cFaces) + { + const face& f = mesh_.faces()[facei]; + + for (label fp = 1; fp < f.size() - 1; ++fp) + { + const triFace tri(f[0], f[fp], f[f.fcIndex(fp)]); + + if (isTriCut(tri, pVals_)) + { + return CUT; + } + } + } + return NOTCUT; + } + else + { + const bool cellLower = (cVals_[celli] < iso_); + + // First check if there is any cut in cell + bool edgeCut = false; + + for (const label facei : cFaces) + { + const face& f = mesh_.faces()[facei]; + + // Check pyramids cut + for (const label pointi : f) + { + if ((pVals_[pointi] < iso_) != cellLower) + { + edgeCut = true; + break; + } + } + + if (edgeCut) + { + break; + } + + const label fp0 = mesh_.tetBasePtIs()[facei]; + label fp = f.fcIndex(fp0); + for (label i = 2; i < f.size(); ++i) + { + label nextFp = f.fcIndex(fp); + + if (isTriCut(triFace(f[fp0], f[fp], f[nextFp]), pVals_)) + { + edgeCut = true; + break; + } + + fp = nextFp; + } + + if (edgeCut) + { + break; + } + } + + if (edgeCut) + { + // Count actual cuts (expensive since addressing needed) + // Note: not needed if you don't want to preserve maxima/minima + // centred around cellcentre. In that case just always return CUT + + const labelList& cPoints = mesh_.cellPoints(celli); + + label nPyrEdgeCuts = 0; + + for (const label pointi : cPoints) + { + if ((pVals_[pointi] < iso_) != cellLower) + { + ++nPyrEdgeCuts; + } + } + + if (nPyrEdgeCuts == cPoints.size()) + { + return SPHERE; + } + else if (nPyrEdgeCuts) + { + return CUT; + } + } + return NOTCUT; + } +} + + +Foam::label Foam::isoSurfaceTopo::calcCutTypes +( + tetMatcher& tet, + List<cellCutType>& cellCutTypes +) +{ + const cellList& cells = mesh_.cells(); + + cellCutTypes.setSize(cells.size()); + label nCutCells = 0; + forAll(cells, celli) + { + cellCutTypes[celli] = calcCutType(tet.isA(mesh_, celli), celli); + + if (cellCutTypes[celli] == CUT) + { + ++nCutCells; + } + } + + if (debug) + { + Pout<< "isoSurfaceCell : candidate cut cells " + << nCutCells << " / " << mesh_.nCells() << endl; + } + return nCutCells; +} + + +Foam::label Foam::isoSurfaceTopo::generatePoint +( + const label facei, + const bool edgeIsDiag, + const edge& vertices, + + DynamicList<edge>& pointToVerts, + DynamicList<label>& pointToFace, + DynamicList<bool>& pointFromDiag, + EdgeMap<label>& vertsToPoint +) const +{ + EdgeMap<label>::const_iterator edgeFnd = vertsToPoint.find(vertices); + if (edgeFnd != vertsToPoint.end()) + { + return edgeFnd(); + } + else + { + // Generate new point + label pointi = pointToVerts.size(); + + pointToVerts.append(vertices); + pointToFace.append(facei); + pointFromDiag.append(edgeIsDiag); + vertsToPoint.insert(vertices, pointi); + return pointi; + } +} + + +void Foam::isoSurfaceTopo::generateTriPoints +( + const label facei, + const FixedList<scalar, 4>& s, + const FixedList<point, 4>& p, + const FixedList<label, 4>& pIndex, + const FixedList<bool, 6>& edgeIsDiag,// Per tet edge whether is face diag + + DynamicList<edge>& pointToVerts, + DynamicList<label>& pointToFace, + DynamicList<bool>& pointFromDiag, + + EdgeMap<label>& vertsToPoint, + DynamicList<label>& verts // Every three verts is new triangle +) const +{ + int triIndex = 0; + if (s[0] < iso_) + { + triIndex |= 1; + } + if (s[1] < iso_) + { + triIndex |= 2; + } + if (s[2] < iso_) + { + triIndex |= 4; + } + if (s[3] < iso_) + { + triIndex |= 8; + } + + // Form the vertices of the triangles for each case + switch (triIndex) + { + case 0x00: + case 0x0F: + break; + + case 0x01: + case 0x0E: + { + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[0], + edge(pIndex[0], pIndex[1]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[1], + edge(pIndex[0], pIndex[2]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[2], + edge(pIndex[0], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + + if (triIndex == 0x0E) + { + // Flip normals + label sz = verts.size(); + Swap(verts[sz-2], verts[sz-1]); + } + } + break; + + case 0x02: + case 0x0D: + { + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[0], + edge(pIndex[1], pIndex[0]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[3], + edge(pIndex[1], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[4], + edge(pIndex[1], pIndex[2]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + + if (triIndex == 0x0D) + { + // Flip normals + label sz = verts.size(); + Swap(verts[sz-2], verts[sz-1]); + } + } + break; + + case 0x03: + case 0x0C: + { + label p0p2 + ( + generatePoint + ( + facei, + edgeIsDiag[1], + edge(pIndex[0], pIndex[2]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + label p1p3 + ( + generatePoint + ( + facei, + edgeIsDiag[3], + edge(pIndex[1], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[2], + edge(pIndex[0], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append(p1p3); + verts.append(p0p2); + verts.append(p1p3); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[4], + edge(pIndex[1], pIndex[2]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append(p0p2); + + if (triIndex == 0x0C) + { + // Flip normals + label sz = verts.size(); + Swap(verts[sz-5], verts[sz-4]); + Swap(verts[sz-2], verts[sz-1]); + } + } + break; + + case 0x04: + case 0x0B: + { + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[1], + edge(pIndex[2], pIndex[0]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[4], + edge(pIndex[2], pIndex[1]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[5], + edge(pIndex[2], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + + if (triIndex == 0x0B) + { + // Flip normals + label sz = verts.size(); + Swap(verts[sz-2], verts[sz-1]); + } + } + break; + + case 0x05: + case 0x0A: + { + label p0p1 + ( + generatePoint + ( + facei, + edgeIsDiag[0], + edge(pIndex[0], pIndex[1]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + label p2p3 + ( + generatePoint + ( + facei, + edgeIsDiag[5], + edge(pIndex[2], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + + verts.append(p0p1); + verts.append(p2p3); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[2], + edge(pIndex[0], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append(p0p1); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[4], + edge(pIndex[1], pIndex[2]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append(p2p3); + + if (triIndex == 0x0A) + { + // Flip normals + label sz = verts.size(); + Swap(verts[sz-5], verts[sz-4]); + Swap(verts[sz-2], verts[sz-1]); + } + } + break; + + case 0x06: + case 0x09: + { + label p0p1 + ( + generatePoint + ( + facei, + edgeIsDiag[0], + edge(pIndex[0], pIndex[1]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + label p2p3 + ( + generatePoint + ( + facei, + edgeIsDiag[5], + edge(pIndex[2], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + + verts.append(p0p1); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[3], + edge(pIndex[1], pIndex[3]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append(p2p3); + verts.append(p0p1); + verts.append(p2p3); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[1], + edge(pIndex[0], pIndex[2]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + + if (triIndex == 0x09) + { + // Flip normals + label sz = verts.size(); + Swap(verts[sz-5], verts[sz-4]); + Swap(verts[sz-2], verts[sz-1]); + } + } + break; + + case 0x08: + case 0x07: + { + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[2], + edge(pIndex[3], pIndex[0]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[5], + edge(pIndex[3], pIndex[2]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + verts.append + ( + generatePoint + ( + facei, + edgeIsDiag[3], + edge(pIndex[3], pIndex[1]), + pointToVerts, pointToFace, pointFromDiag, vertsToPoint + ) + ); + if (triIndex == 0x07) + { + // Flip normals + label sz = verts.size(); + Swap(verts[sz-2], verts[sz-1]); + } + } + break; + } +} + + +void Foam::isoSurfaceTopo::generateTriPoints +( + const polyMesh& mesh, + const label celli, + const bool isTet, + + DynamicList<edge>& pointToVerts, + DynamicList<label>& pointToFace, + DynamicList<bool>& pointFromDiag, + + EdgeMap<label>& vertsToPoint, + DynamicList<label>& verts, + DynamicList<label>& faceLabels +) const +{ + const cell& cFaces = mesh.cells()[celli]; + + if (isTet) + { + // For tets don't do cell-centre decomposition, just use the + // tet points and values + + label facei = cFaces[0]; + const face& f0 = mesh_.faces()[facei]; + + // Get the other point + const face& f1 = mesh_.faces()[cFaces[1]]; + label oppositeI = -1; + forAll(f1, fp) + { + oppositeI = f1[fp]; + if (findIndex(f0, oppositeI) == -1) + { + break; + } + } + + + label p0 = f0[0]; + label p1 = f0[1]; + label p2 = f0[2]; + FixedList<bool, 6> edgeIsDiag(false); + + if (mesh.faceOwner()[facei] == celli) + { + Swap(p1, p2); + } + + tetPointRef tet + ( + mesh.points()[p0], + mesh.points()[p1], + mesh.points()[p2], + mesh.points()[oppositeI] + ); + + label startTrii = verts.size(); + generateTriPoints + ( + facei, + FixedList<scalar, 4> + ({ + pVals_[p0], + pVals_[p1], + pVals_[p2], + pVals_[oppositeI] + }), + FixedList<point, 4> + ({ + mesh.points()[p0], + mesh.points()[p1], + mesh.points()[p2], + mesh.points()[oppositeI] + }), + FixedList<label, 4> + ({ + p0, + p1, + p2, + oppositeI + }), + edgeIsDiag, + + pointToVerts, + pointToFace, + pointFromDiag, + vertsToPoint, + verts // Every three verts is new triangle + ); + + label nTris = (verts.size()-startTrii)/3; + for (label i = 0; i < nTris; ++i) + { + faceLabels.append(facei); + } + } + else + { + for (const label facei : cFaces) + { + const face& f = mesh.faces()[facei]; + + label fp0 = mesh.tetBasePtIs()[facei]; + + label startTrii = verts.size(); + + // Skip undefined tets + if (fp0 < 0) + { + fp0 = 0; + } + + label fp = f.fcIndex(fp0); + for (label i = 2; i < f.size(); ++i) + { + label nextFp = f.fcIndex(fp); + + FixedList<bool, 6> edgeIsDiag(false); + + label p0 = f[fp0]; + label p1 = f[fp]; + label p2 = f[nextFp]; + if (mesh.faceOwner()[facei] == celli) + { + Swap(p1, p2); + if (i != 2) edgeIsDiag[1] = true; + if (i != f.size()-1) edgeIsDiag[0] = true; + } + else + { + if (i != 2) edgeIsDiag[0] = true; + if (i != f.size()-1) edgeIsDiag[1] = true; + } + + tetPointRef tet + ( + mesh.points()[p0], + mesh.points()[p1], + mesh.points()[p2], + mesh.cellCentres()[celli] + ); + + generateTriPoints + ( + facei, + FixedList<scalar, 4> + ({ + pVals_[p0], + pVals_[p1], + pVals_[p2], + cVals_[celli] + }), + FixedList<point, 4> + ({ + mesh.points()[p0], + mesh.points()[p1], + mesh.points()[p2], + mesh.cellCentres()[celli] + }), + FixedList<label, 4> + ({ + p0, + p1, + p2, + mesh.nPoints()+celli + }), + edgeIsDiag, + + pointToVerts, + pointToFace, + pointFromDiag, + vertsToPoint, + verts // Every three verts is new triangle + ); + + fp = nextFp; + } + + label nTris = (verts.size()-startTrii)/3; + for (label i = 0; i < nTris; ++i) + { + faceLabels.append(facei); + } + } + } +} + + +void Foam::isoSurfaceTopo::triangulateOutside +( + const bool filterDiag, + const primitivePatch& pp, + const boolList& pointFromDiag, + const labelList& pointToFace, + const label cellID, + + DynamicList<face>& compactFaces, + DynamicList<label>& compactCellIDs +) const +{ + // We can form pockets: + // - 1. triangle on face + // - 2. multiple triangles on interior (from diag edges) + // - the edge loop will be pocket since it is only the diag + // edges that give it volume? + + // Retriangulate the exterior loops + const labelListList& edgeLoops = pp.edgeLoops(); + const labelList& mp = pp.meshPoints(); + + for (const labelList& loop : edgeLoops) + { + if (loop.size() > 2) + { + compactFaces.append(face(0)); + face& f = compactFaces.last(); + + f.setSize(loop.size()); + label fpi = 0; + forAll(f, i) + { + label pointi = mp[loop[i]]; + if (filterDiag && pointFromDiag[pointi]) + { + label prevPointi = mp[loop[loop.fcIndex(i)]]; + if + ( + pointFromDiag[prevPointi] + && (pointToFace[pointi] != pointToFace[prevPointi]) + ) + { + f[fpi++] = pointi; + } + else + { + // Filter out diagonal point + } + } + else + { + f[fpi++] = pointi; + } + } + + if (fpi > 2) + { + f.setSize(fpi); + } + else + { + // Keep original face + forAll(f, i) + { + label pointi = mp[loop[i]]; + f[i] = pointi; + } + } + compactCellIDs.append(cellID); + } + } +} + + +Foam::MeshedSurface<Foam::face> Foam::isoSurfaceTopo::removeInsidePoints +( + const bool filterDiag, + const MeshStorage& s, + const boolList& pointFromDiag, + const labelList& pointToFace, + const labelList& start, // Per cell the starting triangle + DynamicList<label>& pointCompactMap, // Per returned point the original + DynamicList<label>& compactCellIDs // Per returned tri the cellID +) const +{ + const pointField& points = s.points(); + + pointCompactMap.clear(); + compactCellIDs.clear(); + + DynamicList<face> compactFaces(s.size()/8); + + for (label celli = 0; celli < start.size()-1; ++celli) + { + // All triangles of the current cell + + label nTris = start[celli+1]-start[celli]; + + if (nTris) + { + const SubList<face> cellFaces(s, nTris, start[celli]); + const primitivePatch pp(cellFaces, points); + + triangulateOutside + ( + filterDiag, + pp, + pointFromDiag, + pointToFace, + //protectedFace, + celli, + + compactFaces, + compactCellIDs + ); + } + } + + + // Compact out unused points + // Pick up the used vertices + labelList oldToCompact(points.size(), -1); + DynamicField<point> compactPoints(points.size()); + pointCompactMap.clear(); + + for (face& f : compactFaces) + { + forAll(f, fp) + { + label pointi = f[fp]; + label compacti = oldToCompact[pointi]; + if (compacti == -1) + { + compacti = compactPoints.size(); + oldToCompact[pointi] = compacti; + compactPoints.append(points[pointi]); + pointCompactMap.append(pointi); + } + f[fp] = compacti; + } + } + + + MeshStorage cpSurface + ( + std::move(compactPoints), + std::move(compactFaces), + s.surfZones() + ); + + return cpSurface; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::isoSurfaceTopo::isoSurfaceTopo +( + const polyMesh& mesh, + const scalarField& cVals, + const scalarField& pVals, + const scalar iso, + const filterType filter +) +: + mesh_(mesh), + cVals_(cVals), + pVals_(pVals), + iso_(iso) +{ + if (debug) + { + Pout<< "isoSurfaceTopo : iso:" << iso_ << " filter:" << filter << endl; + } + + tetMatcher tet; + + // Determine if any cut through cell + List<cellCutType> cellCutTypes; + const label nCutCells = calcCutTypes(tet, cellCutTypes); + + // Per cell: 5 pyramids cut, each generating 2 triangles + // - pointToVerts : from generated iso point to originating mesh verts + DynamicList<edge> pointToVerts(10*nCutCells); + // - pointToFace : from generated iso point to originating mesh face + DynamicList<label> pointToFace(10*nCutCells); + // - pointToFace : from generated iso point whether is on face diagonal + DynamicList<bool> pointFromDiag(10*nCutCells); + + // Per cell: number of intersected edges: + // - four faces cut so 4 mesh edges + 4 face-diagonal edges + // - 4 of the pyramid edges + EdgeMap<label> vertsToPoint(12*nCutCells); + DynamicList<label> verts(12*nCutCells); + // Per cell: 5 pyramids cut (since only one pyramid not cut) + DynamicList<label> faceLabels(5*nCutCells); + DynamicList<label> cellLabels(5*nCutCells); + + + labelList startTri(mesh_.nCells()+1, 0); + + for (label celli = 0; celli < mesh_.nCells(); ++celli) + { + startTri[celli] = faceLabels.size(); + if (cellCutTypes[celli] != NOTCUT) + { + generateTriPoints + ( + mesh, + celli, + tet.isA(mesh_, celli), + + pointToVerts, + pointToFace, + pointFromDiag, + + vertsToPoint, + verts, + faceLabels + ); + + for (label i = startTri[celli]; i < faceLabels.size(); ++i) + { + cellLabels.append(celli); + } + } + } + startTri[mesh_.nCells()] = faceLabels.size(); + + + pointToVerts_.transfer(pointToVerts); + meshCells_.transfer(cellLabels); + pointToFace_.transfer(pointToFace); + + tmp<pointField> allPoints + ( + interpolate + ( + mesh_.cellCentres(), + mesh_.points() + ) + ); + + + // Assign to MeshedSurface + faceList allTris(faceLabels.size()); + label verti = 0; + for (face& allTri : allTris) + { + allTri.setSize(3); + allTri[0] = verts[verti++]; + allTri[1] = verts[verti++]; + allTri[2] = verts[verti++]; + } + + + surfZoneList allZones(1); + allZones[0] = surfZone + ( + "allFaces", + allTris.size(), // Size + 0, // Start + 0 // Index + ); + + MeshStorage updated + ( + std::move(allPoints), + std::move(allTris), + std::move(allZones) + ); + MeshStorage::transfer(updated); + + // Now: + // - generated faces and points are assigned to *this + // - per point we know: + // - pointOnDiag: whether it is on a face-diagonal edge + // - pointToFace_: from what pyramid (cell+face) it was produced + // (note that the pyramid faces are shared between multiple mesh faces) + // - pointToVerts_ : originating mesh vertex or cell centre + + + if (debug) + { + Pout<< "isoSurfaceTopo : generated " << size() << " faces." << endl; + } + + + if (filter != NONE) + { + // Triangulate outside (filter edges to cell centres and optionally + // face diagonals) + DynamicList<label> pointCompactMap(size()); // Back to original point + DynamicList<label> compactCellIDs(size()); // Per tri the cell + MeshStorage::operator= + ( + removeInsidePoints + ( + (filter == DIAGCELL ? true : false), + *this, + pointFromDiag, + pointToFace_, + startTri, + pointCompactMap, + compactCellIDs + ) + ); + + pointToVerts_ = UIndirectList<edge>(pointToVerts_, pointCompactMap)(); + pointToFace_ = UIndirectList<label>(pointToFace_, pointCompactMap)(); + pointFromDiag = UIndirectList<bool>(pointFromDiag, pointCompactMap)(); + meshCells_.transfer(compactCellIDs); + + if (debug) + { + Pout<< "isoSurfaceTopo :" + << " after removing cell centre and face-diag triangles : " + << size() << endl; + } + + + if (filter == DIAGCELL) + { + // We remove verts on face diagonals. This is in fact just + // straightening the edges of the face through the cell. This can + // close off 'pockets' of triangles and create open or + // multiply-connected triangles + + // Solved by eroding open-edges + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + // Mark points on mesh outside. Note that we extend with nCells + // so we can easily index with pointToVerts_. + PackedBoolList isBoundaryPoint(mesh.nPoints() + mesh.nCells()); + for + ( + label facei = mesh.nInternalFaces(); + facei < mesh.nFaces(); + ++facei + ) + { + isBoundaryPoint.set(mesh.faces()[facei]); + } + + + while (true) + { + const labelList& mp = meshPoints(); + + PackedBoolList removeFace(this->size()); + label nFaces = 0; + { + const labelListList& edgeFaces = + MeshStorage::edgeFaces(); + forAll(edgeFaces, edgei) + { + const labelList& eFaces = edgeFaces[edgei]; + if (eFaces.size() == 1) + { + // Open edge. Check that vertices do not originate + // from a boundary face + const edge& e = edges()[edgei]; + const edge& verts0 = pointToVerts_[mp[e[0]]]; + const edge& verts1 = pointToVerts_[mp[e[1]]]; + if + ( + isBoundaryPoint[verts0[0]] + && isBoundaryPoint[verts0[1]] + && isBoundaryPoint[verts1[0]] + && isBoundaryPoint[verts1[1]] + ) + { + // Open edge on boundary face. Keep + } + else + { + // Open edge. Mark for erosion + if (removeFace.set(eFaces[0])) + { + ++nFaces; + } + } + } + } + } + + if (debug) + { + Pout<< "isoSurfaceTopo :" + << " removing " << nFaces + << " faces since on open edges" << endl; + } + + if (returnReduce(nFaces, sumOp<label>()) == 0) + { + break; + } + + // Remove the faces + labelHashSet keepFaces(2*size()); + forAll(removeFace, facei) + { + if (!removeFace[facei]) + { + keepFaces.insert(facei); + } + } + + labelList pointMap; + labelList faceMap; + MeshStorage filteredSurf + ( + MeshStorage::subsetMesh + ( + keepFaces, + pointMap, + faceMap + ) + ); + MeshStorage::transfer(filteredSurf); + + pointToVerts_ = UIndirectList<edge>(pointToVerts_, pointMap)(); + pointToFace_ = UIndirectList<label>(pointToFace_, pointMap)(); + pointFromDiag = UIndirectList<bool>(pointFromDiag, pointMap)(); + meshCells_ = UIndirectList<label>(meshCells_, faceMap)(); + } + } + } +} + + +// ************************************************************************* // diff --git a/src/sampling/surface/isoSurface/isoSurfaceTopo.H b/src/sampling/surface/isoSurface/isoSurfaceTopo.H new file mode 100644 index 0000000000000000000000000000000000000000..322eab8d7c43a609bf88a4cb83e79d69a2d65953 --- /dev/null +++ b/src/sampling/surface/isoSurface/isoSurfaceTopo.H @@ -0,0 +1,266 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +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::isoSurfaceTopo + +Description + Marching tet iso surface algorithm with optional filtering to keep only + points originating from mesh edges. + +SourceFiles + isoSurfaceTopo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef isoSurfaceTopo_H +#define isoSurfaceTopo_H + +#include "labelPair.H" +#include "pointIndexHit.H" +#include "PackedBoolList.H" +#include "MeshedSurface.H" +#include "edgeList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class polyMesh; +class tetMatcher; + +/*---------------------------------------------------------------------------*\ + Class isoSurfaceTopo Declaration +\*---------------------------------------------------------------------------*/ + +class isoSurfaceTopo +: + public MeshedSurface<face> +{ + // Private typedefs for convenience + typedef MeshedSurface<face> MeshStorage; + +public: + + enum filterType + { + NONE, // No filtering + DIAGCELL, // Remove points from face-diagonal and pyramid + // (vertex to cell-centre) edges + CELL // Only remove points from pyramid edges + }; + + +private: + + // Private data + + enum cellCutType + { + NOTCUT, // Not cut + SPHERE, // All edges to cell centre cut + CUT // Normal cut + }; + + + //- Reference to mesh + const polyMesh& mesh_; + + const scalarField& cVals_; + + const scalarField& pVals_; + + //- Iso value + const scalar iso_; + + //- Per point: originating mesh vertex/cc. See encoding above + edgeList pointToVerts_; + + //- For every face the original cell in mesh + labelList meshCells_; + + //- For every point the originating face in mesh + labelList pointToFace_; + + + // Private Member Functions + + //- Does any edge of triangle cross iso value? + bool isTriCut + ( + const triFace& tri, + const scalarField& pointValues + ) const; + + //- Determine whether cell is cut + cellCutType calcCutType + ( + const bool isTet, + const label + ) const; + + //- Determine for all mesh whether cell is cut + label calcCutTypes + ( + tetMatcher& tet, + List<cellCutType>& cellCutTypes + ); + + //- Generate single point on edge + label generatePoint + ( + const label facei, + const bool edgeIsDiag, + const edge& vertices, + + DynamicList<edge>& pointToVerts, + DynamicList<label>& pointToFace, + DynamicList<bool>& pointFromDiag, + EdgeMap<label>& vertsToPoint + ) const; + + //- Generate triangles from tet + void generateTriPoints + ( + const label facei, + const FixedList<scalar, 4>& s, + const FixedList<point, 4>& p, + const FixedList<label, 4>& pIndex, + const FixedList<bool, 6>& edgeIsDiag, + + DynamicList<edge>& pointToVerts, + DynamicList<label>& pointToFace, + DynamicList<bool>& pointFromDiag, + + EdgeMap<label>& vertsToPoint, + DynamicList<label>& verts + ) const; + + //- Generate triangles from cell + void generateTriPoints + ( + const polyMesh& mesh, + const label celli, + const bool isTet, + + DynamicList<edge>& pointToVerts, + DynamicList<label>& pointToFace, + DynamicList<bool>& pointFromDiag, + + EdgeMap<label>& vertsToPoint, + DynamicList<label>& verts, + DynamicList<label>& faceLabels + ) const; + + + // Simplification + + void triangulateOutside + ( + const bool filterDiag, + const PrimitivePatch<face, SubList, const pointField&>& pp, + const boolList& pointFromDiag, + const labelList& pointToFace, + const label cellID, + + DynamicList<face>& compactFaces, + DynamicList<label>& compactCellIDs + ) const; + + MeshStorage removeInsidePoints + ( + const bool filterDiag, + const MeshStorage& s, + const boolList& pointFromDiag, + const labelList& pointToFace, + const labelList& start, // Per cell:starting tri + DynamicList<label>& pointCompactMap, // Per point the original + DynamicList<label>& compactCellIDs // Per face the cellID + ) const; + + +public: + + //- Runtime type information + TypeName("isoSurfaceTopo"); + + + // Constructors + + //- Construct from dictionary + isoSurfaceTopo + ( + const polyMesh& mesh, + const scalarField& cellValues, + const scalarField& pointValues, + const scalar iso, + const filterType filter = DIAGCELL + ); + + + // Member Functions + + //- For every face original cell in mesh + const labelList& meshCells() const + { + return meshCells_; + } + + //- For every point originating face (pyramid) in mesh + const labelList& pointToFace() const + { + return pointToFace_; + } + + //- Per point: originating mesh vertex/cc. See encoding above� + const edgeList& pointToVerts() const + { + return pointToVerts_; + } + + //- Interpolates cCoords,pCoords. + template<class Type> + tmp<Field<Type>> interpolate + ( + const Field<Type>& cCoords, + const Field<Type>& pCoords + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "isoSurfaceTopoTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/sampling/surface/isoSurface/isoSurfaceTopoTemplates.C b/src/sampling/surface/isoSurface/isoSurfaceTopoTemplates.C new file mode 100644 index 0000000000000000000000000000000000000000..631d948e4c2dd2adf680403a43fbefd6d617d3d0 --- /dev/null +++ b/src/sampling/surface/isoSurface/isoSurfaceTopoTemplates.C @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +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/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class Type> +Foam::tmp<Foam::Field<Type>> +Foam::isoSurfaceTopo::interpolate +( + const Field<Type>& cellCoords, + const Field<Type>& pointCoords +) const +{ + tmp<Field<Type>> tfld(new Field<Type>(pointToVerts_.size())); + Field<Type>& fld = tfld.ref(); + + forAll(pointToVerts_, i) + { + scalar s0; + Type p0; + { + label v0 = pointToVerts_[i][0]; + if (v0 < mesh_.nPoints()) + { + s0 = pVals_[v0]; + p0 = pointCoords[v0]; + } + else + { + label celli = v0-mesh_.nPoints(); + s0 = cVals_[celli]; + p0 = cellCoords[celli]; + } + } + + scalar s1; + Type p1; + { + label v1 = pointToVerts_[i][1]; + if (v1 < mesh_.nPoints()) + { + s1 = pVals_[v1]; + p1 = pointCoords[v1]; + } + else + { + label celli = v1-mesh_.nPoints(); + s1 = cVals_[celli]; + p1 = cellCoords[celli]; + } + } + + scalar d = s1-s0; + if (mag(d) > VSMALL) + { + scalar s = (iso_-s0)/d; + fld[i] = s*p1+(1.0-s)*p0; + } + else + { + fld[i] = 0.5*(p0+p1); + } + } + + return tfld; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/controlDict b/tutorials/incompressible/simpleFoam/pipeCyclic/system/controlDict index fae83278cb6cfaef6d6e55823dc0d0a9e238fc04..0beed5f5bd3ff006a9c90363eabc5d6a1b17abbd 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/controlDict +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/controlDict @@ -48,6 +48,7 @@ runTimeModifiable true; functions { #include "coordinateTransform" + #include "momentum" } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/momentum b/tutorials/incompressible/simpleFoam/pipeCyclic/system/momentum new file mode 100644 index 0000000000000000000000000000000000000000..6f05784e69fe58f92b9a0c0abcad98bbd88c7e88 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/momentum @@ -0,0 +1,33 @@ +// -*- C++ -*- +// Calculate momentum fields +momentum +{ + type momentum; + libs ("libfieldFunctionObjects.so"); + log true; + + executeInterval 10; + writeControl writeTime; + + // writeToFile true; + + writeMomentum true; + writePosition true; + writeVelocity true; + + // Cells to select (all/cellSet/cellZone) + regionType all; + // name c0; + + cylindrical true; + + origin (0 0 0); + rotation + { + type cylindrical; + axis (1 0 0); //< local Z + } +} + + +// ************************************************************************* // diff --git a/wmake/rules/General/version b/wmake/rules/General/version index ef3aa5c37d53ba79d4eb8e0dba34520621036fd5..08400d12cc1d17d20426e99282b792987e2aa81f 100644 --- a/wmake/rules/General/version +++ b/wmake/rules/General/version @@ -2,11 +2,9 @@ SUFFIXES += .Cver -# Update version strings in C++ file and in $WM_PROJECT_DIR/.build file +# Update strings in C++ file and in META-INFO files Cvertoo = \ - sed -e 's!VERSION_STRING!$(shell wmakePrintBuild -major)!' \ - -e 's!BUILD_STRING!$(shell wmakePrintBuild -update)!' \ - $< > $(@D)/$(<F).C; \ + wmakeBuildInfo -update -filter $< > $(@D)/$(<F).C; \ $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@ #------------------------------------------------------------------------------ diff --git a/wmake/wmakeBuildInfo b/wmake/wmakeBuildInfo new file mode 100755 index 0000000000000000000000000000000000000000..b05b1cf1f167e76e55c8c5a25841c1661023acc2 --- /dev/null +++ b/wmake/wmakeBuildInfo @@ -0,0 +1,531 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# 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/>. +# +# Script +# wmakeBuildInfo +# +# Description +# Print the version used when building the project +# +# Environment +# - WM_PROJECT_DIR +# - WM_DIR (unset defaults to WM_PROJECT_DIR/wmake) +# +# Note +# Partial logic is also implemented in the bin/foamEtcFile +# -show-api and -show-patch options. +# Make sure that any changes here are also reflected there. +# +#------------------------------------------------------------------------------ +# Locations +rulesFile="${WM_DIR:-$WM_PROJECT_DIR/wmake}/rules/General/general" +metaInfoDir="$WM_PROJECT_DIR/META-INFO" + +usage() { + exec 1>&2 + + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<<USAGE +Usage: ${0##*/} [OPTION] + ${0##*/} [-update] -filter FILE +options: + -check Compare make and meta information (exit 0 for no changes) + -diff Display differences between make and meta information + (exit code 0 for no changes) + -dry-run In combination with -update + -update Update meta-info from make information + -filter FILE Filter/replace @API@, @BUILD@ tags in specified file + with corresponding make information + -query Report make-info and meta-info + -query-make Report make-info values (api, branch, build) + -query-meta Report meta-info values (api, branch, build) + -show-api Print api value from wmake/rules, or meta-info and exit + -show-patch Print patch value from meta-info and exit + -help Print the usage + +Query/manage status of api,branch,build information. +Default without any arguments is the same as '-query-make'. + +USAGE + exit 1 +} + +# 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 arguments and options +#------------------------------------------------------------------------------ +unset optCheck optDryRun optUpdate optQuery optFilter + +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help*) + usage + ;; + -check) + optCheck=true + ;; + -diff) + optCheck=verbose + ;; + -dry-run) + optDryRun=true + ;; + -update) + optUpdate=true + ;; + -query) + optQuery="make:meta" + ;; + -query-make | -query-meta) + optQuery="$optQuery:${1##*-}" + ;; + -show-api) + optQuery="api" + ;; + -show-patch) + optQuery="patch" + ;; + -filter) + optFilter=true + shift # Stop here, a file name follows + break + ;; + *) + die "unknown option/argument: '$1'" + ;; + esac + shift +done + +#------------------------------------------------------------------------------ + +if [ "$optFilter" = true ] +then + [ -f "$1" ] || { + echo "Error in ${0##*/}: file not found '$1'" 1>&2 + exit 2 + } + + # Disable other methods that generate output to stdout + unset optCheck optQuery +else + [ "$#" -eq 0 ] || die "Unexpected option/arguments $@" + + # Nothing specified? Default to -query-make + if [ -z "$optCheck$optUpdate$optQuery" ] + then + optQuery="make" + fi +fi + + +#------------------------------------------------------------------------------ + +# Variables +declare -A makeInfo +declare -A metaInfo + +# +# Populate makeInfo array +# +# - api : from rules/General/general +# - patch : cached value from previous make +# - branch : from git +# - build : from git +# +# Failure modes: +# - No api information (can't find file etc). +# -> FATAL: should never happen. +# +# - No git installed or no git repo +# -> branch and build are populated as empty strings +# +# - Working on detached head. +# -> branch has value "HEAD" instead of something more readable. +# +getMakeInfo() +{ + local api patch build branch + makeInfo=() + + # (api) from WM_DIR/rules/General/general + # - extract WM_VERSION = OPENFOAM=<digits> + + api="$(sed -ne '/^ *#/!{ /WM_VERSION.*OPENFOAM=/{ s@^.*OPENFOAM= *\([0-9][0-9]*\).*@\1@p; q }}' $rulesFile 2>/dev/null)" + + if [ -d "$metaInfoDir" ] + then + # (patch) from build-info - not from api-info + patch="$(sed -ne 's@^patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/build-info 2>/dev/null)" + fi + + # Build info from git + build="$(git --git-dir=$WM_PROJECT_DIR/.git log -1 --date='format:%y%m%d' --format='%h-%ad' 2>/dev/null)" + + # Branch info from git + if [ -n "$build" ] + then + branch="$(git --git-dir=$WM_PROJECT_DIR/.git rev-parse --abbrev-ref HEAD 2>/dev/null)" + fi + + makeInfo[api]="$api" + makeInfo[patch]="${patch:-0}" # default is 0 + makeInfo[branch]="$branch" + makeInfo[build]="$build" + makeInfo[cached]=true +} + + +# +# Populate metaInfo array +# +# - api : from META-INFO/api-info +# - patch : from META-INFO/api-info +# - branch : from META-INFO/build-info +# - build : from META-INFO/build-info +# +# Failure modes: +# - Directory, file or entry not found. +# -> corresponding entries are empty strings +# +getMetaInfo() +{ + local api patch build branch + metaInfo=() + + if [ -d "$metaInfoDir" ] + then + # (api, patch) from api-info + # (branch, build) from build-info + + api="$(sed -ne 's@^api *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)" + patch="$(sed -ne 's@^patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)" + branch="$(sed -ne 's@^branch *= *\([^ ]*\).*@\1@p' $metaInfoDir/build-info 2>/dev/null)" + build="$(sed -ne 's@^build *= *\([^ ]*\).*@\1@p' $metaInfoDir/build-info 2>/dev/null)" + fi + + metaInfo[api]="$api" + metaInfo[patch]="${patch:-0}" # default is 0 + metaInfo[branch]="$branch" + metaInfo[build]="$build" + metaInfo[cached]=true +} + + +# +# Get api from rules/General/general +# +# Failure modes: +# - No api information (can't find file etc). +# -> Fatal for building, but could be OK for a stripped down version +# +# Fallback. Get from api-info +# +getApi() +{ + [ -n "${makeInfo[cached]}" ] || getMakeInfo + + # Local copy + local api="${makeInfo[api]}" + + if [ -z "$api" ] + then + [ -n "${metaInfo[cached]}" ] || getMetaInfo + api="${metaInfo[api]}" + fi + + if [ -n "$api" ] + then + echo "$api" + else + return 1 + fi +} + + +# Get patch from meta-info / api-info +# +# Failure modes: +# - No patch information (can't find file etc). +# +getPatchLevel() +{ + [ -n "${metaInfo[cached]}" ] || getMetaInfo + + # Local copy + local value="${metaInfo[patch]}" + + if [ -n "$value" ] + then + echo "$value" + else + return 1 + fi +} + + +# Report make info +reportMakeInfo() +{ + local key + + [ -n "${makeInfo[cached]}" ] || getMakeInfo + [ -n "${metaInfo[cached]}" ] || getMetaInfo + + local patch="${metaInfo[patch]}" # <- From meta-info only + makeInfo[patch]="${patch:=0}" # Extra safety + + echo "make" + for key in api patch branch build + do + echo " $key = ${makeInfo[$key]}" + done +} + + +# Report meta info +reportMetaInfo() +{ + local key + + [ -n "${metaInfo[cached]}" ] || getMetaInfo + + local patch="${metaInfo[patch]}" # <- From meta-info only + metaInfo[patch]="${patch:=0}" # Extra safety + + echo "meta" + for key in api patch branch build + do + echo " $key = ${metaInfo[$key]}" + done +} + + +# Test make vs meta info. +# Return 0 for no differences, 1 otherwise +# $1 == verbose, print as diff. Silent otherwise +checkDiff() +{ + local verbose="$1" + local key diff + + [ -n "${makeInfo[cached]}" ] || getMakeInfo + [ -n "${metaInfo[cached]}" ] || getMetaInfo + + for key in api patch branch build + do + if [ "${makeInfo[$key]}" != "${metaInfo[$key]}" ] + then + diff="$diff $key" + fi + done + + if [ "$verbose" = verbose ] && [ -n "$diff" ] + then + echo "Differences" + for key in $diff + do + echo "$key:" + echo " make ${makeInfo[$key]}" + echo " meta ${metaInfo[$key]}" + done + fi + + test -z "$diff" +} + + +# +# Update metaInfo (on disk) based on the makeInfo +# +performUpdate() +{ + [ -n "${makeInfo[cached]}" ] || getMakeInfo + [ -n "${metaInfo[cached]}" ] || getMetaInfo + + # Local copies of the make info + local api="${makeInfo[api]}" + local branch="${makeInfo[branch]}" + local build="${makeInfo[build]}" + local patch="${makeInfo[patch]}" + + # If any of the make-info are empty (bad), + # use the meta-info to avoid spurious changes + [ -n "$api" ] || api="${metaInfo[api]}" + [ -n "$branch" ] || branch="${metaInfo[branch]}" + [ -n "$build" ] || build="${metaInfo[build]}" + + local outputFile + + # build-info + outputFile="$metaInfoDir/build-info" + if [ "$branch" != "${metaInfo[branch]}" ] || \ + [ "$build" != "${metaInfo[build]}" ] || \ + [ "$patch" != "${metaInfo[patch]}" ] + then + patch="${metaInfo[patch]}" # <- From meta-info only + : "${patch:=0}" # Extra safety + + if [ -n "$optDryRun" ] + then + echo "dry-run (update) ${outputFile##*/} branch=${branch}" 1>&2 + echo "dry-run (update) ${outputFile##*/} build=${build}" 1>&2 + echo "dry-run (update) ${outputFile##*/} patch=${patch}" 1>&2 + else + echo "branch=${branch}" >| "$outputFile" + echo "build=${build}" >> "$outputFile" + echo "patch=${patch}" >> "$outputFile" + fi + fi + + + # api-info + outputFile="$metaInfoDir/api-info" + if [ "$api" != "${metaInfo[api]}" ] + then + patch="${metaInfo[patch]}" # <- From meta-info only + : "${patch:=0}" # Extra safety + + if [ -n "$optDryRun" ] + then + echo "dry-run (update) ${outputFile##*/} api=${api}" 1>&2 + echo "dry-run (update) ${outputFile##*/} patch=${patch}" 1>&2 + else + echo "api=${api}" >| "$outputFile" + echo "patch=${patch}" >> "$outputFile" + fi + fi + + return 0 +} + + +# +# Update metaInfo (on disk) based on the makeInfo +# This is the +# +performFiltering() +{ + local input="$1" + + [ -f "$input" ] || { + echo "Error in ${0##*/}: file not found '$1'" 1>&2 + exit 2 + } + + [ -n "${makeInfo[cached]}" ] || getMakeInfo + [ -n "${metaInfo[cached]}" ] || getMetaInfo + + # Local copies of the make info + local api="${makeInfo[api]}" + local branch="${makeInfo[branch]}" + local build="${makeInfo[build]}" + local patch="${metaInfo[patch]}" # <- From meta-info only + : "${patch:=0}" # Extra safety + + + # If any of the make-info are empty (bad), + # conjure up something from the meta-info + + # api is not normally needed (available directly from -Ddefine) + # but we may wish to filter other types of files + + if [ -z "$api" ] + then + api="${metaInfo[api]}" + api="${api:-0}" # integer value + fi + + # branch/build could be missing for non-git + if [ -z "$branch" ] + then + branch="${metaInfo[branch]}" + branch="${branch:-unknown}" + fi + if [ -z "$build" ] + then + build="${metaInfo[build]}" + build="nogit${build:+-$build}" + fi + + sed \ + -e 's!@API@!'"${api}"'!g' \ + -e 's!@PATCH@!'"${patch:-0}"'!g' \ + -e 's!@BRANCH@!'"${branch}"'!g' \ + -e 's!@BUILD@!'"${build}"'!g' \ + -e 's!@VERSION@!'"${WM_PROJECT_VERSION}"'!g' \ + "$input" + + return 0 +} + + +#------------------------------------------------------------------------------ + +# Dispatching + +if [ -n "$optCheck" ] +then + checkDiff $optCheck + exit $? +elif [ "$optQuery" = api ] +then + # Show API and exit + getApi + exit $? +elif [ "$optQuery" = patch ] +then + # Show patch level and exit + getPatchLevel + exit $? +else + # Other queries + case "$optQuery" in (*make*) reportMakeInfo ;; esac + case "$optQuery" in (*meta*) reportMetaInfo ;; esac +fi + +[ -n "$optUpdate" ] && performUpdate + +if [ -n "$optFilter" ] +then + # Perform filter on file + performFiltering "$1" +fi + +exit 0 # clean exit + +#------------------------------------------------------------------------------ diff --git a/wmake/wmakePrintBuild b/wmake/wmakePrintBuild index 6c7941114a3ab364036161c2a5b9184f8dd8bee4..bafd96bb6c9b951e5431e23897f83b9e5b9cb6a6 100755 --- a/wmake/wmakePrintBuild +++ b/wmake/wmakePrintBuild @@ -61,6 +61,17 @@ die() } +#------------------------------------------------------------------------------ + +cat << WARN_OBSOLETE 1>&2 +############################################################################### +## The wmakePrintBuild utility is OBSOLETE (Dec-2018). ## +## The wmakeBuildInfo utility is to be used instead. ## +############################################################################### + +WARN_OBSOLETE + + #------------------------------------------------------------------------------ # Parse arguments and options #------------------------------------------------------------------------------