Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

This commit is contained in:
sergio
2018-12-06 09:06:31 -08:00
94 changed files with 5321 additions and 1427 deletions

5
META-INFO/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
# Do not track build information
build-info
# Do not track time-stamp
time-stamp

84
META-INFO/README.md Normal file
View File

@ -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

2
META-INFO/api-info Normal file
View File

@ -0,0 +1,2 @@
api=1811
patch=0

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd. \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,32 +22,13 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
decomposePar Test-decomposePar
Group Group
grpParallelUtilities grpParallelUtilities
Description Description
Automatically decomposes a mesh and fields of a case for parallel Like decomposePar -dry-run, but with additional options
execution of OpenFOAM.
Usage
\b decomposePar [OPTION]
Options:
- \par -region \<regionName\>
Decompose named region. Does not check for existence of processor*.
- \par -allRegions
Decompose all regions in regionProperties. Does not check for
existence of processor*.
- \par -constant
- \par -time xxx:yyy
Override controlDict settings and decompose selected times. Does not
re-decompose the mesh i.e. does not handle moving mesh or changing
mesh cases.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -65,7 +46,10 @@ int main(int argc, char *argv[])
{ {
argList::addNote 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(); argList::noParallel();
@ -79,33 +63,38 @@ int main(int argc, char *argv[])
argList::addBoolOption argList::addBoolOption
( (
"allRegions", "allRegions",
"operate on all regions in regionProperties" "Operate on all regions in regionProperties"
); );
argList::addBoolOption argList::addBoolOption
( (
"verbose", "verbose",
"more information about decomposition" "Additional verbosity"
); );
argList::addOption argList::addOption
( (
"domains", "domains",
"N", "N",
"override numberOfSubdomains" "Override numberOfSubdomains"
); );
argList::addOption argList::addOption
( (
"method", "method",
"name", "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 // Include explicit constant options, have zero from time range
timeSelector::addOptions(true, false); timeSelector::addOptions(true, false);
#include "setRootCase.H" #include "setRootCase.H"
const bool region = args.found("region"); const bool optRegion = args.found("region");
const bool allRegions = args.found("allRegions"); const bool allRegions = args.found("allRegions");
const bool verbose = args.found("verbose"); const bool verbose = args.found("verbose");

View File

@ -964,6 +964,13 @@ Foam::label Foam::checkGeometry
: patchWriter() : patchWriter()
); );
// Currently only do AMI checks
const fileName outputDir
(
mesh.time().globalPath()/functionObject::outputPrefix/"checkMesh"
);
forAll(pbm, patchi) forAll(pbm, patchi)
{ {
if (isA<cyclicAMIPolyPatch>(pbm[patchi])) if (isA<cyclicAMIPolyPatch>(pbm[patchi]))
@ -1021,8 +1028,11 @@ Foam::label Foam::checkGeometry
{ {
wr.write wr.write
( (
functionObject::outputPrefix, outputDir,
"src_" + tmName, (
"patch" + Foam::name(cpp.index())
+ "-src_" + tmName
),
meshedSurfRef meshedSurfRef
( (
mergedPoints, mergedPoints,
@ -1054,8 +1064,11 @@ Foam::label Foam::checkGeometry
{ {
wr.write wr.write
( (
functionObject::outputPrefix, outputDir,
"src_" + tmName, (
"patch" + Foam::name(cpp.index())
+ "-src_" + tmName
),
meshedSurfRef meshedSurfRef
( (
mergedPoints, mergedPoints,
@ -1109,8 +1122,11 @@ Foam::label Foam::checkGeometry
{ {
wr.write wr.write
( (
functionObject::outputPrefix, outputDir,
"tgt_" + tmName, (
"patch" + Foam::name(cpp.index())
+ "-tgt_" + tmName
),
meshedSurfRef meshedSurfRef
( (
mergedPoints, mergedPoints,
@ -1142,8 +1158,11 @@ Foam::label Foam::checkGeometry
{ {
wr.write wr.write
( (
functionObject::outputPrefix, outputDir,
"tgt_" + tmName, (
"patch" + Foam::name(cpp.index())
+ "-tgt_" + tmName
),
meshedSurfRef meshedSurfRef
( (
mergedPoints, mergedPoints,

View File

@ -284,8 +284,7 @@ void Foam::mergeAndWrite
fileName outputDir fileName outputDir
( (
set.time().path() set.time().globalPath()
/ (Pstream::parRun() ? ".." : "")
/ functionObject::outputPrefix / functionObject::outputPrefix
/ mesh.pointsInstance() / mesh.pointsInstance()
/ set.name() / set.name()
@ -378,8 +377,7 @@ void Foam::mergeAndWrite
fileName outputDir fileName outputDir
( (
set.time().path() set.time().globalPath()
/ (Pstream::parRun() ? ".." : "")
/ functionObject::outputPrefix / functionObject::outputPrefix
/ mesh.pointsInstance() / mesh.pointsInstance()
/ set.name() / set.name()
@ -478,8 +476,7 @@ void Foam::mergeAndWrite
// postProcessing/<time>/p0.vtk // postProcessing/<time>/p0.vtk
fileName outputDir fileName outputDir
( (
set.time().path() set.time().globalPath()
/ (Pstream::parRun() ? ".." : "")
/ functionObject::outputPrefix / functionObject::outputPrefix
/ mesh.pointsInstance() / mesh.pointsInstance()
// set.name() // set.name()

View File

@ -116,6 +116,11 @@ void writeWeights
void writeWeights(const polyMesh& mesh) void writeWeights(const polyMesh& mesh)
{ {
const fileName outputDir
(
mesh.time().globalPath()/functionObject::outputPrefix/"checkAMI"
);
for (const polyPatch& pp : mesh.boundaryMesh()) for (const polyPatch& pp : mesh.boundaryMesh())
{ {
if (isA<cyclicAMIPolyPatch>(pp)) if (isA<cyclicAMIPolyPatch>(pp))
@ -137,8 +142,8 @@ void writeWeights(const polyMesh& mesh)
mesh, mesh,
ami.tgtWeightsSum(), ami.tgtWeightsSum(),
cpp.neighbPatch(), cpp.neighbPatch(),
functionObject::outputPrefix, outputDir,
"tgt", "patch" + Foam::name(pp.index()) + "-tgt",
mesh.time() mesh.time()
); );
writeWeights writeWeights
@ -146,8 +151,8 @@ void writeWeights(const polyMesh& mesh)
mesh, mesh,
ami.srcWeightsSum(), ami.srcWeightsSum(),
cpp, cpp,
functionObject::outputPrefix, outputDir,
"src", "patch" + Foam::name(pp.index()) + "-src",
mesh.time() mesh.time()
); );
} }
@ -170,7 +175,7 @@ int main(int argc, char *argv[])
#include "createTime.H" #include "createTime.H"
#include "createNamedDynamicFvMesh.H" #include "createNamedDynamicFvMesh.H"
const bool checkAMI = args.found("checkAMI"); const bool checkAMI = args.found("checkAMI");
if (checkAMI) if (checkAMI)
{ {

View File

@ -6,6 +6,7 @@ link_directories(
) )
include_directories( include_directories(
${LIB_SRC}/OpenFOAM/include
${LIB_SRC}/OpenFOAM/lnInclude ${LIB_SRC}/OpenFOAM/lnInclude
${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude ${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude
${LIB_SRC}/fileFormats/lnInclude ${LIB_SRC}/fileFormats/lnInclude

View File

@ -6,6 +6,7 @@ link_directories(
) )
include_directories( include_directories(
${LIB_SRC}/OpenFOAM/include
${LIB_SRC}/OpenFOAM/lnInclude ${LIB_SRC}/OpenFOAM/lnInclude
${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude ${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude
${LIB_SRC}/meshing/blockMesh/lnInclude ${LIB_SRC}/meshing/blockMesh/lnInclude

View File

@ -40,11 +40,11 @@ InClass
#include "areaFaMesh.H" #include "areaFaMesh.H"
#include "areaFields.H" #include "areaFields.H"
// vtk includes // VTK includes
#include "vtkFloatArray.h" #include <vtkFloatArray.h>
#include "vtkCellData.h" #include <vtkCellData.h>
#include "vtkPointData.h" #include <vtkPointData.h>
#include "vtkSmartPointer.h" #include <vtkSmartPointer.h>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// //
@ -68,10 +68,8 @@ void Foam::vtkPVFoam::convertVolField
autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr; autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr;
if (interpField) if (interpField)
{ {
if (debug) DebugInfo
{ << "convertVolField interpolating:" << fld.name() << nl;
Info<< "convertVolField interpolating:" << fld.name() << nl;
}
ptfPtr.reset ptfPtr.reset
( (
@ -102,7 +100,7 @@ void Foam::vtkPVFoam::convertVolField
foamVtpData& vtpData = iter.object(); foamVtpData& vtpData = iter.object();
auto dataset = vtpData.dataset; auto dataset = vtpData.dataset;
const labelList& patchIds = vtpData.additionalIds(); const labelUList& patchIds = vtpData.additionalIds();
if (patchIds.empty()) if (patchIds.empty())
{ {
@ -291,13 +289,13 @@ void Foam::vtkPVFoam::convertVolFields
catch (Foam::IOerror& ioErr) catch (Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
// Restore previous exception throwing state // Restore previous exception throwing state
@ -373,13 +371,13 @@ void Foam::vtkPVFoam::convertDimFields
catch (Foam::IOerror& ioErr) catch (Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
// Restore previous exception throwing state // Restore previous exception throwing state
@ -501,13 +499,13 @@ void Foam::vtkPVFoam::convertAreaFields
catch (Foam::IOerror& ioErr) catch (Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
// Restore previous exception throwing state // Restore previous exception throwing state
@ -545,10 +543,8 @@ void Foam::vtkPVFoam::convertPointFields
continue; continue;
} }
if (debug) DebugInfo
{ << "convertPointFields : " << fieldName << nl;
Info<< "convertPointFields : " << fieldName << nl;
}
// Throw FatalError, FatalIOError as exceptions // Throw FatalError, FatalIOError as exceptions
const bool throwingError = FatalError.throwExceptions(); const bool throwingError = FatalError.throwExceptions();
@ -581,7 +577,7 @@ void Foam::vtkPVFoam::convertPointFields
foamVtpData& vtpData = iter.object(); foamVtpData& vtpData = iter.object();
auto dataset = vtpData.dataset; auto dataset = vtpData.dataset;
const labelList& patchIds = vtpData.additionalIds(); const labelUList& patchIds = vtpData.additionalIds();
if (patchIds.size() != 1) if (patchIds.size() != 1)
{ {
continue; continue;
@ -645,13 +641,13 @@ void Foam::vtkPVFoam::convertPointFields
catch (Foam::IOerror& ioErr) catch (Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
// Restore previous exception throwing state // Restore previous exception throwing state
@ -706,7 +702,6 @@ vtkSmartPointer<vtkFloatArray> Foam::vtkPVFoam::convertPointField
const foamVtuData& vtuData const foamVtuData& vtuData
) )
{ {
const int nComp(pTraits<Type>::nComponents);
const labelUList& addPointCellLabels = vtuData.additionalIds(); const labelUList& addPointCellLabels = vtuData.additionalIds();
const labelUList& pointMap = vtuData.pointMap(); const labelUList& pointMap = vtuData.pointMap();
@ -714,7 +709,7 @@ vtkSmartPointer<vtkFloatArray> Foam::vtkPVFoam::convertPointField
const label nPoints = (pointMap.size() ? pointMap.size() : pfld.size()); const label nPoints = (pointMap.size() ? pointMap.size() : pfld.size());
auto data = vtkSmartPointer<vtkFloatArray>::New(); auto data = vtkSmartPointer<vtkFloatArray>::New();
data->SetNumberOfComponents(nComp); data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents));
data->SetNumberOfTuples(nPoints + addPointCellLabels.size()); data->SetNumberOfTuples(nPoints + addPointCellLabels.size());
// Note: using the name of the original volField // Note: using the name of the original volField
@ -729,75 +724,54 @@ vtkSmartPointer<vtkFloatArray> Foam::vtkPVFoam::convertPointField
data->SetName(pfld.name().c_str()); data->SetName(pfld.name().c_str());
} }
if (debug) DebugInfo
{ << "Convert point field: " << pfld.name()
Info<< "convert Point field: " << " size=" << (nPoints + addPointCellLabels.size())
<< pfld.name() << " (" << nPoints << " + " << addPointCellLabels.size()
<< " size=" << (nPoints + addPointCellLabels.size()) << ") nComp=" << static_cast<int>(pTraits<Type>::nComponents) << nl;
<< " (" << nPoints << " + " << addPointCellLabels.size()
<< ") nComp=" << nComp << nl;
}
float vec[nComp];
label pointi = 0; float scratch[pTraits<Type>::nComponents];
vtkIdType pointi = 0;
if (pointMap.size()) if (pointMap.size())
{ {
forAll(pointMap, i) for (const label meshPointi : pointMap)
{ {
const Type& t = pfld[pointMap[i]]; vtk::Tools::foamToVtkTuple(scratch, pfld[meshPointi]);
for (direction d=0; d<nComp; ++d) data->SetTuple(pointi++, scratch);
{
vec[d] = component(t, d);
}
remapTuple<Type>(vec);
data->SetTuple(pointi++, vec);
} }
} }
else else
{ {
forAll(pfld, i) for (const Type& val : pfld)
{ {
const Type& t = pfld[i]; vtk::Tools::foamToVtkTuple(scratch, val);
for (direction d=0; d<nComp; ++d) data->SetTuple(pointi++, scratch);
{
vec[d] = component(t, d);
}
remapTuple<Type>(vec);
data->SetTuple(pointi++, vec);
} }
} }
// Continue with additional points // Continue with additional points
// - correspond to cell centres
if (notNull(vfld)) if (notNull(vfld))
{ {
forAll(addPointCellLabels, apI) for (const label meshCelli : addPointCellLabels)
{ {
const Type& t = vfld[addPointCellLabels[apI]]; vtk::Tools::foamToVtkTuple(scratch, vfld[meshCelli]);
for (direction d=0; d<nComp; ++d) data->SetTuple(pointi++, scratch);
{
vec[d] = component(t, d);
}
remapTuple<Type>(vec);
data->SetTuple(pointi++, vec);
} }
} }
else else
{ {
forAll(addPointCellLabels, apI) for (const label meshCelli : addPointCellLabels)
{ {
Type t = interpolatePointToCell(pfld, addPointCellLabels[apI]); vtk::Tools::foamToVtkTuple
for (direction d=0; d<nComp; ++d) (
{ scratch,
vec[d] = component(t, d); interpolatePointToCell(pfld, meshCelli)
} );
remapTuple<Type>(vec); data->SetTuple(pointi++, scratch);
data->SetTuple(pointi++, vec);
} }
} }
@ -846,13 +820,13 @@ void Foam::vtkPVFoam::convertLagrangianFields
catch (Foam::IOerror& ioErr) catch (Foam::IOerror& ioErr)
{ {
ioErr.write(Warning, false); ioErr.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
catch (Foam::error& err) catch (Foam::error& err)
{ {
// Bit of trickery to get the original message // Bit of trickery to get the original message
err.write(Warning, false); err.write(Warning, false);
Info << nl << endl; Info<< nl << endl;
} }
// Restore previous exception throwing state // Restore previous exception throwing state
@ -876,53 +850,44 @@ Foam::vtkPVFoam::convertFaceFieldToVTK
const labelUList& faceLabels const labelUList& faceLabels
) const ) const
{ {
if (debug) DebugInfo
{ << "Convert face field: " << fld.name()
Info<< "convert face field: " << " size=" << faceLabels.size()
<< fld.name() << " nComp=" << static_cast<int>(pTraits<Type>::nComponents) << nl;
<< " size=" << faceLabels.size()
<< " nComp=" << int(pTraits<Type>::nComponents) << nl;
}
const fvMesh& mesh = fld.mesh(); const fvMesh& mesh = fld.mesh();
const int nComp(pTraits<Type>::nComponents);
const label nInternalFaces = mesh.nInternalFaces(); const label nInternalFaces = mesh.nInternalFaces();
const labelList& faceOwner = mesh.faceOwner(); const labelUList& faceOwner = mesh.faceOwner();
const labelList& faceNeigh = mesh.faceNeighbour(); const labelUList& faceNeigh = mesh.faceNeighbour();
auto data = vtkSmartPointer<vtkFloatArray>::New(); auto data = vtkSmartPointer<vtkFloatArray>::New();
data->SetName(fld.name().c_str()); data->SetName(fld.name().c_str());
data->SetNumberOfComponents(nComp); data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents));
data->SetNumberOfTuples(faceLabels.size()); data->SetNumberOfTuples(faceLabels.size());
float scratch[nComp];
// Interior faces: average owner/neighbour // Interior faces: average owner/neighbour
// Boundary faces: the owner value // 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<nComp; ++d) float scratch[pTraits<Type>::nComponents];
{
scratch[d] = component(t, d); 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 else
{ {
const Type& t = fld[faceOwner[faceNo]]; const Type& val = fld[faceOwner[meshFacei]];
for (direction d=0; d<nComp; ++d) vtk::Tools::foamToVtkTuple(scratch, val);
{
scratch[d] = component(t, d);
}
} }
remapTuple<Type>(scratch);
data->SetTuple(idx, scratch); data->SetTuple(faceId++, scratch);
} }
return data; return data;
@ -937,35 +902,26 @@ Foam::vtkPVFoam::convertVolFieldToVTK
const foamVtuData& vtuData const foamVtuData& vtuData
) const ) const
{ {
const int nComp(pTraits<Type>::nComponents);
const labelUList& cellMap = vtuData.cellMap(); const labelUList& cellMap = vtuData.cellMap();
auto data = vtkSmartPointer<vtkFloatArray>::New(); auto data = vtkSmartPointer<vtkFloatArray>::New();
data->SetName(fld.name().c_str()); data->SetName(fld.name().c_str());
data->SetNumberOfComponents(nComp); data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents));
data->SetNumberOfTuples(cellMap.size()); data->SetNumberOfTuples(cellMap.size());
if (debug) DebugInfo
{ << "Convert volField: " << fld.name() << " size="
Info<< "convert volField: " << cellMap.size() << " (field "
<< fld.name() << fld.size() << ") nComp="
<< " size=" << cellMap.size() << static_cast<int>(pTraits<Type>::nComponents) << nl;
<< " (" << fld.size() << " + "
<< (cellMap.size() - fld.size())
<< ") nComp=" << nComp << nl;
}
float scratch[nComp]; float scratch[pTraits<Type>::nComponents];
forAll(cellMap, idx)
{
const Type& t = fld[cellMap[idx]];
for (direction d=0; d<nComp; ++d)
{
scratch[d] = component(t, d);
}
remapTuple<Type>(scratch);
data->SetTuple(idx, scratch); vtkIdType celli = 0;
for (const label meshCelli : cellMap)
{
vtk::Tools::foamToVtkTuple(scratch, fld[meshCelli]);
data->SetTuple(celli++, scratch);
} }
return data; return data;

View File

@ -172,7 +172,7 @@ void Foam::vtkPVFoam::convertMeshPatches()
{ {
// Point movement on single patch is OK // Point movement on single patch is OK
const labelList& patchIds = vtpData.additionalIds(); const labelUList& patchIds = vtpData.additionalIds();
if (patchIds.size() == 1) if (patchIds.size() == 1)
{ {
vtkgeom = vtpData.getCopy(); vtkgeom = vtpData.getCopy();

View File

@ -49,23 +49,21 @@ vtkSmartPointer<vtkPoints> Foam::vtkPVFoam::foamVtuData::points
const pointField& pts = mesh.points(); const pointField& pts = mesh.points();
// Additional cell centres // Additional cell centres
const labelList& addPoints = this->additionalIds(); const labelUList& addPoints = this->additionalIds();
vtkpoints->SetNumberOfPoints(pts.size() + addPoints.size()); vtkpoints->SetNumberOfPoints(pts.size() + addPoints.size());
// Normal points // Normal points
label pointId = 0; vtkIdType pointId = 0;
for (const point& p : pts) for (const point& p : pts)
{ {
vtkpoints->SetPoint(pointId, p.v_); vtkpoints->SetPoint(pointId++, p.v_);
++pointId;
} }
// Cell centres // Cell centres
for (const label ptId : addPoints) for (const label meshCelli : addPoints)
{ {
vtkpoints->SetPoint(pointId, mesh.C()[ptId].v_); vtkpoints->SetPoint(pointId++, mesh.cellCentres()[meshCelli].v_);
++pointId;
} }
return vtkpoints; return vtkpoints;
@ -85,23 +83,21 @@ vtkSmartPointer<vtkPoints> Foam::vtkPVFoam::foamVtuData::points
const pointField& pts = mesh.points(); const pointField& pts = mesh.points();
// Additional cell centres // Additional cell centres
const labelList& addPoints = this->additionalIds(); const labelUList& addPoints = this->additionalIds();
vtkpoints->SetNumberOfPoints(pointMap.size() + addPoints.size()); vtkpoints->SetNumberOfPoints(pointMap.size() + addPoints.size());
// Normal points // Normal points
label pointId = 0; vtkIdType pointId = 0;
for (const label ptId : pointMap) for (const label meshPointi : pointMap)
{ {
vtkpoints->SetPoint(pointId, pts[ptId].v_); vtkpoints->SetPoint(pointId++, pts[meshPointi].v_);
++pointId;
} }
// Cell centres // Cell centres
for (const label ptId : addPoints) for (const label meshCelli : addPoints)
{ {
vtkpoints->SetPoint(pointId, mesh.C()[ptId].v_); vtkpoints->SetPoint(pointId++, mesh.cellCentres()[meshCelli].v_);
++pointId;
} }
return vtkpoints; return vtkpoints;

View File

@ -24,21 +24,20 @@
# \endcode # \endcode
# #
# The -mode option can also be used when chaining settings. # The -mode option can also be used when chaining settings.
# For example, in the user ~/.OpenFOAM/<VERSION>/config.sh/compiler # For example, in the user ~/.OpenFOAM/config.sh/compiler
# \code # \code
# eval $(foamEtcFile -sh -mode=go config.sh/compiler) # eval $(foamEtcFile -sh -mode=go config.sh/compiler)
# \endcode # \endcode
# #
# Environment # Environment
# - WM_PROJECT (unset defaults to OpenFOAM) # - WM_PROJECT_SITE (unset defaults to PROJECT/site)
# - WM_PROJECT_VERSION (unset defaults to detect from path)
# - WM_PROJECT_SITE (unset defaults to PREFIX/site)
# #
# Note # Note
# This script must exist in one of these locations: # This script must exist in the project 'bin' directory
# - PREFIX/OpenFOAM-<VERSION>/bin #
# - PREFIX/openfoam-<VERSION>/bin # The '-show-api' and '-show-patch' options implement partial logic
# - PREFIX/openfoam<VERSION>/bin # from wmake/wmakeBuildInfo.
# Make sure that any changes there are also reflected here.
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
printHelp() { printHelp() {
@ -52,8 +51,6 @@ options:
-list (-l) List directories or files to be checked -list (-l) List directories or files to be checked
-list-test List (existing) 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) -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 -csh Produce 'source FILE' output for a csh eval
-sh Produce '. FILE' output for a sh eval -sh Produce '. FILE' output for a sh eval
-csh-verbose As per -csh, with additional verbosity -csh-verbose As per -csh, with additional verbosity
@ -61,6 +58,9 @@ options:
-config Add config directory prefix for shell type: -config Add config directory prefix for shell type:
with -csh* for a config.csh/ prefix with -csh* for a config.csh/ prefix
with -sh* for a config.sh/ 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 -quiet (-q) Suppress all normal output
-silent (-s) Suppress stderr, except -csh-verbose, -sh-verbose output -silent (-s) Suppress stderr, except -csh-verbose, -sh-verbose output
-help Print the usage -help Print the usage
@ -70,8 +70,8 @@ Locate user/group/other file as per '#includeEtc'
Do not group single character options. Do not group single character options.
Equivalent options: Equivalent options:
| -mode=MODE | -mode MODE | -m MODE | -mode=MODE | -mode MODE | -m MODE
| -prefix=DIR | -prefix DIR | -p DIR | -prefix=DIR | -prefix DIR | -p DIR [obsolete 1812]
| -version=VER | -version VER | -v VER | -version=VER | -version VER | -v VER [obsolete 1812]
Exit status Exit status
0 when the file is found. Print resolved path to stdout. 0 when the file is found. Print resolved path to stdout.
@ -98,80 +98,71 @@ die()
} }
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
binDir="${0%/*}" # The bin dir binDir="${0%/*}" # The bin dir
projectDir="${binDir%/bin}" # The project dir projectDir="$(\cd $(dirname $binDir) && \pwd -L)" # Project dir
prefixDir="${projectDir%/*}" # The prefix dir (same as $WM_PROJECT_INST_DIR)
# Could not resolve projectDir, prefixDir? (eg, called as ./bin/foamEtcFile) userDir="$HOME/.OpenFOAM" # As per foamVersion.H
if [ "$prefixDir" = "$projectDir" ] groupDir="${WM_PROJECT_SITE:-$projectDir/site}" # As per foamVersion.H
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
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Guess project version or simply get the stem part of the projectDirName. # The API locations. See wmake/wmakeBuildInfo
# Handle standard naming conventions: rulesFile="$projectDir/wmake/rules/General/general"
metaInfoDir="$projectDir/META-INFO"
# Get api from rules/General/general
# #
# * OpenFOAM-<version>[-extra...] # Failure modes:
# * openfoam-<version>[-extra...] # - No api information (can't find file etc).
# * openfoam<digits> # -> Fatal for building, but could be OK for a stripped down version
# #
# - projectVersion: update unless already set # Fallback. Get from api-info
# #
# Helper variables: getApi()
# - dirBase (for reassembling name) == projectDirName without the version
unset dirBase
guessVersion()
{ {
local version local value
case "$projectDirName" in value="$(sed -ne '/^ *#/!{ /WM_VERSION.*OPENFOAM=/{ s@^.*OPENFOAM= *\([0-9][0-9]*\).*@\1@p; q }}' $rulesFile 2>/dev/null)"
(OpenFOAM-* | openfoam-*) if [ -z "$value" ] && [ -f "$metaInfoDir/api-info" ]
# Dashed naming: OpenFOAM-<VERSION> or openfoam-<VERSION> then
dirBase="${projectDirName%%-*}-" # Fallback. Get from api-info
version="${projectDirName#*-}" value="$(sed -ne 's@^ *api *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)"
version="${version%%*-}" # Extra safety, eg openfoam-version-packager fi
;;
(openfoam[0-9]*) if [ -n "$value" ]
# Debian-style naming: openfoam<VERSION> then
dirBase="openfoam" echo "$value"
version="${projectDirName#openfoam}" else
;; return 1
fi
(*)
die "unknown/unsupported naming convention for '$projectDirName'"
;;
esac
# Set projectVersion if required
: ${projectVersion:=$version}
} }
# Set projectVersion and update versionNum, projectDirName accordingly # Get patch from meta-info / api-info
setVersion() #
# Failure modes:
# - No patch information (can't find file etc).
#
getPatchLevel()
{ {
projectVersion="$1" local value
# Need dirBase when reassembling projectDirName # Fallback. Get from api-info
[ -n "$dirBase" ] || guessVersion 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' optMode=ugo # Default mode is always 'ugo'
unset shellOutput verboseOutput unset shellOutput verboseOutput
unset optAll optConfig optList optVersion unset optAll optConfig optList projectApi
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -180,6 +171,19 @@ do
-h | -help*) -h | -help*)
printHelp printHelp
;; ;;
-show-api)
# Show API and exit
getApi
exit $?
;;
-show-patch)
# Show patch level and exit
getPatchLevel
exit $?
;;
-with-api=*)
projectApi="${1#*=}"
;;
-a | -all) -a | -all)
optAll=true optAll=true
unset shellOutput verboseOutput unset shellOutput verboseOutput
@ -204,13 +208,6 @@ do
-mode=[ugo]*) -mode=[ugo]*)
optMode="${1#*=}" optMode="${1#*=}"
;; ;;
-prefix=/*)
prefixDir="${1#*=}"
prefixDir="${prefixDir%/}"
;;
-version=*)
optVersion="${1#*=}"
;;
-m | -mode) -m | -mode)
optMode="$2" optMode="$2"
shift shift
@ -223,22 +220,23 @@ do
;; ;;
esac esac
;; ;;
-p | -prefix)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
prefixDir="${2%/}"
shift
;;
-q | -quiet) -q | -quiet)
optQuiet=true optQuiet=true
;; ;;
-s | -silent) -s | -silent)
optSilent=true 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" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
optVersion="$2" echo "ignored defunct option '$1'" 1>&2
shift shift
;; ;;
--) --)
shift shift
break 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 # Split arguments into filename (for searching) and trailing bits for shell eval
# Silently remove leading ~OpenFOAM/ (as per Foam::findEtcFile) # Silently remove leading ~OpenFOAM/ (as per Foam::findEtcFile)
nArgs=$# nArgs=$#
@ -279,25 +281,9 @@ then
fi 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: # Debugging:
# echo "Installed locations:" 1>&2 # echo "Installed locations:" 1>&2
# for i in projectDir prefixDir projectDirName projectVersion # for i in projectDir
# do # do
# eval echo "$i=\$$i" 1>&2 # eval echo "$i=\$$i" 1>&2
# done # done
@ -305,12 +291,12 @@ groupDir="${WM_PROJECT_SITE:-$prefixDir/site}"
# Define the various places to be searched: # Define the various places to be searched:
unset dirList unset dirList
case "$optMode" in (*u*) # (U)ser case "$optMode" in (*u*) # (U)ser
dirList="$dirList $userDir/$projectVersion $userDir" dirList="$dirList $userDir/$projectApi $userDir"
;; ;;
esac esac
case "$optMode" in (*g*) # (G)roup == site case "$optMode" in (*g*) # (G)roup == site
dirList="$dirList $groupDir/$projectVersion/etc $groupDir/etc" dirList="$dirList $groupDir/$projectApi/etc $groupDir/etc"
;; ;;
esac esac

View File

@ -1,145 +0,0 @@
#!/bin/bash
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
#-------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# foamExec
#
# Description
# Usage: foamExec [-version=foamVersion] <foamCommand> ...
#
# Runs the <foamVersion> version of executable <foamCommand>
# with the rest of the arguments.
#
# Can also be used for parallel runs. For example,
# \code
# mpirun -np <nProcs> \
# foamExec -version=VERSION <foamCommand> ... -parallel
# \endcode
#
# Note
# This script must exist in $WM_PROJECT_INST_DIR/OpenFOAM-<VERSION>/bin
# or $WM_PROJECT_INST_DIR/openfoam<VERSION>/bin (debian)
#
# foamEtcFile located in the same directory as this script
#
# See also
# foamEtcFile
#
#------------------------------------------------------------------------------
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
Usage: ${0##*/} [OPTION] <application> ...
options:
-mode=MODE Any combination of u(user), g(group), o(other)
-prefix=DIR Specify an alternative installation prefix
pass through to foamEtcFile
-version=VER Specify alternative OpenFOAM version (eg, 3.0, 1612, ...)
pass through to foamEtcFile
-help Print the usage
Run a particular OpenFOAM version of <APPLICATION>
USAGE
exit 1
}
#-------------------------------------------------------------------------------
binDir="${0%/*}" # The bin dir
projectDir="${binDir%/bin}" # The project dir
# prefixDir="${projectDir%/*}" # The prefix dir (same as $WM_PROJECT_INST_DIR)
projectVersion="${WM_PROJECT_VERSION:-unknown}"
unset etcOpts
# parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help*)
usage
;;
-mode=*)
etcOpts="$etcOpts $1" # pass-thru to foamEtcFile
;;
-prefix=/*)
etcOpts="$etcOpts $1" # pass-thru to foamEtcFile
;;
-version=*)
etcOpts="$etcOpts $1" # pass-thru to foamEtcFile
projectVersion="${1#*=}" # for reporting
;;
-m | -mode)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile
shift
;;
-p | -prefix)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile
shift
;;
-v | -version)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile
projectVersion="$2" # for reporting
shift
;;
--)
shift
break
;;
-*)
usage "invalid option '$1'"
;;
*)
break
;;
esac
shift
done
# Find and source the OpenFOAM <etc/bashrc>
# placed in function to preserve command-line arguments
sourceBashrc()
{
rcFile="$($binDir/foamEtcFile $etcOpts bashrc)" || {
echo "Error: bashrc file could not be found for OpenFOAM-$projectVersion" 1>&2
exit 2
}
. $rcFile $FOAM_SETTINGS
}
[ "$#" -ge 1 ] || usage "no application specified"
sourceBashrc
exec "$@"
#------------------------------------------------------------------------------

View File

@ -297,9 +297,7 @@ reportExecutable()
checkOpenFOAMEnvironment() 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 ""
echo "FATAL ERROR: OpenFOAM environment not configured." echo "FATAL ERROR: OpenFOAM environment not configured."
echo "" echo ""
@ -389,7 +387,6 @@ COL5="Crit"
hline hline
echo "$COL1 $COL2 $COL3 $COL5" echo "$COL1 $COL2 $COL3 $COL5"
hline hline
reportEnv '$WM_PROJECT_INST_DIR' noPath yes
reportEnv '$WM_PROJECT_USER_DIR' noPath no reportEnv '$WM_PROJECT_USER_DIR' noPath no
reportEnv '$WM_THIRD_PARTY_DIR' noPath yes reportEnv '$WM_THIRD_PARTY_DIR' noPath yes
hline hline
@ -415,11 +412,12 @@ hline
reportEnv '$FOAM_LIBBIN' '$LD_LIBRARY_PATH' yes reportEnv '$FOAM_LIBBIN' '$LD_LIBRARY_PATH' yes
reportEnv '$FOAM_SITE_LIBBIN' '$LD_LIBRARY_PATH' no reportEnv '$FOAM_SITE_LIBBIN' '$LD_LIBRARY_PATH' no
reportEnv '$FOAM_USER_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 reportEnv '$MPI_ARCH_PATH' '$LD_LIBRARY_PATH' yes
hline hline
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
heading "Third-party software" heading "Software Components"
hline hline
echo "$(fixlen Software 9) $(fixlen Version 10) $(fixlen Location 10)" echo "$(fixlen Software 9) $(fixlen Version 10) $(fixlen Location 10)"
hline hline

View File

@ -28,11 +28,16 @@
# Description # Description
# Extract data for each time-step from a log file for graphing. # Extract data for each time-step from a log file for graphing.
# #
# Environment
# WM_PROJECT_API
# WM_PROJECT_DIR
# WM_PROJECT_SITE
#
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
Script=${0##*/} Script="${0##*/}"
toolsDir=${0%/*}/tools toolsDir="${0%/*}/tools"
siteDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-<unknown>}/site}" groupDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-<unknown>}/site}"
userDir=$HOME/.OpenFOAM userDir="$HOME/.OpenFOAM"
usage() { usage() {
exec 1>&2 exec 1>&2
@ -85,11 +90,11 @@ cat <<HELP
The database ($Script.db) will taken from these locations: The database ($Script.db) will taken from these locations:
. .
$userDir/$WM_PROJECT_VERSION $userDir/$WM_PROJECT_API/
$userDir $userDir/
$siteDir/$WM_PROJECT_VERSION $groupDir/$WM_PROJECT_API/etc/
$siteDir $groupDir/etc/
$WM_PROJECT_DIR/etc $WM_PROJECT_DIR/etc/
$toolsDir $toolsDir
option -quiet : suppresses the default information and only prints the option -quiet : suppresses the default information and only prints the

View File

@ -4,7 +4,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
@ -29,10 +29,15 @@
# Create a new case from a template for particular applications # Create a new case from a template for particular applications
# - requires rsync # - requires rsync
# #
# Environment
# WM_PROJECT_API
# WM_PROJECT_DIR
# WM_PROJECT_SITE
#
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
siteDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-<unknown>}/site}" groupDir="${WM_PROJECT_SITE:-${WM_PROJECT_DIR:-<unknown>}/site}"
userDir="$HOME/.OpenFOAM" userDir="$HOME/.OpenFOAM"
version="${WM_PROJECT_VERSION:-unknown}" projectApi="${WM_PROJECT_API:-unknown}"
templateDir="appTemplates" templateDir="appTemplates"
@ -44,20 +49,22 @@ usage() {
Usage: ${0##*/} [OPTION] Usage: ${0##*/} [OPTION]
options: options:
-app <name> specify the application to use -app NAME specify the application to use
-case <dir> specify alternative case directory, default is the cwd -case DIR specify alternative case directory, default is the cwd
-list list the applications available -list list the applications available
-version <ver> specify an alternative version (default: '$WM_PROJECT_VERSION') -with-api=NUM specify alternative api to use (default: \$WM_PROJECT_API)
-version VER [obsolete]
-help Print the usage
clone initial application settings to the specified case from clone initial application settings to the specified case from
$userDir/$templateDir/{$version,}/<APP> $userDir/$templateDir/{$projectApi,}/APP
$siteDir/$templateDir/{$version,}/<APP> $groupDir/$templateDir/{$projectApi,}/APP
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
unset appName caseName listOpt unset appName caseName optList
# parse options # parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -69,21 +76,23 @@ do
-app) -app)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument" [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
appName="$2" appName="$2"
shift 2 shift
;; ;;
-case) -case)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument" [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
caseName="$2" caseName="$2"
shift 2 shift
;; ;;
-l | -list) -l | -list)
listOpt=true optList=true
shift
;; ;;
-v | -ver | -version) -v | -ver | -version)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument" [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
version="$2" echo "ignored defunct option -version" 1>&2
shift 2 shift
;;
-with-api=*)
projectApi="${1#*=}"
;; ;;
-*) -*)
usage "unknown option: '$*'" usage "unknown option: '$*'"
@ -92,19 +101,16 @@ do
usage "unexpected argument: '$*'" usage "unexpected argument: '$*'"
;; ;;
esac esac
shift
done done
# need rsync, except for when listing # 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 # find apps in current directory
# considered an app if it has constant/ and system/ directories # considered an app if it has constant/ and system/ directories
@ -113,18 +119,23 @@ findApps()
{ {
for app in $(/bin/ls -d * 2>/dev/null) for app in $(/bin/ls -d * 2>/dev/null)
do do
[ -d "$app/constant" -a -d "$app/system" ] && echo $app [ -d "$app/constant" -a -d "$app/system" ] && echo "$app"
done done
} }
appList=$( appList=$(
for dir in $userDir/$templateDir $siteDir/$templateDir for dir in "$userDir/$templateDir" "$groupDir/$templateDir"
do do
if cd $dir 2>/dev/null if cd "$dir" 2>/dev/null
then then
findApps ## generic findApps ## generic
cd $version 2>/dev/null && findApps ## version-specific
## version-specific
if [ -n "$projectApi" ]
then
cd "$projectApi" 2>/dev/null && findApps
fi
fi fi
done | sort | uniq done | sort | uniq
) )
@ -142,7 +153,7 @@ listApps()
} }
if [ "$listOpt" = true ] if [ "$optList" = true ]
then then
listApps listApps
exit 0 exit 0
@ -160,11 +171,11 @@ fi
# get the corresponding srcDir name # get the corresponding srcDir name
srcDir=$( srcDir=$(
for dir in $userDir/$templateDir $siteDir/$templateDir for dir in "$userDir/$templateDir" "$groupDir/$templateDir"
do do
if [ -d $dir ] if [ -d $dir ]
then then
for appDir in $dir/$version/$appName $dir/$appName for appDir in "$dir/$projectApi/$appName" "$dir/$appName"
do do
if [ -d $appDir -a -d $appDir/constant -a -d $appDir/system ] if [ -d $appDir -a -d $appDir/constant -a -d $appDir/system ]
then then
@ -211,21 +222,6 @@ echo " syncing ..."
# sync updated files only, itemize changes so we know what is going on # sync updated files only, itemize changes so we know what is going on
rsync -aui $srcDir/ $newDir 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 echo Done
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
@ -44,7 +44,7 @@ options:
-help print the usage -help print the usage
Updates the header of application files and removes consecutive blank lines. 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. An alternative version can be specified with the -version option.
USAGE USAGE
@ -74,8 +74,12 @@ do
esac esac
done done
# constant width for version - default to WM_PROJECT_VERSION # Constant width for version - default to WM_PROJECT_API
version=$(printf %-36s ${version:-$WM_PROJECT_VERSION})
: ${version:=$WM_PROJECT_API}
: ${version:=$WM_PROJECT_VERSION}
version=$(printf %-36s ${version:-OPENFOAM})
[ $# -ge 1 ] || usage [ $# -ge 1 ] || usage

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -25,7 +25,7 @@
# . change-sitedir.sh PREFIX [SUFFIX] # . change-sitedir.sh PREFIX [SUFFIX]
# #
# Shortcuts (prefix) # Shortcuts (prefix)
# -prefix "$WM_PROJECT_INST_DIR/site" # -prefix "$WM_PROJECT_DIR/../site"
# -project "$WM_PROJECT_DIR/site" # -project "$WM_PROJECT_DIR/site"
# -none remove from environment # -none remove from environment
# #
@ -46,7 +46,7 @@
# #
# corresponds to the standard site location: # 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" suffix="$2"
foamOldDirs="$FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN \ 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 foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
if [ -x "$foamClean" ] if [ -x "$foamClean" ]
then then
@ -66,12 +66,12 @@ then
fi fi
case "$suffix" in case "$suffix" in
-plat*) suffix="platforms/$WM_OPTIONS" ;; -plat*) suffix="platforms/$WM_OPTIONS" ;;
esac esac
case "$prefix" in case "$prefix" in
-prefix) prefix="$WM_PROJECT_INST_DIR/site" ;; -prefix) prefix="${WM_PROJECT_DIR%/*}/site" ;;
-project) prefix="$WM_PROJECT_DIR/site" ;; -project) prefix="$WM_PROJECT_DIR/site" ;;
-none) unset prefix ;; -none) unset prefix ;;
esac esac
if [ -n "$prefix" ] if [ -n "$prefix" ]

View File

@ -69,8 +69,8 @@ then
-plat*) suffix="platforms/$WM_OPTIONS" ;; -plat*) suffix="platforms/$WM_OPTIONS" ;;
esac esac
case "$prefix" in case "$prefix" in
-home) prefix="$HOME/OpenFOAM/$USER-${WM_PROJECT_VERSION:-unknown}" ;; -home) prefix="$HOME/OpenFOAM/$USER-${WM_PROJECT_VERSION:-unknown}" ;;
-none) unset prefix ;; -none) unset prefix ;;
esac esac
if [ -n "$prefix" ] if [ -n "$prefix" ]

View File

@ -25,9 +25,8 @@ usage() {
usage: ${0##*/} options usage: ${0##*/} options
Basic Basic
-prefix DIR specify installation directory (eg, /opt) -project-path DIR specify 'WM_PROJECT_DIR' (eg, /opt/openfoam1806-patch1)
-version VER specify project version (eg, 1612) -version VER specify project version (eg, v1806)
-projectName NAME specify project directory name (eg, openfoam1612)
-archOption 32|64 specify 'WM_ARCH_OPTION' architecture option -archOption 32|64 specify 'WM_ARCH_OPTION' architecture option
-SP | -float32 specify 'WM_PRECISION_OPTION' for single precision -SP | -float32 specify 'WM_PRECISION_OPTION' for single precision
-DP | -float64 specify 'WM_PRECISION_OPTION' for double precision -DP | -float64 specify 'WM_PRECISION_OPTION' for double precision
@ -61,31 +60,26 @@ Components
-metis ver specify 'METIS_VERSION' -metis ver specify 'METIS_VERSION'
-metis-path DIR specify 'METIS_ARCH_PATH' -metis-path DIR specify 'METIS_ARCH_PATH'
-scotch VER specify 'SCOTCH_VERSION' (eg, scotch_6.0.4) -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 Graphics
-paraview VER specify 'ParaView_VERSION' (eg, 5.4.1) -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) -paraview-path DIR specify 'ParaView_DIR' (eg, /opt/ParaView-5.4.1)
-vtk VER specify 'vtk_version' (eg, VTK-7.1.0) -vtk VER specify 'vtk_version' (eg, VTK-7.1.0)
-mesa VER specify 'mesa_version' (eg, mesa-13.0.1) -mesa VER specify 'mesa_version' (eg, mesa-13.0.1)
Misc Misc
-default-third default ThirdParty location: PREFIX/ThirdParty-VERSION -foamInstall DIR [obsolete]
-no-third use PROJECT/ThirdParty for ThirdParty location -projectName NAME [obsolete]
-third-path DIR specify 'WM_THIRD_PARTY_DIR' -sigfpe|-no-sigfpe [obsolete - now under etc/controlDict]
-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]
Adjusts hardcoded versions and installation paths (for bash, POSIX shell). Adjusts hardcoded versions and installation paths (for bash, POSIX shell).
Equivalent options: Equivalent options:
-prefix -foamInstall --foamInstall -version -foamVersion --projectVersion
-version -foamVersion --projectVersion
-projectName --projectName
-archOption --archOption -archOption --archOption
-third -ThirdParty -third -ThirdParty
-paraview --paraviewVersion | -paraviewVersion -paraview --paraviewVersion | -paraviewVersion
@ -186,6 +180,31 @@ replace()
done done
} }
# Standard <key> <val> type of replacements.
# replace <file> <key1> <val1> .. <keyN> <valN>
# looks for "setenv KEYWORD value"
# but avoids "setenv KEYWORD" without a value
replaceCsh()
{
local file="$1"
shift
local key val
while [ "$#" -ge 2 ]
do
key=$1
val=$2
shift 2
_inlineSed \
"$file" \
"setenv *$key [^ #]*" \
"setenv $key $val" \
"Replaced $key setenv by '$val'"
done
}
# Get the option's value (argument). # Get the option's value (argument).
# Die if the argument doesn't exist or is empty # Die if the argument doesn't exist or is empty
# $1 option # $1 option
@ -196,13 +215,14 @@ getOptionValue()
echo "$2" 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 # projectDir=$BASH_SOURCE
# [ -n "$variable" ] && FOAM_INST_DIR= ... # [ -n "$projectDir" ] && projectDir= ...
# FOAM_INST_DIR=... # projectDir=...
# ---- # ----
removeMagic() removeBashMagic()
{ {
local file="$1" local file="$1"
@ -211,10 +231,33 @@ removeMagic()
exit 2 # Fatal exit 2 # Fatal
} }
echo " Remove default FOAM_INST_DIR setting ($file)" echo " Remove automatic projectDir setting ($file)"
sed -i \ 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" "$file"
} }
@ -235,23 +278,15 @@ do
## Basic ## ## Basic ##
-prefix | -foamInstall | --foamInstall) -project-path)
# Replace WM_PROJECT_INST_DIR, disable FOAM_INST_DIR discovery # Replace WM_PROJECT_DIR=...
optionValue=$(getOptionValue "$@") optionValue=$(getOptionValue "$@")
removeMagic etc/bashrc replace etc/bashrc WM_PROJECT_DIR "\"$optionValue\""
replace etc/bashrc WM_PROJECT_INST_DIR "$optionValue" replaceCsh etc/cshrc WM_PROJECT_DIR "\"$optionValue\""
adjusted=true
shift 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 adjusted=true
shift shift
;; ;;
@ -259,7 +294,8 @@ do
-version | -foamVersion | --projectVersion) -version | -foamVersion | --projectVersion)
# Replace WM_PROJECT_VERSION=... # Replace WM_PROJECT_VERSION=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -275,7 +311,8 @@ do
echo "WM_ARCH_OPTION already set to $optionValue" echo "WM_ARCH_OPTION already set to $optionValue"
: ${adjusted:=false} : ${adjusted:=false}
else else
replace etc/bashrc WM_ARCH_OPTION "$optionValue" replace etc/bashrc WM_ARCH_OPTION "$optionValue"
replaceCsh etc/cshrc WM_ARCH_OPTION "$optionValue"
adjusted=true adjusted=true
fi fi
shift shift
@ -283,20 +320,23 @@ do
-SP | -float32) -SP | -float32)
# Replace WM_PRECISION_OPTION=... # 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 adjusted=true
;; ;;
-DP | -float64) -DP | -float64)
# Replace WM_PRECISION_OPTION=... # 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 adjusted=true
;; ;;
-int32 | -int64) -int32 | -int64)
# Replace WM_LABEL_SIZE=... # Replace WM_LABEL_SIZE=...
optionValue="${1#-int}" 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 adjusted=true
;; ;;
@ -306,7 +346,8 @@ do
-clang) -clang)
# Replace clang_version=... # Replace clang_version=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -314,7 +355,8 @@ do
-gcc) -gcc)
# Replace gcc_version=... # Replace gcc_version=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -325,6 +367,9 @@ do
replace etc/bashrc \ replace etc/bashrc \
WM_COMPILER_TYPE system \ WM_COMPILER_TYPE system \
WM_COMPILER "$optionValue" WM_COMPILER "$optionValue"
replaceCsh etc/cshrc \
WM_COMPILER_TYPE system \
WM_COMPILER "$optionValue"
adjusted=true adjusted=true
shift shift
;; ;;
@ -335,25 +380,31 @@ do
replace etc/bashrc \ replace etc/bashrc \
WM_COMPILER_TYPE ThirdParty \ WM_COMPILER_TYPE ThirdParty \
WM_COMPILER "$optionValue" WM_COMPILER "$optionValue"
replaceCsh etc/cshrc \
WM_COMPILER_TYPE ThirdParty \
WM_COMPILER "$optionValue"
adjusted=true adjusted=true
shift shift
;; ;;
gmp-[4-9]* | gmp-system) gmp-[4-9]* | gmp-system)
# gcc-related package # 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 adjusted=true
;; ;;
mpfr-[2-9]* | mpfr-system) mpfr-[2-9]* | mpfr-system)
# gcc-related package # 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 adjusted=true
;; ;;
mpc-[0-9]* | mpc-system) mpc-[0-9]* | mpc-system)
# gcc-related package # 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 adjusted=true
;; ;;
@ -363,7 +414,8 @@ do
-mpi) -mpi)
# Explicitly set WM_MPLIB=... # Explicitly set WM_MPLIB=...
optionValue=$(getOptionValue "$@") optionValue=$(getOptionValue "$@")
replace etc/bashrc WM_MPLIB "$optionValue" replace etc/bashrc WM_MPLIB "$optionValue"
replaceCsh etc/bashrc WM_MPLIB "$optionValue"
optMpi=system optMpi=system
adjusted=true adjusted=true
shift shift
@ -383,21 +435,29 @@ do
"FOAM_MPI=$optMpi" \ "FOAM_MPI=$optMpi" \
"Replaced 'FOAM_MPI=$expected' setting by '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 adjusted=true
shift shift
;; ;;
-openmpi-system) -openmpi-system)
# Explicitly set WM_MPLIB=SYSTEMOPENMPI # 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 optMpi=system
adjusted=true adjusted=true
;; ;;
-openmpi-third) -openmpi-third)
# Explicitly set WM_MPLIB=OPENMPI, using default setting for openmpi # 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 optMpi=third
adjusted=true adjusted=true
;; ;;
@ -408,7 +468,8 @@ do
-boost) -boost)
# Replace boost_version=... # Replace boost_version=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -416,7 +477,8 @@ do
-boost-path) -boost-path)
# Replace BOOST_ARCH_PATH=... # Replace BOOST_ARCH_PATH=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -424,7 +486,8 @@ do
-cgal) -cgal)
# Replace cgal_version=... # Replace cgal_version=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -432,7 +495,8 @@ do
-cgal-path) -cgal-path)
# Replace CGAL_ARCH_PATH=... # Replace CGAL_ARCH_PATH=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -440,7 +504,8 @@ do
-fftw) -fftw)
# Replace fftw_version=... # Replace fftw_version=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -448,7 +513,8 @@ do
-fftw-path) -fftw-path)
# Replace FFTW_ARCH_PATH=... # Replace FFTW_ARCH_PATH=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -456,7 +522,8 @@ do
-cmake) -cmake)
# Replace cmake_version=... # Replace cmake_version=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -472,7 +539,7 @@ do
-kahip-path) -kahip-path)
# Replace KAHIP_ARCH_PATH=... # Replace KAHIP_ARCH_PATH=...
optionValue=$(getOptionValue "$@") optionValue=$(getOptionValue "$@")
replace etc/config.sh/kahip KAHIP_ARCH_PATH "$optionValue" replace etc/config.sh/kahip KAHIP_ARCH_PATH "\"$optionValue\""
adjusted=true adjusted=true
shift shift
;; ;;
@ -488,7 +555,7 @@ do
-metis-path) -metis-path)
# Replace METIS_ARCH_PATH=... # Replace METIS_ARCH_PATH=...
optionValue=$(getOptionValue "$@") optionValue=$(getOptionValue "$@")
replace etc/config.sh/metis METIS_ARCH_PATH "$optionValue" replace etc/config.sh/metis METIS_ARCH_PATH "\"$optionValue\""
adjusted=true adjusted=true
shift shift
;; ;;
@ -504,7 +571,7 @@ do
-scotch-path | -scotchArchPath | --scotchArchPath) -scotch-path | -scotchArchPath | --scotchArchPath)
# Replace SCOTCH_ARCH_PATH=... # Replace SCOTCH_ARCH_PATH=...
optionValue=$(getOptionValue "$@") optionValue=$(getOptionValue "$@")
replace etc/config.sh/scotch SCOTCH_ARCH_PATH "$optionValue" replace etc/config.sh/scotch SCOTCH_ARCH_PATH "\"$optionValue\""
adjusted=true adjusted=true
shift shift
;; ;;
@ -519,7 +586,17 @@ do
_matches "$optionValue" "$expected" || \ _matches "$optionValue" "$expected" || \
die "'$1' has bad value: '$optionValue'" 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 adjusted=true
shift shift
;; ;;
@ -527,7 +604,8 @@ do
-paraview-path | -paraviewInstall | --paraviewInstall) -paraview-path | -paraviewInstall | --paraviewInstall)
# Replace ParaView_DIR=... # Replace ParaView_DIR=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -535,7 +613,8 @@ do
-vtk) -vtk)
# Replace vtk_version=... # Replace vtk_version=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -543,7 +622,8 @@ do
-mesa) -mesa)
# Replace mesa_version=... # Replace mesa_version=...
optionValue=$(getOptionValue "$@") 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 adjusted=true
shift shift
;; ;;
@ -551,55 +631,17 @@ do
## Misc ## ## 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) -sigfpe | -no-sigfpe)
echo "Enable/disable FOAM_SIGFPE now via controlDict" 1>&2 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'" die "unknown option/argument: '$1'"
;; ;;

