Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -25,8 +25,7 @@ Application
|
||||
createBaffles
|
||||
|
||||
Description
|
||||
Makes internal faces into boundary faces. Does not duplicate points, unlike
|
||||
mergeOrSplitBaffles.
|
||||
Makes internal faces into boundary faces. Does not duplicate points.
|
||||
|
||||
Note: if any coupled patch face is selected for baffling the opposite
|
||||
member has to be selected for baffling as well.
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
mergeBaffles.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/mergeBaffles
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,22 +25,8 @@ Application
|
||||
mergeOrSplitBaffles
|
||||
|
||||
Description
|
||||
Detects faces that share points (baffles). Either merge them or
|
||||
duplicate the points.
|
||||
|
||||
Notes:
|
||||
- can only handle pairwise boundary faces. So three faces using
|
||||
the same points is not handled (is illegal mesh anyway)
|
||||
|
||||
- there is no option to only split/merge some baffles.
|
||||
|
||||
- surfaces consisting of duplicate faces can be topologically split
|
||||
if the points on the interior of the surface cannot walk to all the
|
||||
cells that use them in one go.
|
||||
|
||||
- Parallel operation (where duplicate face is perpendicular to a coupled
|
||||
boundary) is supported but not really tested.
|
||||
(Note that coupled faces themselves are not seen as duplicate faces)
|
||||
Detects faces that share points (baffles) and merge them into internal
|
||||
faces.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -66,13 +52,42 @@ using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
void insertDuplicateMerge
|
||||
void mergeDuplicateBoundaryFaces
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const labelList& duplicates,
|
||||
polyTopoChange& meshMod
|
||||
)
|
||||
{
|
||||
// Get all duplicate face labels in the boundary
|
||||
labelList duplicates = localPointRegion::findDuplicateFaces
|
||||
(
|
||||
mesh,
|
||||
identity(mesh.nFaces() - mesh.nInternalFaces())
|
||||
+ mesh.nInternalFaces()
|
||||
);
|
||||
|
||||
// Check that none are on processor patches
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
forAll(duplicates, bFacei)
|
||||
{
|
||||
if (duplicates[bFacei] != -1)
|
||||
{
|
||||
label facei = mesh.nInternalFaces() + bFacei;
|
||||
label patchi = patches.whichPatch(facei);
|
||||
|
||||
if (isA<processorPolyPatch>(patches[patchi]))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Duplicate face " << facei
|
||||
<< " is on a processorPolyPatch."
|
||||
<< "This is not allowed." << nl
|
||||
<< "Face:" << facei
|
||||
<< " is on patch:" << patches[patchi].name()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const faceList& faces = mesh.faces();
|
||||
const labelList& faceOwner = mesh.faceOwner();
|
||||
const faceZoneMesh& faceZones = mesh.faceZones();
|
||||
@ -154,93 +169,17 @@ void insertDuplicateMerge
|
||||
}
|
||||
|
||||
|
||||
labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
|
||||
{
|
||||
// Get all duplicate face labels (in boundaryFaces indices!).
|
||||
labelList duplicates = localPointRegion::findDuplicateFaces
|
||||
(
|
||||
mesh,
|
||||
boundaryFaces
|
||||
);
|
||||
|
||||
|
||||
// Check that none are on processor patches
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
|
||||
forAll(duplicates, bFacei)
|
||||
{
|
||||
if (duplicates[bFacei] != -1)
|
||||
{
|
||||
label facei = mesh.nInternalFaces() + bFacei;
|
||||
label patchi = patches.whichPatch(facei);
|
||||
|
||||
if (isA<processorPolyPatch>(patches[patchi]))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Duplicate face " << facei
|
||||
<< " is on a processorPolyPatch."
|
||||
<< "This is not allowed." << nl
|
||||
<< "Face:" << facei
|
||||
<< " is on patch:" << patches[patchi].name()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Write to faceSet for ease of postprocessing.
|
||||
{
|
||||
faceSet duplicateSet
|
||||
(
|
||||
mesh,
|
||||
"duplicateFaces",
|
||||
(mesh.nFaces() - mesh.nInternalFaces())/256
|
||||
);
|
||||
|
||||
forAll(duplicates, bFacei)
|
||||
{
|
||||
label otherFacei = duplicates[bFacei];
|
||||
|
||||
if (otherFacei != -1 && otherFacei > bFacei)
|
||||
{
|
||||
duplicateSet.insert(mesh.nInternalFaces() + bFacei);
|
||||
duplicateSet.insert(mesh.nInternalFaces() + otherFacei);
|
||||
}
|
||||
}
|
||||
|
||||
Pout<< "Writing " << duplicateSet.size()
|
||||
<< " duplicate faces to faceSet " << duplicateSet.localObjectPath()
|
||||
<< nl << endl;
|
||||
duplicateSet.write();
|
||||
}
|
||||
|
||||
return duplicates;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Detect faces that share points (baffles).\n"
|
||||
"Merge them or duplicate the points."
|
||||
"Detect faces that share points (baffles)\n"
|
||||
"and merge them into internal faces."
|
||||
);
|
||||
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addRegionOption.H"
|
||||
argList::addBoolOption
|
||||
(
|
||||
"detectOnly",
|
||||
"find baffles only, but do not merge or split them"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"split",
|
||||
"topologically split duplicate surfaces"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"fields",
|
||||
"update fields"
|
||||
@ -251,28 +190,10 @@ int main(int argc, char *argv[])
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const bool split = args.optionFound("split");
|
||||
const bool overwrite = args.optionFound("overwrite");
|
||||
const bool detectOnly = args.optionFound("detectOnly");
|
||||
const bool fields = args.optionFound("fields");
|
||||
|
||||
// Collect all boundary faces
|
||||
labelList boundaryFaces(mesh.nFaces() - mesh.nInternalFaces());
|
||||
|
||||
forAll(boundaryFaces, i)
|
||||
{
|
||||
boundaryFaces[i] = i+mesh.nInternalFaces();
|
||||
}
|
||||
|
||||
|
||||
if (detectOnly)
|
||||
{
|
||||
findBaffles(mesh, boundaryFaces);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
// Read objects in time directory
|
||||
IOobjectList objects(mesh, runTime.timeName());
|
||||
@ -283,39 +204,11 @@ int main(int argc, char *argv[])
|
||||
#include "readSurfaceFields.H"
|
||||
#include "readPointFields.H"
|
||||
|
||||
Info<< endl;
|
||||
|
||||
|
||||
// Mesh change engine
|
||||
polyTopoChange meshMod(mesh);
|
||||
|
||||
|
||||
if (split)
|
||||
{
|
||||
Pout<< "Topologically splitting duplicate surfaces"
|
||||
<< ", i.e. duplicating points internal to duplicate surfaces."
|
||||
<< nl << endl;
|
||||
|
||||
// Analyse which points need to be duplicated
|
||||
localPointRegion regionSide(mesh);
|
||||
|
||||
// Point duplication engine
|
||||
duplicatePoints pointDuplicator(mesh);
|
||||
|
||||
// Insert topo changes
|
||||
pointDuplicator.setRefinement(regionSide, meshMod);
|
||||
}
|
||||
else
|
||||
{
|
||||
Pout<< "Merging duplicate faces."
|
||||
<< nl << endl;
|
||||
|
||||
// Get all duplicate face labels (in boundaryFaces indices!).
|
||||
labelList duplicates(findBaffles(mesh, boundaryFaces));
|
||||
|
||||
// Merge into internal faces.
|
||||
insertDuplicateMerge(mesh, duplicates, meshMod);
|
||||
}
|
||||
// Merge duplicate boundary faces into internal faces.
|
||||
mergeDuplicateBoundaryFaces(mesh, meshMod);
|
||||
|
||||
if (!overwrite)
|
||||
{
|
||||
@ -338,38 +231,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
mesh.setInstance(oldInstance);
|
||||
}
|
||||
Pout<< "Writing mesh to time " << runTime.timeName() << endl;
|
||||
|
||||
Info<< "Writing mesh to time " << runTime.timeName() << endl;
|
||||
mesh.write();
|
||||
|
||||
// Dump duplicated points (if any)
|
||||
if (split)
|
||||
{
|
||||
const labelList& pointMap = map().pointMap();
|
||||
|
||||
labelList nDupPerPoint(map().nOldPoints(), 0);
|
||||
|
||||
pointSet dupPoints(mesh, "duplicatedPoints", 100);
|
||||
|
||||
forAll(pointMap, pointi)
|
||||
{
|
||||
label oldPointi = pointMap[pointi];
|
||||
|
||||
nDupPerPoint[oldPointi]++;
|
||||
|
||||
if (nDupPerPoint[oldPointi] > 1)
|
||||
{
|
||||
dupPoints.insert(map().reversePointMap()[oldPointi]);
|
||||
dupPoints.insert(pointi);
|
||||
}
|
||||
}
|
||||
|
||||
Pout<< "Writing " << dupPoints.size()
|
||||
<< " duplicated points to pointSet "
|
||||
<< dupPoints.localObjectPath() << nl << endl;
|
||||
|
||||
dupPoints.write();
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
@ -1,3 +0,0 @@
|
||||
mergeOrSplitBaffles.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/mergeOrSplitBaffles
|
||||
@ -0,0 +1,3 @@
|
||||
splitBaffles.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/splitBaffles
|
||||
@ -0,0 +1,9 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-ldynamicMesh
|
||||
@ -0,0 +1,125 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 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/>.
|
||||
|
||||
Application
|
||||
splitBaffles
|
||||
|
||||
Description
|
||||
Detects faces that share points (baffles) and duplicates the points to
|
||||
separate them
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "Time.H"
|
||||
#include "polyTopoChange.H"
|
||||
#include "localPointRegion.H"
|
||||
#include "duplicatePoints.H"
|
||||
#include "ReadFields.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "pointFields.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Detect faces that share points (baffles)\n"
|
||||
"and duplicate the points to separate them."
|
||||
);
|
||||
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addRegionOption.H"
|
||||
argList::addBoolOption
|
||||
(
|
||||
"fields",
|
||||
"update fields"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const bool overwrite = args.optionFound("overwrite");
|
||||
const bool fields = args.optionFound("fields");
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
// Read objects in time directory
|
||||
IOobjectList objects(mesh, runTime.timeName());
|
||||
|
||||
if (fields) Info<< "Reading geometric fields" << nl << endl;
|
||||
|
||||
#include "readVolFields.H"
|
||||
#include "readSurfaceFields.H"
|
||||
#include "readPointFields.H"
|
||||
|
||||
// Mesh change engine
|
||||
polyTopoChange meshMod(mesh);
|
||||
|
||||
// Analyse which points need to be duplicated
|
||||
localPointRegion regionSide(mesh);
|
||||
|
||||
// Point duplication engine
|
||||
duplicatePoints pointDuplicator(mesh);
|
||||
|
||||
// Insert topo changes
|
||||
pointDuplicator.setRefinement(regionSide, meshMod);
|
||||
|
||||
if (!overwrite)
|
||||
{
|
||||
runTime++;
|
||||
}
|
||||
|
||||
// Change the mesh. No inflation.
|
||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false);
|
||||
|
||||
// Update fields
|
||||
mesh.updateMesh(map);
|
||||
|
||||
// Move mesh (since morphing does not do this)
|
||||
if (map().hasMotionPoints())
|
||||
{
|
||||
mesh.movePoints(map().preMotionPoints());
|
||||
}
|
||||
|
||||
if (overwrite)
|
||||
{
|
||||
mesh.setInstance(oldInstance);
|
||||
}
|
||||
|
||||
Info<< "Writing mesh to time " << runTime.timeName() << endl;
|
||||
mesh.write();
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
47
bin/mergeOrSplitBaffles
Executable file
47
bin/mergeOrSplitBaffles
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2021 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/>.
|
||||
#
|
||||
# Script
|
||||
# mergeOrSplitBaffles
|
||||
#
|
||||
# Description
|
||||
# Script to inform the user that mergeOrSplitBaffles has been replaced
|
||||
# by separate splitBaffles and mergeBaffles utilities.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
The mergeOrSplitBaffles utility has been replaced by the splitBaffles and
|
||||
mergeBaffles utilities.
|
||||
|
||||
If mergeOrSplitBaffles was previously being called with the "-split" option,
|
||||
then splitBaffles should now be called instead.
|
||||
|
||||
If mergeOrSplitBaffles was previously being called without the "-split" option,
|
||||
then mergeBaffles should now be called instead.
|
||||
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -235,6 +235,7 @@ do
|
||||
sed -n '/^options/,/^$/p' | \
|
||||
grep -E "^[\t ]*-" | \
|
||||
tr -s " ")
|
||||
[ -z "$optList" ] && continue
|
||||
|
||||
# Categorise options ...
|
||||
|
||||
|
||||
@ -2123,6 +2123,31 @@ _mdInitialise_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _mdInitialise_ mdInitialise
|
||||
|
||||
_mergeBaffles_ ()
|
||||
{
|
||||
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 -doc -fields -fileHandler -help -hostRoots -libs -noFunctionObjects -overwrite -parallel -region -roots -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _mergeBaffles_ mergeBaffles
|
||||
|
||||
_mergeMeshes_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -2149,31 +2174,6 @@ _mergeMeshes_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _mergeMeshes_ mergeMeshes
|
||||
|
||||
_mergeOrSplitBaffles_ ()
|
||||
{
|
||||
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 -detectOnly -doc -fields -fileHandler -help -hostRoots -libs -noFunctionObjects -overwrite -parallel -region -roots -split -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _mergeOrSplitBaffles_ mergeOrSplitBaffles
|
||||
|
||||
_mhdFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -3729,6 +3729,31 @@ _solidEquilibriumDisplacementFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _solidEquilibriumDisplacementFoam_ solidEquilibriumDisplacementFoam
|
||||
|
||||
_splitBaffles_ ()
|
||||
{
|
||||
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 -doc -fields -fileHandler -help -hostRoots -libs -noFunctionObjects -overwrite -parallel -region -roots -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-region|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _splitBaffles_ splitBaffles
|
||||
|
||||
_splitCells_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5038,62 +5063,26 @@ _zipUpMesh_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _zipUpMesh_ zipUpMesh
|
||||
|
||||
_coalChemistryFoam_ ()
|
||||
_foamCleanCase_ ()
|
||||
{
|
||||
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=""
|
||||
opts="-case -help"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _coalChemistryFoam_ coalChemistryFoam
|
||||
|
||||
_compressibleInterFilmFoam_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _compressibleInterFilmFoam_ compressibleInterFilmFoam
|
||||
|
||||
_DPMFoam_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _DPMFoam_ DPMFoam
|
||||
complete -o filenames -o nospace -F _foamCleanCase_ foamCleanCase
|
||||
|
||||
_foamCleanPath_ ()
|
||||
{
|
||||
@ -5114,29 +5103,6 @@ _foamCleanPath_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _foamCleanPath_ foamCleanPath
|
||||
|
||||
_foamCleanPolyMesh_ ()
|
||||
{
|
||||
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 -help -region"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-region)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _foamCleanPolyMesh_ foamCleanPolyMesh
|
||||
|
||||
_foamCleanTutorials_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5546,44 +5512,6 @@ _foamTags_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _foamTags_ foamTags
|
||||
|
||||
_icoUncoupledKinematicParcelFoam_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _icoUncoupledKinematicParcelFoam_ icoUncoupledKinematicParcelFoam
|
||||
|
||||
_interPhaseChangeFoam_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _interPhaseChangeFoam_ interPhaseChangeFoam
|
||||
|
||||
_mpirunDebug_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5603,25 +5531,6 @@ _mpirunDebug_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _mpirunDebug_ mpirunDebug
|
||||
|
||||
_MPPICFoam_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _MPPICFoam_ MPPICFoam
|
||||
|
||||
_paraFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5645,44 +5554,6 @@ _paraFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _paraFoam_ paraFoam
|
||||
|
||||
_reactingParcelFoam_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _reactingParcelFoam_ reactingParcelFoam
|
||||
|
||||
_uncoupledKinematicParcelFoam_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _uncoupledKinematicParcelFoam_ uncoupledKinematicParcelFoam
|
||||
|
||||
_wclean_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5705,26 +5576,6 @@ _wclean_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _wclean_ wclean
|
||||
|
||||
_wcleanLnIncludeAll_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra="-d"
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-*) ;;
|
||||
*) opts="";;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _wcleanLnIncludeAll_ wcleanLnIncludeAll
|
||||
|
||||
_wcleanPlatform_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5923,25 +5774,6 @@ _wmakePrintBuild_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _wmakePrintBuild_ wmakePrintBuild
|
||||
|
||||
_wmakeScheduler_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _wmakeScheduler_ wmakeScheduler
|
||||
|
||||
_wmakeSchedulerUptime_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5961,25 +5793,6 @@ _wmakeSchedulerUptime_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _wmakeSchedulerUptime_ wmakeSchedulerUptime
|
||||
|
||||
_wrmdep_ ()
|
||||
{
|
||||
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=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _wrmdep_ wrmdep
|
||||
|
||||
_wrmo_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
@ -10,7 +10,7 @@ runApplication blockMesh
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
runApplication splitBaffles -overwrite
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ runParallel snappyHexMesh -overwrite
|
||||
|
||||
# Convert the face zones into mapped wall baffles and split
|
||||
runParallel createBaffles -overwrite
|
||||
runParallel mergeOrSplitBaffles -split -overwrite
|
||||
runParallel splitBaffles -overwrite
|
||||
rm -rf processor*/constant/polyMesh/pointLevel
|
||||
|
||||
# Run snappy again to create layers
|
||||
|
||||
@ -14,7 +14,7 @@ runApplication snappyHexMesh -overwrite
|
||||
|
||||
# Create the inlet/outlet and AMI patches
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
runApplication splitBaffles -overwrite
|
||||
|
||||
# Renumbering
|
||||
runApplication renumberMesh -noFields -overwrite
|
||||
|
||||
@ -8,7 +8,7 @@ application=$(getApplication)
|
||||
|
||||
runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/mixerVessel2D
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
runApplication splitBaffles -overwrite
|
||||
runApplication topoSet
|
||||
|
||||
#runApplication $application
|
||||
|
||||
@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/mixerVessel2D
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
runApplication splitBaffles -overwrite
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
@ -12,6 +12,6 @@ runApplication blockMesh
|
||||
runApplication surfaceFeatures
|
||||
runApplication snappyHexMesh -overwrite
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
runApplication splitBaffles -overwrite
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -13,7 +13,7 @@ runApplication snappyHexMesh -overwrite
|
||||
|
||||
# Create the inlet/outlet and AMI patches
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
runApplication splitBaffles -overwrite
|
||||
|
||||
# Renumbering
|
||||
runApplication renumberMesh -noFields -overwrite
|
||||
|
||||
@ -8,7 +8,7 @@ application=$(getApplication)
|
||||
|
||||
runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/mixerVessel2D
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
runApplication splitBaffles -overwrite
|
||||
|
||||
runApplication $application
|
||||
|
||||
|
||||
Reference in New Issue
Block a user