Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-12
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -74,6 +74,11 @@ void Foam::blockMeshCartesianConfiguration::calcBlockMeshDict
|
||||
|
||||
Info<< "Bounding box is now " << bb_ << endl;
|
||||
|
||||
if (minDimCells_ > 0)
|
||||
{
|
||||
nCells_ = setMinDimCells(nCells_, minDimCells_);
|
||||
}
|
||||
|
||||
// Scale nCells_ by refine factor
|
||||
nCells_ *= refineFactor_;
|
||||
|
||||
@ -266,6 +271,7 @@ Foam::blockMeshCartesianConfiguration::blockMeshCartesianConfiguration
|
||||
const meshingSurfaceList& surfaces,
|
||||
const bool& boundsOpt,
|
||||
const Vector<label>& nCells,
|
||||
const label minDimCells,
|
||||
const label refineFactor,
|
||||
const HashTable<Pair<word>>& patchOpts,
|
||||
const bool clearBoundary
|
||||
@ -273,6 +279,7 @@ Foam::blockMeshCartesianConfiguration::blockMeshCartesianConfiguration
|
||||
:
|
||||
blockMeshConfigurationBase(name, dir, time, surfaces, patchOpts),
|
||||
nCells_(nCells),
|
||||
minDimCells_(minDimCells),
|
||||
refineFactor_(refineFactor),
|
||||
clearBoundary_(clearBoundary)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,6 +57,9 @@ class blockMeshCartesianConfiguration
|
||||
//- Number of cells in background mesh block
|
||||
Vector<label> nCells_;
|
||||
|
||||
//- Number of cells in background mesh shortest direction
|
||||
const label minDimCells_;
|
||||
|
||||
//- Refinement factor used to scale nCells
|
||||
const label refineFactor_;
|
||||
|
||||
@ -118,6 +121,7 @@ public:
|
||||
const meshingSurfaceList& surfaces,
|
||||
const bool& boundsOpt,
|
||||
const Vector<label>& nCells,
|
||||
const label minDimCells,
|
||||
const label refineFactor,
|
||||
const HashTable<Pair<word>>& patchOpts,
|
||||
const bool clearBoundary
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -99,6 +99,18 @@ inline vector roundUp(const vector& v, const scalar s)
|
||||
);
|
||||
}
|
||||
|
||||
inline Vector<label> setMinDimCells(const vector& v, const scalar s)
|
||||
{
|
||||
const scalar m(cmptMin(v)/s);
|
||||
|
||||
return Vector<label>
|
||||
(
|
||||
round(v.x()/m),
|
||||
round(v.y()/m),
|
||||
round(v.z()/m)
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -326,12 +326,14 @@ Foam::meshingSurfaceList::meshingSurfaceList
|
||||
const wordList& baffles,
|
||||
const boundBox& bb,
|
||||
const wordList& specifiedInletRegions,
|
||||
const wordList& specifiedOutletRegions
|
||||
const wordList& specifiedOutletRegions,
|
||||
const bool& closedDomain
|
||||
)
|
||||
:
|
||||
PtrList<meshingSurface>(),
|
||||
bb_(),
|
||||
rzbb_()
|
||||
rzbb_(),
|
||||
closedDomain_(closedDomain)
|
||||
{
|
||||
// Load all the surfaces and construct the bounding box
|
||||
forAll(surfaces, i)
|
||||
@ -353,6 +355,7 @@ Foam::meshingSurfaceList::meshingSurfaceList
|
||||
(
|
||||
operator[](i).closed()
|
||||
&& operator[](i).nParts() == 1
|
||||
&& (closedDomain || operator[](i).regions().size() != 1)
|
||||
&& bbInflate.contains(bb_)
|
||||
)
|
||||
{
|
||||
@ -376,8 +379,13 @@ Foam::meshingSurfaceList::meshingSurfaceList
|
||||
}
|
||||
|
||||
// If inletRegions and outletRegions are both empty, set "template"
|
||||
// names
|
||||
if (inletRegions.empty() && outletRegions.empty())
|
||||
// names, unless "closedDomain" is specified
|
||||
if
|
||||
(
|
||||
inletRegions.empty()
|
||||
&& outletRegions.empty()
|
||||
&& !closedDomain
|
||||
)
|
||||
{
|
||||
inletRegions.append("<inletRegion>");
|
||||
outletRegions.append("<outletRegion>");
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,6 +65,9 @@ class meshingSurfaceList
|
||||
//- Bounding box for the rotatingZone surfaces
|
||||
boundBox rzbb_;
|
||||
|
||||
//- Does the list of surfaces have inlets/outlets?
|
||||
const bool closedDomain_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -122,7 +125,8 @@ public:
|
||||
const wordList& baffles,
|
||||
const boundBox& bb,
|
||||
const wordList& inletRegions,
|
||||
const wordList& outletRegions
|
||||
const wordList& outletRegions,
|
||||
const bool& closedDomain
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
|
||||
@ -95,33 +95,63 @@ Usage
|
||||
|
||||
Options:
|
||||
|
||||
- \par -surface \<file\>
|
||||
Single surface geometry file for meshing
|
||||
|
||||
- \par -nCells \<cells\>
|
||||
Number of cells in each direction, e.g. '(10 20 30)'
|
||||
- \par -baffles \<list\>
|
||||
Surfaces that form baffles, e.g. '(helical)'
|
||||
|
||||
- \par -bounds \<box\>
|
||||
Bounding box of the mesh, e.g. '((-10 -5 0) (10 5 10))'
|
||||
|
||||
- \par -cellZones \<list\>
|
||||
Surfaces that form cellZones, e.g. '(porousZone heatSource)'
|
||||
|
||||
- \par -clearBoundary,
|
||||
Do not set default patch entries, i.e. xMin, xMax, yMin, etc...
|
||||
|
||||
- \par -closedDomain
|
||||
Domain does not contain inlets or outlets
|
||||
|
||||
- \par -cylindricalBackground
|
||||
Generate a cylindrical background mesh aligned with the z-axis
|
||||
|
||||
- \par -defaultPatch \<entry\>
|
||||
Name and type of default patch, '(\<name\> \<type\>)'
|
||||
|
||||
- \par -explicitFeatures,
|
||||
Use explicit feature capturing, default is implicit
|
||||
|
||||
- \par -firstLayerThickness \<value\>
|
||||
Specify the thickness of the near wall cells for layer addition
|
||||
|
||||
- \par -inletRegions \<list\>
|
||||
Inlet regions on an external surface, e.g. '(inletA inletB)'
|
||||
|
||||
- \par -insidePoint \<point\>
|
||||
Point location inside the region of geometry to be meshed
|
||||
|
||||
- \par -layerExpansionRatio \<value\>
|
||||
Specify the expansion ratio between layers, default 1.2
|
||||
|
||||
- \par -layers \<entry\>
|
||||
Number of layers on specified surfaces, e.g. '((car 3) (ground 4))'
|
||||
|
||||
- \par -minDimCells \<cells\>
|
||||
Number of cells in the shortest direction, e.g. 10
|
||||
|
||||
- \par -nCells \<cells\>
|
||||
Number of cells in each direction, e.g. '(10 20 30)'
|
||||
|
||||
- \par -nCellsBetweenLevels \<int\>
|
||||
Number of cells at successive refinement levels, default 3
|
||||
|
||||
- \par -noBackground
|
||||
Do not write a blockMeshDict file
|
||||
|
||||
- \par -outletRegions \<list\>
|
||||
Outlet regions on an external surface, e.g. '(outletA outletB)'
|
||||
|
||||
- \par -refineBackground \<int\>
|
||||
Integer multiplier for the number of cells (>= 1)
|
||||
|
||||
- \par -refinementLevel \<int\>
|
||||
Refinement level used by snappyHexMesh, default 2
|
||||
|
||||
- \par -surfaceLevels \<entry\>
|
||||
Refinement level at specified surfaces, e.g. '((pipe 2) (baffles 1))'
|
||||
|
||||
- \par -refinementRegions \<entry\>
|
||||
Refinement regions specified by '( (\<surface\> \<level\>) (...) )'
|
||||
|
||||
- \par -refinementBoxes \<entry\>
|
||||
Refinement boxes specified by '( (\<min\> \<max\> \<level\>) (...) )'
|
||||
|
||||
@ -129,48 +159,27 @@ Usage
|
||||
Refinement distance specified by
|
||||
'( (\<surface\> \<dist\> \<level\>) (...) )'
|
||||
|
||||
- \par -defaultPatch \<entry\>
|
||||
Name and type of default patch, '(\<name\> \<type\>)'
|
||||
- \par -refinementLevel \<int\>
|
||||
Refinement level used by snappyHexMesh, default 2
|
||||
|
||||
- \par -xMinPatch (-xMaxPatch, -yMinPatch, etc...) \<entry\>
|
||||
Name and type of the xMin (xMax, yMin, etc...) patch,
|
||||
'(\<name\> \<type\>)'
|
||||
- \par -refinementRegions \<entry\>
|
||||
Refinement regions specified by '( (\<surface\> \<level\>) (...) )'
|
||||
|
||||
- \par -clearBoundary,
|
||||
Do not set default patch entries, i.e. xMin, xMax, yMin, etc...
|
||||
|
||||
- \par -explicitFeatures,
|
||||
Use explicit feature capturing, default is implicit
|
||||
|
||||
- \par -layers \<entry\>
|
||||
Number of layers on specified surfaces, e.g. '((car 3) (ground 4))'
|
||||
|
||||
- \par -firstLayerThickness \<value\>
|
||||
Specify the thickness of the near wall cells for layer addition
|
||||
|
||||
- \par -layerExpansionRatio \<value\>
|
||||
Specify the expansion ratio between layers, default 1.2
|
||||
|
||||
- \par -cellZones \<list\>
|
||||
Surfaces that form cellZones, e.g. '(porousZone heatSource)'
|
||||
- \par -region \<name\>
|
||||
Specify alternative mesh region
|
||||
|
||||
- \par -rotatingZones \<list\>
|
||||
Surfaces that form rotatingZones, e.g. '(rotatingZone)'
|
||||
|
||||
- \par -baffles \<list\>
|
||||
Surfaces that form baffles, e.g. '(helical)'
|
||||
- \par -surface \<file\>
|
||||
Single surface geometry file for meshing
|
||||
|
||||
- \par -insidePoint \<point\>
|
||||
Point location inside the region of geometry to be meshed
|
||||
- \par -surfaceLevels \<entry\>
|
||||
Refinement level at specified surfaces, e.g. '((pipe 2) (baffles 1))'
|
||||
|
||||
- \par -nCellsBetweenLevels \<int\>
|
||||
Number of cells at successive refinement levels, default 3
|
||||
|
||||
- \par -inletRegions \<list\>
|
||||
Inlet regions on an external surface, e.g. '(inletA inletB)'
|
||||
|
||||
- \par -outletRegions \<list\>
|
||||
Outlet regions on an external surface, e.g. '(outletA outletB)'
|
||||
- \par -xMinPatch (-xMaxPatch, -yMinPatch, etc...) \<entry\>
|
||||
Name and type of the xMin (xMax, yMin, etc...) patch,
|
||||
'(\<name\> \<type\>)'
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -220,6 +229,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
#include "removeCaseOptions.H"
|
||||
#include "addRegionOption.H"
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
@ -235,6 +245,13 @@ int main(int argc, char *argv[])
|
||||
"number of cells in each direction, e.g. '(10 20 30)'"
|
||||
);
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"minDimCells",
|
||||
"int",
|
||||
"number of cells in the shortest direction, e.g. 10"
|
||||
);
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"bounds",
|
||||
@ -400,9 +417,29 @@ int main(int argc, char *argv[])
|
||||
"outlet regions on an external surface, e.g. '(outletA outletB)'"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"closedDomain",
|
||||
"domain does not contain inlets or outlets"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
word regionName;
|
||||
word regionPath(runTime.system());
|
||||
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
{
|
||||
regionPath = runTime.system()/regionName;
|
||||
Info<< "Writing files to " << regionPath << nl <<endl;
|
||||
|
||||
if (!isDir(regionPath))
|
||||
{
|
||||
mkDir(regionPath);
|
||||
}
|
||||
}
|
||||
|
||||
fileNameList surfaceNames;
|
||||
|
||||
if (args.optionFound("surface"))
|
||||
@ -492,6 +529,8 @@ int main(int argc, char *argv[])
|
||||
outletRegions.append(args.optionReadList<word>("outletRegions"));
|
||||
}
|
||||
|
||||
const bool closedDomain(args.optionFound("closedDomain"));
|
||||
|
||||
meshingSurfaceList surfaces
|
||||
(
|
||||
runTime,
|
||||
@ -501,13 +540,20 @@ int main(int argc, char *argv[])
|
||||
baffleNames,
|
||||
bb,
|
||||
inletRegions,
|
||||
outletRegions
|
||||
outletRegions,
|
||||
closedDomain
|
||||
);
|
||||
|
||||
const Vector<label> nCells
|
||||
(
|
||||
args.optionLookupOrDefault("nCells", Vector<label>::zero)
|
||||
);
|
||||
|
||||
const label minDimCells
|
||||
(
|
||||
args.optionLookupOrDefault("minDimCells", 0)
|
||||
);
|
||||
|
||||
const label refineFactor
|
||||
(
|
||||
args.optionLookupOrDefault("refineBackground", 1)
|
||||
@ -529,7 +575,7 @@ int main(int argc, char *argv[])
|
||||
blockMeshCylindricalConfiguration blockMeshConfig
|
||||
(
|
||||
"blockMeshDict",
|
||||
runTime.system(),
|
||||
regionPath,
|
||||
runTime,
|
||||
surfaces,
|
||||
args.optionFound("bounds"),
|
||||
@ -546,11 +592,12 @@ int main(int argc, char *argv[])
|
||||
blockMeshCartesianConfiguration blockMeshConfig
|
||||
(
|
||||
"blockMeshDict",
|
||||
runTime.system(),
|
||||
regionPath,
|
||||
runTime,
|
||||
surfaces,
|
||||
args.optionFound("bounds"),
|
||||
nCells,
|
||||
minDimCells,
|
||||
refineFactor,
|
||||
patchOpts,
|
||||
clearBoundary
|
||||
@ -641,7 +688,7 @@ int main(int argc, char *argv[])
|
||||
surfaceFeaturesConfiguration surfaceFeaturesConfig
|
||||
(
|
||||
"surfaceFeaturesDict",
|
||||
runTime.system(),
|
||||
regionPath,
|
||||
runTime,
|
||||
surfaces
|
||||
);
|
||||
@ -652,7 +699,7 @@ int main(int argc, char *argv[])
|
||||
snappyHexMeshConfiguration snappyConfig
|
||||
(
|
||||
"snappyHexMeshDict",
|
||||
runTime.system(),
|
||||
regionPath,
|
||||
runTime,
|
||||
surfaces,
|
||||
refinementLevel,
|
||||
@ -673,7 +720,7 @@ int main(int argc, char *argv[])
|
||||
meshQualityConfiguration meshQualityConfig
|
||||
(
|
||||
"meshQualityDict",
|
||||
runTime.system(),
|
||||
regionPath,
|
||||
runTime
|
||||
);
|
||||
|
||||
|
||||
29
bin/foamGet
29
bin/foamGet
@ -40,6 +40,7 @@ options:
|
||||
-help | -h print the usage
|
||||
-no-ext | -n specify file without extension
|
||||
-target | -t <dir> specify target directory (default = system)
|
||||
-region | -r <name> specify alternative mesh region
|
||||
|
||||
Finds an example OpenFOAM case dictionary file in $FOAM_ETC/caseDicts and
|
||||
copies it into the respective case directory, e.g.
|
||||
@ -160,6 +161,7 @@ setTgt () {
|
||||
_prefix="$1"
|
||||
_file="$2"
|
||||
_tgt="$3"
|
||||
_region="$4"
|
||||
|
||||
! [ "$_tgt" ] && \
|
||||
echo "$_file" | grep -q fvModel && \
|
||||
@ -177,11 +179,10 @@ setTgt () {
|
||||
*) _tgt="system" ;;
|
||||
esac
|
||||
|
||||
[ "$_region" ] && _tgt="$_tgt/$_region"
|
||||
echo "$_tgt"
|
||||
|
||||
[ -d "$_tgt" ] && return 0
|
||||
echo "target directory does not exist: '$_tgt'" >&2
|
||||
return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
setFile () {
|
||||
@ -208,6 +209,7 @@ searchDirs="$searchDirs \
|
||||
|
||||
ext="ANY"
|
||||
tgt=""
|
||||
region=""
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
@ -233,6 +235,11 @@ do
|
||||
tgt="$2"
|
||||
shift 2
|
||||
;;
|
||||
-r | -region)
|
||||
[ "$#" -ge 2 ] || error "'$1' option requires an argument"
|
||||
region="$2"
|
||||
shift 2
|
||||
;;
|
||||
-*)
|
||||
error "invalid option '$1'"
|
||||
;;
|
||||
@ -260,8 +267,12 @@ files="$(pruneFiles "$files")"
|
||||
|
||||
nFiles="$(nArgs "$files")"
|
||||
[ "$nFiles" -eq 1 ] && \
|
||||
tgt="$(setTgt "$prefix" "$files" "$tgt")" && \
|
||||
cpFile "$files" "$tgt" && exit 0
|
||||
if tgt="$(setTgt "$prefix" "$files" "$tgt" "$region")"
|
||||
then
|
||||
cpFile "$files" "$tgt" && exit 0
|
||||
else
|
||||
error "target directory does not exist: '$tgt'"
|
||||
fi
|
||||
|
||||
echo "Multiple files with \"$prefix\" prefix found:"
|
||||
suggest="$(listArgs "$files")"
|
||||
@ -282,5 +293,9 @@ read -r nFile
|
||||
echo "\"$nFile\" is not a number between 1 and $nFiles" && exit 1
|
||||
|
||||
file="$(setFile "$files" "$nFile")"
|
||||
tgt="$(setTgt "$prefix" "$file" "$tgt")"
|
||||
cpFile "$file" "$tgt"
|
||||
if tgt="$(setTgt "$prefix" "$file" "$tgt" "$region")"
|
||||
then
|
||||
cpFile "$files" "$tgt" && exit 0
|
||||
else
|
||||
error "target directory does not exist: '$tgt'"
|
||||
fi
|
||||
|
||||
@ -101,6 +101,14 @@ EOF
|
||||
|
||||
optionFunctions () {
|
||||
cat<<EOF
|
||||
_region ()
|
||||
{
|
||||
find . -name polyMesh -type d | \
|
||||
awk -F '/' '{print \$(NF-1)}' | \
|
||||
grep -v constant | \
|
||||
sort -u | xargs
|
||||
}
|
||||
|
||||
_solver ()
|
||||
{
|
||||
foamToC -table solver | sed '1,/Contents/d' | awk '{print \$1}' | xargs
|
||||
@ -296,7 +304,7 @@ $(declareLocals)
|
||||
echo "\${_files}" | xargs -n 1 | sort -u
|
||||
}
|
||||
|
||||
opts="-case -ext -help -no-ext -target"
|
||||
opts="-case -ext -help -no-ext -target -region"
|
||||
for o in \$used ; do opts="\${opts/\$o/}" ; done
|
||||
extra=""
|
||||
opts="\${opts} \$(_searchDirs)"
|
||||
@ -306,10 +314,12 @@ $(caseStart)
|
||||
opts="" ; extra="-d" ;;
|
||||
-ext)
|
||||
opts="" ; extra="" ;;
|
||||
-region)
|
||||
opts="\$(_region)"; extra="" ;;
|
||||
-*) ;;
|
||||
*)
|
||||
case "\${COMP_WORDS[COMP_CWORD-2]}" in
|
||||
-case|-ext|-target) ;;
|
||||
-case|-ext|-target|-region) ;;
|
||||
*) opts=""; extra="" ;;
|
||||
esac
|
||||
;;
|
||||
@ -472,7 +482,7 @@ do
|
||||
handlerOpts="" # file handler options -fileHandler
|
||||
rangesOpts="" # ranges options -time
|
||||
argOpts="" # options with unspecified arguments
|
||||
specialOpts="" # -solver, -table, -func
|
||||
specialOpts="" # -solver, -table, -func, -region
|
||||
|
||||
while read -r line
|
||||
do
|
||||
@ -489,7 +499,7 @@ do
|
||||
[ "$opt" = "-libs" ] && next=libList
|
||||
|
||||
case "$opt" in
|
||||
-solver|-table|-func)
|
||||
-solver|-table|-func|-region)
|
||||
specialOpts="$specialOpts $opt"
|
||||
continue
|
||||
;;
|
||||
|
||||
@ -31,6 +31,11 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# shellcheck disable=SC2155,SC2207,SC2086
|
||||
|
||||
_region ()
|
||||
{
|
||||
find . -name polyMesh -type d | awk -F '/' '{print $(NF-1)}' | grep -v constant | sort -u | xargs
|
||||
}
|
||||
|
||||
_solver ()
|
||||
{
|
||||
foamToC -table solver | sed '1,/Contents/d' | awk '{print $1}' | xargs
|
||||
@ -285,8 +290,9 @@ _blockMesh_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-libs|-region)
|
||||
-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -395,8 +401,9 @@ _changeDictionary_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-instance|-libs|-region|-roots|-subDict)
|
||||
-hostRoots|-instance|-libs|-roots|-subDict)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -422,8 +429,9 @@ _checkMesh_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-nonOrthThreshold|-region|-roots|-setFormat|-skewThreshold|-surfaceFormat)
|
||||
-hostRoots|-libs|-nonOrthThreshold|-roots|-setFormat|-skewThreshold|-surfaceFormat)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -550,8 +558,9 @@ _createBaffles_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -575,8 +584,9 @@ _createEngineZones_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-libs|-region)
|
||||
-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -600,8 +610,9 @@ _createExternalCoupledPatchGeometry_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -627,8 +638,9 @@ _createNonConformalCouples_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -654,8 +666,9 @@ _createPatch_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -712,8 +725,9 @@ _decomposePar_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-libs|-region)
|
||||
-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -837,8 +851,9 @@ _engineCompRatio_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-cellSet|-cellZone|-hostRoots|-libs|-region|-roots)
|
||||
-cellSet|-cellZone|-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -958,8 +973,9 @@ _extrudeMesh_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -985,8 +1001,9 @@ _extrudeToRegionMesh_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -1012,8 +1029,9 @@ _faceAgglomerate_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -1209,8 +1227,9 @@ _foamFormatConvert_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -1315,9 +1334,10 @@ _foamPostProcess_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-field|-fields|-funcs|-hostRoots|-libs|-region|-roots)
|
||||
-field|-fields|-funcs|-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-func) opts="$(_func ${cur})" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
-solver) opts="$(_solver ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
@ -1418,8 +1438,9 @@ _foamToEnsight_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-cellZone|-faceZones|-fields|-hostRoots|-libs|-patches|-region|-roots)
|
||||
-cellZone|-faceZones|-fields|-hostRoots|-libs|-patches|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -1578,8 +1599,9 @@ _foamToVTK_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-cellSet|-excludePatches|-faceSet|-fields|-hostRoots|-libs|-pointSet|-polyhedra|-region|-roots)
|
||||
-cellSet|-excludePatches|-faceSet|-fields|-hostRoots|-libs|-pointSet|-polyhedra|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -1634,12 +1656,13 @@ _gmshToFoam_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-libs|-region)
|
||||
-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
-*) ;;
|
||||
*)
|
||||
case "${COMP_WORDS[COMP_CWORD-2]}" in
|
||||
-libs|-region|-case|-fileHandler) ;;
|
||||
-libs|-case|-fileHandler) ;;
|
||||
*) opts=""; extra="" ;;
|
||||
esac
|
||||
;;
|
||||
@ -1690,12 +1713,13 @@ _ideasUnvToFoam_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-libs|-region)
|
||||
-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
-*) ;;
|
||||
*)
|
||||
case "${COMP_WORDS[COMP_CWORD-2]}" in
|
||||
-libs|-region|-case|-fileHandler) ;;
|
||||
-libs|-case|-fileHandler) ;;
|
||||
*) opts=""; extra="" ;;
|
||||
esac
|
||||
;;
|
||||
@ -1964,8 +1988,9 @@ _mergeBaffles_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -1991,8 +2016,9 @@ _mergeMeshes_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-libs|-region)
|
||||
-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2043,8 +2069,9 @@ _mirrorMesh_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2198,8 +2225,9 @@ _orientFaceZone_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2225,8 +2253,9 @@ _particleTracks_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2252,8 +2281,9 @@ _patchSummary_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2460,8 +2490,9 @@ _reconstructPar_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-fields|-lagrangianFields|-libs|-region)
|
||||
-fields|-lagrangianFields|-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2487,8 +2518,9 @@ _redistributePar_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2512,8 +2544,9 @@ _refineHexMesh_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2564,8 +2597,9 @@ _refineMesh_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2589,8 +2623,9 @@ _refineWallLayer_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-inSet|-libs|-region)
|
||||
-inSet|-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2643,8 +2678,9 @@ _renumberMesh_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2670,8 +2706,9 @@ _reorderPatches_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-patchOrder|-referenceCase|-referenceRegion|-region|-roots)
|
||||
-hostRoots|-libs|-patchOrder|-referenceCase|-referenceRegion|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2774,8 +2811,9 @@ _setAtmBoundaryLayer_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2803,8 +2841,9 @@ _setFields_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2830,8 +2869,9 @@ _setsToZones_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2859,8 +2899,9 @@ _setWaves_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-U|-alpha|-hostRoots|-libs|-region|-roots)
|
||||
-U|-alpha|-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2969,8 +3010,9 @@ _snappyHexMesh_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-patches|-region|-roots|-surfaceSimplify)
|
||||
-hostRoots|-libs|-patches|-roots|-surfaceSimplify)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -2984,7 +3026,7 @@ _snappyHexMeshConfig_ ()
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-baffles -bounds -cellZones -clearBoundary -cylindricalBackground -defaultPatch -doc -explicitFeatures -firstLayerThickness -help -inletRegions -insidePoint -layerExpansionRatio -layers -nCells -nCellsBetweenLevels -noBackground -outletRegions -refineBackground -refinementBoxes -refinementDists -refinementLevel -refinementRegions -rotatingZones -srcDoc -surface -surfaceLevels -xMaxPatch -xMinPatch -yMaxPatch -yMinPatch -zMaxPatch -zMinPatch"
|
||||
opts="-baffles -bounds -cellZones -clearBoundary -closedDomain -cylindricalBackground -defaultPatch -doc -explicitFeatures -firstLayerThickness -help -inletRegions -insidePoint -layerExpansionRatio -layers -minDimCells -nCells -nCellsBetweenLevels -noBackground -outletRegions -refineBackground -refinementBoxes -refinementDists -refinementLevel -refinementRegions -region -rotatingZones -srcDoc -surface -surfaceLevels -xMaxPatch -xMinPatch -yMaxPatch -yMinPatch -zMaxPatch -zMinPatch"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
@ -2992,8 +3034,9 @@ _snappyHexMeshConfig_ ()
|
||||
case "$prev" in
|
||||
-surface)
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-baffles|-bounds|-cellZones|-defaultPatch|-firstLayerThickness|-inletRegions|-insidePoint|-layerExpansionRatio|-layers|-nCells|-nCellsBetweenLevels|-outletRegions|-refineBackground|-refinementBoxes|-refinementDists|-refinementLevel|-refinementRegions|-rotatingZones|-surfaceLevels|-xMaxPatch|-xMinPatch|-yMaxPatch|-yMinPatch|-zMaxPatch|-zMinPatch)
|
||||
-baffles|-bounds|-cellZones|-defaultPatch|-firstLayerThickness|-inletRegions|-insidePoint|-layerExpansionRatio|-layers|-minDimCells|-nCells|-nCellsBetweenLevels|-outletRegions|-refineBackground|-refinementBoxes|-refinementDists|-refinementLevel|-refinementRegions|-rotatingZones|-surfaceLevels|-xMaxPatch|-xMinPatch|-yMaxPatch|-yMinPatch|-zMaxPatch|-zMinPatch)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -3017,8 +3060,9 @@ _splitBaffles_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -3069,8 +3113,9 @@ _splitMeshRegions_ ()
|
||||
opts="" ; extra="-d -f" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-blockedFaces|-defaultRegionName|-hostRoots|-insidePoint|-libs|-region|-roots)
|
||||
-blockedFaces|-defaultRegionName|-hostRoots|-insidePoint|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -3148,8 +3193,9 @@ _steadyParticleTracks_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-libs|-region)
|
||||
-libs)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -3175,8 +3221,9 @@ _stitchMesh_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-libs|-region|-tol)
|
||||
-libs|-tol)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -3200,8 +3247,9 @@ _subsetMesh_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-patch|-region|-resultTime|-roots)
|
||||
-hostRoots|-libs|-patch|-resultTime|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -3672,8 +3720,9 @@ _surfaceMeshTriangulate_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-faceZones|-hostRoots|-libs|-patches|-region|-roots)
|
||||
-faceZones|-hostRoots|-libs|-patches|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -3939,8 +3988,9 @@ _temporalInterpolate_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-divisions|-fields|-hostRoots|-interpolationType|-libs|-region|-roots)
|
||||
-divisions|-fields|-hostRoots|-interpolationType|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -3993,8 +4043,9 @@ _topoSet_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -4018,8 +4069,9 @@ _transformPoints_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-pointSet|-region|-roots)
|
||||
-hostRoots|-libs|-pointSet|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -4043,8 +4095,9 @@ _viewFactorsGen_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -4101,8 +4154,9 @@ _writeMeshObj_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-cell|-cellSet|-face|-faceSet|-hostRoots|-libs|-point|-region|-roots)
|
||||
-cell|-cellSet|-face|-faceSet|-hostRoots|-libs|-point|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -4151,8 +4205,9 @@ _zipUpMesh_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -4559,7 +4614,7 @@ _foamGet_ ()
|
||||
echo "${_files}" | xargs -n 1 | sort -u
|
||||
}
|
||||
|
||||
opts="-case -ext -help -no-ext -target"
|
||||
opts="-case -ext -help -no-ext -target -region"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
opts="${opts} $(_searchDirs)"
|
||||
@ -4570,10 +4625,12 @@ _foamGet_ ()
|
||||
opts="" ; extra="-d" ;;
|
||||
-ext)
|
||||
opts="" ; extra="" ;;
|
||||
-region)
|
||||
opts="$(_region)"; extra="" ;;
|
||||
-*) ;;
|
||||
*)
|
||||
case "${COMP_WORDS[COMP_CWORD-2]}" in
|
||||
-case|-ext|-target) ;;
|
||||
-case|-ext|-target|-region) ;;
|
||||
*) opts=""; extra="" ;;
|
||||
esac
|
||||
;;
|
||||
@ -4854,6 +4911,27 @@ _foamUnits_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _foamUnits_ foamUnits
|
||||
|
||||
_foamVTKSeries_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -dir -help"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case|-dir)
|
||||
opts="" ; extra="-d" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _foamVTKSeries_ foamVTKSeries
|
||||
|
||||
_interFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5013,8 +5091,7 @@ _paraFoam_ ()
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-region)
|
||||
opts="" ; extra="" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
@ -5092,9 +5169,10 @@ _postProcess_ ()
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-time)
|
||||
opts="$(foamListTimes -withZero 2> /dev/null)" ; extra="" ;;
|
||||
-field|-fields|-funcs|-hostRoots|-libs|-region|-roots)
|
||||
-field|-fields|-funcs|-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
-func) opts="$(_func ${cur})" ;;
|
||||
-region) opts="$(_region ${cur})" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
|
||||
Reference in New Issue
Block a user