View File

@ -27,11 +27,12 @@ usage() {
Usage: ${0##*/} [OPTION] [appName .. [appNameN]] Usage: ${0##*/} [OPTION] [appName .. [appNameN]]
options: options:
-d dir | -dir dir Directory to process -dir DIR Directory to process
-u | -user Add \$FOAM_USER_APPBIN to the search directories -user Add \$FOAM_USER_APPBIN to the search directories
-no-header Suppress header generation -no-header Suppress header generation
-o FILE Write to alternative output -output FILE, -o FILE
-h | -help Print the usage Write to alternative output
-h | -help Print the usage
Create cache of bash completion values for OpenFOAM applications. Create cache of bash completion values for OpenFOAM applications.
The cached values are typically used by the tcsh completion wrapper. The cached values are typically used by the tcsh completion wrapper.
@ -68,13 +69,13 @@ do
-h | -help*) -h | -help*)
usage usage
;; ;;
-d | -dir) -dir)
[ "$#" -ge 2 ] || die "'$1' option requires an argument" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
searchDirs="$2" searchDirs="$2"
[ -d "$searchDirs" ] || die "directory not found '$searchDirs'" [ -d "$searchDirs" ] || die "directory not found '$searchDirs'"
shift shift
;; ;;
-u | -user) -user)
searchDirs="$searchDirs $FOAM_USER_APPBIN" searchDirs="$searchDirs $FOAM_USER_APPBIN"
;; ;;
-no-head*) -no-head*)
@ -116,8 +117,8 @@ echo 1>&2
# Header not disabled # Header not disabled
[ "$optHeader" = true ] && cat << HEADER [ "$optHeader" = true ] && cat << HEADER
#----------------------------------*-sh-*-------------------------------------- #----------------------------------*-sh-*--------------------------------------
# Cached options for bash completion of OpenFOAM applications, primarily for # Cached options for bash completion of OpenFOAM applications,
# use with the tcsh completion mechanism. # primarily for use with the tcsh completion mechanism.
# These are the values expected by the '_of_complete_' function # These are the values expected by the '_of_complete_' function
# #
# Recreate with "${0##*/}" # Recreate with "${0##*/}"
@ -140,7 +141,12 @@ HEADER
# -opt1 descrip # -opt1 descrip
# -opt2 <arg> descrip # -opt2 <arg> descrip
# -help-full # -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. # Terminate parsing on first appearance of -help-full.
# - options with '=' (eg, -mode=ugo) are not handled very well at all. # - options with '=' (eg, -mode=ugo) are not handled very well at all.
# - alternatives (eg, -a, -all) are not handled nicely either, # - alternatives (eg, -a, -all) are not handled nicely either,
@ -150,6 +156,7 @@ extractOptions()
local appName="$1" local appName="$1"
local helpText=$($appName -help-full 2>/dev/null | \ local helpText=$($appName -help-full 2>/dev/null | \
sed -ne 's/^ *//; /^$/d; /^[^-]/d; /^--/d; /^-help-man/d;' \ sed -ne 's/^ *//; /^$/d; /^[^-]/d; /^--/d; /^-help-man/d;' \
-e '/^-hostRoots /d; /^-roots /d;' \
-e 'y/,/ /; s/=.*$/=/;' \ -e 'y/,/ /; s/=.*$/=/;' \
-e '/^-[^ ]* </{ s/^\(-[^ ]* <\).*$/\1/; p; d }' \ -e '/^-[^ ]* </{ s/^\(-[^ ]* <\).*$/\1/; p; d }' \
-e 's/^\(-[^ ]*\).*$/\1/; p; /^-help-full/q;' \ -e 's/^\(-[^ ]*\).*$/\1/; p; /^-help-full/q;' \

View File

@ -85,10 +85,10 @@ do
--recursive-backend--) --recursive-backend--)
optBackend=true optBackend=true
;; ;;
--output=*) -output=*)
moduleOutput="${1#*=}" moduleOutput="${1#*=}"
;; ;;
--tmpdir=*) -tmpdir=*)
moduleTmpDir="${1#*=}" moduleTmpDir="${1#*=}"
;; ;;
-*) -*)
@ -219,7 +219,7 @@ echo "Using openfoam: $WM_PROJECT_DIR" 1>&2
echo "==> $moduleOutput" 1>&2 echo "==> $moduleOutput" 1>&2
# Remove some cruft # 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 WM_PROJECT_USER_DIR WM_THIRD_PARTY_DIR
unset SCOTCH_VERSION unset SCOTCH_VERSION

