mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: change foamUpgradeCyclics -test option to -dry-run
This commit is contained in:
@ -34,7 +34,7 @@ Usage
|
|||||||
\b foamUpgradeCyclics [OPTION]
|
\b foamUpgradeCyclics [OPTION]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
- \par -test
|
- \par -dry-run
|
||||||
Suppress writing the updated files with split cyclics
|
Suppress writing the updated files with split cyclics
|
||||||
|
|
||||||
- \par -enableFunctionEntries
|
- \par -enableFunctionEntries
|
||||||
@ -70,7 +70,7 @@ namespace Foam
|
|||||||
// Read boundary file without reading mesh
|
// Read boundary file without reading mesh
|
||||||
void rewriteBoundary
|
void rewriteBoundary
|
||||||
(
|
(
|
||||||
const bool isTestRun,
|
const bool dryrun,
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const fileName& regionPrefix,
|
const fileName& regionPrefix,
|
||||||
HashTable<word>& thisNames,
|
HashTable<word>& thisNames,
|
||||||
@ -237,9 +237,9 @@ void rewriteBoundary
|
|||||||
|
|
||||||
if (returnReduce(nOldCyclics, sumOp<label>()) > 0)
|
if (returnReduce(nOldCyclics, sumOp<label>()) > 0)
|
||||||
{
|
{
|
||||||
if (isTestRun)
|
if (dryrun)
|
||||||
{
|
{
|
||||||
//Info<< "-test option: no changes made" << nl << endl;
|
//Info<< "-dry-run option: no changes made" << nl << endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -263,7 +263,7 @@ void rewriteBoundary
|
|||||||
|
|
||||||
void rewriteField
|
void rewriteField
|
||||||
(
|
(
|
||||||
const bool isTestRun,
|
const bool dryrun,
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const HashTable<word>& thisNames,
|
const HashTable<word>& thisNames,
|
||||||
@ -342,7 +342,7 @@ void rewriteField
|
|||||||
|
|
||||||
if (returnReduce(nChanged, sumOp<label>()) > 0)
|
if (returnReduce(nChanged, sumOp<label>()) > 0)
|
||||||
{
|
{
|
||||||
if (isTestRun)
|
if (dryrun)
|
||||||
{
|
{
|
||||||
//Info<< "-test option: no changes made" << endl;
|
//Info<< "-test option: no changes made" << endl;
|
||||||
}
|
}
|
||||||
@ -369,7 +369,7 @@ void rewriteField
|
|||||||
|
|
||||||
void rewriteFields
|
void rewriteFields
|
||||||
(
|
(
|
||||||
const bool isTestRun,
|
const bool dryrun,
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
const wordList& fieldNames,
|
const wordList& fieldNames,
|
||||||
const HashTable<word>& thisNames,
|
const HashTable<word>& thisNames,
|
||||||
@ -380,7 +380,7 @@ void rewriteFields
|
|||||||
{
|
{
|
||||||
rewriteField
|
rewriteField
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
fieldName,
|
fieldName,
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -395,7 +395,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
|
|
||||||
argList::addBoolOption("test", "test only; do not change any files");
|
argList::addOptionCompat("dry-run", {"test", 1806});
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"dry-run",
|
||||||
|
"test only do not change any files"
|
||||||
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"enableFunctionEntries",
|
"enableFunctionEntries",
|
||||||
@ -414,10 +419,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
const bool isTestRun = args.found("test");
|
const bool dryrun = args.found("dry-run");
|
||||||
if (isTestRun)
|
if (dryrun)
|
||||||
{
|
{
|
||||||
Info<< "-test option: no changes made" << nl << endl;
|
Info<< "-dry-run option: no changes made" << nl << endl;
|
||||||
}
|
}
|
||||||
const bool enableEntries = args.found("enableFunctionEntries");
|
const bool enableEntries = args.found("enableFunctionEntries");
|
||||||
|
|
||||||
@ -452,7 +457,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
rewriteBoundary
|
rewriteBoundary
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
io,
|
io,
|
||||||
regionPrefix,
|
regionPrefix,
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -486,7 +491,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
rewriteBoundary
|
rewriteBoundary
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
io,
|
io,
|
||||||
regionPrefix,
|
regionPrefix,
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -510,7 +515,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(volScalarField::typeName),
|
objects.names(volScalarField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -518,7 +523,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(volVectorField::typeName),
|
objects.names(volVectorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -526,7 +531,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(volSphericalTensorField::typeName),
|
objects.names(volSphericalTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -534,7 +539,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(volSymmTensorField::typeName),
|
objects.names(volSymmTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -542,7 +547,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(volTensorField::typeName),
|
objects.names(volTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -555,7 +560,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(pointScalarField::typeName),
|
objects.names(pointScalarField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -563,7 +568,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(pointVectorField::typeName),
|
objects.names(pointVectorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -571,7 +576,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(pointSphericalTensorField::typeName),
|
objects.names(pointSphericalTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -579,7 +584,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(pointSymmTensorField::typeName),
|
objects.names(pointSymmTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -587,7 +592,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(pointTensorField::typeName),
|
objects.names(pointTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -600,7 +605,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(surfaceScalarField::typeName),
|
objects.names(surfaceScalarField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -608,7 +613,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(surfaceVectorField::typeName),
|
objects.names(surfaceVectorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -616,7 +621,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(surfaceSphericalTensorField::typeName),
|
objects.names(surfaceSphericalTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -624,7 +629,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(surfaceSymmTensorField::typeName),
|
objects.names(surfaceSymmTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
@ -632,7 +637,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
rewriteFields
|
rewriteFields
|
||||||
(
|
(
|
||||||
isTestRun,
|
dryrun,
|
||||||
runTime,
|
runTime,
|
||||||
objects.names(surfaceTensorField::typeName),
|
objects.names(surfaceTensorField::typeName),
|
||||||
thisNames,
|
thisNames,
|
||||||
|
|||||||
@ -95,7 +95,7 @@ _of_complete_cache_[foamToStarMesh]="-case -fileHandler -scale -time | -constant
|
|||||||
_of_complete_cache_[foamToSurface]="-case -fileHandler -scale -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -tri -doc -doc-source -help -help-full"
|
_of_complete_cache_[foamToSurface]="-case -fileHandler -scale -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -tri -doc -doc-source -help -help-full"
|
||||||
_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 -help-full"
|
_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 -help-full"
|
||||||
_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 -newTimes -noFaceZones -noFunctionObjects -noInternal -noLagrangian -noLinks -noPointValues -noZero -parallel -poly -surfaceFields -useTimeName -xml -doc -doc-source -help -help-full"
|
_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 -newTimes -noFaceZones -noFunctionObjects -noInternal -noLagrangian -noLinks -noPointValues -noZero -parallel -poly -surfaceFields -useTimeName -xml -doc -doc-source -help -help-full"
|
||||||
_of_complete_cache_[foamUpgradeCyclics]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -test -doc -doc-source -help -help-full"
|
_of_complete_cache_[foamUpgradeCyclics]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -region -roots -time | -constant -dry-run -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -doc -doc-source -help -help-full"
|
||||||
_of_complete_cache_[foamyHexMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -checkGeometry -conformationOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help -help-full"
|
_of_complete_cache_[foamyHexMesh]="-case -decomposeParDict -fileHandler -hostRoots -listScalarBCs -listVectorBCs -roots | -checkGeometry -conformationOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -doc -doc-source -help -help-full"
|
||||||
_of_complete_cache_[foamyQuadMesh]="-case -fileHandler -pointsFile | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -doc -doc-source -help -help-full"
|
_of_complete_cache_[foamyQuadMesh]="-case -fileHandler -pointsFile | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -doc -doc-source -help -help-full"
|
||||||
_of_complete_cache_[gambitToFoam]="-case -fileHandler -scale | -noFunctionObjects -doc -doc-source -help -help-full"
|
_of_complete_cache_[gambitToFoam]="-case -fileHandler -scale | -noFunctionObjects -doc -doc-source -help -help-full"
|
||||||
|
|||||||
Reference in New Issue
Block a user