diff --git a/META-INFO/.gitignore b/META-INFO/.gitignore
new file mode 100644
index 0000000000..eddcd95786
--- /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 0000000000..3ac2880aa3
--- /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 0000000000..dc411fce20
--- /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 26673bf6b1..4747c4e9ca 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 .
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 \
- 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 c9fee2364d..7ec94c7e6f 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(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 76e4fc5b18..29d2437767 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//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 531721b32d..a56d685d0f 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(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 9b8673260d..119caee55c 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 1b35d22bbe..f75b0db94b 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 40802fdb7c..6cb7a81cde 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
+#include
+#include
+#include
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//
@@ -68,10 +68,8 @@ void Foam::vtkPVFoam::convertVolField
autoPtr> 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 Foam::vtkPVFoam::convertPointField
const foamVtuData& vtuData
)
{
- const int nComp(pTraits::nComponents);
const labelUList& addPointCellLabels = vtuData.additionalIds();
const labelUList& pointMap = vtuData.pointMap();
@@ -714,7 +709,7 @@ vtkSmartPointer Foam::vtkPVFoam::convertPointField
const label nPoints = (pointMap.size() ? pointMap.size() : pfld.size());
auto data = vtkSmartPointer::New();
- data->SetNumberOfComponents(nComp);
+ data->SetNumberOfComponents(static_cast(pTraits::nComponents));
data->SetNumberOfTuples(nPoints + addPointCellLabels.size());
// Note: using the name of the original volField
@@ -729,75 +724,54 @@ vtkSmartPointer 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(pTraits::nComponents) << nl;
- float vec[nComp];
- label pointi = 0;
+ float scratch[pTraits::nComponents];
+
+ 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(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(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(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(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::nComponents) << nl;
- }
+ DebugInfo
+ << "Convert face field: " << fld.name()
+ << " size=" << faceLabels.size()
+ << " nComp=" << static_cast(pTraits::nComponents) << nl;
const fvMesh& mesh = fld.mesh();
- const int nComp(pTraits::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::New();
data->SetName(fld.name().c_str());
- data->SetNumberOfComponents(nComp);
+ data->SetNumberOfComponents(static_cast(pTraits::nComponents));
data->SetNumberOfTuples(faceLabels.size());
- float scratch[nComp];
-
// Interior faces: average owner/neighbour
// Boundary faces: the owner value
- forAll(faceLabels, idx)
- {
- const label faceNo = faceLabels[idx];
- if (faceNo < nInternalFaces)
- {
- Type t = 0.5*(fld[faceOwner[faceNo]] + fld[faceNeigh[faceNo]]);
- for (direction d=0; d::nComponents];
+
+ vtkIdType faceId = 0;
+ for (const label meshFacei : faceLabels)
+ {
+ if (meshFacei < nInternalFaces)
+ {
+ Type val =
+ 0.5*(fld[faceOwner[meshFacei]] + fld[faceNeigh[meshFacei]]);
+
+ vtk::Tools::foamToVtkTuple(scratch, val);
}
else
{
- const Type& t = fld[faceOwner[faceNo]];
- for (direction d=0; d(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::nComponents);
const labelUList& cellMap = vtuData.cellMap();
auto data = vtkSmartPointer::New();
data->SetName(fld.name().c_str());
- data->SetNumberOfComponents(nComp);
+ data->SetNumberOfComponents(static_cast(pTraits::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(pTraits::nComponents) << nl;
- float scratch[nComp];
- forAll(cellMap, idx)
- {
- const Type& t = fld[cellMap[idx]];
- for (direction d=0; d(scratch);
+ float scratch[pTraits::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 7a29072240..eeb3bfab1e 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 7ef9e570ff..28d304f51c 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamMeshVolume.C
@@ -49,23 +49,21 @@ vtkSmartPointer 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 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 1239d83e7e..e45a7fd86d 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//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-/bin
-# - PREFIX/openfoam-/bin
-# - PREFIX/openfoam/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-[-extra...]
-# * openfoam-[-extra...]
-# * openfoam
+# 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
+ local value
- case "$projectDirName" in
- (OpenFOAM-* | openfoam-*)
- # Dashed naming: OpenFOAM- or openfoam-
- dirBase="${projectDirName%%-*}-"
- version="${projectDirName#*-}"
- version="${version%%*-}" # Extra safety, eg openfoam-version-packager
- ;;
+ 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
- (openfoam[0-9]*)
- # Debian-style naming: openfoam
- dirBase="openfoam"
- version="${projectDirName#openfoam}"
- ;;
-
- (*)
- die "unknown/unsupported naming convention for '$projectDirName'"
- ;;
- esac
-
- # 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 85b20547e1..0000000000
--- 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 .
-#
-# Script
-# foamExec
-#
-# Description
-# Usage: foamExec [-version=foamVersion] ...
-#
-# Runs the version of executable
-# with the rest of the arguments.
-#
-# Can also be used for parallel runs. For example,
-# \code
-# mpirun -np \
-# foamExec -version=VERSION ... -parallel
-# \endcode
-#
-# Note
-# This script must exist in $WM_PROJECT_INST_DIR/OpenFOAM-/bin
-# or $WM_PROJECT_INST_DIR/openfoam/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< ...
-
-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
-
-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
-# 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 286bd3292c..0aa8a5edc1 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 b3beddcbb0..2603832309 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:-}/site}"
-userDir=$HOME/.OpenFOAM
+Script="${0##*/}"
+toolsDir="${0%/*}/tools"
+groupDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-}/site}"
+userDir="$HOME/.OpenFOAM"
usage() {
exec 1>&2
@@ -85,11 +90,11 @@ cat <}/site}"
+groupDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-}/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 specify the application to use
- -case 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 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,}/
- $siteDir/$templateDir/{$version,}/
+ $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 23a87a0c55..11f110a045 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 220f1225d2..f66504a225 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 d126fcfe5d..06df062b63 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 ad0ea89887..6890d35ed0 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 type of replacements.
+# replace ..
+# 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
- ;;
-
- -third-path)
- # Replace WM_THIRD_PARTY_DIR=...
- 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
- 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
;;
+ -foamInstall | --foamInstall | -projectName | --projectName)
+ # Removed for 1812
+ optionValue=$(getOptionValue "$@")
+ echo "Ignoring obsolete option $1" 1>&2
+ shift
+ ;;
+
*)
die "unknown option/argument: '$1'"
;;
diff --git a/bin/tools/foamCreateCompletionCache b/bin/tools/foamCreateCompletionCache
index cf1bcdef50..0e1e81bf1e 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 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 f8e8775ed3..d79865fd69 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 0000000000..d638115c48
--- /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 60029da36a..0000000000
--- 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 3a5262af78..b38f5f5b14 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 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" ]
+
+# Finalize setup of OpenFOAM environment for POSIX shell
+if [ -d "$WM_PROJECT_DIR" ]
then
- export WM_PROJECT_SITE
+ 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
- unset WM_PROJECT_SITE
+ echo "Error: did not locate installation path for $WM_PROJECT-$WM_PROJECT_VERSION" 1>&2
+ echo "No directory: $WM_PROJECT_DIR" 1>&2
fi
-# Load shell functions
-unset WM_SHELL_FUNCTIONS
-. $WM_PROJECT_DIR/etc/config.sh/functions
-
-# Overrides via
-# 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" ]
-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 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 7365e632bc..f78a161f74 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 e865f46af2..ac09ece5bd 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 0000000000..7f02c0dcb6
--- /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
+# .
+#
+# 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
+# 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 7769d74e61..b35cef97ef 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 1ca8836fd7..aaeccc3861 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 baf8888956..3d0553007e 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 eef3d9941d..ead8071054 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 ae63d010fe..23aec009a3 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 0000000000..423605ce92
--- /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
+# .
+#
+# 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
+# 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 4ebfe76185..4d3c5fd0e4 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 242407e977..782fcc43e4 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 28b93b5ef9..971041cfa8 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
-# 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
+# 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
-# 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
-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 0e65a8c916..f0c9f44bcb 160000
--- a/modules/catalyst
+++ b/modules/catalyst
@@ -1 +1 @@
-Subproject commit 0e65a8c91644587ddfb0b38abf4bdd5771fbc82d
+Subproject commit f0c9f44bcb94a2bdb195fb60ccf32a9615f05ff1
diff --git a/modules/cfmesh b/modules/cfmesh
index 101a4d03cb..024454c8db 160000
--- a/modules/cfmesh
+++ b/modules/cfmesh
@@ -1 +1 @@
-Subproject commit 101a4d03cb7ff08da3bc9cde4ad62a15692eef7c
+Subproject commit 024454c8dbef41a19d4e401b2c32ca4f03090d00
diff --git a/src/Allwmake b/src/Allwmake
index bb96a54004..7742d3502c 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 6e564d58c6..0e92a02440 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 2326536279..3f1cc7c035 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(fileObr_))
@@ -65,12 +61,11 @@ Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const
const polyMesh& mesh = refCast(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::functionObjects::writeFile::createFile
(
const word& name,
- const scalar time
+ const scalar time0
) const
{
autoPtr 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 3dcc397ff6..d430f0c340 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 68cdfd067b..c192baab4c 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 5e8e56ad5a..1f27a0f91b 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 e73dd87832..f52d3f1905 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
#include
#include
@@ -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
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
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
+ 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
+ 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& 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(double data[])
}
-
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace vtk
diff --git a/src/conversion/vtk/adaptor/foamVtkToolsI.H b/src/conversion/vtk/adaptor/foamVtkToolsI.H
index f93b2c7d55..e151f1a7d1 100644
--- a/src/conversion/vtk/adaptor/foamVtkToolsI.H
+++ b/src/conversion/vtk/adaptor/foamVtkToolsI.H
@@ -87,4 +87,34 @@ inline vtkSmartPointer Foam::vtk::Tools::identityVertices
};
+template
+inline void Foam::vtk::Tools::foamToVtkTuple
+(
+ float output[],
+ const Type& val
+)
+{
+ for (direction cmpt=0; cmpt < pTraits::nComponents; ++cmpt)
+ {
+ output[cmpt] = component(val, cmpt);
+ }
+ remapTuple(output);
+}
+
+
+template
+inline void Foam::vtk::Tools::foamToVtkTuple
+(
+ double output[],
+ const Type& val
+)
+{
+ for (direction cmpt=0; cmpt < pTraits::nComponents; ++cmpt)
+ {
+ output[cmpt] = component(val, cmpt);
+ }
+ remapTuple(output);
+}
+
+
// ************************************************************************* //
diff --git a/src/conversion/vtk/adaptor/foamVtkToolsTemplates.C b/src/conversion/vtk/adaptor/foamVtkToolsTemplates.C
index 3a7b653869..5049e67ff8 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::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& input,
- const label start
+ vtkIdType start
)
{
const int nComp(pTraits::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(scratch);
+ float scratch[pTraits::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::New();
data->SetName(name.c_str());
- data->SetNumberOfComponents(int(pTraits::nComponents));
+ data->SetNumberOfComponents(static_cast(pTraits::nComponents));
data->SetNumberOfTuples(size);
data->Fill(0);
@@ -239,7 +232,7 @@ Foam::vtk::Tools::convertFieldToVTK
auto data = vtkSmartPointer::New();
data->SetName(name.c_str());
- data->SetNumberOfComponents(int(pTraits::nComponents));
+ data->SetNumberOfComponents(static_cast(pTraits::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 11864207b1..1179b8971f 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& 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());
@@ -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 75969204e4..695bb086f9 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 1bc4344706..6b1f796cae 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());
@@ -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 98ad8c32d2..3f19285ff0 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 b2e5d39804..524446cffe 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 0b772daad9..4d9918e62a 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 e73dff11aa..1ff5fa79f0 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 d3eda760ae..f0095149db 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 d9c5a9a470..c692e3d436 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 1f4779afeb..c39c9cf8c5 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)
+ switch (regionType_)
{
- return labelList::null();
- }
- else
- {
- 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());
}
}
diff --git a/src/finiteVolume/functionObjects/volRegion/volRegion.H b/src/finiteVolume/functionObjects/volRegion/volRegion.H
index f95504684d..ef33682b94 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 f722a5578e..91b8cf92a4 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 1afdfb2ea7..d5aa38ee3d 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 37690a46f5..c07eae4b76 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 4df87913c3..71f14690d9 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 0000000000..53438c91af
--- /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 .
+
+\*---------------------------------------------------------------------------*/
+
+#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
+Foam::autoPtr
+Foam::functionObjects::momentum::newField
+(
+ const word& baseName,
+ const dimensionSet& dims,
+ bool registerObject
+) const
+{
+ return
+ autoPtr::New
+ (
+ IOobject
+ (
+ scopedName(baseName),
+ time_.timeName(),
+ mesh_,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE,
+ registerObject
+ ),
+ mesh_,
+ dimensioned(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 tmomentum, tAngularMom, tAngularVel;
+
+
+ // The base fields required
+ const auto& U = lookupObject(UName_);
+ const auto* rhoPtr = findObject(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 tmass =
+ // (
+ // rhoPtr
+ // ? (mesh_.V() * (*rhoPtr))
+ // : (mesh_.V() * rhoRef)
+ // );
+
+
+ // Linear momentum
+ // ~~~~~~~~~~~~~~~
+
+ auto* pmomentum = getObjectPtr(scopedName("momentum"));
+
+ if (!pmomentum)
+ {
+ tmomentum = newField("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(scopedName("angularMomentum"));
+
+ if (hasCsys_ && !pAngularMom)
+ {
+ tAngularMom =
+ newField("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(scopedName("angularVelocity"));
+
+ if (hasCsys_)
+ {
+ if (!pAngularVel)
+ {
+ tAngularVel =
+ newField("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());
+ reduce(sumAngularMom_, sumOp());
+}
+
+
+// * * * * * * * * * * * * 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(UName_))
+ {
+ FatalErrorInFunction
+ << "Could not find U: " << UName_ << " in database"
+ << exit(FatalError);
+ }
+
+
+ const auto* pPtr = cfindObject(pName_);
+
+ if (pPtr && pPtr->dimensions() == dimPressure)
+ {
+ // Compressible - rho is mandatory
+
+ if (!foundObject(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("U", "U");
+ pName_ = dict.lookupOrDefault("p", "p");
+ rhoName_ = dict.lookupOrDefault("rho", "rho");
+ rhoRef_ = dict.lookupOrDefault("rhoRef", 1.0);
+
+ rhoRef_ = dict.lookupOrDefault("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("momentum", dimVelocity*dimMass)
+ );
+
+ if (hasCsys_)
+ {
+ mesh_.objectRegistry::store
+ (
+ newField("angularMomentum", dimVelocity*dimMass)
+ );
+ }
+ }
+
+ if (hasCsys_)
+ {
+ if (writeVelocity_)
+ {
+ Info<< " Angular velocity will be written" << endl;
+
+ mesh_.objectRegistry::store
+ (
+ newField("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(scopedName("momentum"));
+ if (fieldPtr) fieldPtr->write();
+
+ fieldPtr = findObject(scopedName("angularMomentum"));
+ if (fieldPtr) fieldPtr->write();
+
+ fieldPtr = findObject(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("cyl_r", dimLength);
+ auto cyl_t = newField("cyl_theta", dimless);
+ auto cyl_z = newField("cyl_z", dimLength);
+
+ // Internal
+ {
+ const auto& pts = mesh_.cellCentres();
+ const label len = pts.size();
+
+ UList& r = cyl_r->primitiveFieldRef(false);
+ UList& t = cyl_t->primitiveFieldRef(false);
+ UList& 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& r = cyl_r->boundaryFieldRef(false)[patchi];
+ UList& t = cyl_t->boundaryFieldRef(false)[patchi];
+ UList& 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 0000000000..2da62e1ea0
--- /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 .
+
+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/\ 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
+ autoPtr 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 86d26c54ec..2b0665df23 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 6cd899348c..d64168acbd 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 6af579dff4..63b4542113 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 4d5c816ec7..26d19cd558 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 11edced4d8..f81d689dbc 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::CloudFunctionObject
)
:
CloudSubModelBase(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 3a538119b5..117bcdb955 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 bf8adcf9fc..1dc96724f7 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());
@@ -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 c0e989dbf0..9f3c40fb5d 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 7bf887d232..5face8ad41 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());
@@ -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 f6c373559c..aa6348ff36 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 09227deb24..b6323a3e3e 100644
--- a/src/meshTools/output/foamVtkWriteCellSetFaces.C
+++ b/src/meshTools/output/foamVtkWriteCellSetFaces.C
@@ -42,8 +42,6 @@ bool Foam::vtk::writeCellSetFaces
{
typedef IndirectList 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
+
+ labelList faceValues(faces.size());
+
+ const labelList& faceIds = faces.addressing();
+
+ // processor-local cellID offset
+ const label cellIdOffset =
+ (
+ writer.parallel() ? globalIndex(mesh.nCells()).localStart() : 0
+ );
+
+ forAll(faceValues, facei)
+ {
+ faceValues[facei] = cellFaces[faceIds[facei]] + cellIdOffset;
+ }
writer.write("faceID", faceValues);
-
- // End CellData/PointData is implicit
}
+ // End CellData/PointData is implicit
+
writer.close();
return true;
diff --git a/src/meshTools/output/foamVtkWriteFaceSet.C b/src/meshTools/output/foamVtkWriteFaceSet.C
index 28003c9be2..7cc75e04fc 100644
--- a/src/meshTools/output/foamVtkWriteFaceSet.C
+++ b/src/meshTools/output/foamVtkWriteFaceSet.C
@@ -42,8 +42,6 @@ bool Foam::vtk::writeFaceSet
{
typedef IndirectList 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 1952c3a2fc..667bcb3641 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 3e42081cc0..dbef3b3987 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 9849cc4e29..2035acfe13 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 fe00ddd5d8..7589d5b3df 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 bc8cd1a467..4bc1df916a 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 0000000000..6f3ff764f0
--- /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 .
+
+\*---------------------------------------------------------------------------*/
+
+#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(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(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 fieldReadPtr;
+
+ if (!cellFldPtr)
+ {
+ // Bit of a hack. Read field and store.
+
+ fieldReadPtr = autoPtr::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& mySurface = const_cast(*this);
+
+ mySurface.transfer(static_cast(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(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("isoField")),
+ isoVal_(dict.get("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(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::sampledIsoSurfaceTopo::sample
+(
+ const interpolation& sampler
+) const
+{
+ return sampleOnFaces(sampler);
+}
+
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::sample
+(
+ const interpolation& sampler
+) const
+{
+ return sampleOnFaces(sampler);
+}
+
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::sample
+(
+ const interpolation& sampler
+) const
+{
+ return sampleOnFaces(sampler);
+}
+
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::sample
+(
+ const interpolation& sampler
+) const
+{
+ return sampleOnFaces(sampler);
+}
+
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::sample
+(
+ const interpolation& sampler
+) const
+{
+ return sampleOnFaces(sampler);
+}
+
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::interpolate
+(
+ const interpolation& interpolator
+) const
+{
+ return sampleOnPoints(interpolator);
+}
+
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::interpolate
+(
+ const interpolation& interpolator
+) const
+{
+ return sampleOnPoints(interpolator);
+}
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::interpolate
+(
+ const interpolation& interpolator
+) const
+{
+ return sampleOnPoints(interpolator);
+}
+
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::interpolate
+(
+ const interpolation& interpolator
+) const
+{
+ return sampleOnPoints(interpolator);
+}
+
+
+Foam::tmp
+Foam::sampledIsoSurfaceTopo::interpolate
+(
+ const interpolation& 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 0000000000..31612b9231
--- /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 .
+
+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
+{
+ // Private typedefs for convenience
+ typedef MeshedSurface 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
+ tmp> sampleOnFaces
+ (
+ const interpolation& sampler
+ ) const;
+
+ //- Interpolate volume field onto surface points
+ template
+ tmp> sampleOnPoints
+ (
+ const interpolation& 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 sample
+ (
+ const interpolation& sampler
+ ) const;
+
+ //- Sample volume field onto surface faces
+ virtual tmp sample
+ (
+ const interpolation& sampler
+ ) const;
+
+ //- Sample volume field onto surface faces
+ virtual tmp sample
+ (
+ const interpolation& sampler
+ ) const;
+
+ //- Sample volume field onto surface faces
+ virtual tmp sample
+ (
+ const interpolation& sampler
+ ) const;
+
+ //- Sample volume field onto surface faces
+ virtual tmp sample
+ (
+ const interpolation& sampler
+ ) const;
+
+
+ // Interpolate
+
+ //- Interpolate volume field onto surface points
+ virtual tmp interpolate
+ (
+ const interpolation& interpolator
+ ) const;
+
+ //- Interpolate volume field onto surface points
+ virtual tmp interpolate
+ (
+ const interpolation& interpolator
+ ) const;
+
+ //- Interpolate volume field onto surface points
+ virtual tmp interpolate
+ (
+ const interpolation& interpolator
+ ) const;
+
+ //- Interpolate volume field onto surface points
+ virtual tmp interpolate
+ (
+ const interpolation& interpolator
+ ) const;
+
+ //- Interpolate volume field onto surface points
+ virtual tmp interpolate
+ (
+ const interpolation& 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 0000000000..5517417f47
--- /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 .
+
+\*---------------------------------------------------------------------------*/
+
+#include "sampledIsoSurfaceTopo.H"
+#include "isoSurface.H"
+#include "volFieldsFwd.H"
+#include "pointFields.H"
+#include "volPointInterpolation.H"
+
+// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+
+template
+Foam::tmp>
+Foam::sampledIsoSurfaceTopo::sampleOnFaces
+(
+ const interpolation& sampler
+) const
+{
+ updateGeometry(); // Recreate geometry if time has changed
+
+ return sampledSurface::sampleOnFaces
+ (
+ sampler,
+ meshCells_,
+ faces(),
+ points()
+ );
+}
+
+
+template
+Foam::tmp>
+Foam::sampledIsoSurfaceTopo::sampleOnPoints
+(
+ const interpolation& interpolator
+) const
+{
+ updateGeometry(); // Recreate geometry if time has changed
+
+ const labelList& elements = meshCells_;
+
+ // One value per point
+ auto tvalues = tmp>::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 0000000000..fb0531e423
--- /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 .
+
+\*---------------------------------------------------------------------------*/
+
+#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& 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& pointToVerts,
+ DynamicList& pointToFace,
+ DynamicList& pointFromDiag,
+ EdgeMap& vertsToPoint
+) const
+{
+ EdgeMap::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& s,
+ const FixedList& p,
+ const FixedList& pIndex,
+ const FixedList& edgeIsDiag,// Per tet edge whether is face diag
+
+ DynamicList& pointToVerts,
+ DynamicList& pointToFace,
+ DynamicList& pointFromDiag,
+
+ EdgeMap& vertsToPoint,
+ DynamicList& 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& pointToVerts,
+ DynamicList& pointToFace,
+ DynamicList& pointFromDiag,
+
+ EdgeMap& vertsToPoint,
+ DynamicList