29
etc/README.md Normal file
View File

@ -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

View File

@ -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

View File

@ -22,9 +22,9 @@
# - $WM_PROJECT_DIR/etc/prefs.sh # - $WM_PROJECT_DIR/etc/prefs.sh
# #
# - User or group values (first file found): # - User or group values (first file found):
# - ~/.OpenFOAM/$WM_PROJECT_VERSION/prefs.sh # - ~/.OpenFOAM/$WM_PROJECT_API/prefs.sh
# - ~/.OpenFOAM/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 # - $WM_PROJECT_SITE/etc/prefs.sh
# #
# Environment # Environment
@ -43,21 +43,22 @@
export WM_PROJECT=OpenFOAM export WM_PROJECT=OpenFOAM
export WM_PROJECT_VERSION=plus 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 # \- 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, # should work when sourced by BASH or ZSH shells. If this however fails,
# set one of the fallback values to an appropriate path. # 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 # END OF (NORMAL) USER EDITABLE PART
################################################################################ ################################################################################
: # Safety statement (if the user removed all fallback values) : # Safety statement (if the user removed all fallback values)
unset rc
# Configuration environment variables. # Configuration environment variables.
# Should override via <prefs.sh> file instead of editing this file. # Should override via <prefs.sh> file instead of editing this file.
@ -127,113 +128,31 @@ foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR \
$HOME/$WM_PROJECT/$USER $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \ $HOME/$WM_PROJECT/$USER $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
$WM_PROJECT_SITE $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN" $WM_PROJECT_SITE $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN"
# Location of installation and third-party software # [WM_PROJECT_DIR] - Location of this OpenFOAM version
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR export WM_PROJECT_DIR="$projectDir"
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_USER_DIR] - Location of user files # [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 # [WM_PROJECT_SITE] - Location of site-specific (group) files
# Default (unset) implies WM_PROJECT_DIR/site # Default (unset) implies WM_PROJECT_DIR/site
# Normally defined in calling environment # Normally defined in calling environment
if [ -d "$WM_PROJECT_SITE" ]
# Finalize setup of OpenFOAM environment for POSIX shell
if [ -d "$WM_PROJECT_DIR" ]
then 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 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 fi
# Load shell functions # Cleanup variables (done as final statement for a clean exit code)
unset WM_SHELL_FUNCTIONS unset foamOldDirs projectDir
. $WM_PROJECT_DIR/etc/config.sh/functions
# Overrides via <prefs.sh>
# 1. other (system) values
_foamEtc -mode=o prefs.sh
# 2. user or group values (unless disabled)
[ -z "$FOAM_CONFIG_NOUSER" ] && _foamEtc -mode=ug prefs.sh
# Evaluate command-line parameters and record settings for later.
# These can be used to set/unset values, specify additional files etc.
FOAM_SETTINGS="$@"
if [ -z "$FOAM_SETTINGS" ]
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
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -33,6 +33,13 @@ alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
# $2 = fallback libname ('lib' or 'lib64') # $2 = fallback libname ('lib' or 'lib64')
alias _foamAddLibAuto 'eval `$WM_PROJECT_DIR/bin/tools/lib-dir -csh \!*`' 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 # Source an etc file, possibly with some verbosity
if ($?FOAM_VERBOSE && $?prompt) then if ($?FOAM_VERBOSE && $?prompt) then
if ($?FOAM_CONFIG_NOUSER) then if ($?FOAM_CONFIG_NOUSER) then

View File

@ -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_APPBIN "$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin"
setenv FOAM_LIBBIN "$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib" 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 # Site-specific (group) files
# Default # 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 # Prepend wmake to the path - not required for runtime-only environment
set foundDir="${WM_PROJECT_DIR}/wmake" set foundDir="${WM_PROJECT_DIR}/wmake"
if ( $?WM_DIR ) then if ( $?WM_DIR ) then
if ( -d "${WM_DIR}" ) foundDir="${WM_DIR}" if ( -d "${WM_DIR}" ) set foundDir="${WM_DIR}"
endif endif
if ( -d "$foundDir" ) then if ( -d "$foundDir" ) then
setenv PATH "${foundDir}:${PATH}" setenv PATH "${foundDir}:${PATH}"
@ -189,8 +186,8 @@ setenv PATH "${WM_PROJECT_DIR}/bin:${PATH}"
if ( -d "$siteDir/bin" ) then # Generic if ( -d "$siteDir/bin" ) then # Generic
_foamAddPath "$siteDir/bin" _foamAddPath "$siteDir/bin"
endif endif
if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then # Version-specific if ( -d "$siteDir/$WM_PROJECT_API/bin" ) then # API-specific
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin" _foamAddPath "$siteDir/$WM_PROJECT_API/bin"
endif endif
# OpenFOAM executables (user, group, standard) # OpenFOAM executables (user, group, standard)
@ -200,8 +197,11 @@ _foamAddPath "${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}"
_foamAddLib "$FOAM_LIBBIN/dummy" _foamAddLib "$FOAM_LIBBIN/dummy"
# External (ThirdParty) libraries. Also allowed to be unset # External (ThirdParty) libraries. Also allowed to be unset
if ( $?FOAM_EXT_LIBBIN ) then if ( -d "$WM_THIRD_PARTY_DIR" ) then
_foamAddLib $FOAM_EXT_LIBBIN 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 endif
# OpenFOAM libraries (user, group, standard) # OpenFOAM libraries (user, group, standard)

187
etc/config.csh/setup Normal file
View File

