snappyHexMeshConfig: added '-noBackground' option to prevent writing of a blockMeshDict file

This commit is contained in:
Chris Greenshields
2024-07-27 17:11:02 +01:00
parent a246faf1c1
commit 0070ddccb5

View File

@ -107,6 +107,9 @@ Usage
- \par -cylindricalBackground - \par -cylindricalBackground
Generate a cylindrical background mesh aligned with the z-axis Generate a cylindrical background mesh aligned with the z-axis
- \par -noBackground
Do not write a blockMeshDict file
- \par -refineBackground \<int\> - \par -refineBackground \<int\>
Integer multiplier for the number of cells (>= 1) Integer multiplier for the number of cells (>= 1)
@ -245,6 +248,12 @@ int main(int argc, char *argv[])
"generate a cylindrical background mesh aligned with the z-axis" "generate a cylindrical background mesh aligned with the z-axis"
); );
argList::addBoolOption
(
"noBackground",
"do not write a blockMeshDict file"
);
argList::addOption argList::addOption
( (
"refineBackground", "refineBackground",
@ -513,39 +522,42 @@ int main(int argc, char *argv[])
const bool clearBoundary(args.optionFound("clearBoundary")); const bool clearBoundary(args.optionFound("clearBoundary"));
if (args.optionFound("cylindricalBackground")) if (!args.optionFound("noBackground"))
{ {
blockMeshCylindricalConfiguration blockMeshConfig if (args.optionFound("cylindricalBackground"))
( {
"blockMeshDict", blockMeshCylindricalConfiguration blockMeshConfig
runTime.system(), (
runTime, "blockMeshDict",
surfaces, runTime.system(),
args.optionFound("bounds"), runTime,
nCells, surfaces,
refineFactor, args.optionFound("bounds"),
patchOpts, nCells,
clearBoundary refineFactor,
); patchOpts,
clearBoundary
);
blockMeshConfig.write(); blockMeshConfig.write();
} }
else else
{ {
blockMeshCartesianConfiguration blockMeshConfig blockMeshCartesianConfiguration blockMeshConfig
( (
"blockMeshDict", "blockMeshDict",
runTime.system(), runTime.system(),
runTime, runTime,
surfaces, surfaces,
args.optionFound("bounds"), args.optionFound("bounds"),
nCells, nCells,
refineFactor, refineFactor,
patchOpts, patchOpts,
clearBoundary clearBoundary
); );
blockMeshConfig.write(); blockMeshConfig.write();
}
} }
// snappyHexMeshDict options // snappyHexMeshDict options