@ -0,0 +1,187 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# File
# etc/config.csh/setup
# - sourced by OpenFOAM-*/etc/cshrc
#
# Description
# Finalize setup of OpenFOAM environment for C-shell (csh, tcsh)
#
# Environment
# FOAM_VERBOSE (set/unset)
# - add extra verbosity when sourcing files
# FOAM_CONFIG_NOUSER (set/unset)
# - suppress use of user/group configuration files
#
#------------------------------------------------------------------------------
# [WM_PROJECT_API] - The API level for the project
setenv WM_PROJECT_API `$WM_PROJECT_DIR/bin/foamEtcFile -show-api`
# The installation parent directory
set prefixDir="${WM_PROJECT_DIR:h}"
# Load shell "functions" (actually aliases)
source "$WM_PROJECT_DIR/etc/config.csh/functions"
# [WM_THIRD_PARTY_DIR] - Location of third-party software components
# \- This may be installed in a directory parallel to the OpenFOAM project
# directory, with the same version name or using the API value.
# It may also not be required at all, in which case a dummy "ThirdParty"
# directory inside of the OpenFOAM project directory.
#
# Note: only accept if the directory exists and contains a "Allwmake" file
setenv WM_THIRD_PARTY_DIR
set foundDir=''
_foamEcho "Locating ThirdParty directory"
foreach WM_THIRD_PARTY_DIR (\
"$WM_PROJECT_DIR/ThirdParty" \
"$prefixDir/ThirdParty-$WM_PROJECT_VERSION" \
"$prefixDir/ThirdParty-v$WM_PROJECT_API" \
"$prefixDir/ThirdParty-$WM_PROJECT_API" \
"$prefixDir/ThirdParty-common" \
)
_foamEcho "... $WM_THIRD_PARTY_DIR"
if ( -d "$WM_THIRD_PARTY_DIR" ) then
if ( -f "$WM_THIRD_PARTY_DIR/Allwmake" || -d "$WM_THIRD_PARTY_DIR/platforms" ) then
set foundDir=true
break
endif
endif
end
if ( "${%foundDir}" ) then
_foamEcho "Using $WM_THIRD_PARTY_DIR"
else
# Dummy fallback value
setenv WM_THIRD_PARTY_DIR "$WM_PROJECT_DIR/ThirdParty"
_foamEcho "Dummy $WM_THIRD_PARTY_DIR"
endif
# Done with ThirdParty discovery
# Overrides via <prefs.csh>
# 1. other (system) values
_foamEtc -mode=o prefs.csh
# 2. user or group values (unless disabled)
if (! $?FOAM_CONFIG_NOUSER ) then
_foamEtc -mode=ug prefs.csh
endif
# Capture and evaluate any command-line parameters
# These can be used to set/unset values, specify additional files etc.
setenv FOAM_SETTINGS "${*}"
while ( $#argv > 0 )
switch ($argv[1])
case -*:
# Stray option (not meant for us here) -> get out
break
breaksw
case *=:
# name= -> unsetenv name
_foamEcho "unsetenv $argv[1]:s/=//"
eval "unsetenv $argv[1]:s/=//"
breaksw
case *=*:
# name=value -> setenv name value
_foamEcho "setenv $argv[1]:s/=/ /"
eval "setenv $argv[1]:s/=/ /"
breaksw
default:
# Filename: source it
if ( -f "$argv[1]" ) then
_foamEcho "Using: $argv[1]"
source "$argv[1]"
else
_foamEtc -silent "$argv[1]"
endif
breaksw
endsw
shift
end
# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Prevent local variables from shadowing setenv variables
unset PATH MANPATH LD_LIBRARY_PATH LD_PRELOAD
if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH
if (! $?MANPATH ) setenv MANPATH
_foamClean PATH "$foamOldDirs"
_foamClean MANPATH "$foamOldDirs"
_foamClean LD_LIBRARY_PATH "$foamOldDirs"
# Setup for OpenFOAM compilation etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamEtc -config settings
# Setup for third-party packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamEtc -config mpi
_foamEtc -config paraview -- "$FOAM_SETTINGS" # Pass through for evaluation
_foamEtc -config vtk
_foamEtc -config ensight
## _foamEtc -config ADIOS
## _foamEtc -config ADIOS2
_foamEtc -config CGAL
_foamEtc -config FFTW
if ( -d "$WM_PROJECT_DIR/doc/man1" ) then
_foamAddMan "$WM_PROJECT_DIR/doc"
endif
# Interactive shell
if ($?prompt) then
_foamEtc -config aliases
_foamEtc -config tcsh_completion
endif
# Clean environment paths again. Only remove duplicates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamClean PATH
_foamClean MANPATH
_foamClean LD_LIBRARY_PATH
# Add trailing ':' for system manpages
if ( $?MANPATH ) then
setenv MANPATH "${MANPATH}:"
endif
if ( $?LD_PRELOAD ) then
_foamClean LD_PRELOAD
endif
# Cleanup temporary information
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Unload shell "functions"
unalias _foamClean
unalias _foamEcho
unalias _foamEtc
unalias _foamAddPath
unalias _foamAddMan
unalias _foamAddLib
unalias _foamAddLibAuto
# Variables (done as final statement for a clean exit code)
unset cleaned foamOldDirs foundDir prefixDir
#------------------------------------------------------------------------------

View File

@ -59,6 +59,7 @@ unsetenv WM_OPTIONS
unsetenv WM_OSTYPE unsetenv WM_OSTYPE
unsetenv WM_PRECISION_OPTION unsetenv WM_PRECISION_OPTION
unsetenv WM_PROJECT unsetenv WM_PROJECT
unsetenv WM_PROJECT_API
unsetenv WM_PROJECT_DIR unsetenv WM_PROJECT_DIR
unsetenv WM_PROJECT_INST_DIR unsetenv WM_PROJECT_INST_DIR
unsetenv WM_PROJECT_SITE unsetenv WM_PROJECT_SITE

View File

@ -30,7 +30,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade # 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 set mesa_version=mesa-17.1.1
setenv VTK_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version setenv VTK_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version

View File

@ -1,6 +1,6 @@
#----------------------------------*-sh-*-------------------------------------- #----------------------------------*-sh-*--------------------------------------
# Cached options for bash completion of OpenFOAM applications, primarily for # Cached options for bash completion of OpenFOAM applications,
# use with the tcsh completion mechanism. # primarily for use with the tcsh completion mechanism.
# These are the values expected by the '_of_complete_' function # These are the values expected by the '_of_complete_' function
# #
# Recreate with "foamCreateCompletionCache" # Recreate with "foamCreateCompletionCache"
@ -13,230 +13,231 @@ _of_complete_cache_=()
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
_of_complete_cache_[adiabaticFlameT]="-case -fileHandler | -doc -doc-source -help" _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_[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_[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_[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_[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_[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 -listScalarBCs -listVectorBCs | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -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_[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 -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 | -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 -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 | -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 -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 | -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 -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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 -hostRoots -roots | -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -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 -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_[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_[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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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 -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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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 -hostRoots -roots -time | -collapseFaces -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -overwrite -parallel -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 -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -meshQuality -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -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_[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 -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 | -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -region -regions -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -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 -hostRoots -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -writeObj -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 -hostRoots -listScalarBCs -listVectorBCs -roots -templateDir | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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_[equilibriumCO]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -doc -doc-source -help"
_of_complete_cache_[equilibriumFlameT]="-case -fileHandler | -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_[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_[extrudeMesh]="-case -decomposeParDict -fileHandler -region | -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_[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 -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -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_[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_[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_[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_[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_[FMSToSurface]="-case -fileHandler | -exportFeatureEdges -exportSubsets -noFunctionObjects -doc -doc-source -help"
_of_complete_cache_[FMSToVTK]="-case -fileHandler | -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_[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 -hostRoots -roots -set | -disableFunctionEntries -expand -includes -keywords -noFunctionObjects -parallel -remove -value -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 -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noConstant -noFunctionObjects -noZero -parallel -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_[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_[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_[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_[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 -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_[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 -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_[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_[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_[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_[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_[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 -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_[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 -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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -checkGeometry -conformationOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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_[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_[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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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_[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_[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_[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 -hostRoots -roots | -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 -hostRoots -roots | -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 -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_[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 -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 | -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 -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 | -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 -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 | -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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 -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_[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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -parallel -vtk -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_[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_[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_[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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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 -hostRoots -masterRegion -resultTime -roots | -noFunctionObjects -overwrite -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 -hostRoots -listScalarBCs -listVectorBCs -region -roots | -detectOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -split -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_[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_[meshToFPMA]="-case -decomposeParDict -fileHandler | -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_[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 -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -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_[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_[modifyMesh]="-case -decomposeParDict -dict -fileHandler | -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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -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_[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_[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 -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_[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 -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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 -hostRoots -roots | -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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_[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_[orientFaceZone]="-case -decomposeParDict -fileHandler -region | -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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -pName -roots | -initialiseUBCs -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -withFunctionObjects -writePhi -writep -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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 -hostRoots -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -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 -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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -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 -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_[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 -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 | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -doc -doc-source -help"
_of_complete_cache_[plot3dToFoam]="-case -fileHandler -scale | -noBlank -noFunctionObjects -singleBlock -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 -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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 -listScalarBCs -listVectorBCs | -concaveMultiCells -doNotPreserveFaceZones -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -splitAllFaces -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 -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_[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 -listScalarBCs -listVectorBCs -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -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 -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -list -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -profiling -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 -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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -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_[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_[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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -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_[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 -listScalarBCs -listVectorBCs -mergeTol -region -time | -cellDist -constant -fullMatch -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -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 -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_[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 -hostRoots -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -minSet -overwrite -parallel -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -readLevel -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 -hostRoots -region -roots | -all -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -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 -hostRoots -roots -useSet | -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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 -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_[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 -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 | -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 -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 | -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 -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 | -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 -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 | -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 -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 | -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 -hostRoots -listScalarBCs -listVectorBCs -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -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 -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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_[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_[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_[setAlphaField]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listUnsetSwitches -listVectorBCs -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_[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 -hostRoots -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -loop -noFunctionObjects -noSync -noVTK -noZero -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 -hostRoots -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFlipMap -noFunctionObjects -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -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_[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 -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 | -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 -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 | -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 -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 | -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 -hostRoots -listScalarBCs -listVectorBCs -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -parallel -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -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_[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_[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_[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 -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 | -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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 -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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -dry-run -dry-run-write -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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_[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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -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_[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 -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 | -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 -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 | -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_[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_[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_[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 -hostRoots -listScalarBCs -listVectorBCs -patch -patches -region -resultTime -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -overwrite -parallel -zone -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_[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_[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" _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_[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_[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_[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_[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_[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_[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_[surfaceRefineRedGreen]="-case -fileHandler | -noFunctionObjects -doc -doc-source -help"
_of_complete_cache_[surfaceSplitByPatch]="-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" _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_[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_[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_[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_[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 -hostRoots -interpolationType -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -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_[tetgenToFoam]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFaceFile -noFunctionObjects -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_[tetMesh]="-case -decomposeParDict -fileHandler -hostRoots -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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_[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_[tetMesh]="-case -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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_[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_[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_[topoSet]="-case -decomposeParDict -dict -fileHandler -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noSync -noZero -parallel -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_[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_[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_[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_[uncoupledKinematicParcelDyMFoam]="-case -cloudName -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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_[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_[uncoupledKinematicParcelDyMFoam]="-case -cloudName -decomposeParDict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -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_[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_[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_[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 -hostRoots -point -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noZero -parallel -patchEdges -patchFaces -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -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 -hostRoots -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -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 -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_[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 -hostRoots -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -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" _of_complete_cache_[paraFoam]="-case -region | -block -touch -touch-all -touch-proc -vtk -help"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -40,6 +40,15 @@ then
unset "foamVar_name" 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 # Source an etc file, possibly with some verbosity
# - use eval to avoid intermediate variables (ksh doesn't have 'local') # - use eval to avoid intermediate variables (ksh doesn't have 'local')
unset -f _foamEtc 2>/dev/null unset -f _foamEtc 2>/dev/null
@ -216,7 +225,7 @@ else
# Was previously loaded/defined - now unset # Was previously loaded/defined - now unset
unset -f _foamAddPath _foamAddMan _foamAddLib _foamAddLibAuto 2>/dev/null 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 foamClean
unset WM_SHELL_FUNCTIONS unset WM_SHELL_FUNCTIONS

View File

@ -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_APPBIN="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin"
export FOAM_LIBBIN="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib" 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 # Site-specific (group) files
# Default # Default
@ -187,9 +184,9 @@ if [ -d "$siteDir/bin" ] # Generic
then then
_foamAddPath "$siteDir/bin" _foamAddPath "$siteDir/bin"
fi fi
if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ] # Version-specific if [ -d "$siteDir/$WM_PROJECT_API/bin" ] # API-specific
then then
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin" _foamAddPath "$siteDir/$WM_PROJECT_API/bin"
fi fi
# OpenFOAM executables (user, group, standard) # 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 # Dummy versions of external libraries. To be found last in LD_LIBRARY_PATH
_foamAddLib "$FOAM_LIBBIN/dummy" _foamAddLib "$FOAM_LIBBIN/dummy"
# External libraries (allowed to be unset) # External (ThirdParty) libraries. Also allowed to be unset
if [ -n "$FOAM_EXT_LIBBIN" ] if [ -d "$WM_THIRD_PARTY_DIR" ]
then 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 fi
# OpenFOAM libraries (user, group, standard) # OpenFOAM libraries (user, group, standard)

171
etc/config.sh/setup Normal file
View File

@ -0,0 +1,171 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# File
# etc/config.sh/setup
# - sourced by OpenFOAM-*/etc/bashrc
#
# Description
# Finalize setup of OpenFOAM environment for POSIX shell.
#
# Environment
# FOAM_VERBOSE (set/unset)
# - add extra verbosity when sourcing files
# FOAM_CONFIG_NOUSER (set/unset)
# - suppress use of user/group configuration files
#
#------------------------------------------------------------------------------
# [WM_PROJECT_API] - The API level for the project
export WM_PROJECT_API="$($WM_PROJECT_DIR/bin/foamEtcFile -show-api)"
# The installation parent directory
prefixDir="${WM_PROJECT_DIR%/*}"
# Load shell functions
unset WM_SHELL_FUNCTIONS
. "$WM_PROJECT_DIR/etc/config.sh/functions"
# [WM_THIRD_PARTY_DIR] - Location of third-party software components
# \- This may be installed in a directory parallel to the OpenFOAM project
# directory, with the same version name or using the API value.
# It may also not be required at all, in which case a dummy "ThirdParty"
# directory inside of the OpenFOAM project directory.
#
# Note: only accept if the directory exists and contains a "Allwmake" file
export WM_THIRD_PARTY_DIR
unset foundDir
_foamEcho "Locating ThirdParty directory"
for WM_THIRD_PARTY_DIR in \
"$WM_PROJECT_DIR/ThirdParty" \
"$prefixDir/ThirdParty-$WM_PROJECT_VERSION" \
"$prefixDir/ThirdParty-v$WM_PROJECT_API" \
"$prefixDir/ThirdParty-$WM_PROJECT_API" \
"$prefixDir/ThirdParty-common" \
;
do
_foamEcho "... $WM_THIRD_PARTY_DIR"
if [ -d "$WM_THIRD_PARTY_DIR" ]
then
if [ -f "$WM_THIRD_PARTY_DIR/Allwmake" ] || \
[ -d "$WM_THIRD_PARTY_DIR/platforms" ]
then
foundDir=true
break
fi
fi
done
if [ -n "$foundDir" ]
then
_foamEcho "Using $WM_THIRD_PARTY_DIR"
else
# Dummy fallback value
WM_THIRD_PARTY_DIR="$WM_PROJECT_DIR/ThirdParty"
_foamEcho "Dummy $WM_THIRD_PARTY_DIR"
fi
# Done with ThirdParty discovery
# Overrides via <prefs.sh>
# 1. other (system) values
_foamEtc -mode=o prefs.sh
# 2. user or group values (unless disabled)
[ -z "$FOAM_CONFIG_NOUSER" ] && _foamEtc -mode=ug prefs.sh
# Capture and evaluate any command-line parameters
# These can be used to set/unset values, specify additional files etc.
FOAM_SETTINGS="$@"
# Evaluate the command-line parameters, which were saved as FOAM_SETTINGS.
# These can be used to set/unset values, specify additional files etc.
if [ -z "$FOAM_SETTINGS" ]
then
unset FOAM_SETTINGS
else
export FOAM_SETTINGS
_foamEval "$@"
fi
# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PATH MANPATH LD_LIBRARY_PATH
_foamClean PATH "$foamOldDirs"
_foamClean MANPATH "$foamOldDirs"
_foamClean LD_LIBRARY_PATH "$foamOldDirs"
# Setup for OpenFOAM compilation etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamEtc -config settings
# Setup for third-party packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamEtc -config mpi
_foamEtc -config paraview -- "$@" # Pass through for evaluation
_foamEtc -config vtk
_foamEtc -config ensight
_foamEtc -config gperftools
## _foamEtc -config ADIOS
## _foamEtc -config ADIOS2
_foamEtc -config CGAL
_foamEtc -config scotch
_foamEtc -config FFTW
if [ -d "$WM_PROJECT_DIR/doc/man1" ]
then
_foamAddMan "$WM_PROJECT_DIR/doc"
fi
# Interactive shell
if /usr/bin/tty -s 2>/dev/null
then
_foamEtc -config aliases
[ "${BASH_VERSINFO:-0}" -ge 4 ] && _foamEtc -config bash_completion
fi
# Clean environment paths again. Only remove duplicates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PATH MANPATH LD_LIBRARY_PATH
_foamClean PATH
_foamClean MANPATH
_foamClean LD_LIBRARY_PATH
# Add trailing ':' for system manpages
if [ -n "$MANPATH" ]
then
MANPATH="${MANPATH}:"
fi
if [ -n "$LD_PRELOAD" ]
then
export LD_PRELOAD
_foamClean LD_PRELOAD
fi
# Cleanup temporary information
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Unload shell functions
. "$WM_PROJECT_DIR/etc/config.sh/functions"
# Variables (done as the last statement for a clean exit code)
unset cleaned foamOldDirs foundDir prefixDir
#------------------------------------------------------------------------------

View File

@ -50,6 +50,7 @@ unset WM_OPTIONS
unset WM_OSTYPE unset WM_OSTYPE
unset WM_PRECISION_OPTION unset WM_PRECISION_OPTION
unset WM_PROJECT unset WM_PROJECT
unset WM_PROJECT_API
unset WM_PROJECT_DIR unset WM_PROJECT_DIR
unset WM_PROJECT_INST_DIR unset WM_PROJECT_INST_DIR
unset WM_PROJECT_SITE unset WM_PROJECT_SITE

View File

@ -31,7 +31,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade # 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 mesa_version=mesa-17.1.1
export VTK_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version export VTK_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version

150
etc/cshrc
View File

@ -22,10 +22,10 @@
# - $WM_PROJECT_DIR/etc/prefs.csh # - $WM_PROJECT_DIR/etc/prefs.csh
# #
# - User or group values (first file found): # - User or group values (first file found):
# - ~/.OpenFOAM/$WM_PROJECT_VERSION/prefs.csh # - ~/.OpenFOAM/$WM_PROJECT_API/prefs.csh
# - ~/.OpenFOAM/prefs.csh # - ~/.OpenFOAM/prefs.csh
# - $WM_PROJECT_SITE/$WM_PROJECT_VERSION/etc/prefs.csh # - $WM_PROJECT_SITE/$WM_PROJECT_API/etc/prefs.csh
# - $WM_PROJECT_SITE/etc/prefs.csh # - $WM_PROJECT_SITE/prefs.csh
# #
# Environment # Environment
# FOAM_VERBOSE (set/unset) # FOAM_VERBOSE (set/unset)
@ -43,17 +43,22 @@
setenv WM_PROJECT OpenFOAM setenv WM_PROJECT OpenFOAM
setenv WM_PROJECT_VERSION plus 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 # \- 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, # should work when sourced by CSH or TCSH shells. If this however fails,
# set one of the fallback values to an appropriate path. # 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 # END OF (NORMAL) USER EDITABLE PART
################################################################################ ################################################################################
@ -138,10 +143,8 @@ if ( $?FOAM_SITE_LIBBIN ) then
set foamOldDirs="$foamOldDirs $FOAM_SITE_LIBBIN" set foamOldDirs="$foamOldDirs $FOAM_SITE_LIBBIN"
endif endif
# Location of installation and third-party software # [WM_PROJECT_DIR] - Location of this OpenFOAM version
setenv WM_PROJECT_INST_DIR $FOAM_INST_DIR setenv WM_PROJECT_DIR "$projectDir"
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_USER_DIR] - Location of user files # [WM_PROJECT_USER_DIR] - Location of user files
setenv WM_PROJECT_USER_DIR "$HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION" setenv WM_PROJECT_USER_DIR "$HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION"
@ -157,118 +160,17 @@ else
unsetenv WM_PROJECT_SITE unsetenv WM_PROJECT_SITE
endif endif
# Load shell "functions" (actually aliases)
source $WM_PROJECT_DIR/etc/config.csh/functions
# Overrides via <prefs.csh> # Finalize setup of OpenFOAM environment
# 1. other (system) values if ( -d "$WM_PROJECT_DIR" ) then
_foamEtc -mode=o prefs.csh if ($?FOAM_VERBOSE && $?prompt) echo "source $WM_PROJECT_DIR/etc/config.csh/setup"
source "$WM_PROJECT_DIR/etc/config.csh/setup" "${*}"
# 2. user or group values (unless disabled) else
if (! $?FOAM_CONFIG_NOUSER ) then echo "Error: did not locate installation path for $WM_PROJECT-$WM_PROJECT_VERSION"
_foamEtc -mode=ug prefs.csh echo "No directory: $WM_PROJECT_DIR"
endif endif
# Evaluate command-line parameters and record settings for later. # Cleanup variables (done as final statement for a clean exit code)
# These can be used to set/unset values, specify additional files etc. unset foamOldDirs projectDir projectName
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
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -16,7 +16,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR/src" 2>/dev/null || {
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Trigger update of version strings as required # 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 OpenFOAM
wmakeLnInclude -u OSspecific/"${WM_OSTYPE:-POSIX}" wmakeLnInclude -u OSspecific/"${WM_OSTYPE:-POSIX}"

View File

@ -81,6 +81,7 @@ void Foam::dynamicCode::checkSecurity
<< " allowSystemOperations 1" << nl << nl << " allowSystemOperations 1" << nl << nl
<< "to the InfoSwitches setting in the system controlDict." << nl << "to the InfoSwitches setting in the system controlDict." << nl
<< "The system controlDict is any of" << nl << nl << "The system controlDict is any of" << nl << nl
<< " ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl
<< " ~/.OpenFOAM/controlDict" << nl << " ~/.OpenFOAM/controlDict" << nl
<< " $WM_PROJECT_DIR/etc/controlDict" << nl << endl << " $WM_PROJECT_DIR/etc/controlDict" << nl << endl
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -46,18 +46,14 @@ void Foam::functionObjects::writeFile::initStream(Ostream& os) const
Foam::fileName Foam::functionObjects::writeFile::baseFileDir() 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()) fileName baseDir =
{ (
// Put in undecomposed case (Note: gives problems for fileObr_.time().globalPath()
// distributed data running) / functionObject::outputPrefix
baseDir = baseDir/".."/functionObject::outputPrefix; );
}
else
{
baseDir = baseDir/functionObject::outputPrefix;
}
// Append mesh name if not default region // Append mesh name if not default region
if (isA<polyMesh>(fileObr_)) if (isA<polyMesh>(fileObr_))
@ -65,12 +61,11 @@ Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const
const polyMesh& mesh = refCast<const polyMesh>(fileObr_); const polyMesh& mesh = refCast<const polyMesh>(fileObr_);
if (mesh.name() != polyMesh::defaultRegion) if (mesh.name() != polyMesh::defaultRegion)
{ {
baseDir = baseDir/mesh.name(); baseDir /= mesh.name();
} }
} }
// Remove any ".." baseDir.clean(); // Remove unneeded ".."
baseDir.clean();
return baseDir; return baseDir;
} }
@ -85,15 +80,18 @@ Foam::fileName Foam::functionObjects::writeFile::baseTimeDir() const
Foam::autoPtr<Foam::OFstream> Foam::functionObjects::writeFile::createFile Foam::autoPtr<Foam::OFstream> Foam::functionObjects::writeFile::createFile
( (
const word& name, const word& name,
const scalar time const scalar time0
) const ) const
{ {
autoPtr<OFstream> osPtr; autoPtr<OFstream> osPtr;
if (Pstream::master() && writeToFile_) if (Pstream::master() && writeToFile_)
{ {
const scalar userTime = fileObr_.time().timeToUserTime(time); const scalar time = useUserTime_ ?
const word timeName = Time::timeName(userTime); fileObr_.time().timeToUserTime(time0)
: time0;
const word timeName = Time::timeName(time);
fileName outputDir(baseFileDir()/prefix_/timeName); fileName outputDir(baseFileDir()/prefix_/timeName);
@ -164,6 +162,7 @@ Foam::functionObjects::writeFile::writeFile
writePrecision_(IOstream::defaultPrecision()), writePrecision_(IOstream::defaultPrecision()),
writeToFile_(true), writeToFile_(true),
writtenHeader_(false), writtenHeader_(false),
useUserTime_(true),
startTime_(obr.time().startTime().value()) startTime_(obr.time().startTime().value())
{} {}
@ -183,6 +182,7 @@ Foam::functionObjects::writeFile::writeFile
writePrecision_(IOstream::defaultPrecision()), writePrecision_(IOstream::defaultPrecision()),
writeToFile_(true), writeToFile_(true),
writtenHeader_(false), writtenHeader_(false),
useUserTime_(true),
startTime_(obr.time().startTime().value()) startTime_(obr.time().startTime().value())
{ {
read(dict); read(dict);
@ -205,6 +205,9 @@ bool Foam::functionObjects::writeFile::read(const dictionary& dict)
writeToFile_ = dict.lookupOrDefault("writeToFile", true); writeToFile_ = dict.lookupOrDefault("writeToFile", true);
writeToFile_ = writeToFile_ && Pstream::master(); writeToFile_ = writeToFile_ && Pstream::master();
// Use user time, e.g. CA deg in preference to seconds
useUserTime_ = dict.lookupOrDefault("useUserTime", true);
return true; return true;
} }
@ -277,7 +280,10 @@ void Foam::functionObjects::writeFile::writeHeader
void Foam::functionObjects::writeFile::writeTime(Ostream& os) const 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); os << setw(charWidth()) << Time::timeName(timeNow);
} }

View File

@ -82,6 +82,10 @@ protected:
//- Flag to identify whether the header has been written //- Flag to identify whether the header has been written
bool writtenHeader_; bool writtenHeader_;
//- Flag to use the specified user time, e.g. CA deg instead
//- of seconds. Default = true
bool useUserTime_;
//- Start time value //- Start time value
scalar startTime_; scalar startTime_;

View File

@ -119,18 +119,8 @@ Foam::fileNameList searchEtc
bool (*accept)(const Foam::fileName&) bool (*accept)(const Foam::fileName&)
) )
{ {
Foam::fileName version(Foam::getEnv("WM_PROJECT_VERSION")); // Could use foamVersion::api, but this more direct.
const Foam::fileName version(std::to_string(OPENFOAM));
// Fallback when WM_PROJECT_VERSION is unset
if (version.empty())
{
#if OPENFOAM
version.assign(std::to_string(OPENFOAM));
#else
version.assign(foamVersion::version);
#endif
}
Foam::fileNameList list; Foam::fileNameList list;
Foam::fileName dir, candidate; Foam::fileName dir, candidate;

View File

@ -26,8 +26,8 @@ Description
It is important that these are constructed in the appropriate order to It is important that these are constructed in the appropriate order to
avoid the use of unconstructed data in the global namespace. avoid the use of unconstructed data in the global namespace.
This file has the extension .Cver to trigger a Makefile rule that converts This file has a '.Cver' extension to trigger a Makefile rule to replace
'VERSION\_STRING' and 'BUILD\_STRING' into the appropriate strings. 'BUILD', 'VERSION' tags with the corresponding strings.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -48,14 +48,14 @@ const int Foam::foamVersion::api
// Value of PATCH generated by the build-script // Value of PATCH generated by the build-script
const std::string Foam::foamVersion::patch const std::string Foam::foamVersion::patch
( (
"" "@PATCH@"
); );
// Value of the BUILD generated by the build-script // Value of the BUILD generated by the build-script
const std::string Foam::foamVersion::build const std::string Foam::foamVersion::build
( (
"BUILD_STRING" "@BUILD@"
); );
@ -78,7 +78,7 @@ const std::string Foam::foamVersion::buildArch
// Only required for compatibility // Only required for compatibility
const std::string Foam::foamVersion::version const std::string Foam::foamVersion::version
( (
"VERSION_STRING" "@VERSION@"
); );

View File

@ -49,6 +49,7 @@ SourceFiles
#include "pointField.H" #include "pointField.H"
#include "symmTensor.H" #include "symmTensor.H"
// VTK includes
#include <vtkCellArray.h> #include <vtkCellArray.h>
#include <vtkFloatArray.h> #include <vtkFloatArray.h>
#include <vtkDoubleArray.h> #include <vtkDoubleArray.h>
@ -209,13 +210,36 @@ public:
//- Remapping for some OpenFOAM data types (eg, symmTensor) //- Remapping for some OpenFOAM data types (eg, symmTensor)
// \param data[in,out] The data to be remapped in-place
template<class Type> template<class Type>
inline static void remapTuple(float data[]) {} inline static void remapTuple(float data[]) {}
//- Remapping for some OpenFOAM data types (eg, symmTensor) //- Remapping for some OpenFOAM data types (eg, symmTensor)
// \param data[in,out] The data to be remapped in-place
template<class Type> template<class Type>
inline static void remapTuple(double data[]) {} inline static void remapTuple(double data[]) {}
//- Copy/transcribe OpenFOAM data types to VTK format
// This allows a change of data type (float vs double) as well as
// addressing any swapping issues (eg, symmTensor)
//
// \param output[out] The output scratch space. Must be long enough
// to hold the result.
// \param val[in] The input data to copy/transcribe
template<class Type>
inline static void foamToVtkTuple(float output[], const Type& val);
//- Copy/transcribe OpenFOAM data types to VTK format
// This allows a change of data type (float vs double) as well as
// addressing any swapping issues (eg, symmTensor)
//
// \param output[out] The output scratch space. Must be long enough
// to hold the result.
// \param val[in] The input data to copy/transcribe
template<class Type>
inline static void foamToVtkTuple(double output[], const Type& val);
// Field Conversion Functions // Field Conversion Functions
//- Copy list to pre-allocated vtk array. //- Copy list to pre-allocated vtk array.
@ -225,7 +249,7 @@ public:
( (
vtkFloatArray* array, vtkFloatArray* array,
const UList<Type>& input, const UList<Type>& input,
const label start = 0 vtkIdType start = 0 //!< The write offset into output array
); );
//- Create named field initialized to zero //- Create named field initialized to zero
@ -270,7 +294,6 @@ inline void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(double data[])
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace vtk } // End namespace vtk

View File

@ -87,4 +87,34 @@ inline vtkSmartPointer<vtkCellArray> Foam::vtk::Tools::identityVertices
}; };
template<class Type>
inline void Foam::vtk::Tools::foamToVtkTuple
(
float output[],
const Type& val
)
{
for (direction cmpt=0; cmpt < pTraits<Type>::nComponents; ++cmpt)
{
output[cmpt] = component(val, cmpt);
}
remapTuple<Type>(output);
}
template<class Type>
inline void Foam::vtk::Tools::foamToVtkTuple
(
double output[],
const Type& val
)
{
for (direction cmpt=0; cmpt < pTraits<Type>::nComponents; ++cmpt)
{
output[cmpt] = component(val, cmpt);
}
remapTuple<Type>(output);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -50,12 +50,11 @@ Foam::vtk::Tools::Patch::points(const PatchType& p)
auto vtkpoints = vtkSmartPointer<vtkPoints>::New(); auto vtkpoints = vtkSmartPointer<vtkPoints>::New();
vtkpoints->SetNumberOfPoints(pts.size()); vtkpoints->SetNumberOfPoints(pts.size());
vtkIdType pointId = 0;
vtkIdType pointId = 0;
for (const point& p : pts) for (const point& p : pts)
{ {
vtkpoints->SetPoint(pointId, p.v_); vtkpoints->SetPoint(pointId++, p.v_);
++pointId;
} }
return vtkpoints; return vtkpoints;
@ -127,8 +126,7 @@ Foam::vtk::Tools::Patch::faceNormals(const PatchType& p)
vtkIdType faceId = 0; vtkIdType faceId = 0;
for (const vector& n : norms) for (const vector& n : norms)
{ {
array->SetTuple(faceId, n.v_); array->SetTuple(faceId++, n.v_);
++faceId;
} }
return array; return array;
@ -145,7 +143,7 @@ Foam::label Foam::vtk::Tools::transcribeFloatData
( (
vtkFloatArray* array, vtkFloatArray* array,
const UList<Type>& input, const UList<Type>& input,
const label start vtkIdType start
) )
{ {
const int nComp(pTraits<Type>::nComponents); const int nComp(pTraits<Type>::nComponents);
@ -162,7 +160,7 @@ Foam::label Foam::vtk::Tools::transcribeFloatData
} }
const vtkIdType maxSize = array->GetNumberOfTuples(); const vtkIdType maxSize = array->GetNumberOfTuples();
const vtkIdType endPos = vtkIdType(start) + vtkIdType(input.size()); const vtkIdType endPos = start + vtkIdType(input.size());
if (!maxSize) if (!maxSize)
{ {
@ -174,7 +172,7 @@ Foam::label Foam::vtk::Tools::transcribeFloatData
WarningInFunction WarningInFunction
<< "vtk array '" << array->GetName() << "vtk array '" << array->GetName()
<< "' copy with out-of-range [0," << long(maxSize) << ")" << "' copy with out-of-range [0," << long(maxSize) << ")"
<< " starting at " << start << " starting at " << long(start)
<< nl; << nl;
return 0; return 0;
@ -185,23 +183,18 @@ Foam::label Foam::vtk::Tools::transcribeFloatData
<< "vtk array '" << array->GetName() << "vtk array '" << array->GetName()
<< "' copy ends out-of-range (" << long(maxSize) << ")" << "' copy ends out-of-range (" << long(maxSize) << ")"
<< " using sizing (start,size) = (" << " using sizing (start,size) = ("
<< start << "," << input.size() << ")" << long(start) << "," << input.size() << ")"
<< nl; << nl;
return 0; return 0;
} }
float scratch[nComp]; float scratch[pTraits<Type>::nComponents];
forAll(input, idx)
{
const Type& t = input[idx];
for (direction d=0; d<nComp; ++d)
{
scratch[d] = component(t, d);
}
remapTuple<Type>(scratch);
array->SetTuple(start+idx, scratch); for (const Type& val : input)
{
foamToVtkTuple(scratch, val);
array->SetTuple(start++, scratch);
} }
return input.size(); return input.size();
@ -219,7 +212,7 @@ Foam::vtk::Tools::zeroField
auto data = vtkSmartPointer<vtkFloatArray>::New(); auto data = vtkSmartPointer<vtkFloatArray>::New();
data->SetName(name.c_str()); data->SetName(name.c_str());
data->SetNumberOfComponents(int(pTraits<Type>::nComponents)); data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents));
data->SetNumberOfTuples(size); data->SetNumberOfTuples(size);
data->Fill(0); data->Fill(0);
@ -239,7 +232,7 @@ Foam::vtk::Tools::convertFieldToVTK
auto data = vtkSmartPointer<vtkFloatArray>::New(); auto data = vtkSmartPointer<vtkFloatArray>::New();
data->SetName(name.c_str()); data->SetName(name.c_str());
data->SetNumberOfComponents(int(pTraits<Type>::nComponents)); data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents));
data->SetNumberOfTuples(fld.size()); data->SetNumberOfTuples(fld.size());
transcribeFloatData(data, fld); transcribeFloatData(data, fld);

View File

@ -123,10 +123,7 @@ void Foam::vtk::internalWriter::writePoints()
} }
void Foam::vtk::internalWriter::writeCellsLegacy void Foam::vtk::internalWriter::writeCellsLegacy(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
const List<uint8_t>& cellTypes = vtuCells_.cellTypes(); const List<uint8_t>& cellTypes = vtuCells_.cellTypes();
const labelList& vertLabels = vtuCells_.vertLabels(); const labelList& vertLabels = vtuCells_.vertLabels();
@ -165,7 +162,7 @@ void Foam::vtk::internalWriter::writeCellsLegacy
vtk::vtuSizing::copyVertLabelsLegacy vtk::vtuSizing::copyVertLabelsLegacy
( (
vertLabels, vertLabels,
pointOffsets.localStart() pointOffset
) )
); );
} }
@ -206,10 +203,7 @@ void Foam::vtk::internalWriter::writeCellsLegacy
} }
void Foam::vtk::internalWriter::writeCellsConnectivity void Foam::vtk::internalWriter::writeCellsConnectivity(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
// //
// 'connectivity' // 'connectivity'
@ -239,7 +233,7 @@ void Foam::vtk::internalWriter::writeCellsConnectivity
vtk::vtuSizing::copyVertLabelsXml vtk::vtuSizing::copyVertLabelsXml
( (
vertLabels, vertLabels,
pointOffsets.localStart() pointOffset
) )
); );
} }
@ -263,12 +257,6 @@ void Foam::vtk::internalWriter::writeCellsConnectivity
const labelList& vertOffsets = vtuCells_.vertOffsets(); const labelList& vertOffsets = vtuCells_.vertOffsets();
label nOffs = vertOffsets.size(); label nOffs = vertOffsets.size();
// global connectivity offsets
const globalIndex procOffset
(
vertOffsets.empty() ? 0 : vertOffsets.last()
);
if (parallel_) if (parallel_)
{ {
reduce(nOffs, sumOp<label>()); reduce(nOffs, sumOp<label>());
@ -285,6 +273,12 @@ void Foam::vtk::internalWriter::writeCellsConnectivity
if (parallel_) if (parallel_)
{ {
// processor-local connectivity offsets
const globalIndex procOffset
(
vertOffsets.empty() ? 0 : vertOffsets.last()
);
vtk::writeListParallel(format_.ref(), vertOffsets, procOffset); vtk::writeListParallel(format_.ref(), vertOffsets, procOffset);
} }
else else
@ -347,10 +341,7 @@ void Foam::vtk::internalWriter::writeCellsConnectivity
} }
void Foam::vtk::internalWriter::writeCellsFaces void Foam::vtk::internalWriter::writeCellsFaces(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
label nFaceLabels = vtuCells_.faceLabels().size(); label nFaceLabels = vtuCells_.faceLabels().size();
@ -393,7 +384,7 @@ void Foam::vtk::internalWriter::writeCellsFaces
vtk::vtuSizing::copyFaceLabelsXml vtk::vtuSizing::copyFaceLabelsXml
( (
faceLabels, faceLabels,
pointOffsets.localStart() pointOffset
) )
); );
} }
@ -578,12 +569,15 @@ bool Foam::vtk::internalWriter::writeGeometry()
writePoints(); writePoints();
// With addPointCellLabels for the point offsets // Include addPointCellLabels for the point offsets
const globalIndex globalPointOffset(vtuCells_.nFieldPoints()); const label pointOffset =
(
parallel_ ? globalIndex(vtuCells_.nFieldPoints()).localStart() : 0
);
if (legacy()) if (legacy())
{ {
writeCellsLegacy(globalPointOffset); writeCellsLegacy(pointOffset);
return true; return true;
} }
@ -592,8 +586,8 @@ bool Foam::vtk::internalWriter::writeGeometry()
format().tag(vtk::fileTag::CELLS); format().tag(vtk::fileTag::CELLS);
} }
writeCellsConnectivity(globalPointOffset); writeCellsConnectivity(pointOffset);
writeCellsFaces(globalPointOffset); writeCellsFaces(pointOffset);
if (format_) if (format_)
{ {

View File

@ -58,7 +58,6 @@ namespace Foam
{ {
// Forward declarations // Forward declarations
class globalIndex;
class volPointInterpolation; class volPointInterpolation;
namespace vtk namespace vtk
@ -96,13 +95,16 @@ class internalWriter
void writePoints(); void writePoints();
//- Write cells (connectivity and type), legacy format //- 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 //- Write cells connectivity
void writeCellsConnectivity(const globalIndex& pointOffsets); // \param pointOffset processor-local point offset
void writeCellsConnectivity(const label pointOffset);
//- Write cells face streams //- Write cells face streams
void writeCellsFaces(const globalIndex& pointOffsets); // \param pointOffset processor-local point offset
void writeCellsFaces(const label pointOffset);
//- No copy construct //- No copy construct

View File

@ -171,10 +171,7 @@ void Foam::vtk::patchWriter::writePoints()
} }
void Foam::vtk::patchWriter::writePolysLegacy void Foam::vtk::patchWriter::writePolysLegacy(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
const polyBoundaryMesh& patches = mesh_.boundaryMesh(); const polyBoundaryMesh& patches = mesh_.boundaryMesh();
@ -207,7 +204,7 @@ void Foam::vtk::patchWriter::writePolysLegacy
auto iter = vertLabels.begin(); auto iter = vertLabels.begin();
label off = pointOffsets.localStart(); label off = pointOffset;
for (const label patchId : patchIDs_) for (const label patchId : patchIDs_)
{ {
@ -245,10 +242,7 @@ void Foam::vtk::patchWriter::writePolysLegacy
} }
void Foam::vtk::patchWriter::writePolys void Foam::vtk::patchWriter::writePolys(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
if (format_) if (format_)
{ {
@ -285,7 +279,7 @@ void Foam::vtk::patchWriter::writePolys
auto iter = vertLabels.begin(); auto iter = vertLabels.begin();
label off = pointOffsets.localStart(); label off = pointOffset;
for (const label patchId : patchIDs_) for (const label patchId : patchIDs_)
{ {
@ -328,9 +322,6 @@ void Foam::vtk::patchWriter::writePolys
labelList vertOffsets(nLocalFaces_); labelList vertOffsets(nLocalFaces_);
label nOffs = vertOffsets.size(); label nOffs = vertOffsets.size();
// global connectivity offsets
const globalIndex procOffset(nLocalVerts_);
if (parallel_) if (parallel_)
{ {
reduce(nOffs, sumOp<label>()); reduce(nOffs, sumOp<label>());
@ -346,7 +337,12 @@ void Foam::vtk::patchWriter::writePolys
} }
label off = procOffset.localStart(); // processor-local connectivity offsets
label off =
(
parallel_ ? globalIndex(nLocalVerts_).localStart() : 0
);
auto iter = vertOffsets.begin(); auto iter = vertOffsets.begin();
@ -517,15 +513,18 @@ bool Foam::vtk::patchWriter::writeGeometry()
writePoints(); writePoints();
const globalIndex globalPointOffset(nLocalPoints_); const label pointOffset =
(
parallel_ ? globalIndex(nLocalPoints_).localStart() : 0
);
if (legacy()) if (legacy())
{ {
writePolysLegacy(globalPointOffset); writePolysLegacy(pointOffset);
} }
else else
{ {
writePolys(globalPointOffset); writePolys(pointOffset);
} }
return true; return true;

View File

@ -55,10 +55,6 @@ SourceFiles
namespace Foam namespace Foam
{ {
// Forward declarations
class globalIndex;
namespace vtk namespace vtk
{ {
@ -107,10 +103,12 @@ class patchWriter
void writePoints(); void writePoints();
//- Write patch faces, legacy format //- Write patch faces, legacy format
void writePolysLegacy(const globalIndex& pointOffsets); // \param pointOffset processor-local point offset
void writePolysLegacy(const label pointOffset);
//- Write patch faces //- Write patch faces
void writePolys(const globalIndex& pointOffsets); // \param pointOffset processor-local point offset
void writePolys(const label pointOffset);
//- No copy construct //- No copy construct

View File

@ -24,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "foamVtkFileWriter.H" #include "foamVtkFileWriter.H"
#include "globalIndex.H"
#include "OSspecific.H" #include "OSspecific.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -286,7 +286,6 @@ Foam::faAreaMapper::faAreaMapper
: :
mesh_(mesh), mesh_(mesh),
mpm_(mpm), mpm_(mpm),
insertedFaces_(false),
direct_(false), direct_(false),
hasUnmapped_(false), hasUnmapped_(false),
sizeBeforeMapping_(mesh.nFaces()), sizeBeforeMapping_(mesh.nFaces()),

View File

@ -68,9 +68,6 @@ class faAreaMapper
//- Reference to mapPolyMesh //- Reference to mapPolyMesh
const mapPolyMesh& mpm_; const mapPolyMesh& mpm_;
//- Are there any inserted (unmapped) faces
bool insertedFaces_;
//- Is the mapping direct //- Is the mapping direct
bool direct_; bool direct_;

View File

@ -65,7 +65,7 @@ Foam::faEdgeMapper::faEdgeMapper
) )
: :
mesh_(mesh), mesh_(mesh),
mpm_(mpm), // mpm_(mpm),
sizeBeforeMapping_(mesh.nInternalEdges()), sizeBeforeMapping_(mesh.nInternalEdges()),
hasUnmapped_(false), hasUnmapped_(false),
directAddrPtr_(nullptr) directAddrPtr_(nullptr)

View File

@ -67,7 +67,7 @@ class faEdgeMapper
const faMesh& mesh_; const faMesh& mesh_;
//- Reference to mapPolyMesh //- Reference to mapPolyMesh
const mapPolyMesh& mpm_; //const mapPolyMesh& mpm_;
//- Old mesh size //- Old mesh size
label sizeBeforeMapping_; label sizeBeforeMapping_;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -25,6 +25,7 @@ License
#include "volRegion.H" #include "volRegion.H"
#include "volMesh.H" #include "volMesh.H"
#include "cellSet.H"
#include "globalMeshData.H" #include "globalMeshData.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -44,8 +45,9 @@ const Foam::Enum
> >
Foam::functionObjects::volRegion::regionTypeNames_ Foam::functionObjects::volRegion::regionTypeNames_
({ ({
{ regionTypes::vrtCellZone, "cellZone" },
{ regionTypes::vrtAll, "all" }, { regionTypes::vrtAll, "all" },
{ regionTypes::vrtCellSet, "cellSet" },
{ regionTypes::vrtCellZone, "cellZone" },
}); });
@ -73,7 +75,7 @@ Foam::functionObjects::volRegion::volRegion
const dictionary& dict const dictionary& dict
) )
: :
mesh_(mesh), volMesh_(mesh),
regionType_ regionType_
( (
regionTypeNames_.lookupOrDefault regionTypeNames_.lookupOrDefault
@ -83,7 +85,7 @@ Foam::functionObjects::volRegion::volRegion
regionTypes::vrtAll regionTypes::vrtAll
) )
), ),
regionName_(polyMesh::defaultRegion), regionName_(volMesh_.name()),
regionID_(-1) regionID_(-1)
{ {
read(dict); read(dict);
@ -94,12 +96,6 @@ Foam::functionObjects::volRegion::volRegion
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjects::volRegion::~volRegion()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::functionObjects::volRegion::read bool Foam::functionObjects::volRegion::read
@ -107,19 +103,41 @@ bool Foam::functionObjects::volRegion::read
const dictionary& dict const dictionary& dict
) )
{ {
regionID_ = -1;
cellIds_.clear();
switch (regionType_) 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: case vrtCellZone:
{ {
dict.readEntry("name", regionName_); dict.readEntry("name", regionName_);
regionID_ = mesh_.cellZones().findZoneID(regionName_); regionID_ = volMesh_.cellZones().findZoneID(regionName_);
if (regionID_ < 0) if (regionID_ < 0)
{ {
FatalIOErrorInFunction(dict) FatalIOErrorInFunction(dict)
<< "Unknown cell zone name: " << regionName_ << "Unknown cell zone name: " << regionName_
<< ". Valid cell zones are: " << mesh_.cellZones().names() << ". Valid cell zones : "
<< flatOutput(volMesh_.cellZones().names())
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -137,6 +155,7 @@ bool Foam::functionObjects::volRegion::read
case vrtAll: case vrtAll:
{ {
regionName_= volMesh_.name();
break; break;
} }
@ -144,7 +163,7 @@ bool Foam::functionObjects::volRegion::read
{ {
FatalIOErrorInFunction(dict) FatalIOErrorInFunction(dict)
<< "Unknown region type. Valid region types are:" << "Unknown region type. Valid region types are:"
<< regionTypeNames_.sortedToc() << flatOutput(regionTypeNames_.names()) << nl
<< exit(FatalIOError); << exit(FatalIOError);
} }
} }
@ -155,14 +174,21 @@ bool Foam::functionObjects::volRegion::read
const Foam::labelList& Foam::functionObjects::volRegion::cellIDs() const const Foam::labelList& Foam::functionObjects::volRegion::cellIDs() const
{ {
if (regionType_ == vrtAll) switch (regionType_)
{ {
return labelList::null(); case vrtCellSet:
} return cellIds_;
else break;
{
return mesh_.cellZones()[regionID_]; 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) if (regionType_ == vrtAll)
{ {
return mesh_.globalData().nTotalCells(); return volMesh_.globalData().nTotalCells();
} }
else else
{ {
@ -183,11 +209,17 @@ Foam::scalar Foam::functionObjects::volRegion::V() const
{ {
if (regionType_ == vrtAll) if (regionType_ == vrtAll)
{ {
return gSum(mesh_.V()); return gSum(volMesh_.V());
} }
else else
{ {
return gSum(scalarField(mesh_.V(), cellIDs())); scalar vol = 0;
for (const label celli : cellIDs())
{
vol += volMesh_.V()[celli];
}
return returnReduce(vol, sumOp<scalar>());
} }
} }

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -54,9 +54,9 @@ Description
Usage Usage
\table \table
Property | Description | Required | Default value Property | Description | Required | Default
regionType | cellZone or all | no | all regionType | Selection type: all/cellSet/cellZone | no | all
name | Name of cellZone if required | no | name | Name of cellSet/cellZone if required | no |
\endtable \endtable
See also See also
@ -78,7 +78,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
// Forward declaration of classes // Forward declarations
class fvMesh; class fvMesh;
namespace functionObjects namespace functionObjects
@ -90,12 +90,16 @@ namespace functionObjects
class volRegion 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 // Cache integral properties of the region for writeFileHeader
label nCells_; label nCells_;
scalar V_; scalar V_;
@ -106,8 +110,9 @@ public:
//- Region type enumeration //- Region type enumeration
enum regionTypes enum regionTypes
{ {
vrtCellZone, //!< cell zone vrtAll, //!< All cells
vrtAll //!< all cells vrtCellSet, //!< A cellSet
vrtCellZone //!< A cellZone
}; };
//- Region type names //- Region type names
@ -116,15 +121,15 @@ public:
protected: protected:
// Protected data // Protected Data
//- Region type //- Region type
regionTypes regionType_; regionTypes regionType_;
//- Region name (patch, zone, etc.) //- Region name (cellSet, cellZone, ...)
word regionName_; word regionName_;
//- Region ID (patch ID, zone ID, etc.) //- Region ID (zone ID, ...)
label regionID_; label regionID_;
@ -147,13 +152,13 @@ public:
//- Destructor //- Destructor
virtual ~volRegion(); virtual ~volRegion() = default;
// Public Member Functions // Public Member Functions
//- Read from dictionary //- Read from dictionary
bool read(const dictionary&); bool read(const dictionary& dict);
//- Return the region type //- Return the region type
inline const regionTypes& regionType() const; inline const regionTypes& regionType() const;
@ -161,7 +166,7 @@ public:
//- Return the local list of cell IDs //- Return the local list of cell IDs
const labelList& cellIDs() const; const labelList& cellIDs() const;
//- Return the number of cells in the region //- Return the number of cells selected in the region
label nCells() const; label nCells() const;
//- Return total volume of the region //- Return total volume of the region

View File

@ -968,15 +968,11 @@ void Foam::isoAdvection::writeIsoFaces
if (!writeIsoFacesToFile_ || !mesh_.time().writeTime()) return; if (!writeIsoFacesToFile_ || !mesh_.time().writeTime()) return;
// Writing isofaces to obj file for inspection, e.g. in paraview // Writing isofaces to obj file for inspection, e.g. in paraview
const fileName dirName const fileName outputFile
( (
Pstream::parRun() ? mesh_.time().globalPath()
mesh_.time().path()/".."/"isoFaces" / "isoFaces"
: mesh_.time().path()/"isoFaces" / word::printf("isoFaces_%012d.obj", mesh_.time().timeIndex())
);
const word fName
(
word::printf("isoFaces_%012d", mesh_.time().timeIndex())
); );
if (Pstream::parRun()) if (Pstream::parRun())
@ -988,8 +984,8 @@ void Foam::isoAdvection::writeIsoFaces
if (Pstream::master()) if (Pstream::master())
{ {
mkDir(dirName); mkDir(outputFile.path());
OBJstream os(dirName/fName + ".obj"); OBJstream os(outputFile);
Info<< nl << "isoAdvection: writing iso faces to file: " Info<< nl << "isoAdvection: writing iso faces to file: "
<< os.name() << nl << endl; << os.name() << nl << endl;
@ -1015,8 +1011,8 @@ void Foam::isoAdvection::writeIsoFaces
} }
else else
{ {
mkDir(dirName); mkDir(outputFile.path());
OBJstream os(dirName/fName + ".obj"); OBJstream os(outputFile);
Info<< nl << "isoAdvection: writing iso faces to file: " Info<< nl << "isoAdvection: writing iso faces to file: "
<< os.name() << nl << endl; << os.name() << nl << endl;

View File

@ -59,6 +59,7 @@ flowType/flowType.C
CourantNo/CourantNo.C CourantNo/CourantNo.C
PecletNo/PecletNo.C PecletNo/PecletNo.C
blendingFactor/blendingFactor.C blendingFactor/blendingFactor.C
momentum/momentum.C
pressure/pressure.C pressure/pressure.C
MachNo/MachNo.C MachNo/MachNo.C
Curle/Curle.C Curle/Curle.C

View File

@ -54,26 +54,6 @@ namespace functionObjects
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * 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() void Foam::functionObjects::extractEulerianParticles::checkFaceZone()
{ {
DebugInFunction << endl; DebugInFunction << endl;

View File

@ -184,9 +184,6 @@ protected:
// Protected Member Functions // Protected Member Functions
//- Return the base directory for dictionary output
virtual fileName dictBaseFileDir() const;
//- Check that the faceZone is valid //- Check that the faceZone is valid
virtual void checkFaceZone(); virtual void checkFaceZone();

View File

@ -0,0 +1,573 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "momentum.H"
#include "fvMesh.H"
#include "volFields.H"
#include "cellSet.H"
#include "cylindricalRotation.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
defineTypeNameAndDebug(momentum, 0);
addToRunTimeSelectionTable(functionObject, momentum, dictionary);
}
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
template<class GeoField>
Foam::autoPtr<GeoField>
Foam::functionObjects::momentum::newField
(
const word& baseName,
const dimensionSet& dims,
bool registerObject
) const
{
return
autoPtr<GeoField>::New
(
IOobject
(
scopedName(baseName),
time_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
registerObject
),
mesh_,
dimensioned<typename GeoField::value_type>(dims, Zero)
);
}
void Foam::functionObjects::momentum::calc()
{
initialise();
// When field writing is not enabled we need our local storage
// for the momentum and angular velocity fields
autoPtr<volVectorField> tmomentum, tAngularMom, tAngularVel;
// The base fields required
const auto& U = lookupObject<volVectorField>(UName_);
const auto* rhoPtr = findObject<volScalarField>(rhoName_);
const dimensionedScalar rhoRef("rho", dimDensity, rhoRef_);
// For quantities such as the mass-averaged angular velocity,
// we would calculate the mass per-cell here.
// tmp<volScalarField::Internal> tmass =
// (
// rhoPtr
// ? (mesh_.V() * (*rhoPtr))
// : (mesh_.V() * rhoRef)
// );
// Linear momentum
// ~~~~~~~~~~~~~~~
auto* pmomentum = getObjectPtr<volVectorField>(scopedName("momentum"));
if (!pmomentum)
{
tmomentum = newField<volVectorField>("momentum", dimVelocity*dimMass);
pmomentum = tmomentum.get(); // get(), not release()
}
auto& momentum = *pmomentum;
if (rhoPtr)
{
momentum.ref() = (U * mesh_.V() * (*rhoPtr));
}
else
{
momentum.ref() = (U * mesh_.V() * rhoRef);
}
momentum.correctBoundaryConditions();
// Angular momentum
// ~~~~~~~~~~~~~~~~
auto* pAngularMom =
getObjectPtr<volVectorField>(scopedName("angularMomentum"));
if (hasCsys_ && !pAngularMom)
{
tAngularMom =
newField<volVectorField>("angularMomentum", dimVelocity*dimMass);
pAngularMom = tAngularMom.get(); // get(), not release()
}
else if (!pAngularMom)
{
// Angular momentum not requested, but alias to normal momentum
// to simplify logic when calculating the summations
pAngularMom = pmomentum;
}
auto& angularMom = *pAngularMom;
// Angular velocity
// ~~~~~~~~~~~~~~~~
auto* pAngularVel =
getObjectPtr<volVectorField>(scopedName("angularVelocity"));
if (hasCsys_)
{
if (!pAngularVel)
{
tAngularVel =
newField<volVectorField>("angularVelocity", dimVelocity);
pAngularVel = tAngularVel.get(); // get(), not release()
}
auto& angularVel = *pAngularVel;
// Global to local
angularVel.primitiveFieldRef() =
csys_.invTransform(mesh_.cellCentres(), U.internalField());
angularVel.correctBoundaryConditions();
if (rhoPtr)
{
angularMom.ref() = (angularVel * mesh_.V() * (*rhoPtr));
}
else
{
angularMom.ref() = (angularVel * mesh_.V() * rhoRef);
}
angularMom.correctBoundaryConditions();
}
// Integrate the selection
sumMomentum_ = Zero;
sumAngularMom_ = Zero;
switch (regionType_)
{
case vrtCellSet:
case vrtCellZone:
{
for (const label celli : cellIDs())
{
sumMomentum_ += momentum[celli];
sumAngularMom_ += angularMom[celli];
}
break;
}
case vrtAll:
{
for (label celli=0; celli < mesh_.nCells(); ++celli)
{
sumMomentum_ += momentum[celli];
sumAngularMom_ += angularMom[celli];
}
break;
}
}
reduce(sumMomentum_, sumOp<vector>());
reduce(sumAngularMom_, sumOp<vector>());
}
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::functionObjects::momentum::writeFileHeader(Ostream& os)
{
if (!writeToFile() || writtenHeader_)
{
return;
}
if (hasCsys_)
{
writeHeader(os, "Momentum, Angular Momentum");
writeHeaderValue(os, "origin", csys_.origin());
writeHeaderValue(os, "axis", csys_.e3());
}
else
{
writeHeader(os, "Momentum");
}
if (regionType_ != vrtAll)
{
writeHeader
(
os,
"Selection " + regionTypeNames_[regionType_]
+ " = " + regionName_
);
}
writeHeader(os, "");
writeCommented(os, "Time");
writeTabbed(os, "(momentum_x momentum_y momentum_z)");
if (hasCsys_)
{
writeTabbed(os, "(momentum_r momentum_rtheta momentum_axis)");
}
os << endl;
writtenHeader_ = true;
}
void Foam::functionObjects::momentum::initialise()
{
if (initialised_)
{
return;
}
if (!foundObject<volVectorField>(UName_))
{
FatalErrorInFunction
<< "Could not find U: " << UName_ << " in database"
<< exit(FatalError);
}
const auto* pPtr = cfindObject<volScalarField>(pName_);
if (pPtr && pPtr->dimensions() == dimPressure)
{
// Compressible - rho is mandatory
if (!foundObject<volScalarField>(rhoName_))
{
FatalErrorInFunction
<< "Could not find rho:" << rhoName_
<< exit(FatalError);
}
}
initialised_ = true;
}
void Foam::functionObjects::momentum::writeValues(Ostream& os)
{
Log << type() << " " << name() << " write:" << nl;
Log << " Sum of Momentum";
if (regionType_ != vrtAll)
{
Log << ' ' << regionTypeNames_[regionType_]
<< ' ' << regionName_;
}
Log << nl
<< " linear : " << sumMomentum_ << nl;
if (hasCsys_)
{
Log << " angular : " << sumAngularMom_ << nl;
}
if (writeToFile())
{
writeTime(os);
os << tab << sumMomentum_;
if (hasCsys_)
{
os << tab << sumAngularMom_;
}
os << endl;
}
Log << endl;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObjects::momentum::momentum
(
const word& name,
const Time& runTime,
const dictionary& dict,
bool readFields
)
:
fvMeshFunctionObject(name, runTime, dict),
volRegion(fvMeshFunctionObject::mesh_, dict),
writeFile(mesh_, name, typeName, dict),
sumMomentum_(Zero),
sumAngularMom_(Zero),
UName_(),
pName_(),
rhoName_(),
rhoRef_(1.0),
csys_(),
hasCsys_(false),
writeMomentum_(false),
writeVelocity_(false),
writePosition_(false),
initialised_(false)
{
if (readFields)
{
read(dict);
Log << endl;
}
}
Foam::functionObjects::momentum::momentum
(
const word& name,
const objectRegistry& obr,
const dictionary& dict,
bool readFields
)
:
fvMeshFunctionObject(name, obr, dict),
volRegion(fvMeshFunctionObject::mesh_, dict),
writeFile(mesh_, name, typeName, dict),
sumMomentum_(Zero),
sumAngularMom_(Zero),
UName_(),
pName_(),
rhoName_(),
rhoRef_(1.0),
csys_(),
hasCsys_(false),
writeMomentum_(false),
writeVelocity_(false),
writePosition_(false),
initialised_(false)
{
if (readFields)
{
read(dict);
Log << endl;
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::functionObjects::momentum::read(const dictionary& dict)
{
fvMeshFunctionObject::read(dict);
volRegion::read(dict);
writeFile::read(dict);
initialised_ = false;
Info<< type() << " " << name() << ":" << nl;
// Optional entries U and p
UName_ = dict.lookupOrDefault<word>("U", "U");
pName_ = dict.lookupOrDefault<word>("p", "p");
rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1.0);
rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1.0);
hasCsys_ = dict.lookupOrDefault("cylindrical", false);
if (hasCsys_)
{
csys_ = coordSystem::cylindrical(dict);
}
writeMomentum_ = dict.lookupOrDefault("writeMomentum", false);
writeVelocity_ = dict.lookupOrDefault("writeVelocity", false);
writePosition_ = dict.lookupOrDefault("writePosition", false);
Info<<"Integrating for selection: "
<< regionTypeNames_[regionType_]
<< " (" << regionName_ << ")" << nl;
if (writeMomentum_)
{
Info<< " Momentum fields will be written" << endl;
mesh_.objectRegistry::store
(
newField<volVectorField>("momentum", dimVelocity*dimMass)
);
if (hasCsys_)
{
mesh_.objectRegistry::store
(
newField<volVectorField>("angularMomentum", dimVelocity*dimMass)
);
}
}
if (hasCsys_)
{
if (writeVelocity_)
{
Info<< " Angular velocity will be written" << endl;
mesh_.objectRegistry::store
(
newField<volVectorField>("angularVelocity", dimVelocity)
);
}
if (writePosition_)
{
Info<< " Angular position will be written" << endl;
}
}
return true;
}
bool Foam::functionObjects::momentum::execute()
{
calc();
if (Pstream::master())
{
writeFileHeader(file());
writeValues(file());
Log << endl;
}
// Write state/results information
setResult("momentum_x", sumMomentum_[0]);
setResult("momentum_y", sumMomentum_[1]);
setResult("momentum_z", sumMomentum_[2]);
setResult("momentum_r", sumAngularMom_[0]);
setResult("momentum_rtheta", sumAngularMom_[1]);
setResult("momentum_axis", sumAngularMom_[2]);
return true;
}
bool Foam::functionObjects::momentum::write()
{
if (writeMomentum_ || (hasCsys_ && (writeVelocity_ || writePosition_)))
{
Log <<"Writing fields" << nl;
const volVectorField* fieldPtr;
fieldPtr = findObject<volVectorField>(scopedName("momentum"));
if (fieldPtr) fieldPtr->write();
fieldPtr = findObject<volVectorField>(scopedName("angularMomentum"));
if (fieldPtr) fieldPtr->write();
fieldPtr = findObject<volVectorField>(scopedName("angularVelocity"));
if (fieldPtr) fieldPtr->write();
if (hasCsys_ && writePosition_)
{
// Clunky, but currently no simple means of handling
// component-wise conversion and output
auto cyl_r = newField<volScalarField>("cyl_r", dimLength);
auto cyl_t = newField<volScalarField>("cyl_theta", dimless);
auto cyl_z = newField<volScalarField>("cyl_z", dimLength);
// Internal
{
const auto& pts = mesh_.cellCentres();
const label len = pts.size();
UList<scalar>& r = cyl_r->primitiveFieldRef(false);
UList<scalar>& t = cyl_t->primitiveFieldRef(false);
UList<scalar>& z = cyl_z->primitiveFieldRef(false);
for (label i=0; i < len; ++i)
{
point p(csys_.localPosition(pts[i]));
r[i] = p.x();
t[i] = p.y();
z[i] = p.z();
}
}
// Boundary
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
forAll(pbm, patchi)
{
const auto& pts = pbm[patchi].faceCentres();
const label len = pts.size();
UList<scalar>& r = cyl_r->boundaryFieldRef(false)[patchi];
UList<scalar>& t = cyl_t->boundaryFieldRef(false)[patchi];
UList<scalar>& z = cyl_z->boundaryFieldRef(false)[patchi];
for (label i=0; i < len; ++i)
{
point p(csys_.localPosition(pts[i]));
r[i] = p.x();
t[i] = p.y();
z[i] = p.z();
}
}
cyl_r->write();
cyl_t->write();
cyl_z->write();
}
}
return true;
}
// ************************************************************************* //

View File

@ -0,0 +1,266 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::functionObjects::momentum
Group
grpFieldFunctionObjects
Description
Calculates linear/angular momentum, reporting integral values
and optionally writing the fields.
Data is written into momentum.dat in the
postProcessing/\<functionObjectName\> directory.
Usage
Example of function object specification:
\verbatim
momentum1
{
type momentum;
libs ("libfieldFunctionObjects.so");
...
log yes;
regionType all;
writeMomentum yes;
writePosition yes;
writeVelocity yes;
cylindrical true;
origin (0 0 0);
e1 (1 0 0);
e3 (0 0 1);
}
\endverbatim
Where the entries comprise:
\table
Property | Description | Required | Default
type | Type name: momentum | yes |
log | Log information to standard output | no | no
writeMomentum | Write (linear, angular) momentum fields | no | no
writePosition | Write angular position component fields | no | no
writeVelocity | Write angular velocity fields | no | no
p | Pressure field name | no | p
U | Velocity field name | no | U
rho | Density field name | no | rho
rhoRef | Reference density (incompressible) | no | 1.0
cylindrical | Use cylindrical coordinates | no | false
origin | Origin for cylindrical coordinates | no |
regionType | Selection type: all/cellSet/cellZone | no | all
name | Name of cellSet/cellZone if required | no |
\endtable
Note
- For incompressible cases, the value of \c rhoRef is used.
- When specifying the cylindrical coordinate system, the rotation
can be specified directly with e1/e2/e3 axes, or via a \c rotation
sub-dictionary
For example,
\verbatim
origin (0 0 0);
rotation
{
type cylindrical;
axis (0 0 1);
}
\endverbatim
See also
Foam::functionObject
Foam::functionObjects::fvMeshFunctionObject
Foam::functionObjects::volRegion
Foam::functionObjects::writeFile
Foam::functionObjects::timeControl
SourceFiles
momentum.C
\*---------------------------------------------------------------------------*/
#ifndef functionObjects_momentum_H
#define functionObjects_momentum_H
#include "fvMeshFunctionObject.H"
#include "writeFile.H"
#include "cylindricalCS.H"
#include "volFieldsFwd.H"
#include "volRegion.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declarations
class dimensionSet;
namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class momentum Declaration
\*---------------------------------------------------------------------------*/
class momentum
:
public fvMeshFunctionObject,
public volRegion,
public writeFile
{
// Private Member Functions
//- Calculate the fields and integral values
void calc();
//- Allocate a new zero geometric field
template<class GeoField>
autoPtr<GeoField> newField
(
const word& baseName,
const dimensionSet& dims,
bool registerObject=true
) const;
protected:
// Protected data
//- Integral (linear) momentum
vector sumMomentum_;
//- Integral angular momentum
vector sumAngularMom_;
// Read from dictionary
//- The velocity field name (optional)
word UName_;
//- The pressure field name (optional)
// Only used to determine incompressible/compressible
word pName_;
//- The density field name (optional)
word rhoName_;
//- Reference density (for incompressible)
scalar rhoRef_;
//- Coordinate system for evaluating angular momentum
coordSystem::cylindrical csys_;
//- Are we using the cylindrical coordinate system?
bool hasCsys_;
//- Write fields flag
bool writeMomentum_;
//- Write fields flag
bool writeVelocity_;
//- Write fields flag
bool writePosition_;
//- Initialised flag
bool initialised_;
// Protected Member Functions
//- Initialise the fields
void initialise();
//- Output file header information
virtual void writeFileHeader(Ostream& os);
//- Write momentum data
void writeValues(Ostream& os);
//- No copy construct
momentum(const momentum&) = delete;
//- No copy assignment
void operator=(const momentum&) = delete;
public:
//- Runtime type information
TypeName("momentum");
// Constructors
//- Construct from Time and dictionary
momentum
(
const word& name,
const Time& runTime,
const dictionary& dict,
const bool readFields = true
);
//- Construct from objectRegistry and dictionary
momentum
(
const word& name,
const objectRegistry& obr,
const dictionary& dict,
const bool readFields = true
);
//- Destructor
virtual ~momentum() = default;
// Member Functions
//- Read the momentum data
virtual bool read(const dictionary&);
//- Calculate and report the integral momentum
virtual bool execute();
//- Write the momentum, possibly angular momentum and velocity
virtual bool write();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -646,9 +646,7 @@ bool Foam::functionObjects::streamLineBase::writeToFile()
fileName vtkPath fileName vtkPath
( (
Pstream::parRun() time_.globalPath()/functionObject::outputPrefix/"sets"/name()
? time_.path()/".."/functionObject::outputPrefix/"sets"/name()
: time_.path()/functionObject::outputPrefix/"sets"/name()
); );
if (mesh_.name() != fvMesh::defaultRegion) if (mesh_.name() != fvMesh::defaultRegion)
{ {

View File

@ -14,6 +14,7 @@ else()
endif() endif()
include_directories( include_directories(
${LIB_SRC}/OpenFOAM/include
${LIB_SRC}/OpenFOAM/lnInclude ${LIB_SRC}/OpenFOAM/lnInclude
${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude ${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude
${LIB_SRC}/finiteVolume/lnInclude ${LIB_SRC}/finiteVolume/lnInclude

View File

@ -389,16 +389,12 @@ void Foam::functionObjects::runTimePostPro::scene::saveImage
const Time& runTime = obr_.time(); const Time& runTime = obr_.time();
const fileName relPath const fileName prefix
( (
functionObject::outputPrefix/name_/obr_.time().timeName() runTime.globalPath()
); / functionObject::outputPrefix
/ name_
fileName prefix / runTime.timeName()
(
Pstream::parRun() ?
runTime.path()/".."/relPath
: runTime.path()/relPath
); );
mkDir(prefix); mkDir(prefix);

View File

@ -127,6 +127,7 @@ bool Foam::functionObjects::systemCall::read(const dictionary& dict)
<< " allowSystemOperations 1" << nl << nl << " allowSystemOperations 1" << nl << nl
<< "to the InfoSwitches setting in the system controlDict." << nl << "to the InfoSwitches setting in the system controlDict." << nl
<< "The system controlDict is any of" << nl << nl << "The system controlDict is any of" << nl << nl
<< " ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl
<< " ~/.OpenFOAM/controlDict" << nl << " ~/.OpenFOAM/controlDict" << nl
<< " $WM_PROJECT_DIR/etc/controlDict" << nl << endl << " $WM_PROJECT_DIR/etc/controlDict" << nl << endl
<< exit(FatalError); << exit(FatalError);

View File

@ -55,28 +55,21 @@ Foam::CloudFunctionObject<CloudType>::CloudFunctionObject
) )
: :
CloudSubModelBase<CloudType>(modelName, owner, dict, typeName, objectType), CloudSubModelBase<CloudType>(modelName, owner, dict, typeName, objectType),
outputDir_(owner.mesh().time().path()) outputDir_()
{ {
const fileName relPath // Put in undecomposed case
// (Note: gives problems for distributed data running)
outputDir_ =
( (
functionObject::outputPrefix owner.mesh().time().globalPath()
/cloud::prefix / functionObject::outputPrefix
/owner.name() / cloud::prefix
/this->modelName() / owner.name()
/ this->modelName()
); );
outputDir_.clean(); // Remove unneeded ".."
if (Pstream::parRun())
{
// Put in undecomposed case (Note: gives problems for
// distributed data running)
outputDir_ = outputDir_/".."/relPath;
}
else
{
outputDir_ = outputDir_/relPath;
}
outputDir_.clean();
} }

View File

@ -2285,8 +2285,7 @@ Foam::label Foam::meshRefinement::findRegions
if (Pstream::master()) if (Pstream::master())
{ {
outputDir = outputDir =
mesh.time().path() mesh.time().globalPath()
/ (Pstream::parRun() ? ".." : "")
/ functionObject::outputPrefix / functionObject::outputPrefix
/ mesh.pointsInstance(); / mesh.pointsInstance();
outputDir.clean(); outputDir.clean();

View File

@ -148,10 +148,7 @@ void Foam::vtk::indirectPatchWriter::writePoints()
} }
void Foam::vtk::indirectPatchWriter::writePolysLegacy void Foam::vtk::indirectPatchWriter::writePolysLegacy(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
// Connectivity count without additional storage (done internally) // Connectivity count without additional storage (done internally)
@ -182,7 +179,7 @@ void Foam::vtk::indirectPatchWriter::writePolysLegacy
auto iter = vertLabels.begin(); auto iter = vertLabels.begin();
label off = pointOffsets.localStart(); label off = pointOffset;
{ {
for (const face& f : pp_.localFaces()) for (const face& f : pp_.localFaces())
@ -217,10 +214,7 @@ void Foam::vtk::indirectPatchWriter::writePolysLegacy
} }
void Foam::vtk::indirectPatchWriter::writePolys void Foam::vtk::indirectPatchWriter::writePolys(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
if (format_) if (format_)
{ {
@ -254,7 +248,7 @@ void Foam::vtk::indirectPatchWriter::writePolys
auto iter = vertLabels.begin(); auto iter = vertLabels.begin();
label off = pointOffsets.localStart(); label off = pointOffset;
{ {
for (const face& f : pp_.localFaces()) for (const face& f : pp_.localFaces())
@ -294,9 +288,6 @@ void Foam::vtk::indirectPatchWriter::writePolys
labelList vertOffsets(nLocalFaces_); labelList vertOffsets(nLocalFaces_);
label nOffs = vertOffsets.size(); label nOffs = vertOffsets.size();
// global connectivity offsets
const globalIndex procOffset(nLocalVerts_);
if (parallel_) if (parallel_)
{ {
reduce(nOffs, sumOp<label>()); reduce(nOffs, sumOp<label>());
@ -311,7 +302,11 @@ void Foam::vtk::indirectPatchWriter::writePolys
} }
label off = procOffset.localStart(); // processor-local connectivity offsets
label off =
(
parallel_ ? globalIndex(nLocalVerts_).localStart() : 0
);
auto iter = vertOffsets.begin(); auto iter = vertOffsets.begin();
@ -419,15 +414,18 @@ bool Foam::vtk::indirectPatchWriter::writeGeometry()
writePoints(); writePoints();
const globalIndex globalPointOffset(nLocalPoints_); const label pointOffset =
(
parallel_ ? globalIndex(nLocalPoints_).localStart() : 0
);
if (legacy()) if (legacy())
{ {
writePolysLegacy(globalPointOffset); writePolysLegacy(pointOffset);
} }
else else
{ {
writePolys(globalPointOffset); writePolys(pointOffset);
} }
return true; return true;

View File

@ -54,10 +54,6 @@ SourceFiles
namespace Foam namespace Foam
{ {
// Forward declarations
class globalIndex;
namespace vtk namespace vtk
{ {
@ -100,10 +96,12 @@ class indirectPatchWriter
void writePoints(); void writePoints();
//- Write patch faces, legacy format //- Write patch faces, legacy format
void writePolysLegacy(const globalIndex& pointOffsets); // \param pointOffset processor-local point offset
void writePolysLegacy(const label pointOffset);
//- Write patch faces //- Write patch faces
void writePolys(const globalIndex& pointOffsets); // \param pointOffset processor-local point offset
void writePolys(const label pointOffset);
//- No copy construct //- No copy construct

View File

@ -148,10 +148,7 @@ void Foam::vtk::surfaceWriter::writePoints()
} }
void Foam::vtk::surfaceWriter::writePolysLegacy void Foam::vtk::surfaceWriter::writePolysLegacy(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
// Connectivity count without additional storage (done internally) // Connectivity count without additional storage (done internally)
@ -182,7 +179,7 @@ void Foam::vtk::surfaceWriter::writePolysLegacy
auto iter = vertLabels.begin(); auto iter = vertLabels.begin();
label off = pointOffsets.localStart(); label off = pointOffset;
{ {
for (const face& f : faces_) for (const face& f : faces_)
@ -217,10 +214,7 @@ void Foam::vtk::surfaceWriter::writePolysLegacy
} }
void Foam::vtk::surfaceWriter::writePolys void Foam::vtk::surfaceWriter::writePolys(const label pointOffset)
(
const globalIndex& pointOffsets
)
{ {
if (format_) if (format_)
{ {
@ -254,7 +248,7 @@ void Foam::vtk::surfaceWriter::writePolys
auto iter = vertLabels.begin(); auto iter = vertLabels.begin();
label off = pointOffsets.localStart(); label off = pointOffset;
{ {
for (const face& f : faces_) for (const face& f : faces_)
@ -294,9 +288,6 @@ void Foam::vtk::surfaceWriter::writePolys
labelList vertOffsets(nLocalFaces_); labelList vertOffsets(nLocalFaces_);
label nOffs = vertOffsets.size(); label nOffs = vertOffsets.size();
// global connectivity offsets
const globalIndex procOffset(nLocalVerts_);
if (parallel_) if (parallel_)
{ {
reduce(nOffs, sumOp<label>()); reduce(nOffs, sumOp<label>());
@ -311,7 +302,12 @@ void Foam::vtk::surfaceWriter::writePolys
} }
label off = procOffset.localStart(); // processor-local connectivity offsets
label off =
(
parallel_ ? globalIndex(nLocalVerts_).localStart() : 0
);
auto iter = vertOffsets.begin(); auto iter = vertOffsets.begin();
@ -438,15 +434,18 @@ bool Foam::vtk::surfaceWriter::writeGeometry()
writePoints(); writePoints();
const globalIndex globalPointOffset(nLocalPoints_); const label pointOffset =
(
parallel_ ? globalIndex(nLocalPoints_).localStart() : 0
);
if (legacy()) if (legacy())
{ {
writePolysLegacy(globalPointOffset); writePolysLegacy(pointOffset);
} }
else else
{ {
writePolys(globalPointOffset); writePolys(pointOffset);
} }
return true; return true;

View File

@ -56,10 +56,6 @@ SourceFiles
namespace Foam namespace Foam
{ {
// Forward declarations
class globalIndex;
namespace vtk namespace vtk
{ {
@ -108,10 +104,12 @@ class surfaceWriter
void writePoints(); void writePoints();
//- Write patch faces, legacy format //- Write patch faces, legacy format
void writePolysLegacy(const globalIndex& pointOffsets); // \param pointOffset processor-local point offset
void writePolysLegacy(const label pointOffset);
//- Write patch faces //- Write patch faces
void writePolys(const globalIndex& pointOffsets); // \param pointOffset processor-local point offset
void writePolys(const label pointOffset);
//- No copy construct //- No copy construct

View File

@ -42,8 +42,6 @@ bool Foam::vtk::writeCellSetFaces
{ {
typedef IndirectList<face> FaceListType; typedef IndirectList<face> FaceListType;
const globalIndex cellIdOffset(mesh.nCells());
indirectPrimitivePatch pp indirectPrimitivePatch pp
( (
FaceListType(mesh.faces(), labelList()), FaceListType(mesh.faces(), labelList()),
@ -88,22 +86,6 @@ bool Foam::vtk::writeCellSetFaces
// Use these faces // Use these faces
faces.resetAddressing(cellFaces.sortedToc()); 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); 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); writer.write("faceID", faceValues);
// End CellData/PointData is implicit
} }
// End CellData/PointData is implicit
writer.close(); writer.close();
return true; return true;

View File

@ -42,8 +42,6 @@ bool Foam::vtk::writeFaceSet
{ {
typedef IndirectList<face> FaceListType; typedef IndirectList<face> FaceListType;
const globalIndex faceIdOffset(mesh.nFaces());
indirectPrimitivePatch pp indirectPrimitivePatch pp
( (
FaceListType(mesh.faces(), labelList()), FaceListType(mesh.faces(), labelList()),
@ -69,7 +67,17 @@ bool Foam::vtk::writeFaceSet
writer.beginCellData(1); writer.beginCellData(1);
labelField faceValues(faces.addressing()); 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); writer.write("faceID", faceValues);

View File

@ -94,8 +94,6 @@ bool Foam::vtk::writePointSet
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
const globalIndex pointIdOffset(mesh.nPoints());
labelField pointLabels(set.sortedToc()); labelField pointLabels(set.sortedToc());
label numberOfPoints = pointLabels.size(); label numberOfPoints = pointLabels.size();
@ -206,6 +204,8 @@ bool Foam::vtk::writePointSet
if (parallel) if (parallel)
{ {
const globalIndex pointIdOffset(mesh.nPoints());
vtk::writeListParallel(format.ref(), pointLabels, pointIdOffset); vtk::writeListParallel(format.ref(), pointLabels, pointIdOffset);
} }
else else

View File

@ -29,6 +29,7 @@ surface/cutting/cuttingSurfaceBaseSelection.C
surface/distanceSurface/distanceSurface.C surface/distanceSurface/distanceSurface.C
surface/isoSurface/isoSurface.C surface/isoSurface/isoSurface.C
surface/isoSurface/isoSurfaceCell.C surface/isoSurface/isoSurfaceCell.C
surface/isoSurface/isoSurfaceTopo.C
surface/thresholdCellFaces/thresholdCellFaces.C surface/thresholdCellFaces/thresholdCellFaces.C
surface/triSurfaceMesh/discreteSurface.C surface/triSurfaceMesh/discreteSurface.C
@ -44,6 +45,7 @@ sampledSurface/sampledPatchInternalField/sampledPatchInternalField.C
sampledSurface/sampledPlane/sampledPlane.C sampledSurface/sampledPlane/sampledPlane.C
sampledSurface/isoSurface/sampledIsoSurface.C sampledSurface/isoSurface/sampledIsoSurface.C
sampledSurface/isoSurface/sampledIsoSurfaceCell.C sampledSurface/isoSurface/sampledIsoSurfaceCell.C
sampledSurface/isoSurface/sampledIsoSurfaceTopo.C
sampledSurface/distanceSurface/sampledDistanceSurface.C sampledSurface/distanceSurface/sampledDistanceSurface.C
sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C
sampledSurface/sampledCuttingSurface/sampledCuttingSurface.C sampledSurface/sampledCuttingSurface/sampledCuttingSurface.C

View File

@ -195,26 +195,24 @@ Foam::label Foam::probes::prepare()
<< endl; << endl;
fileName probeDir;
fileName probeSubDir = name(); fileName probeSubDir = name();
if (mesh_.name() != polyMesh::defaultRegion) if (mesh_.name() != polyMesh::defaultRegion)
{ {
probeSubDir = probeSubDir/mesh_.name(); 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)
// Put in undecomposed case
// (Note: gives problems for distributed data running) fileName probeDir =
probeDir = mesh_.time().path()/".."/probeSubDir; (
} mesh_.time().globalPath()
else / functionObject::outputPrefix
{ / probeSubDir
probeDir = mesh_.time().path()/probeSubDir; / mesh_.time().timeName()
} );
probeDir.clean(); // Remove unneeded ".." probeDir.clean(); // Remove unneeded ".."
// ignore known fields, close streams for fields that no longer exist // ignore known fields, close streams for fields that no longer exist

View File

@ -97,16 +97,10 @@ Foam::sampledSets::sampledSets
interpolationScheme_(word::null), interpolationScheme_(word::null),
writeFormat_(word::null) writeFormat_(word::null)
{ {
const fileName relPath(functionObject::outputPrefix/name); outputPath_ =
(
if (Pstream::parRun()) mesh_.time().globalPath()/functionObject::outputPrefix/name
{ );
outputPath_ = mesh_.time().path()/".."/relPath;
}
else
{
outputPath_ = mesh_.time().path()/relPath;
}
if (mesh_.name() != fvMesh::defaultRegion) if (mesh_.name() != fvMesh::defaultRegion)
{ {
@ -136,16 +130,10 @@ Foam::sampledSets::sampledSets
interpolationScheme_(word::null), interpolationScheme_(word::null),
writeFormat_(word::null) writeFormat_(word::null)
{ {
const fileName relPath(functionObject::outputPrefix/name); outputPath_ =
(
if (Pstream::parRun()) mesh_.time().globalPath()/functionObject::outputPrefix/name
{ );
outputPath_ = mesh_.time().path()/".."/relPath;
}
else
{
outputPath_ = mesh_.time().path()/relPath;
}
if (mesh_.name() != fvMesh::defaultRegion) if (mesh_.name() != fvMesh::defaultRegion)
{ {

View File

@ -844,8 +844,7 @@ Foam::shortestPathSet::shortestPathSet
if (Pstream::master()) if (Pstream::master())
{ {
outputDir = outputDir =
mesh.time().path() mesh.time().globalPath()
/ (Pstream::parRun() ? ".." : "")
/ functionObject::outputPrefix / functionObject::outputPrefix
/ mesh.pointsInstance(); / mesh.pointsInstance();
outputDir.clean(); outputDir.clean();

View File

@ -0,0 +1,328 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "sampledIsoSurfaceTopo.H"
#include "dictionary.H"
#include "volFields.H"
#include "volPointInterpolation.H"
#include "addToRunTimeSelectionTable.H"
#include "fvMesh.H"
#include "isoSurfaceTopo.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(sampledIsoSurfaceTopo, 0);
addNamedToRunTimeSelectionTable
(
sampledSurface,
sampledIsoSurfaceTopo,
word,
isoSurfaceTopo
);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
bool Foam::sampledIsoSurfaceTopo::updateGeometry() const
{
const fvMesh& fvm = static_cast<const fvMesh&>(mesh());
// No update needed
if (fvm.time().timeIndex() == prevTimeIndex_)
{
return false;
}
prevTimeIndex_ = fvm.time().timeIndex();
// Clear derived data
sampledSurface::clearGeom();
// Use field from database, or try to read it in
const auto* cellFldPtr = fvm.findObject<volScalarField>(isoField_);
if (debug)
{
if (cellFldPtr)
{
InfoInFunction << "Lookup " << isoField_ << endl;
}
else
{
InfoInFunction
<< "Reading " << isoField_
<< " from time " << fvm.time().timeName()
<< endl;
}
}
// For holding the volScalarField read in.
autoPtr<volScalarField> fieldReadPtr;
if (!cellFldPtr)
{
// Bit of a hack. Read field and store.
fieldReadPtr = autoPtr<volScalarField>::New
(
IOobject
(
isoField_,
fvm.time().timeName(),
fvm,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
),
fvm
);
}
const volScalarField& cellFld =
(fieldReadPtr.valid() ? *fieldReadPtr : *cellFldPtr);
auto tpointFld = volPointInterpolation::New(fvm).interpolate(cellFld);
//- Direct from cell field and point field. Gives bad continuity.
isoSurfaceTopo surf
(
fvm,
cellFld.primitiveField(),
tpointFld().primitiveField(),
isoVal_,
(regularise_ ? isoSurfaceTopo::DIAGCELL : isoSurfaceTopo::NONE)
);
MeshedSurface<face>& mySurface = const_cast<sampledIsoSurfaceTopo&>(*this);
mySurface.transfer(static_cast<meshedSurface&>(surf));
meshCells_ = std::move(surf.meshCells());
// triangulate uses remapFaces()
// - this is somewhat less efficient since it recopies the faces
// that we just created, but we probably don't want to do this
// too often anyhow.
if (triangulate_)
{
labelList faceMap;
mySurface.triangulate(faceMap);
meshCells_ = UIndirectList<label>(meshCells_, faceMap)();
}
if (debug)
{
Pout<< "sampledIsoSurfaceTopo::updateGeometry() : constructed iso:"
<< nl
<< " regularise : " << regularise_ << nl
<< " triangulate : " << triangulate_ << nl
<< " isoField : " << isoField_ << nl
<< " isoValue : " << isoVal_ << nl
<< " points : " << points().size() << nl
<< " faces : " << MeshStorage::size() << nl
<< " cut cells : " << meshCells_.size() << endl;
}
return true;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::sampledIsoSurfaceTopo::sampledIsoSurfaceTopo
(
const word& name,
const polyMesh& mesh,
const dictionary& dict
)
:
sampledSurface(name, mesh, dict),
MeshStorage(),
isoField_(dict.get<word>("isoField")),
isoVal_(dict.get<scalar>("isoValue")),
regularise_(dict.lookupOrDefault("regularise", true)),
triangulate_(dict.lookupOrDefault("triangulate", false)),
prevTimeIndex_(-1),
meshCells_()
{
if (triangulate_ && !regularise_)
{
FatalIOErrorInFunction(dict) << "Cannot both use regularise"
<< " and triangulate" << exit(FatalIOError);
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::sampledIsoSurfaceTopo::~sampledIsoSurfaceTopo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::sampledIsoSurfaceTopo::needsUpdate() const
{
const fvMesh& fvm = static_cast<const fvMesh&>(mesh());
return fvm.time().timeIndex() != prevTimeIndex_;
}
bool Foam::sampledIsoSurfaceTopo::expire()
{
// Clear derived data
sampledSurface::clearGeom();
// Already marked as expired
if (prevTimeIndex_ == -1)
{
return false;
}
// Force update
prevTimeIndex_ = -1;
return true;
}
bool Foam::sampledIsoSurfaceTopo::update()
{
return updateGeometry();
}
Foam::tmp<Foam::scalarField>
Foam::sampledIsoSurfaceTopo::sample
(
const interpolation<scalar>& sampler
) const
{
return sampleOnFaces(sampler);
}
Foam::tmp<Foam::vectorField>
Foam::sampledIsoSurfaceTopo::sample
(
const interpolation<vector>& sampler
) const
{
return sampleOnFaces(sampler);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledIsoSurfaceTopo::sample
(
const interpolation<sphericalTensor>& sampler
) const
{
return sampleOnFaces(sampler);
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledIsoSurfaceTopo::sample
(
const interpolation<symmTensor>& sampler
) const
{
return sampleOnFaces(sampler);
}
Foam::tmp<Foam::tensorField>
Foam::sampledIsoSurfaceTopo::sample
(
const interpolation<tensor>& sampler
) const
{
return sampleOnFaces(sampler);
}
Foam::tmp<Foam::scalarField>
Foam::sampledIsoSurfaceTopo::interpolate
(
const interpolation<scalar>& interpolator
) const
{
return sampleOnPoints(interpolator);
}
Foam::tmp<Foam::vectorField>
Foam::sampledIsoSurfaceTopo::interpolate
(
const interpolation<vector>& interpolator
) const
{
return sampleOnPoints(interpolator);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledIsoSurfaceTopo::interpolate
(
const interpolation<sphericalTensor>& interpolator
) const
{
return sampleOnPoints(interpolator);
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledIsoSurfaceTopo::interpolate
(
const interpolation<symmTensor>& interpolator
) const
{
return sampleOnPoints(interpolator);
}
Foam::tmp<Foam::tensorField>
Foam::sampledIsoSurfaceTopo::interpolate
(
const interpolation<tensor>& interpolator
) const
{
return sampleOnPoints(interpolator);
}
void Foam::sampledIsoSurfaceTopo::print(Ostream& os) const
{
os << "sampledIsoSurfaceTopo: " << name() << " :"
<< " field:" << isoField_
<< " value:" << isoVal_;
//<< " faces:" << faces().size() // possibly no geom yet
//<< " points:" << points().size();
}
// ************************************************************************* //

View File

@ -0,0 +1,291 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::sampledIsoSurfaceTopo
Description
A sampledSurface defined by a surface of iso value.
To be used in sampleSurfaces / functionObjects. Recalculates iso surface
only if time changes.
This is often embedded as part of a sampled surfaces function object.
Usage
Example of function object partial specification:
\verbatim
surfaces
(
surface1
{
type isoSurfaceTopo;
isoField p;
isoValue 0.0;
}
);
\endverbatim
Where the sub-entries comprise:
\table
Property | Description | Required | Default
type | isoSurfaceTopo | yes |
isoField | field name for obtaining iso-surface | yes |
isoValue | value of iso-surface | yes |
regularise | filter faces | no | true
triangulate | triangulate faces (if regularise) | no | false
\endtable
Note
Does not currently support cell zones.
SourceFiles
sampledIsoSurfaceTopo.C
\*---------------------------------------------------------------------------*/
#ifndef sampledIsoSurfaceTopo_H
#define sampledIsoSurfaceTopo_H
#include "sampledSurface.H"
#include "MeshedSurface.H"
#include "MeshedSurfacesFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class sampledIsoSurfaceTopo Declaration
\*---------------------------------------------------------------------------*/
class sampledIsoSurfaceTopo
:
public sampledSurface,
public MeshedSurface<face>
{
// Private typedefs for convenience
typedef MeshedSurface<face> MeshStorage;
// Private data
//- Field to get isoSurface of
const word isoField_;
//- Iso value
const scalar isoVal_;
//- Whether to coarse
const bool regularise_;
//- Whether to triangulate
const bool triangulate_;
// Recreated for every isoSurface
//- Time at last call, also track it surface needs an update
mutable label prevTimeIndex_;
//- For every triangle/face the original cell in mesh
mutable labelList meshCells_;
// Private Member Functions
//- Create iso surface (if time has changed)
// Do nothing (and return false) if no update was needed
bool updateGeometry() const;
//- Sample volume field onto surface faces
template<class Type>
tmp<Field<Type>> sampleOnFaces
(
const interpolation<Type>& sampler
) const;
//- Interpolate volume field onto surface points
template<class Type>
tmp<Field<Type>> sampleOnPoints
(
const interpolation<Type>& interpolator
) const;
public:
//- Runtime type information
TypeName("sampledIsoSurfaceTopo");
// Constructors
//- Construct from dictionary
sampledIsoSurfaceTopo
(
const word& name,
const polyMesh& mesh,
const dictionary& dict
);
//- Destructor
virtual ~sampledIsoSurfaceTopo();
// Member Functions
//- Does the surface need an update?
virtual bool needsUpdate() const;
//- Mark the surface as needing an update.
// May also free up unneeded data.
// Return false if surface was already marked as expired.
virtual bool expire();
//- Update the surface as required.
// Do nothing (and return false) if no update was needed
virtual bool update();
//- Points of surface
virtual const pointField& points() const
{
return MeshStorage::points();
}
//- Faces of surface
virtual const faceList& faces() const
{
return *this;
}
//- Const access to per-face zone/region information
virtual const labelList& zoneIds() const
{
return Foam::emptyLabelList;
}
//- Face area magnitudes
virtual const vectorField& Sf() const
{
return MeshStorage::Sf();
}
//- Face area magnitudes
virtual const scalarField& magSf() const
{
return MeshStorage::magSf();
}
//- Face centres
virtual const vectorField& Cf() const
{
return MeshStorage::Cf();
}
// Sample
//- Sample volume field onto surface faces
virtual tmp<scalarField> sample
(
const interpolation<scalar>& sampler
) const;
//- Sample volume field onto surface faces
virtual tmp<vectorField> sample
(
const interpolation<vector>& sampler
) const;
//- Sample volume field onto surface faces
virtual tmp<sphericalTensorField> sample
(
const interpolation<sphericalTensor>& sampler
) const;
//- Sample volume field onto surface faces
virtual tmp<symmTensorField> sample
(
const interpolation<symmTensor>& sampler
) const;
//- Sample volume field onto surface faces
virtual tmp<tensorField> sample
(
const interpolation<tensor>& sampler
) const;
// Interpolate
//- Interpolate volume field onto surface points
virtual tmp<scalarField> interpolate
(
const interpolation<scalar>& interpolator
) const;
//- Interpolate volume field onto surface points
virtual tmp<vectorField> interpolate
(
const interpolation<vector>& interpolator
) const;
//- Interpolate volume field onto surface points
virtual tmp<sphericalTensorField> interpolate
(
const interpolation<sphericalTensor>& interpolator
) const;
//- Interpolate volume field onto surface points
virtual tmp<symmTensorField> interpolate
(
const interpolation<symmTensor>& interpolator
) const;
//- Interpolate volume field onto surface points
virtual tmp<tensorField> interpolate
(
const interpolation<tensor>& interpolator
) const;
//- Write
virtual void print(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "sampledIsoSurfaceTopoTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,95 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "sampledIsoSurfaceTopo.H"
#include "isoSurface.H"
#include "volFieldsFwd.H"
#include "pointFields.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class Type>
Foam::tmp<Foam::Field<Type>>
Foam::sampledIsoSurfaceTopo::sampleOnFaces
(
const interpolation<Type>& sampler
) const
{
updateGeometry(); // Recreate geometry if time has changed
return sampledSurface::sampleOnFaces
(
sampler,
meshCells_,
faces(),
points()
);
}
template<class Type>
Foam::tmp<Foam::Field<Type>>
Foam::sampledIsoSurfaceTopo::sampleOnPoints
(
const interpolation<Type>& interpolator
) const
{
updateGeometry(); // Recreate geometry if time has changed
const labelList& elements = meshCells_;
// One value per point
auto tvalues = tmp<Field<Type>>::New(points().size());
auto& values = tvalues.ref();
const faceList& fcs = faces();
const pointField& pts = points();
bitSet pointDone(points().size());
forAll(faces(), cutFacei)
{
const face& f = fcs[cutFacei];
const label celli = elements[cutFacei];
for (const label pointi : f)
{
if (pointDone.set(pointi))
{
values[pointi] = interpolator.interpolate
(
pts[pointi],
celli
);
}
}
}
return tvalues;
}
// ************************************************************************* //

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,266 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::isoSurfaceTopo
Description
Marching tet iso surface algorithm with optional filtering to keep only
points originating from mesh edges.
SourceFiles
isoSurfaceTopo.C
\*---------------------------------------------------------------------------*/
#ifndef isoSurfaceTopo_H
#define isoSurfaceTopo_H
#include "labelPair.H"
#include "pointIndexHit.H"
#include "PackedBoolList.H"
#include "MeshedSurface.H"
#include "edgeList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class polyMesh;
class tetMatcher;
/*---------------------------------------------------------------------------*\
Class isoSurfaceTopo Declaration
\*---------------------------------------------------------------------------*/
class isoSurfaceTopo
:
public MeshedSurface<face>
{
// Private typedefs for convenience
typedef MeshedSurface<face> MeshStorage;
public:
enum filterType
{
NONE, // No filtering
DIAGCELL, // Remove points from face-diagonal and pyramid
// (vertex to cell-centre) edges
CELL // Only remove points from pyramid edges
};
private:
// Private data
enum cellCutType
{
NOTCUT, // Not cut
SPHERE, // All edges to cell centre cut
CUT // Normal cut
};
//- Reference to mesh
const polyMesh& mesh_;
const scalarField& cVals_;
const scalarField& pVals_;
//- Iso value
const scalar iso_;
//- Per point: originating mesh vertex/cc. See encoding above
edgeList pointToVerts_;
//- For every face the original cell in mesh
labelList meshCells_;
//- For every point the originating face in mesh
labelList pointToFace_;
// Private Member Functions
//- Does any edge of triangle cross iso value?
bool isTriCut
(
const triFace& tri,
const scalarField& pointValues
) const;
//- Determine whether cell is cut
cellCutType calcCutType
(
const bool isTet,
const label
) const;
//- Determine for all mesh whether cell is cut
label calcCutTypes
(
tetMatcher& tet,
List<cellCutType>& cellCutTypes
);
//- Generate single point on edge
label generatePoint
(
const label facei,
const bool edgeIsDiag,
const edge& vertices,
DynamicList<edge>& pointToVerts,
DynamicList<label>& pointToFace,
DynamicList<bool>& pointFromDiag,
EdgeMap<label>& vertsToPoint
) const;
//- Generate triangles from tet
void generateTriPoints
(
const label facei,
const FixedList<scalar, 4>& s,
const FixedList<point, 4>& p,
const FixedList<label, 4>& pIndex,
const FixedList<bool, 6>& edgeIsDiag,
DynamicList<edge>& pointToVerts,
DynamicList<label>& pointToFace,
DynamicList<bool>& pointFromDiag,
EdgeMap<label>& vertsToPoint,
DynamicList<label>& verts
) const;
//- Generate triangles from cell
void generateTriPoints
(
const polyMesh& mesh,
const label celli,
const bool isTet,
DynamicList<edge>& pointToVerts,
DynamicList<label>& pointToFace,
DynamicList<bool>& pointFromDiag,
EdgeMap<label>& vertsToPoint,
DynamicList<label>& verts,
DynamicList<label>& faceLabels
) const;
// Simplification
void triangulateOutside
(
const bool filterDiag,
const PrimitivePatch<face, SubList, const pointField&>& pp,
const boolList& pointFromDiag,
const labelList& pointToFace,
const label cellID,
DynamicList<face>& compactFaces,
DynamicList<label>& compactCellIDs
) const;
MeshStorage removeInsidePoints
(
const bool filterDiag,
const MeshStorage& s,
const boolList& pointFromDiag,
const labelList& pointToFace,
const labelList& start, // Per cell:starting tri
DynamicList<label>& pointCompactMap, // Per point the original
DynamicList<label>& compactCellIDs // Per face the cellID
) const;
public:
//- Runtime type information
TypeName("isoSurfaceTopo");
// Constructors
//- Construct from dictionary
isoSurfaceTopo
(
const polyMesh& mesh,
const scalarField& cellValues,
const scalarField& pointValues,
const scalar iso,
const filterType filter = DIAGCELL
);
// Member Functions
//- For every face original cell in mesh
const labelList& meshCells() const
{
return meshCells_;
}
//- For every point originating face (pyramid) in mesh
const labelList& pointToFace() const
{
return pointToFace_;
}
//- Per point: originating mesh vertex/cc. See encoding above<76>
const edgeList& pointToVerts() const
{
return pointToVerts_;
}
//- Interpolates cCoords,pCoords.
template<class Type>
tmp<Field<Type>> interpolate
(
const Field<Type>& cCoords,
const Field<Type>& pCoords
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "isoSurfaceTopoTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,91 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class Type>
Foam::tmp<Foam::Field<Type>>
Foam::isoSurfaceTopo::interpolate
(
const Field<Type>& cellCoords,
const Field<Type>& pointCoords
) const
{
tmp<Field<Type>> tfld(new Field<Type>(pointToVerts_.size()));
Field<Type>& fld = tfld.ref();
forAll(pointToVerts_, i)
{
scalar s0;
Type p0;
{
label v0 = pointToVerts_[i][0];
if (v0 < mesh_.nPoints())
{
s0 = pVals_[v0];
p0 = pointCoords[v0];
}
else
{
label celli = v0-mesh_.nPoints();
s0 = cVals_[celli];
p0 = cellCoords[celli];
}
}
scalar s1;
Type p1;
{
label v1 = pointToVerts_[i][1];
if (v1 < mesh_.nPoints())
{
s1 = pVals_[v1];
p1 = pointCoords[v1];
}
else
{
label celli = v1-mesh_.nPoints();
s1 = cVals_[celli];
p1 = cellCoords[celli];
}
}
scalar d = s1-s0;
if (mag(d) > VSMALL)
{
scalar s = (iso_-s0)/d;
fld[i] = s*p1+(1.0-s)*p0;
}
else
{
fld[i] = 0.5*(p0+p1);
}
}
return tfld;
}
// ************************************************************************* //

View File

@ -48,6 +48,7 @@ runTimeModifiable true;
functions functions
{ {
#include "coordinateTransform" #include "coordinateTransform"
#include "momentum"
} }

View File

@ -0,0 +1,33 @@
// -*- C++ -*-
// Calculate momentum fields
momentum
{
type momentum;
libs ("libfieldFunctionObjects.so");
log true;
executeInterval 10;
writeControl writeTime;
// writeToFile true;
writeMomentum true;
writePosition true;
writeVelocity true;
// Cells to select (all/cellSet/cellZone)
regionType all;
// name c0;
cylindrical true;
origin (0 0 0);
rotation
{
type cylindrical;
axis (1 0 0); //< local Z
}
}
// ************************************************************************* //

View File

@ -2,11 +2,9 @@
SUFFIXES += .Cver SUFFIXES += .Cver
# Update version strings in C++ file and in $WM_PROJECT_DIR/.build file # Update strings in C++ file and in META-INFO files
Cvertoo = \ Cvertoo = \
sed -e 's!VERSION_STRING!$(shell wmakePrintBuild -major)!' \ wmakeBuildInfo -update -filter $< > $(@D)/$(<F).C; \
-e 's!BUILD_STRING!$(shell wmakePrintBuild -update)!' \
$< > $(@D)/$(<F).C; \
$(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@ $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

531
wmake/wmakeBuildInfo Executable file
View File

@ -0,0 +1,531 @@
#!/bin/bash
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# wmakeBuildInfo
#
# Description
# Print the version used when building the project
#
# Environment
# - WM_PROJECT_DIR
# - WM_DIR (unset defaults to WM_PROJECT_DIR/wmake)
#
# Note
# Partial logic is also implemented in the bin/foamEtcFile
# -show-api and -show-patch options.
# Make sure that any changes here are also reflected there.
#
#------------------------------------------------------------------------------
# Locations
rulesFile="${WM_DIR:-$WM_PROJECT_DIR/wmake}/rules/General/general"
metaInfoDir="$WM_PROJECT_DIR/META-INFO"
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
Usage: ${0##*/} [OPTION]
${0##*/} [-update] -filter FILE
options:
-check Compare make and meta information (exit 0 for no changes)
-diff Display differences between make and meta information
(exit code 0 for no changes)
-dry-run In combination with -update
-update Update meta-info from make information
-filter FILE Filter/replace @API@, @BUILD@ tags in specified file
with corresponding make information
-query Report make-info and meta-info
-query-make Report make-info values (api, branch, build)
-query-meta Report meta-info values (api, branch, build)
-show-api Print api value from wmake/rules, or meta-info and exit
-show-patch Print patch value from meta-info and exit
-help Print the usage
Query/manage status of api,branch,build information.
Default without any arguments is the same as '-query-make'.
USAGE
exit 1
}
# Report error and exit
die()
{
exec 1>&2
echo
echo "Error encountered:"
while [ "$#" -ge 1 ]; do echo " $1"; shift; done
echo
echo "See '${0##*/} -help' for usage"
echo
exit 1
}
#------------------------------------------------------------------------------
# Parse arguments and options
#------------------------------------------------------------------------------
unset optCheck optDryRun optUpdate optQuery optFilter
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help*)
usage
;;
-check)
optCheck=true
;;
-diff)
optCheck=verbose
;;
-dry-run)
optDryRun=true
;;
-update)
optUpdate=true
;;
-query)
optQuery="make:meta"
;;
-query-make | -query-meta)
optQuery="$optQuery:${1##*-}"
;;
-show-api)
optQuery="api"
;;
-show-patch)
optQuery="patch"
;;
-filter)
optFilter=true
shift # Stop here, a file name follows
break
;;
*)
die "unknown option/argument: '$1'"
;;
esac
shift
done
#------------------------------------------------------------------------------
if [ "$optFilter" = true ]
then
[ -f "$1" ] || {
echo "Error in ${0##*/}: file not found '$1'" 1>&2
exit 2
}
# Disable other methods that generate output to stdout
unset optCheck optQuery
else
[ "$#" -eq 0 ] || die "Unexpected option/arguments $@"
# Nothing specified? Default to -query-make
if [ -z "$optCheck$optUpdate$optQuery" ]
then
optQuery="make"
fi
fi
#------------------------------------------------------------------------------
# Variables
declare -A makeInfo
declare -A metaInfo
#
# Populate makeInfo array
#
# - api : from rules/General/general
# - patch : cached value from previous make
# - branch : from git
# - build : from git
#
# Failure modes:
# - No api information (can't find file etc).
# -> FATAL: should never happen.
#
# - No git installed or no git repo
# -> branch and build are populated as empty strings
#
# - Working on detached head.
# -> branch has value "HEAD" instead of something more readable.
#
getMakeInfo()
{
local api patch build branch
makeInfo=()
# (api) from WM_DIR/rules/General/general
# - extract WM_VERSION = OPENFOAM=<digits>
api="$(sed -ne '/^ *#/!{ /WM_VERSION.*OPENFOAM=/{ s@^.*OPENFOAM= *\([0-9][0-9]*\).*@\1@p; q }}' $rulesFile 2>/dev/null)"
if [ -d "$metaInfoDir" ]
then
# (patch) from build-info - not from api-info
patch="$(sed -ne 's@^patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/build-info 2>/dev/null)"
fi
# Build info from git
build="$(git --git-dir=$WM_PROJECT_DIR/.git log -1 --date='format:%y%m%d' --format='%h-%ad' 2>/dev/null)"
# Branch info from git
if [ -n "$build" ]
then
branch="$(git --git-dir=$WM_PROJECT_DIR/.git rev-parse --abbrev-ref HEAD 2>/dev/null)"
fi
makeInfo[api]="$api"
makeInfo[patch]="${patch:-0}" # default is 0
makeInfo[branch]="$branch"
makeInfo[build]="$build"
makeInfo[cached]=true
}
#
# Populate metaInfo array
#
# - api : from META-INFO/api-info
# - patch : from META-INFO/api-info
# - branch : from META-INFO/build-info
# - build : from META-INFO/build-info
#
# Failure modes:
# - Directory, file or entry not found.
# -> corresponding entries are empty strings
#
getMetaInfo()
{
local api patch build branch
metaInfo=()
if [ -d "$metaInfoDir" ]
then
# (api, patch) from api-info
# (branch, build) from build-info
api="$(sed -ne 's@^api *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)"
patch="$(sed -ne 's@^patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)"
branch="$(sed -ne 's@^branch *= *\([^ ]*\).*@\1@p' $metaInfoDir/build-info 2>/dev/null)"
build="$(sed -ne 's@^build *= *\([^ ]*\).*@\1@p' $metaInfoDir/build-info 2>/dev/null)"
fi
metaInfo[api]="$api"
metaInfo[patch]="${patch:-0}" # default is 0
metaInfo[branch]="$branch"
metaInfo[build]="$build"
metaInfo[cached]=true
}
#
# Get api from rules/General/general
#
# Failure modes:
# - No api information (can't find file etc).
# -> Fatal for building, but could be OK for a stripped down version
#
# Fallback. Get from api-info
#
getApi()
{
[ -n "${makeInfo[cached]}" ] || getMakeInfo
# Local copy
local api="${makeInfo[api]}"
if [ -z "$api" ]
then
[ -n "${metaInfo[cached]}" ] || getMetaInfo
api="${metaInfo[api]}"
fi
if [ -n "$api" ]
then
echo "$api"
else
return 1
fi
}
# Get patch from meta-info / api-info
#
# Failure modes:
# - No patch information (can't find file etc).
#
getPatchLevel()
{
[ -n "${metaInfo[cached]}" ] || getMetaInfo
# Local copy
local value="${metaInfo[patch]}"
if [ -n "$value" ]
then
echo "$value"
else
return 1
fi
}
# Report make info
reportMakeInfo()
{
local key
[ -n "${makeInfo[cached]}" ] || getMakeInfo
[ -n "${metaInfo[cached]}" ] || getMetaInfo
local patch="${metaInfo[patch]}" # <- From meta-info only
makeInfo[patch]="${patch:=0}" # Extra safety
echo "make"
for key in api patch branch build
do
echo " $key = ${makeInfo[$key]}"
done
}
# Report meta info
reportMetaInfo()
{
local key
[ -n "${metaInfo[cached]}" ] || getMetaInfo
local patch="${metaInfo[patch]}" # <- From meta-info only
metaInfo[patch]="${patch:=0}" # Extra safety
echo "meta"
for key in api patch branch build
do
echo " $key = ${metaInfo[$key]}"
done
}
# Test make vs meta info.
# Return 0 for no differences, 1 otherwise
# $1 == verbose, print as diff. Silent otherwise
checkDiff()
{
local verbose="$1"
local key diff
[ -n "${makeInfo[cached]}" ] || getMakeInfo
[ -n "${metaInfo[cached]}" ] || getMetaInfo
for key in api patch branch build
do
if [ "${makeInfo[$key]}" != "${metaInfo[$key]}" ]
then
diff="$diff $key"
fi
done
if [ "$verbose" = verbose ] && [ -n "$diff" ]
then
echo "Differences"
for key in $diff
do
echo "$key:"
echo " make ${makeInfo[$key]}"
echo " meta ${metaInfo[$key]}"
done
fi
test -z "$diff"
}
#
# Update metaInfo (on disk) based on the makeInfo
#
performUpdate()
{
[ -n "${makeInfo[cached]}" ] || getMakeInfo
[ -n "${metaInfo[cached]}" ] || getMetaInfo
# Local copies of the make info
local api="${makeInfo[api]}"
local branch="${makeInfo[branch]}"
local build="${makeInfo[build]}"
local patch="${makeInfo[patch]}"
# If any of the make-info are empty (bad),
# use the meta-info to avoid spurious changes
[ -n "$api" ] || api="${metaInfo[api]}"
[ -n "$branch" ] || branch="${metaInfo[branch]}"
[ -n "$build" ] || build="${metaInfo[build]}"
local outputFile
# build-info
outputFile="$metaInfoDir/build-info"
if [ "$branch" != "${metaInfo[branch]}" ] || \
[ "$build" != "${metaInfo[build]}" ] || \
[ "$patch" != "${metaInfo[patch]}" ]
then
patch="${metaInfo[patch]}" # <- From meta-info only
: "${patch:=0}" # Extra safety
if [ -n "$optDryRun" ]
then
echo "dry-run (update) ${outputFile##*/} branch=${branch}" 1>&2
echo "dry-run (update) ${outputFile##*/} build=${build}" 1>&2
echo "dry-run (update) ${outputFile##*/} patch=${patch}" 1>&2
else
echo "branch=${branch}" >| "$outputFile"
echo "build=${build}" >> "$outputFile"
echo "patch=${patch}" >> "$outputFile"
fi
fi
# api-info
outputFile="$metaInfoDir/api-info"
if [ "$api" != "${metaInfo[api]}" ]
then
patch="${metaInfo[patch]}" # <- From meta-info only
: "${patch:=0}" # Extra safety
if [ -n "$optDryRun" ]
then
echo "dry-run (update) ${outputFile##*/} api=${api}" 1>&2
echo "dry-run (update) ${outputFile##*/} patch=${patch}" 1>&2
else
echo "api=${api}" >| "$outputFile"
echo "patch=${patch}" >> "$outputFile"
fi
fi
return 0
}
#
# Update metaInfo (on disk) based on the makeInfo
# This is the
#
performFiltering()
{
local input="$1"
[ -f "$input" ] || {
echo "Error in ${0##*/}: file not found '$1'" 1>&2
exit 2
}
[ -n "${makeInfo[cached]}" ] || getMakeInfo
[ -n "${metaInfo[cached]}" ] || getMetaInfo
# Local copies of the make info
local api="${makeInfo[api]}"
local branch="${makeInfo[branch]}"
local build="${makeInfo[build]}"
local patch="${metaInfo[patch]}" # <- From meta-info only
: "${patch:=0}" # Extra safety
# If any of the make-info are empty (bad),
# conjure up something from the meta-info
# api is not normally needed (available directly from -Ddefine)
# but we may wish to filter other types of files
if [ -z "$api" ]
then
api="${metaInfo[api]}"
api="${api:-0}" # integer value
fi
# branch/build could be missing for non-git
if [ -z "$branch" ]
then
branch="${metaInfo[branch]}"
branch="${branch:-unknown}"
fi
if [ -z "$build" ]
then
build="${metaInfo[build]}"
build="nogit${build:+-$build}"
fi
sed \
-e 's!@API@!'"${api}"'!g' \
-e 's!@PATCH@!'"${patch:-0}"'!g' \
-e 's!@BRANCH@!'"${branch}"'!g' \
-e 's!@BUILD@!'"${build}"'!g' \
-e 's!@VERSION@!'"${WM_PROJECT_VERSION}"'!g' \
"$input"
return 0
}
#------------------------------------------------------------------------------
# Dispatching
if [ -n "$optCheck" ]
then
checkDiff $optCheck
exit $?
elif [ "$optQuery" = api ]
then
# Show API and exit
getApi
exit $?
elif [ "$optQuery" = patch ]
then
# Show patch level and exit
getPatchLevel
exit $?
else
# Other queries
case "$optQuery" in (*make*) reportMakeInfo ;; esac
case "$optQuery" in (*meta*) reportMetaInfo ;; esac
fi
[ -n "$optUpdate" ] && performUpdate
if [ -n "$optFilter" ]
then
# Perform filter on file
performFiltering "$1"
fi
exit 0 # clean exit
#------------------------------------------------------------------------------

View File

@ -61,6 +61,17 @@ die()
} }
#------------------------------------------------------------------------------
cat << WARN_OBSOLETE 1>&2
###############################################################################
## The wmakePrintBuild utility is OBSOLETE (Dec-2018). ##
## The wmakeBuildInfo utility is to be used instead. ##
###############################################################################
WARN_OBSOLETE
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Parse arguments and options # Parse arguments and options
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------