diff --git a/applications/test/FixedList/Test-FixedList.C b/applications/test/FixedList/Test-FixedList.C index 9fd0fde37aaef29daa22ce47f64f4c38d78dd2e3..b057b43f2765880829328a6e1a2d54b19a3d6e8c 100644 --- a/applications/test/FixedList/Test-FixedList.C +++ b/applications/test/FixedList/Test-FixedList.C @@ -34,8 +34,7 @@ See also #include "argList.H" #include "FixedList.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "IPstream.H" #include "OPstream.H" diff --git a/applications/test/argList/Make/files b/applications/test/argList/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..f1d558cc1c3061c0b5de2a80b548a6eca4889b1a --- /dev/null +++ b/applications/test/argList/Make/files @@ -0,0 +1,3 @@ +Test-argList.C + +EXE = $(FOAM_USER_APPBIN)/Test-argList diff --git a/applications/test/argList/Make/options b/applications/test/argList/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..6a9e9810b3d5ce6684bdaf03143933480ff45e42 --- /dev/null +++ b/applications/test/argList/Make/options @@ -0,0 +1,2 @@ +/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ +/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/argList/Test-argList.C b/applications/test/argList/Test-argList.C new file mode 100644 index 0000000000000000000000000000000000000000..50763f15afb5aa6bc2583e185b76849ba52b389c --- /dev/null +++ b/applications/test/argList/Test-argList.C @@ -0,0 +1,80 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "IOstreams.H" +#include "StringStream.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + argList::noBanner(); + argList::noParallel(); + argList::noFunctionObjects(); + argList::removeOption("case"); + + argList::addOption("label", "value", "Test parsing of label"); + argList::addOption("scalar", "value", "Test parsing of scalar"); + + argList args(argc, argv); + + label ival; + scalar sval; + + Info<< nl; + + Info<< "-label = " << flush; + if (args.optionReadIfPresent("label", ival)) + { + Info<< ival << endl; + } + else + { + Info<< "not specified" << endl; + } + + Info<< "-scalar = " << flush; + if (args.optionReadIfPresent("scalar", sval)) + { + Info<< sval << endl; + } + else + { + Info<< "not specified" << endl; + } + + Info<< "\nEnd\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/test/primitivePatch/Test-PrimitivePatch.C b/applications/test/primitivePatch/Test-PrimitivePatch.C index 97b3c0cc9383c41fe569f9fd3df004167300ca61..9fa8e4709b642d35ee184b6717fddea381a6d286 100644 --- a/applications/test/primitivePatch/Test-PrimitivePatch.C +++ b/applications/test/primitivePatch/Test-PrimitivePatch.C @@ -31,8 +31,7 @@ Description #include "Time.H" #include "polyMesh.H" #include "primitivePatch.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" using namespace Foam; diff --git a/applications/test/primitives/Make/files b/applications/test/primitives/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..44e878cb0468703cf5375dd327152856e33613f0 --- /dev/null +++ b/applications/test/primitives/Make/files @@ -0,0 +1,3 @@ +Test-primitives.C + +EXE = $(FOAM_USER_APPBIN)/Test-primitives diff --git a/applications/test/primitives/Make/options b/applications/test/primitives/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..7ce182425d9bee4bef91ba2a36b6b8475fc1aeb2 --- /dev/null +++ b/applications/test/primitives/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/fileFormats/lnInclude + +EXE_LIBS = \ + -lfileFormats diff --git a/applications/test/primitives/Test-primitives.C b/applications/test/primitives/Test-primitives.C new file mode 100644 index 0000000000000000000000000000000000000000..72017bfee9d32e94053928cca75c90b896ded4ba --- /dev/null +++ b/applications/test/primitives/Test-primitives.C @@ -0,0 +1,198 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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/>. + +Application + Test-primitives + +Description + Parsing etc for primitives. + +\*---------------------------------------------------------------------------*/ + +#include "scalar.H" +#include "label.H" +#include "StringStream.H" +#include "NASCore.H" +#include "parsing.H" +#include "Tuple2.H" + +using namespace Foam; + +// Shadow fileFormats::NASCore::readNasScalar +inline scalar readNasScalar(const std::string& str) +{ + return fileFormats::NASCore::readNasScalar(str); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class TYPE> +unsigned testParsing +( + TYPE (*function)(const std::string&), + const List<Tuple2<std::string, bool>>& tests +) +{ + unsigned nFail = 0; + + // Expect some failures + const bool prev = FatalIOError.throwExceptions(); + + for (const Tuple2<std::string, bool>& test : tests) + { + const std::string& str = test.first(); + const bool expected = test.second(); + + bool parsed = true; + + TYPE val; + try + { + val = function (str); + } + catch (Foam::error& err) + { + parsed = false; + } + + if (parsed) + { + if (expected) + { + Info<< "(pass) parsed " << str << " = " << val << nl; + } + else + { + ++nFail; + Info<< "(fail) unexpected success for " << str << nl; + } + } + else + { + if (expected) + { + ++nFail; + Info<< "(fail) unexpected failure " << str << nl; + } + else + { + Info<< "(pass) expected failure " << str << nl; + } + } + } + + FatalIOError.throwExceptions(prev); + + return nFail; +} + + +int main(int argc, char *argv[]) +{ + unsigned nFail = 0; + + { + Info<< nl << "Test readDouble:" << nl; + nFail += testParsing + ( + &readDouble, + { + { "", false }, + { " ", false }, + { " xxx ", false }, + { " 1234E-", false }, + { " 1234E junk", false }, + { " 3.14159 ", true }, + { " 31.4159E-1 " , true }, + } + ); + } + + { + Info<< nl << "Test readFloat:" << nl; + nFail += testParsing + ( + &readFloat, + { + { " 3.14159 ", true }, + { " 31.4159E-1 " , true }, + { " 31.4159E200 " , false }, + { " 31.4159E20 " , true }, + } + ); + } + + { + Info<< nl << "Test readNasScalar:" << nl; + nFail += testParsing + ( + &readNasScalar, + { + { " 3.14159 ", true }, + { " 31.4159E-1 " , true }, + { " 314.159-2 " , true }, + { " 31.4159E200 " , true }, + { " 31.4159E20 " , true }, + } + ); + } + + { + Info<< nl << "Test readInt32 (max= " << INT32_MAX << "):" << nl; + nFail += testParsing + ( + &readInt32, + { + { " 3.14159 ", false }, + { " 31.4159E-1 " , false }, + { "100" , true }, + { " 2147483644" , true }, + { " 2147483700 " , false }, + } + ); + } + + { + Info<< nl << "Test readUint32 (max= " << INT32_MAX << "):" << nl; + nFail += testParsing + ( + &readUint32, + { + { " 2147483644" , true }, + { " 2147483700 " , true }, + } + ); + } + + if (nFail) + { + Info<< nl << "failed " << nFail << " tests" << nl; + return 1; + } + + Info<< nl << "passed all tests" << nl; + return 0; +} + +// ************************************************************************* // diff --git a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C index 94e151f69c079b6c263bece2d514a80783a37381..f222e9c2c151f188f396052944540a72c76f00de 100644 --- a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C +++ b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C @@ -35,8 +35,7 @@ Description #include "joints.H" #include "rigidBodyRestraint.H" #include "rigidBodyModelState.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "constants.H" using namespace Foam; diff --git a/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C index 91a59104ed471933c459d48b687bd3e9737be8be..1ec432613b2154e42697d1723cd44582a2fb4f0e 100644 --- a/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C +++ b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C @@ -35,8 +35,7 @@ Description #include "joints.H" #include "rigidBodyRestraint.H" #include "rigidBodyModelState.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" using namespace Foam; using namespace RBD; diff --git a/applications/test/rigidBodyDynamics/spring/spring.C b/applications/test/rigidBodyDynamics/spring/spring.C index 15e9034b30949594016a20f19ece54ada509726a..bec262ec1b9a655dc99c300498418ed829f8a0fb 100644 --- a/applications/test/rigidBodyDynamics/spring/spring.C +++ b/applications/test/rigidBodyDynamics/spring/spring.C @@ -35,8 +35,7 @@ Description #include "joints.H" #include "rigidBodyRestraint.H" #include "rigidBodyModelState.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" using namespace Foam; using namespace RBD; diff --git a/applications/test/router/Test-processorRouter.C b/applications/test/router/Test-processorRouter.C index 48fc4ab61b102a26e41999583387b62f960fa48e..4f47c80b63dac78800ba08312cd1805aeff79dc8 100644 --- a/applications/test/router/Test-processorRouter.C +++ b/applications/test/router/Test-processorRouter.C @@ -28,8 +28,7 @@ Description #include "argList.H" #include "label.H" #include "labelList.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "point.H" #include "Time.H" #include "fvMesh.H" diff --git a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C index 3a6cdfe11aea93a4ebc18c7535a67d5311b089b2..613c0133b83a2787273a8cb6db212181beaa34dd 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C +++ b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C @@ -38,9 +38,8 @@ Description #include "Time.H" #include "hexRef8.H" #include "cellSet.H" -#include "OFstream.H" +#include "Fstream.H" #include "meshTools.H" -#include "IFstream.H" #include "polyTopoChange.H" #include "mapPolyMesh.H" #include "volMesh.H" diff --git a/applications/utilities/mesh/conversion/datToFoam/datToFoam.C b/applications/utilities/mesh/conversion/datToFoam/datToFoam.C index 7cc4fbffb86cc8963724e708ff35918424c66846..e2961713106c2ea3e2589b2a8170530966802a0e 100644 --- a/applications/utilities/mesh/conversion/datToFoam/datToFoam.C +++ b/applications/utilities/mesh/conversion/datToFoam/datToFoam.C @@ -35,8 +35,7 @@ Description #include "argList.H" #include "Time.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "pointField.H" #include "unitConversion.H" diff --git a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C index 56653cc9217fd705008abf6f74c8820e36e99c0e..c88defe7020ba445a810df3f993a8f0f9050c12e 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C +++ b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C @@ -35,8 +35,7 @@ Description #include "argList.H" #include "Time.H" #include "polyMesh.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "cellShape.H" #include "cellModeller.H" #include "preservePatchTypes.H" diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C index e4b5e8b4e8767d18e72abd144638ad451c7bde9a..cc2494160244f8bc024239dcab1d70ce15628ea6 100644 --- a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C +++ b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C @@ -93,8 +93,8 @@ int main(int argc, char *argv[]) const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); - bool readBlank = !args.optionFound("noBlank"); - bool singleBlock = args.optionFound("singleBlock"); + const bool readBlank = !args.optionFound("noBlank"); + const bool singleBlock = args.optionFound("singleBlock"); scalar twoDThickness = -1; if (args.optionReadIfPresent("2D", twoDThickness)) { diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 3a7b554ee282256a46613bddcb73dccf03a5c05f..a290259e62fa3351bcf99ca57e95eb1402f2e209 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -41,8 +41,7 @@ Description #include "faceSet.H" #include "pointSet.H" #include "topoSetSource.H" -#include "OFstream.H" -#include "IFstream.H" +#include "Fstream.H" #include "demandDrivenData.H" #include "foamVtkWriteCellSetFaces.H" #include "foamVtkWriteFaceSet.H" diff --git a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C index 6d6dca2c76b8efe031e181466f03baac724ad770..e4c31862614e380aafdfe8c12f0c9031308b9c8f 100644 --- a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C +++ b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C @@ -114,8 +114,7 @@ Usage #include "argList.H" #include "profiling.H" #include "Time.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "includeEntry.H" using namespace Foam; diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 004af363fb1a6d71e9b4e6096183a359eaf0a8ce..b1d04b6d9bac0d825268a0184a7790d47e41cda0 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -275,6 +275,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" + bool region = args.optionFound("region"); bool allRegions = args.optionFound("allRegions"); bool writeCellDist = args.optionFound("cellDist"); bool copyZero = args.optionFound("copyZero"); @@ -392,7 +393,7 @@ int main(int argc, char *argv[]) Info<< "Using existing processor directories" << nl; } - if (args.optionFound("region")) + if (region || allRegions) { procDirsProblem = false; forceOverwrite = false; diff --git a/applications/utilities/parallelProcessing/redistributePar/Make/files b/applications/utilities/parallelProcessing/redistributePar/Make/files index 1dfb53f3078d8ccc1cac85efabd4c377b6451fef..3447baa3d827dac259a561af26c9b1b35024cb1a 100644 --- a/applications/utilities/parallelProcessing/redistributePar/Make/files +++ b/applications/utilities/parallelProcessing/redistributePar/Make/files @@ -1,3 +1,4 @@ +passivePositionParticleCloud.C parLagrangianRedistributor.C parFvFieldReconstructor.C loadOrCreateMesh.C diff --git a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C index 73cfda6582ef52e7fa148ffc376e4972f1f0ba17..e35562b6951ca0d561a53aaecd5a27865d553611 100644 --- a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C +++ b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C @@ -25,7 +25,7 @@ License #include "ListOps.H" #include "parLagrangianRedistributor.H" -#include "passiveParticleCloud.H" +#include "passivePositionParticleCloud.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -133,7 +133,7 @@ void Foam::parLagrangianRedistributor::findClouds Foam::autoPtr<Foam::mapDistributeBase> Foam::parLagrangianRedistributor::redistributeLagrangianPositions ( - passiveParticleCloud& lpi + passivePositionParticleCloud& lpi ) const { //Debug(lpi.size()); @@ -147,7 +147,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions { // List of lists of particles to be transferred for all of the // neighbour processors - List<IDLList<passiveParticle>> particleTransferLists + List<IDLList<passivePositionParticle>> particleTransferLists ( Pstream::nProcs() ); @@ -156,17 +156,15 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions labelList destProc(lpi.size()); label particleI = 0; - forAllIter(passiveParticleCloud, lpi, iter) + forAllIter(passivePositionParticleCloud, lpi, iter) { - passiveParticle& ppi = iter(); + passivePositionParticle& ppi = iter(); label destProcI = destinationProcID_[ppi.cell()]; label destCellI = destinationCell_[ppi.cell()]; ppi.cell() = destCellI; destProc[particleI++] = destProcI; - //Pout<< "Sending particle:" << ppi << " to processor " << destProcI - // << " to cell " << destCellI << endl; particleTransferLists[destProcI].append(lpi.remove(&ppi)); } @@ -202,11 +200,11 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions lpi.rename(cloudName + "_old"); // New cloud on tgtMesh - passiveParticleCloud lagrangianPositions + passivePositionParticleCloud lagrangianPositions ( tgtMesh_, cloudName, - IDLList<passiveParticle>() + IDLList<passivePositionParticle>() ); @@ -222,32 +220,28 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions { UIPstream particleStream(procI, pBufs); - IDLList<passiveParticle> newParticles + // Receive particles and locate them + IDLList<passivePositionParticle> newParticles ( particleStream, - passiveParticle::iNew(tgtMesh_) + passivePositionParticle::iNew(tgtMesh_) ); forAllIter ( - IDLList<passiveParticle>, + IDLList<passivePositionParticle>, newParticles, newpIter ) { - passiveParticle& newp = newpIter(); - newp.relocate(); - + passivePositionParticle& newp = newpIter(); lagrangianPositions.addParticle(newParticles.remove(&newp)); } } } - //OFstream::debug = 1; - //Debug(lagrangianPositions.size()); - IOPosition<passiveParticleCloud>(lagrangianPositions).write(); - //OFstream::debug = 0; + IOPosition<passivePositionParticleCloud>(lagrangianPositions).write(); // Restore cloud name lpi.rename(cloudName); @@ -300,7 +294,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions ) const { // Load cloud and send particle - passiveParticleCloud lpi(srcMesh_, cloudName, false); + passivePositionParticleCloud lpi(srcMesh_, cloudName, false); return redistributeLagrangianPositions(lpi); } diff --git a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.H b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.H index 411864ebf1d8fe48bca407fd7cc9fb9ca8604028..f7d1c226cb3d9c520da2cc49c05414ae02bb9a2b 100644 --- a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.H +++ b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.H @@ -49,7 +49,7 @@ namespace Foam class mapDistributePolyMesh; class mapDistributeBase; class IOobjectList; -class passiveParticleCloud; +class passivePositionParticleCloud; /*---------------------------------------------------------------------------*\ Class parLagrangianRedistributor Declaration @@ -112,7 +112,7 @@ public: //- Redistribute and write lagrangian positions autoPtr<mapDistributeBase> redistributeLagrangianPositions ( - passiveParticleCloud& cloud + passivePositionParticleCloud& cloud ) const; //- Read, redistribute and write lagrangian positions @@ -153,7 +153,7 @@ public: template<class Container> static void readLagrangianFields ( - const passiveParticleCloud& cloud, + const passivePositionParticleCloud& cloud, const IOobjectList& objects, const HashSet<word>& selectedFields ); @@ -163,7 +163,7 @@ public: void redistributeStoredLagrangianFields ( const mapDistributeBase& map, - passiveParticleCloud& cloud + passivePositionParticleCloud& cloud ) const; }; diff --git a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributorRedistributeFields.C b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributorRedistributeFields.C index 1eca70bd1eb2bc2aff2146a334dc56af627ff193..c53514fc83ed8d83cfa71eba6e3348dfac00b7bd 100644 --- a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributorRedistributeFields.C +++ b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributorRedistributeFields.C @@ -29,7 +29,7 @@ License #include "mapDistributePolyMesh.H" #include "cloud.H" #include "CompactIOField.H" -#include "passiveParticleCloud.H" +#include "passivePositionParticleCloud.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -223,7 +223,7 @@ void Foam::parLagrangianRedistributor::redistributeLagrangianFieldFields template<class Container> void Foam::parLagrangianRedistributor::readLagrangianFields ( - const passiveParticleCloud& cloud, + const passivePositionParticleCloud& cloud, const IOobjectList& objects, const HashSet<word>& selectedFields ) @@ -272,7 +272,7 @@ template<class Container> void Foam::parLagrangianRedistributor::redistributeStoredLagrangianFields ( const mapDistributeBase& map, - passiveParticleCloud& cloud + passivePositionParticleCloud& cloud ) const { HashTable<Container*> fields diff --git a/applications/utilities/parallelProcessing/redistributePar/passivePositionParticle.H b/applications/utilities/parallelProcessing/redistributePar/passivePositionParticle.H new file mode 100644 index 0000000000000000000000000000000000000000..41cc7c16edd433e6945bb60977f09b57eba72432 --- /dev/null +++ b/applications/utilities/parallelProcessing/redistributePar/passivePositionParticle.H @@ -0,0 +1,183 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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::passivePositionParticle + +Description + Passive particle, transferring in old format (i.e. position instead of + coordinates). Used for e.g. redistributePar. + +SourceFiles + passivePositionParticle.H + +\*---------------------------------------------------------------------------*/ + +#ifndef passivePositionParticle_H +#define passivePositionParticle_H + +#include "passiveParticle.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class passivePositionParticle Declaration +\*---------------------------------------------------------------------------*/ + +class passivePositionParticle +: + public passiveParticle +{ + // Private member data + + //- Cached position + point position_; + + +public: + + // Constructors + + //- Construct from Istream in old format + passivePositionParticle + ( + const polyMesh& mesh, + Istream& is, + bool readFields, + bool newFormat + ) + : + passiveParticle(mesh, is, readFields, newFormat), + position_(position()) + {} + + //- Construct as copy + passivePositionParticle(const passivePositionParticle& p) + : + passiveParticle(p), + position_(p.position_) + {} + + //- Construct and return a clone + virtual autoPtr<particle> clone() const + { + return autoPtr<particle>(new passivePositionParticle(*this)); + } + + + //- Factory class to read-construct particles used for + // parallel transfer + class iNew + { + const polyMesh& mesh_; + + public: + + iNew(const polyMesh& mesh) + : + mesh_(mesh) + {} + + autoPtr<passivePositionParticle> operator()(Istream& is) const + { + return autoPtr<passivePositionParticle> + ( + // Read in old format + new passivePositionParticle(mesh_, is, true, false) + ); + } + }; + + + // Friend Operators + + friend Ostream& operator<< + ( + Ostream& os, + const passivePositionParticle& ppi + ) + { + // Copy data into old format structure. Exact opposite of + // particleIO.C reading old format. + struct oldParticle + { + vector position; + label celli; + label facei; + scalar stepFraction; + label tetFacei; + label tetPti; + label origProc; + label origId; + } p; + + p.position = ppi.position_; + p.celli = ppi.cell(); + p.facei = ppi.face(); + p.stepFraction = ppi.stepFraction(); + p.tetFacei = ppi.tetFace(); + p.tetPti = ppi.tetPt(); + p.origProc = ppi.origProc(); + p.origId = ppi.origId(); + + if (os.format() == IOstream::ASCII) + { + os << p.position + << token::SPACE << p.celli + << token::SPACE << p.facei + << token::SPACE << p.stepFraction + << token::SPACE << p.tetFacei + << token::SPACE << p.tetPti + << token::SPACE << p.origProc + << token::SPACE << p.origId; + } + else + { + const std::size_t sizeofFields + ( + sizeof(oldParticle) - offsetof(oldParticle, position) + ); + + os.write + ( + reinterpret_cast<const char*>(&p.position), + sizeofFields + ); + } + return os; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/redistributePar/passivePositionParticleCloud.C b/applications/utilities/parallelProcessing/redistributePar/passivePositionParticleCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..edd5c3916f3076a74e9c06f77ee97d754aa4132c --- /dev/null +++ b/applications/utilities/parallelProcessing/redistributePar/passivePositionParticleCloud.C @@ -0,0 +1,64 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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 "passivePositionParticleCloud.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTemplateTypeNameAndDebug(Cloud<passivePositionParticle>, 0); +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::passivePositionParticleCloud::passivePositionParticleCloud +( + const polyMesh& mesh, + const word& cloudName, + bool readFields +) +: + Cloud<passivePositionParticle>(mesh, cloudName, false) +{ + if (readFields) + { + passivePositionParticle::readFields(*this); + } +} + + +Foam::passivePositionParticleCloud::passivePositionParticleCloud +( + const polyMesh& mesh, + const word& cloudName, + const IDLList<passivePositionParticle>& particles +) +: + Cloud<passivePositionParticle>(mesh, cloudName, particles) +{} + + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/redistributePar/passivePositionParticleCloud.H b/applications/utilities/parallelProcessing/redistributePar/passivePositionParticleCloud.H new file mode 100644 index 0000000000000000000000000000000000000000..f9a91d0f4265bd0f5b1d79200228ed3d1caf235d --- /dev/null +++ b/applications/utilities/parallelProcessing/redistributePar/passivePositionParticleCloud.H @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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::passivePositionParticleCloud + +Description + A Cloud of passive position particles + +SourceFiles + passivePositionParticleCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef passivePositionParticleCloud_H +#define passivePositionParticleCloud_H + +#include "Cloud.H" +#include "passivePositionParticle.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class passivePositionParticleCloud Declaration +\*---------------------------------------------------------------------------*/ + +class passivePositionParticleCloud +: + public Cloud<passivePositionParticle> +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + passivePositionParticleCloud(const passivePositionParticleCloud&); + + //- Disallow default bitwise assignment + void operator=(const passivePositionParticleCloud&); + + +public: + + // Constructors + + //- Construct given mesh + passivePositionParticleCloud + ( + const polyMesh&, + const word& cloudName = "defaultCloud", + bool readFields = true + ); + + //- Construct from mesh, cloud name, and a list of particles + passivePositionParticleCloud + ( + const polyMesh& mesh, + const word& cloudName, + const IDLList<passivePositionParticle>& particles + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 798d91bf102c2e02e7e1847f084e594a78018ba7..ca116ce38e54a0904cb9b6850c680c7cbb17a588 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -80,7 +80,7 @@ Usage #include "parFvFieldReconstructor.H" #include "parLagrangianRedistributor.H" -#include "unmappedPassiveParticleCloud.H" +#include "unmappedPassivePositionParticleCloud.H" #include "hexRef8Data.H" #include "meshRefinement.H" #include "pointFields.H" @@ -1908,7 +1908,7 @@ void readLagrangian const fvMesh& mesh, const wordList& cloudNames, const HashSet<word>& selectedLagrangianFields, - PtrList<unmappedPassiveParticleCloud>& clouds + PtrList<unmappedPassivePositionParticleCloud>& clouds ) { (void)mesh.tetBasePtIs(); @@ -1919,13 +1919,13 @@ void readLagrangian clouds.set ( i, - new unmappedPassiveParticleCloud(mesh, cloudNames[i], false) + new unmappedPassivePositionParticleCloud(mesh, cloudNames[i], false) ); //forAllConstIter //( - // unmappedPassiveParticleCloud, + // unmappedPassivePositionParticleCloud, // clouds[i], // iter //) @@ -2087,7 +2087,7 @@ void redistributeLagrangian const fvMesh& mesh, const label nOldCells, const mapDistributePolyMesh& distMap, - PtrList<unmappedPassiveParticleCloud>& clouds + PtrList<unmappedPassivePositionParticleCloud>& clouds ) { if (clouds.size()) @@ -2958,7 +2958,7 @@ int main(int argc, char *argv[]) ); // Read lagrangian fields and store on cloud (objectRegistry) - PtrList<unmappedPassiveParticleCloud> clouds(cloudNames.size()); + PtrList<unmappedPassivePositionParticleCloud> clouds(cloudNames.size()); readLagrangian ( mesh, diff --git a/applications/utilities/parallelProcessing/redistributePar/unmappedPassiveParticleCloud.H b/applications/utilities/parallelProcessing/redistributePar/unmappedPassivePositionParticleCloud.H similarity index 77% rename from applications/utilities/parallelProcessing/redistributePar/unmappedPassiveParticleCloud.H rename to applications/utilities/parallelProcessing/redistributePar/unmappedPassivePositionParticleCloud.H index c1b6d6a208151f1c9c28cb28791b1e21309dbecc..c036ac2114430ccfd4cf04265f948e86d2cd77fb 100644 --- a/applications/utilities/parallelProcessing/redistributePar/unmappedPassiveParticleCloud.H +++ b/applications/utilities/parallelProcessing/redistributePar/unmappedPassivePositionParticleCloud.H @@ -22,21 +22,21 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::unmappedPassiveParticleCloud + Foam::unmappedPassivePositionParticleCloud Description - passiveParticleCloud but with autoMap and writing disabled. Only used - for its objectRegistry to store lagrangian fields + passivePositionParticleCloud but with autoMap and writing disabled. + Only used for its objectRegistry to store lagrangian fields SourceFiles - unmappedPassiveParticleCloud.C + unmappedPassivePositionParticleCloud.C \*---------------------------------------------------------------------------*/ -#ifndef unmappedPassiveParticleCloud_H -#define unmappedPassiveParticleCloud_H +#ifndef unmappedPassivePositionParticleCloud_H +#define unmappedPassivePositionParticleCloud_H -#include "passiveParticleCloud.H" +#include "passivePositionParticleCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,9 +47,9 @@ namespace Foam Class unmappedPassiveParticleCloud Declaration \*---------------------------------------------------------------------------*/ -class unmappedPassiveParticleCloud +class unmappedPassivePositionParticleCloud : - public passiveParticleCloud + public passivePositionParticleCloud { public: @@ -57,29 +57,29 @@ public: // Constructors //- Construct given mesh - unmappedPassiveParticleCloud + unmappedPassivePositionParticleCloud ( const polyMesh& mesh, const word& cloudName = "defaultCloud", bool readFields = true ) : - passiveParticleCloud(mesh, cloudName, readFields) + passivePositionParticleCloud(mesh, cloudName, readFields) {} //- Construct from mesh, cloud name, and a list of particles - unmappedPassiveParticleCloud + unmappedPassivePositionParticleCloud ( const polyMesh& mesh, const word& cloudName, - const IDLList<passiveParticle>& particles + const IDLList<passivePositionParticle>& particles ) : - passiveParticleCloud(mesh, cloudName, particles) + passivePositionParticleCloud(mesh, cloudName, particles) {} //- Destructor - virtual ~unmappedPassiveParticleCloud() + virtual ~unmappedPassivePositionParticleCloud() {} //- Switch off remapping of cells of particles when @@ -98,7 +98,6 @@ public: { return true; } - }; diff --git a/applications/utilities/surface/surfaceAdd/surfaceAdd.C b/applications/utilities/surface/surfaceAdd/surfaceAdd.C index 0be9024ebd9e636e79621d960c5d5d79a076d1d0..fa964380d9e29dbb2f22cb1162f9e0883d96c454 100644 --- a/applications/utilities/surface/surfaceAdd/surfaceAdd.C +++ b/applications/utilities/surface/surfaceAdd/surfaceAdd.C @@ -38,8 +38,7 @@ Description #include "argList.H" #include "fileName.H" #include "triSurface.H" -#include "OFstream.H" -#include "IFstream.H" +#include "Fstream.H" #include "triFace.H" #include "triFaceList.H" diff --git a/applications/utilities/surface/surfaceSubset/surfaceSubset.C b/applications/utilities/surface/surfaceSubset/surfaceSubset.C index 8a02cd9a1c104920047226060a6063b464b72049..f97e84081298a40c9e4b2df10307d633a370b7e8 100644 --- a/applications/utilities/surface/surfaceSubset/surfaceSubset.C +++ b/applications/utilities/surface/surfaceSubset/surfaceSubset.C @@ -36,8 +36,7 @@ Description #include "triSurface.H" #include "triSurfaceSearch.H" #include "argList.H" -#include "OFstream.H" -#include "IFstream.H" +#include "Fstream.H" #include "Switch.H" #include "IOdictionary.H" #include "boundBox.H" diff --git a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C index 36ae2631c48c52dcfa827eb19202f64541f69827..173bbf2e3a8a562c7e03714b93f9ae6f886fccb8 100644 --- a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C +++ b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C @@ -41,8 +41,7 @@ Description \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "OFstream.H" -#include "IFstream.H" +#include "Fstream.H" #include "boundBox.H" #include "transformField.H" #include "Pair.H" diff --git a/bin/paraFoam b/bin/paraFoam index f0b583409b6302407857abe84058dfac6ddcd34a..01e47e3066c1a6a73ce9cc804f87c5f61543717c 100755 --- a/bin/paraFoam +++ b/bin/paraFoam @@ -44,7 +44,7 @@ options: -region <name> specify alternative mesh region -touch create the file (eg, .blockMesh, .OpenFOAM, .foam, ...) -touch-all | -touchAll - create .blockMesh, .OpenFOAM files (and for all regions) + create .blockMesh, .foam, .OpenFOAM files (for all regions) -touch-proc same as '-touch' but for each processor -vtk | -builtin use VTK builtin OpenFOAM reader (uses .foam extension) -help print the usage @@ -59,6 +59,21 @@ 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 +} + +#------------------------------------------------------------------------------- + # Do a nice exit to give paraview an opportunity to clean up unset FOAM_ABORT @@ -90,12 +105,12 @@ do shift ;; -case) - [ "$#" -ge 2 ] || usage "'$1' option requires an argument" - cd "$2" 2>/dev/null || usage "directory does not exist: '$2'" + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + cd "$2" 2>/dev/null || die "directory does not exist: '$2'" shift 2 ;; -region) - [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + [ "$#" -ge 2 ] || die "'$1' option requires an argument" regionName=$2 shift 2 ;; @@ -127,7 +142,7 @@ do break # Stop here, treat this and balance as paraview options ;; *) - usage "unknown option/argument: '$1'" + die "unknown option/argument: '$1'" ;; esac done @@ -198,8 +213,8 @@ all) touch "$caseName.blockMesh" echo "Created '$caseName.blockMesh'" 1>&2 fi - touch "$caseName.$extension" - echo "Created '$caseName.$extension'" 1>&2 + touch "$caseName.$extension" "$caseName.foam" + echo "Created '$caseName.$extension' '$caseName.foam'" 1>&2 # Discover probable regions for region in constant/* do diff --git a/doc/Doxygen/Allwmake b/doc/Doxygen/Allwmake index 726c5fbbe7e152ccc3a995ed783b6fa572c1a92c..21d606a9ab1be386f944500fac963e13544316d9 100755 --- a/doc/Doxygen/Allwmake +++ b/doc/Doxygen/Allwmake @@ -12,7 +12,7 @@ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<<USAGE -usage: ${0##*/} [OPTION] +usage: ${0##*/} [OPTION] [dir1 .. dirN] options: -config name use alternative doxygen config -dir name process given directory name directly @@ -20,10 +20,13 @@ options: local source code -help +Run doxygen on OpenFOAM sources, or on specified directories only. + USAGE exit 1 } + # ----------------------------------------------------------------------------- defineURL() { @@ -44,7 +47,7 @@ defineURL() { } -unset configName dirName +unset configName dirNames # Parse options while [ "$#" -gt 0 ] @@ -73,16 +76,30 @@ do shift ;; -dir) - dirName="$2" - [ -d "$dirName" ] || { - echo "Could not resolve input directory: $dirName" 1>&2 - exit 1 - } shift + if [ -d "$1" ] + then + dirNames="$dirNames $1" + else + echo "Could not resolve input directory: $1" 1>&2 + exit 1 + fi ;; -online) defineURL ;; + -*) + usage "unknown option: '$1'" + ;; + + *) # dirName + if [ -d "$1" ] + then + dirNames="$dirNames $1" + else + echo "Could not resolve input directory: $1" 1>&2 + fi + ;; *) usage "unknown option/argument: '$1'" ;; @@ -102,14 +119,12 @@ rm -rf html-stagedRemove$$ >/dev/null 2>&1 & # Ensure that created files are readable by everyone umask 22 -if [ -n "$dirName" ] +if [ -n "$dirNames" ] then - # Create a temporary with only the specified directory - tmpConfig="${TMPDIR:-/tmp}/Doxyfile.$$" - trap 'rm -f $tmpConfig 2>/dev/null; exit 0' EXIT TERM INT - cat $PWD/Doxyfile > $tmpConfig - echo "INPUT = $dirName" >> $tmpConfig - doxygen $tmpConfig + ( + cat ${configName:-Doxyfile} + echo "INPUT = $dirNames" + ) | doxygen - else doxygen $configName fi diff --git a/etc/config.sh/completion_cache b/etc/config.sh/completion_cache index 0456a7e8249caab6c6f6266ca4ba2eab1ed5ac2f..965a53f8dad4fa818776432c953681439f926976 100644 --- a/etc/config.sh/completion_cache +++ b/etc/config.sh/completion_cache @@ -11,248 +11,249 @@ declare -gA _of_complete_cache_; _of_complete_cache_=() #------------------------------------------------------------------------------ -_of_complete_cache_[adiabaticFlameT]="-case | -srcDoc -doc -help" -_of_complete_cache_[adjointShapeOptimizationFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[ansysToFoam]="-case -scale | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[applyBoundaryLayer]="-case -decomposeParDict -region -roots -ybl | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[attachMesh]="-case | -noFunctionObjects -overwrite -srcDoc -doc -help" -_of_complete_cache_[autoPatch]="-case | -noFunctionObjects -overwrite -srcDoc -doc -help" -_of_complete_cache_[blockMesh]="-case -dict -region | -blockTopology -noClean -noFunctionObjects -sets -srcDoc -doc -help" -_of_complete_cache_[boundaryFoam]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[boxTurb]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[buoyantBoussinesqPimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[buoyantBoussinesqSimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[buoyantPimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[buoyantSimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[cavitatingDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[cavitatingFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[cfx4ToFoam]="-case -scale | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[changeDictionary]="-case -decomposeParDict -dict -instance -region -roots -subDict -time | -constant -disablePatchGroups -enableFunctionEntries -latestTime -literalRE -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[checkMesh]="-case -decomposeParDict -region -roots -time -writeFields -writeSets | -allGeometry -allTopology -constant -latestTime -meshQuality -newTimes -noFunctionObjects -noTopology -noZero -parallel -writeAllFields -srcDoc -doc -help" -_of_complete_cache_[chemFoam]="-case | -noFunctionObjects -postProcess -srcDoc -doc -help" -_of_complete_cache_[chemkinToFoam]="-case | -newFormat -srcDoc -doc -help" -_of_complete_cache_[chtMultiRegionFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[chtMultiRegionSimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[coalChemistryFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[coldEngineFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[collapseEdges]="-case -collapseFaceSet -decomposeParDict -dict -roots -time | -collapseFaces -constant -latestTime -newTimes -noFunctionObjects -noZero -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[combinePatchFaces]="-case -concaveAngle -decomposeParDict -roots | -meshQuality -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[compressibleInterDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[compressibleInterFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[compressibleMultiphaseInterFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[createBaffles]="-case -decomposeParDict -dict -region -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[createExternalCoupledPatchGeometry]="-case -commsDir -decomposeParDict -region -regions -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[createPatch]="-case -decomposeParDict -dict -region -roots | -noFunctionObjects -overwrite -parallel -writeObj -srcDoc -doc -help" -_of_complete_cache_[createZeroDirectory]="-case -decomposeParDict -roots -templateDir | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[datToFoam]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[decomposePar]="-case -decomposeParDict -region -time | -allRegions -cellDist -constant -copyUniform -copyZero -fields -force -ifRequired -latestTime -newTimes -noFunctionObjects -noSets -noZero -srcDoc -doc -help" -_of_complete_cache_[deformedGeom]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[dnsFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[DPMDyMFoam]="-case -cloudName -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[DPMFoam]="-case -cloud -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[driftFluxFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[dsmcFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[dsmcInitialise]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[electrostaticFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[engineCompRatio]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[engineFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[engineSwirl]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[equilibriumCO]="-case | -srcDoc -doc -help" -_of_complete_cache_[equilibriumFlameT]="-case | -srcDoc -doc -help" -_of_complete_cache_[extrude2DMesh]="-case -decomposeParDict -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[extrudeMesh]="-case -decomposeParDict -region -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[extrudeToRegionMesh]="-case -decomposeParDict -dict -region -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[faceAgglomerate]="-case -decomposeParDict -dict -region -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[financialFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[fireFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[fireToFoam]="-case -scale | -ascii -check -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[flattenMesh]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[fluent3DMeshToFoam]="-case -ignoreCellGroups -ignoreFaceGroups -scale | -cubit -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[fluentMeshToFoam]="-case -scale | -noFunctionObjects -writeSets -writeZones -srcDoc -doc -help" -_of_complete_cache_[foamDataToFluent]="-case -time | -latestTime -newTimes -noFunctionObjects -noZero -srcDoc -doc -help" -_of_complete_cache_[foamDictionary]="-add -case -decomposeParDict -diff -entry -roots -set | -disableFunctionEntries -expand -includes -keywords -noFunctionObjects -parallel -remove -value -srcDoc -doc -help" -_of_complete_cache_[foamFormatConvert]="-case -decomposeParDict -region -roots -time | -constant -enableFunctionEntries -latestTime -newTimes -noConstant -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[foamHelp]="-case -decomposeParDict -region -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[foamList]="-case -scalarBCs -vectorBCs | -compressibleTurbulenceModels -functionObjects -fvOptions -incompressibleTurbulenceModels -noFunctionObjects -registeredSwitches -switches -unset -srcDoc -doc -help" -_of_complete_cache_[foamListTimes]="-case -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -processor -rm -withZero -srcDoc -doc -help" -_of_complete_cache_[foamMeshToFluent]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[foamToEnsight]="-case -cellZone -decomposeParDict -faceZones -fields -name -patches -region -roots -time -width | -ascii -constant -latestTime -newTimes -noFunctionObjects -noLagrangian -noPatches -noZero -nodeValues -parallel -srcDoc -doc -help" -_of_complete_cache_[foamToEnsightParts]="-case -index -name -time -width | -ascii -constant -latestTime -newTimes -noFunctionObjects -noLagrangian -noMesh -noZero -srcDoc -doc -help" -_of_complete_cache_[foamToFireMesh]="-case -scale -time | -ascii -constant -latestTime -newTimes -noFunctionObjects -noZero -srcDoc -doc -help" -_of_complete_cache_[foamToGMV]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[foamToStarMesh]="-case -scale -time | -constant -latestTime -newTimes -noBnd -noFunctionObjects -noZero -srcDoc -doc -help" -_of_complete_cache_[foamToSurface]="-case -scale -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -tri -srcDoc -doc -help" -_of_complete_cache_[foamToTecplot360]="-case -cellSet -decomposeParDict -excludePatches -faceSet -fields -region -roots -time | -constant -latestTime -nearCellValue -newTimes -noFaceZones -noFunctionObjects -noInternal -noPointValues -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[foamToTetDualMesh]="-case -decomposeParDict -roots -time | -constant -latestTime -noFunctionObjects -noZero -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[foamToVTK]="-case -cellSet -decomposeParDict -excludePatches -faceSet -fields -name -pointSet -region -roots -time | -allPatches -ascii -constant -latestTime -nearCellValue -newTimes -noFaceZones -noFunctionObjects -noInternal -noLagrangian -noLinks -noPointValues -noZero -parallel -poly -surfaceFields -useTimeName -xml -srcDoc -doc -help" -_of_complete_cache_[foamUpgradeCyclics]="-case -decomposeParDict -region -roots -time | -constant -enableFunctionEntries -latestTime -newTimes -noFunctionObjects -noZero -parallel -test -srcDoc -doc -help" -_of_complete_cache_[foamyHexMesh]="-case -decomposeParDict -roots | -checkGeometry -conformationOnly -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[foamyQuadMesh]="-case -pointsFile | -noFunctionObjects -overwrite -srcDoc -doc -help" -_of_complete_cache_[gambitToFoam]="-case -scale | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[gmshToFoam]="-case -region | -keepOrientation -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[icoFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[icoUncoupledKinematicParcelDyMFoam]="-case -cloud -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[icoUncoupledKinematicParcelFoam]="-case -cloud -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[ideasUnvToFoam]="-case | -dump -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[insideCells]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[interCondensatingEvaporatingFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[interDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[interFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[interIsoFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[interMixingFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[interPhaseChangeDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[interPhaseChangeFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[kivaToFoam]="-case -file -version -zHeadMin | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[laplacianFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[lumpedPointForces]="-case -decomposeParDict -region -roots -time | -constant -latestTime -newTimes -noZero -parallel -vtk -srcDoc -doc -help" -_of_complete_cache_[lumpedPointMovement]="-case -max -scale -span | -removeLock -slave -srcDoc -doc -help" -_of_complete_cache_[lumpedPointZones]="-case -region | -verbose -srcDoc -doc -help" -_of_complete_cache_[magneticFoam]="-case -decomposeParDict -roots | -noB -noFunctionObjects -noH -parallel -srcDoc -doc -help" -_of_complete_cache_[mapFields]="-case -mapMethod -sourceDecomposeParDict -sourceRegion -sourceTime -targetDecomposeParDict -targetRegion | -consistent -noFunctionObjects -parallelSource -parallelTarget -subtract -srcDoc -doc -help" -_of_complete_cache_[mapFieldsPar]="-case -decomposeParDict -fields -mapMethod -patchMapMethod -roots -sourceRegion -sourceTime -targetRegion | -consistent -noFunctionObjects -noLagrangian -parallel -subtract -srcDoc -doc -help" -_of_complete_cache_[mdEquilibrationFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[mdFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[mdInitialise]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[mergeMeshes]="-addRegion -case -decomposeParDict -masterRegion -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[mergeOrSplitBaffles]="-case -decomposeParDict -dict -region -roots | -detectOnly -noFunctionObjects -overwrite -parallel -split -srcDoc -doc -help" -_of_complete_cache_[mhdFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[mirrorMesh]="-case -decomposeParDict -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[mixtureAdiabaticFlameT]="-case | -srcDoc -doc -help" -_of_complete_cache_[modifyMesh]="-case -decomposeParDict -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[moveDynamicMesh]="-case -decomposeParDict -region -roots | -checkAMI -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[moveEngineMesh]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[moveMesh]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[MPPICDyMFoam]="-case -cloudName -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[MPPICFoam]="-case -cloud -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[MPPICInterFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[mshToFoam]="-case | -hex -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[multiphaseEulerFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[multiphaseInterDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[multiphaseInterFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[netgenNeutralToFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[noise]="-case -decomposeParDict -dict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[nonNewtonianIcoFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[objToVTK]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[orientFaceZone]="-case -decomposeParDict -region -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[overInterDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[overLaplacianDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[overPimpleDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[overRhoPimpleDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[overSimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[particleTracks]="-case -decomposeParDict -region -roots -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[patchSummary]="-case -decomposeParDict -region -roots -time | -constant -expand -latestTime -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[pdfPlot]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[PDRFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[PDRMesh]="-case -decomposeParDict -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[pimpleDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[pimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[pisoFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[plot3dToFoam]="-case -scale | -noBlank -noFunctionObjects -singleBlock -srcDoc -doc -help" -_of_complete_cache_[polyDualMesh]="-case | -concaveMultiCells -doNotPreserveFaceZones -noFunctionObjects -overwrite -splitAllFaces -srcDoc -doc -help" -_of_complete_cache_[porousSimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[postChannel]="-case -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -srcDoc -doc -help" -_of_complete_cache_[postProcess]="-case -decomposeParDict -dict -field -fields -func -funcs -region -roots -time | -constant -latestTime -list -newTimes -noFunctionObjects -noZero -parallel -profiling -srcDoc -doc -help" -_of_complete_cache_[potentialFoam]="-case -decomposeParDict -pName -roots | -initialiseUBCs -noFunctionObjects -parallel -withFunctionObjects -writePhi -writep -srcDoc -doc -help" -_of_complete_cache_[potentialFreeSurfaceDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[potentialFreeSurfaceFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[reactingFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[reactingMultiphaseEulerFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[reactingParcelFilmFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[reactingParcelFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[reactingTwoPhaseEulerFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[reconstructPar]="-case -fields -lagrangianFields -region -time | -allRegions -constant -latestTime -newTimes -noFields -noFunctionObjects -noLagrangian -noSets -noZero -withZero -srcDoc -doc -help" -_of_complete_cache_[reconstructParMesh]="-case -mergeTol -region -time | -cellDist -constant -fullMatch -latestTime -newTimes -noFunctionObjects -noZero -withZero -srcDoc -doc -help" -_of_complete_cache_[redistributePar]="-case -decomposeParDict -mergeTol -region -roots -time | -cellDist -constant -decompose -latestTime -newTimes -noFunctionObjects -noZero -overwrite -parallel -reconstruct -withZero -srcDoc -doc -help" -_of_complete_cache_[refineHexMesh]="-case -decomposeParDict -region -roots | -minSet -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[refinementLevel]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -readLevel -srcDoc -doc -help" -_of_complete_cache_[refineMesh]="-case -decomposeParDict -dict -region -roots | -all -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[refineWallLayer]="-case -decomposeParDict -roots -useSet | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[removeFaces]="-case -decomposeParDict -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[renumberMesh]="-case -decomposeParDict -dict -region -roots -time | -constant -frontWidth -latestTime -noFunctionObjects -noZero -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[rhoCentralDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rhoCentralFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rhoPimpleAdiabaticFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rhoPimpleDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rhoPimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rhoPorousSimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rhoReactingBuoyantFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rhoReactingFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rhoSimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[rotateMesh]="-case -decomposeParDict -roots -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[scalarTransportFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[selectCells]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[setAlphaField]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[setFields]="-case -decomposeParDict -dict -region -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[setSet]="-batch -case -decomposeParDict -region -roots -time | -constant -latestTime -loop -newTimes -noFunctionObjects -noSync -noVTK -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[setsToZones]="-case -decomposeParDict -region -roots -time | -constant -latestTime -newTimes -noFlipMap -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[shallowWaterFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[simpleCoalParcelFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[simpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[simpleReactingParcelFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[singleCellMesh]="-case -decomposeParDict -roots -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[smapToFoam]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[snappyHexMesh]="-case -decomposeParDict -dict -outFile -patches -region -roots -surfaceSimplify | -checkGeometry -noFunctionObjects -overwrite -parallel -profiling -srcDoc -doc -help" -_of_complete_cache_[snappyRefineMesh]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[solidDisplacementFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[solidEquilibriumDisplacementFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[sonicDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[sonicFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[sonicLiquidFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[splitCells]="-case -set -tol | -geometry -noFunctionObjects -overwrite -srcDoc -doc -help" -_of_complete_cache_[splitMesh]="-case | -noFunctionObjects -overwrite -srcDoc -doc -help" -_of_complete_cache_[splitMeshRegions]="-blockedFaces -case -cellZonesFileOnly -decomposeParDict -insidePoint -region -roots | -cellZones -cellZonesOnly -detectOnly -largestOnly -makeCellZones -noFunctionObjects -overwrite -parallel -prefixRegion -sloppyCellZones -useFaceZones -srcDoc -doc -help" -_of_complete_cache_[sprayDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[sprayEngineFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[sprayFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[SRFPimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[SRFSimpleFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[star4ToFoam]="-case -scale | -ascii -noFunctionObjects -solids -srcDoc -doc -help" -_of_complete_cache_[steadyParticleTracks]="-case -dict -region -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -srcDoc -doc -help" -_of_complete_cache_[stitchMesh]="-case -region -toleranceDict | -noFunctionObjects -overwrite -partial -perfect -srcDoc -doc -help" -_of_complete_cache_[subsetMesh]="-case -decomposeParDict -patch -patches -region -resultTime -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" -_of_complete_cache_[surfaceAdd]="-case -points | -mergeRegions -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceBooleanFeatures]="-case -trim | -invertedSpace -noFunctionObjects -perturb -surf1Baffle -surf2Baffle -srcDoc -doc -help" -_of_complete_cache_[surfaceCheck]="-case -outputThreshold | -blockMesh -checkSelfIntersection -noFunctionObjects -splitNonManifold -verbose -srcDoc -doc -help" -_of_complete_cache_[surfaceClean]="-case | -noClean -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceCoarsen]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceConvert]="-case -scale -writePrecision | -clean -group -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceFeatureConvert]="-case -scale | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceFeatureExtract]="-case -dict | -srcDoc -doc -help" -_of_complete_cache_[surfaceFind]="-case -x -y -z | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceHookUp]="-case -dict | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceInertia]="-case -density -referencePoint | -noFunctionObjects -shellProperties -srcDoc -doc -help" -_of_complete_cache_[surfaceInflate]="-case -featureAngle -nSmooth | -checkSelfIntersection -debug -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[adiabaticFlameT]="-case -fileHandler | -srcDoc -doc -help" +_of_complete_cache_[adjointShapeOptimizationFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[ansysToFoam]="-case -fileHandler -scale | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[applyBoundaryLayer]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots -ybl | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[attachMesh]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -srcDoc -doc -help" +_of_complete_cache_[autoPatch]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -srcDoc -doc -help" +_of_complete_cache_[blockMesh]="-case -dict -fileHandler -region | -blockTopology -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noClean -noFunctionObjects -sets -srcDoc -doc -help" +_of_complete_cache_[boundaryFoam]="-case -fileHandler -listScalarBCs -listVectorBCs | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[boxTurb]="-case -fileHandler -listScalarBCs -listVectorBCs | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[buoyantBoussinesqPimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[buoyantBoussinesqSimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[buoyantPimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[buoyantSimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[cavitatingDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[cavitatingFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[cfx4ToFoam]="-case -fileHandler -scale | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[changeDictionary]="-case -decomposeParDict -dict -fileHandler -instance -listScalarBCs -listVectorBCs -region -roots -subDict -time | -constant -disablePatchGroups -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -literalRE -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[checkMesh]="-case -decomposeParDict -fileHandler -region -roots -time -writeFields -writeSets | -allGeometry -allTopology -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -meshQuality -newTimes -noFunctionObjects -noTopology -noZero -parallel -writeAllFields -srcDoc -doc -help" +_of_complete_cache_[chemFoam]="-case -fileHandler -listScalarBCs -listVectorBCs | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -postProcess -srcDoc -doc -help" +_of_complete_cache_[chemkinToFoam]="-case -fileHandler | -newFormat -srcDoc -doc -help" +_of_complete_cache_[chtMultiRegionFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[chtMultiRegionSimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[coalChemistryFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[coldEngineFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[collapseEdges]="-case -collapseFaceSet -decomposeParDict -dict -fileHandler -roots -time | -collapseFaces -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[combinePatchFaces]="-case -concaveAngle -decomposeParDict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -meshQuality -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[compressibleInterDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[compressibleInterFilmFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[compressibleInterFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[compressibleMultiphaseInterFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[createBaffles]="-case -decomposeParDict -dict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[createExternalCoupledPatchGeometry]="-case -commsDir -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -regions -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[createPatch]="-case -decomposeParDict -dict -fileHandler -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -writeObj -srcDoc -doc -help" +_of_complete_cache_[createZeroDirectory]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots -templateDir | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[datToFoam]="-case -fileHandler | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[decomposePar]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -time | -allRegions -cellDist -constant -copyUniform -copyZero -fields -force -ifRequired -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noSets -noZero -srcDoc -doc -help" +_of_complete_cache_[deformedGeom]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[dnsFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[DPMDyMFoam]="-case -cloudName -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[DPMFoam]="-case -cloud -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[driftFluxFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[dsmcFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[dsmcInitialise]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[electrostaticFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[engineCompRatio]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[engineFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[engineSwirl]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[equilibriumCO]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -srcDoc -doc -help" +_of_complete_cache_[equilibriumFlameT]="-case -fileHandler | -srcDoc -doc -help" +_of_complete_cache_[extrude2DMesh]="-case -decomposeParDict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[extrudeMesh]="-case -decomposeParDict -fileHandler -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[extrudeToRegionMesh]="-case -decomposeParDict -dict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[faceAgglomerate]="-case -decomposeParDict -dict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[financialFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[fireFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[fireToFoam]="-case -fileHandler -scale | -ascii -check -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[flattenMesh]="-case -decomposeParDict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[fluent3DMeshToFoam]="-case -fileHandler -ignoreCellGroups -ignoreFaceGroups -scale | -cubit -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[fluentMeshToFoam]="-case -fileHandler -scale | -noFunctionObjects -writeSets -writeZones -srcDoc -doc -help" +_of_complete_cache_[foamDataToFluent]="-case -fileHandler -listScalarBCs -listVectorBCs -time | -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -srcDoc -doc -help" +_of_complete_cache_[foamDictionary]="-add -case -decomposeParDict -diff -entry -fileHandler -roots -set | -disableFunctionEntries -expand -includes -keywords -noFunctionObjects -parallel -remove -value -srcDoc -doc -help" +_of_complete_cache_[foamFormatConvert]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots -time | -constant -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noConstant -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[foamHelp]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[foamList]="-case -fileHandler -scalarBCs -vectorBCs | -compressibleTurbulenceModels -functionObjects -fvOptions -incompressibleTurbulenceModels -noFunctionObjects -registeredSwitches -switches -unset -srcDoc -doc -help" +_of_complete_cache_[foamListTimes]="-case -fileHandler -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -processor -rm -withZero -srcDoc -doc -help" +_of_complete_cache_[foamMeshToFluent]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[foamToEnsight]="-case -cellZone -decomposeParDict -faceZones -fields -fileHandler -listScalarBCs -listVectorBCs -name -patches -region -roots -time -width | -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noLagrangian -noPatches -noZero -nodeValues -parallel -srcDoc -doc -help" +_of_complete_cache_[foamToEnsightParts]="-case -fileHandler -index -listScalarBCs -listVectorBCs -name -time -width | -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noLagrangian -noMesh -noZero -srcDoc -doc -help" +_of_complete_cache_[foamToFireMesh]="-case -fileHandler -scale -time | -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -srcDoc -doc -help" +_of_complete_cache_[foamToGMV]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[foamToStarMesh]="-case -fileHandler -scale -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noBnd -noFunctionObjects -noZero -srcDoc -doc -help" +_of_complete_cache_[foamToSurface]="-case -fileHandler -scale -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -tri -srcDoc -doc -help" +_of_complete_cache_[foamToTetDualMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[foamToVTK]="-case -cellSet -cellZone -decomposeParDict -excludePatches -faceSet -fields -fileHandler -listScalarBCs -listVectorBCs -name -pointSet -region -roots -time | -allPatches -ascii -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -nearCellValue -newTimes -noFaceZones -noFunctionObjects -noInternal -noLagrangian -noLinks -noPointValues -noZero -parallel -poly -surfaceFields -useTimeName -xml -srcDoc -doc -help" +_of_complete_cache_[foamUpgradeCyclics]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots -time | -constant -enableFunctionEntries -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -test -srcDoc -doc -help" +_of_complete_cache_[foamyHexMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -checkGeometry -conformationOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[foamyQuadMesh]="-case -fileHandler -pointsFile | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -srcDoc -doc -help" +_of_complete_cache_[gambitToFoam]="-case -fileHandler -scale | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[gmshToFoam]="-case -fileHandler -region | -keepOrientation -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[icoFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[icoUncoupledKinematicParcelDyMFoam]="-case -cloud -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[icoUncoupledKinematicParcelFoam]="-case -cloud -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[ideasUnvToFoam]="-case -fileHandler | -dump -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[insideCells]="-case -decomposeParDict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[interCondensatingEvaporatingFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[interDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[interFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[interIsoFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[interMixingFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[interPhaseChangeDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[interPhaseChangeFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[kivaToFoam]="-case -file -fileHandler -version -zHeadMin | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[laplacianFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[lumpedPointForces]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noZero -parallel -vtk -srcDoc -doc -help" +_of_complete_cache_[lumpedPointMovement]="-case -fileHandler -max -scale -span | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -removeLock -slave -srcDoc -doc -help" +_of_complete_cache_[lumpedPointZones]="-case -fileHandler -region | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -verbose -srcDoc -doc -help" +_of_complete_cache_[magneticFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noB -noFunctionObjects -noH -parallel -srcDoc -doc -help" +_of_complete_cache_[mapFields]="-case -fileHandler -mapMethod -sourceDecomposeParDict -sourceRegion -sourceTime -targetDecomposeParDict -targetRegion | -consistent -noFunctionObjects -parallelSource -parallelTarget -subtract -srcDoc -doc -help" +_of_complete_cache_[mapFieldsPar]="-case -decomposeParDict -fields -fileHandler -mapMethod -patchMapMethod -roots -sourceRegion -sourceTime -targetRegion | -consistent -noFunctionObjects -noLagrangian -parallel -subtract -srcDoc -doc -help" +_of_complete_cache_[mdEquilibrationFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[mdFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[mdInitialise]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[mergeMeshes]="-addRegion -case -decomposeParDict -fileHandler -masterRegion -roots | -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[mergeOrSplitBaffles]="-case -decomposeParDict -dict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -detectOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -split -srcDoc -doc -help" +_of_complete_cache_[mhdFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[mirrorMesh]="-case -decomposeParDict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[mixtureAdiabaticFlameT]="-case -fileHandler | -srcDoc -doc -help" +_of_complete_cache_[modifyMesh]="-case -decomposeParDict -dict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[moveDynamicMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -checkAMI -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[moveEngineMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[moveMesh]="-case -decomposeParDict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[MPPICDyMFoam]="-case -cloudName -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[MPPICFoam]="-case -cloud -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[MPPICInterFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[mshToFoam]="-case -fileHandler | -hex -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[multiphaseEulerFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[multiphaseInterDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[multiphaseInterFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[netgenNeutralToFoam]="-case -decomposeParDict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[noise]="-case -decomposeParDict -dict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[nonNewtonianIcoFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[objToVTK]="-case -fileHandler | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[orientFaceZone]="-case -decomposeParDict -fileHandler -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[overInterDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[overLaplacianDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[overPimpleDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[overRhoPimpleDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[overSimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[particleTracks]="-case -decomposeParDict -fileHandler -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[patchSummary]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots -time | -constant -expand -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[pdfPlot]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[PDRFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[PDRMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[pimpleDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[pimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[pisoFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[plot3dToFoam]="-case -fileHandler -scale | -noBlank -noFunctionObjects -singleBlock -srcDoc -doc -help" +_of_complete_cache_[polyDualMesh]="-case -fileHandler -listScalarBCs -listVectorBCs | -concaveMultiCells -doNotPreserveFaceZones -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -splitAllFaces -srcDoc -doc -help" +_of_complete_cache_[porousSimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[postChannel]="-case -fileHandler -listScalarBCs -listVectorBCs -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -srcDoc -doc -help" +_of_complete_cache_[postProcess]="-case -decomposeParDict -dict -field -fields -fileHandler -func -funcs -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -list -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -profiling -srcDoc -doc -help" +_of_complete_cache_[potentialFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -pName -roots | -initialiseUBCs -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -withFunctionObjects -writePhi -writep -srcDoc -doc -help" +_of_complete_cache_[potentialFreeSurfaceDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[potentialFreeSurfaceFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[reactingFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[reactingMultiphaseEulerFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[reactingParcelFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[reactingTwoPhaseEulerFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -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 -srcDoc -doc -help" +_of_complete_cache_[reconstructParMesh]="-case -fileHandler -listScalarBCs -listVectorBCs -mergeTol -region -time | -cellDist -constant -fullMatch -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -withZero -srcDoc -doc -help" +_of_complete_cache_[redistributePar]="-case -decomposeParDict -fileHandler -mergeTol -region -roots -time | -cellDist -constant -decompose -latestTime -newTimes -noFunctionObjects -noZero -overwrite -parallel -reconstruct -withZero -srcDoc -doc -help" +_of_complete_cache_[refineHexMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -minSet -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[refinementLevel]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -readLevel -srcDoc -doc -help" +_of_complete_cache_[refineMesh]="-case -decomposeParDict -dict -fileHandler -region -roots | -all -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[refineWallLayer]="-case -decomposeParDict -fileHandler -roots -useSet | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[removeFaces]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[renumberMesh]="-case -decomposeParDict -dict -fileHandler -listScalarBCs -listVectorBCs -region -roots -time | -constant -frontWidth -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -noZero -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[rhoCentralDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rhoCentralFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rhoPimpleAdiabaticFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rhoPimpleDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rhoPimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rhoPorousSimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rhoReactingBuoyantFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rhoReactingFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rhoSimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[rotateMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[scalarTransportFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[selectCells]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[setAlphaField]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[setFields]="-case -decomposeParDict -dict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[setSet]="-batch -case -decomposeParDict -fileHandler -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -loop -newTimes -noFunctionObjects -noSync -noVTK -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[setsToZones]="-case -decomposeParDict -fileHandler -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFlipMap -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[shallowWaterFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[simpleCoalParcelFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[simpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[simpleReactingParcelFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[singleCellMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[smapToFoam]="-case -fileHandler | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[snappyHexMesh]="-case -decomposeParDict -dict -fileHandler -listScalarBCs -listVectorBCs -outFile -patches -region -roots -surfaceSimplify | -checkGeometry -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -profiling -srcDoc -doc -help" +_of_complete_cache_[snappyRefineMesh]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[solidDisplacementFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[solidEquilibriumDisplacementFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[sonicDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[sonicFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[sonicLiquidFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[splitCells]="-case -fileHandler -set -tol | -geometry -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -srcDoc -doc -help" +_of_complete_cache_[splitMesh]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -srcDoc -doc -help" +_of_complete_cache_[splitMeshRegions]="-blockedFaces -case -cellZonesFileOnly -decomposeParDict -fileHandler -insidePoint -listScalarBCs -listVectorBCs -region -roots | -cellZones -cellZonesOnly -detectOnly -largestOnly -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -makeCellZones -noFunctionObjects -overwrite -parallel -prefixRegion -sloppyCellZones -useFaceZones -srcDoc -doc -help" +_of_complete_cache_[sprayDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[sprayEngineFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[sprayFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[SRFPimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[SRFSimpleFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[star4ToFoam]="-case -fileHandler -scale | -ascii -noFunctionObjects -solids -srcDoc -doc -help" +_of_complete_cache_[steadyParticleTracks]="-case -dict -fileHandler -region -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -srcDoc -doc -help" +_of_complete_cache_[stitchMesh]="-case -fileHandler -listScalarBCs -listVectorBCs -region -toleranceDict | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -partial -perfect -srcDoc -doc -help" +_of_complete_cache_[subsetMesh]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -patch -patches -region -resultTime -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -overwrite -parallel -srcDoc -doc -help" +_of_complete_cache_[surfaceAdd]="-case -fileHandler -points -scale | -mergeRegions -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceBooleanFeatures]="-case -fileHandler -scale -trim | -invertedSpace -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -perturb -surf1Baffle -surf2Baffle -srcDoc -doc -help" +_of_complete_cache_[surfaceCheck]="-case -fileHandler -outputThreshold | -blockMesh -checkSelfIntersection -noFunctionObjects -splitNonManifold -verbose -srcDoc -doc -help" +_of_complete_cache_[surfaceClean]="-case -fileHandler -scale | -noClean -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceCoarsen]="-case -fileHandler -scale | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceConvert]="-case -fileHandler -scale -writePrecision | -clean -group -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceFeatureConvert]="-case -fileHandler -scale | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceFeatureExtract]="-case -dict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -srcDoc -doc -help" +_of_complete_cache_[surfaceFind]="-case -fileHandler -x -y -z | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceHookUp]="-case -dict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceInertia]="-case -density -fileHandler -referencePoint | -noFunctionObjects -shellProperties -srcDoc -doc -help" +_of_complete_cache_[surfaceInflate]="-case -featureAngle -fileHandler -nSmooth | -checkSelfIntersection -debug -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" _of_complete_cache_[surfaceLambdaMuSmooth]="-featureFile | -srcDoc -doc -help" -_of_complete_cache_[surfaceMeshConvert]="-case -dict -from -scaleIn -scaleOut -to | -clean -noFunctionObjects -tri -srcDoc -doc -help" -_of_complete_cache_[surfaceMeshExport]="-case -dict -from -name -scaleIn -scaleOut -to | -clean -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceMeshImport]="-case -dict -from -name -scaleIn -scaleOut -to | -clean -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceMeshInfo]="-case -scale | -areas -noFunctionObjects -xml -srcDoc -doc -help" -_of_complete_cache_[surfaceMeshTriangulate]="-case -decomposeParDict -faceZones -patches -region -roots -time | -constant -excludeProcPatches -latestTime -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[surfaceOrient]="-case | -inside -noFunctionObjects -usePierceTest -srcDoc -doc -help" -_of_complete_cache_[surfacePatch]="-case -dict | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfacePointMerge]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceRedistributePar]="-case -decomposeParDict -roots | -keepNonMapped -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[surfaceRefineRedGreen]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceSplitByPatch]="-case | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceMeshConvert]="-case -dict -fileHandler -from -scaleIn -scaleOut -to | -clean -noFunctionObjects -tri -srcDoc -doc -help" +_of_complete_cache_[surfaceMeshConvertTesting]="-case -fileHandler -scale | -clean -noFunctionObjects -orient -stdout -surfMesh -testModify -triFace -triSurface -unsorted -srcDoc -doc -help" +_of_complete_cache_[surfaceMeshExport]="-case -dict -fileHandler -from -name -scaleIn -scaleOut -to | -clean -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceMeshImport]="-case -dict -fileHandler -from -name -scaleIn -scaleOut -to | -clean -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceMeshInfo]="-case -fileHandler -scale | -areas -noFunctionObjects -xml -srcDoc -doc -help" +_of_complete_cache_[surfaceMeshTriangulate]="-case -decomposeParDict -faceZones -fileHandler -patches -region -roots -time | -constant -excludeProcPatches -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[surfaceOrient]="-case -fileHandler -scale | -inside -noFunctionObjects -usePierceTest -srcDoc -doc -help" +_of_complete_cache_[surfacePatch]="-case -dict -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfacePointMerge]="-case -fileHandler -scale | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceRedistributePar]="-case -decomposeParDict -fileHandler -roots | -keepNonMapped -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[surfaceRefineRedGreen]="-case -fileHandler | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceSplitByPatch]="-case -fileHandler | -noFunctionObjects -srcDoc -doc -help" _of_complete_cache_[surfaceSplitByTopology]=" | -srcDoc -doc -help" -_of_complete_cache_[surfaceSplitNonManifolds]="-case | -debug -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceSubset]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceToPatch]="-case -faceSet -tol | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[surfaceTransformPoints]="-case -rollPitchYaw -rotate -scale -translate -yawPitchRoll | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[temporalInterpolate]="-case -decomposeParDict -divisions -fields -interpolationType -region -roots -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[tetgenToFoam]="-case -decomposeParDict -roots | -noFaceFile -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[thermoFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[topoSet]="-case -decomposeParDict -dict -region -roots -time | -constant -latestTime -newTimes -noFunctionObjects -noSync -noZero -parallel -srcDoc -doc -help" -_of_complete_cache_[transformPoints]="-case -decomposeParDict -region -rollPitchYaw -roots -rotate -scale -translate -yawPitchRoll | -noFunctionObjects -parallel -rotateFields -srcDoc -doc -help" -_of_complete_cache_[twoLiquidMixingFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[twoPhaseEulerFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[uncoupledKinematicParcelFoam]="-case -cloud -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[viewFactorsGen]="-case -decomposeParDict -region -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[vtkUnstructuredToFoam]="-case | -noFunctionObjects -srcDoc -doc -help" -_of_complete_cache_[wallFunctionTable]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -srcDoc -doc -help" -_of_complete_cache_[writeMeshObj]="-case -cell -cellSet -decomposeParDict -face -faceSet -point -region -roots -time | -constant -latestTime -newTimes -noFunctionObjects -noZero -parallel -patchEdges -patchFaces -srcDoc -doc -help" -_of_complete_cache_[XiDyMFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[XiFoam]="-case -decomposeParDict -roots | -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" -_of_complete_cache_[zipUpMesh]="-case -decomposeParDict -region -roots | -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[surfaceSplitNonManifolds]="-case -fileHandler | -debug -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceSubset]="-case -fileHandler | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceToPatch]="-case -faceSet -fileHandler -tol | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[surfaceTransformPoints]="-case -fileHandler -rollPitchYaw -rotate -scale -translate -yawPitchRoll | -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[temporalInterpolate]="-case -decomposeParDict -divisions -fields -fileHandler -interpolationType -listScalarBCs -listVectorBCs -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[tetgenToFoam]="-case -decomposeParDict -fileHandler -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFaceFile -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[thermoFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[topoSet]="-case -decomposeParDict -dict -fileHandler -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noSync -noZero -parallel -srcDoc -doc -help" +_of_complete_cache_[transformPoints]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -rollPitchYaw -roots -rotate -scale -translate -yawPitchRoll | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -rotateFields -srcDoc -doc -help" +_of_complete_cache_[twoLiquidMixingFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[twoPhaseEulerFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[uncoupledKinematicParcelDyMFoam]="-case -cloudName -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[uncoupledKinematicParcelFoam]="-case -cloud -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[viewFactorsGen]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[vtkUnstructuredToFoam]="-case -fileHandler | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -srcDoc -doc -help" +_of_complete_cache_[wallFunctionTable]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" +_of_complete_cache_[writeMeshObj]="-case -cell -cellSet -decomposeParDict -face -faceSet -fileHandler -point -region -roots -time | -constant -latestTime -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -newTimes -noFunctionObjects -noZero -parallel -patchEdges -patchFaces -srcDoc -doc -help" +_of_complete_cache_[XiDyMFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[XiFoam]="-case -decomposeParDict -fileHandler -listScalarBCs -listVectorBCs -roots | -listFunctionObjects -listFvOptions -listRegisteredSwitches -listSwitches -listTurbulenceModels -listUnsetSwitches -noFunctionObjects -parallel -postProcess -srcDoc -doc -help" +_of_complete_cache_[zipUpMesh]="-case -decomposeParDict -fileHandler -region -roots | -listFunctionObjects -listRegisteredSwitches -listSwitches -listUnsetSwitches -noFunctionObjects -parallel -srcDoc -doc -help" #------------------------------------------------------------------------------ diff --git a/src/ODE/ODESolvers/RKDP45/RKDP45.H b/src/ODE/ODESolvers/RKDP45/RKDP45.H index f09c894e0443dd875ebeeed5f6f7bd0a3ddf70a5..62ec247c677e5268cc0664bae2e0377222c5dadd 100644 --- a/src/ODE/ODESolvers/RKDP45/RKDP45.H +++ b/src/ODE/ODESolvers/RKDP45/RKDP45.H @@ -28,7 +28,7 @@ Group grpODESolvers Description - 4/5th Order Dormand–Prince Runge-Kutta ODE solver. + 4/5th Order Dormand-Prince Runge-Kutta ODE solver. References: \verbatim diff --git a/src/OSspecific/POSIX/printStack.C b/src/OSspecific/POSIX/printStack.C index 4031b91d77abc3496e4c32d987910b06f3aaa546..51978a66a7fd458164ff48deec16cda211de0eda 100644 --- a/src/OSspecific/POSIX/printStack.C +++ b/src/OSspecific/POSIX/printStack.C @@ -28,7 +28,7 @@ License #include "IFstream.H" #include "StringStream.H" -#include <inttypes.h> +#include <cinttypes> #include <cxxabi.h> #include <execinfo.h> #include <dlfcn.h> diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index ac475a06feeb0399d252983fb6f4d5739821e106..cc59794bae8d77cf4ae4fdcd905d596d4ae76017 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -114,6 +114,7 @@ $(strings)/wordRe/wordRe.C $(strings)/wordRes/wordRes.C $(strings)/lists/hashedWordList.C $(strings)/stringOps/stringOps.C +$(strings)/parsing/parsing.C ops = primitives/ops $(ops)/flipOp.C diff --git a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C index 15809004dcd7a3a76214f1221f08002fc4a04c9b..d5a93363386f08d71b4b46d651ba290019deddaa 100644 --- a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C +++ b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C @@ -27,9 +27,8 @@ License #include "OPstream.H" #include "IPstream.H" #include "PstreamBuffers.H" -#include "OFstream.H" -#include "IFstream.H" -#include "IStringStream.H" +#include "Fstream.H" +#include "StringStream.H" #include "dictionary.H" #include <sys/time.h> #include "objectRegistry.H" diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C index 17a2b7d1e427a8ecfa14f92c0978f0298d111fbb..8c005c4a316d8f12dc7acbb84ceffe8f5ca2d545 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C +++ b/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C @@ -53,10 +53,11 @@ Foam::OFstreamAllocator::OFstreamAllocator InfoInFunction << "Cannot open null file " << endl; } } - ofstream::openmode mode(ofstream::out); + + std::ios_base::openmode mode(std::ios_base::out); if (append) { - mode |= ofstream::app; + mode |= std::ios_base::app; } if (compression == IOstream::COMPRESSED) @@ -130,7 +131,7 @@ Foam::OFstream::OFstream OSstream ( *allocatedPtr_, - "OFstream.sinkFile_", + pathname, format, version, compression diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.H b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.H index 6bc595d692c55baa61323d370e821d76b23bcac8..c619ad8ac0307e0a9d8f85104c31380f0eb640ac 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.H +++ b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.H @@ -35,7 +35,7 @@ SourceFiles #ifndef masterOFstream_H #define masterOFstream_H -#include "OStringStream.H" +#include "StringStream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/IOstreams/dummyISstream/dummyISstream.H b/src/OpenFOAM/db/IOstreams/dummyISstream/dummyISstream.H index a774271a11ad77fa3cb7a689dd288906edafcaa7..9477b087914408dc993a15bb5de59fdda198e995 100644 --- a/src/OpenFOAM/db/IOstreams/dummyISstream/dummyISstream.H +++ b/src/OpenFOAM/db/IOstreams/dummyISstream/dummyISstream.H @@ -34,7 +34,7 @@ SourceFiles #ifndef dummyISstream_H #define dummyISstream_H -#include "IStringStream.H" +#include "StringStream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C index 836f47500eec2d6214576d21173e78982b065e4b..1371c173004a4d6ab30f0e6e1d0704d6991547a1 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C @@ -26,8 +26,7 @@ License #include "dynamicCode.H" #include "dynamicCodeContext.H" #include "stringOps.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "OSspecific.H" #include "etcFiles.H" #include "dictionary.H" diff --git a/src/OpenFOAM/dimensionSet/dimensionSetIO.C b/src/OpenFOAM/dimensionSet/dimensionSetIO.C index 39773831605c2194f8fe17b6ccef45a97b62b720..9fcfd9ee20bba10295ad601a2f25f1c9691a456a 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSetIO.C +++ b/src/OpenFOAM/dimensionSet/dimensionSetIO.C @@ -143,7 +143,7 @@ void Foam::dimensionSet::tokeniser::splitWord(const word& w) const word subWord = w.substr(start, i-start); if (isdigit(subWord[0]) || subWord[0] == token::SUBTRACT) { - push(token(readScalar(IStringStream(subWord)()))); + push(token(readScalar(subWord))); } else { @@ -154,7 +154,9 @@ void Foam::dimensionSet::tokeniser::splitWord(const word& w) { if (isdigit(w[i])) { - push(token(readScalar(IStringStream(w[i])()))); + // Single digit: as scalar value + const scalar val = (w[i] - '0'); + push(token(val)); } else { @@ -169,7 +171,7 @@ void Foam::dimensionSet::tokeniser::splitWord(const word& w) const word subWord = w.substr(start); if (isdigit(subWord[0]) || subWord[0] == token::SUBTRACT) { - push(token(readScalar(IStringStream(subWord)()))); + push(token(readScalar(subWord))); } else { @@ -539,7 +541,7 @@ Foam::Istream& Foam::dimensionSet::read { const word symbol = symbolPow.substr(0, index); const word exp = symbolPow.substr(index+1); - scalar exponent = readScalar(IStringStream(exp)()); + scalar exponent = readScalar(exp); dimensionedScalar s; s.read(readSet[symbol], readSet); diff --git a/src/OpenFOAM/global/argList/argList.H b/src/OpenFOAM/global/argList/argList.H index b60cd9fa135cb5064263bb9fac5a055019b73048..cba9bb009fa4903a2e0c6c5b2622be6e98416750 100644 --- a/src/OpenFOAM/global/argList/argList.H +++ b/src/OpenFOAM/global/argList/argList.H @@ -281,10 +281,10 @@ public: inline T argRead(const label index) const; //- Return options - inline const Foam::HashTable<string>& options() const; + inline const HashTable<string>& options() const; //- Return non-const access to options - inline Foam::HashTable<string>& options(); + inline HashTable<string>& options(); //- Return the argument string associated with the named option inline const string& option(const word& opt) const; @@ -302,7 +302,7 @@ public: //- Read a value from the named option if present. // Return true if the named option was found. template<class T> - inline bool optionReadIfPresent(const word& opt, T&) const; + inline bool optionReadIfPresent(const word& opt, T& val) const; //- Read a value from the named option if present. // Return true if the named option was found, otherwise @@ -311,7 +311,7 @@ public: inline bool optionReadIfPresent ( const word& opt, - T&, + T& val, const T& deflt ) const; @@ -328,7 +328,7 @@ public: template<class T> List<T> optionReadList(const word& opt) const { - return readList<T>(optionLookup(opt)()); + return Foam::readList<T>(optionLookup(opt)()); } @@ -369,7 +369,7 @@ public: //- Add extra notes for the usage information // This string is used "as-is" without additional formatting - static void addNote(const string&); + static void addNote(const string& note); //- Remove option from validOptions and from optionUsage static void removeOption(const word& opt); diff --git a/src/OpenFOAM/global/argList/argListI.H b/src/OpenFOAM/global/argList/argListI.H index 28caff6acbcd561a0928471a13fae7aa6c59e364..4f1b5fdf8da551c5e582cf8c501a2070020f1e44 100644 --- a/src/OpenFOAM/global/argList/argListI.H +++ b/src/OpenFOAM/global/argList/argListI.H @@ -127,53 +127,84 @@ inline Foam::IStringStream Foam::argList::optionLookup(const word& opt) const namespace Foam { - // Template specialization for string + // + // Specializations for argRead + // + template<> inline Foam::string - Foam::argList::argRead<Foam::string>(const label index) const + argList::argRead<Foam::string>(const label index) const { return args_[index]; } - // Template specialization for word template<> inline Foam::word - Foam::argList::argRead<Foam::word>(const label index) const + argList::argRead<Foam::word>(const label index) const { return args_[index]; } - // Template specialization for fileName template<> inline Foam::fileName - Foam::argList::argRead<Foam::fileName>(const label index) const + argList::argRead<Foam::fileName>(const label index) const { return args_[index]; } - // Template specialization for string + template<> + inline Foam::label + argList::argRead<Foam::label>(const label index) const + { + return Foam::readLabel(args_[index]); + } + + template<> + inline Foam::scalar + argList::argRead<Foam::scalar>(const label index) const + { + return Foam::readScalar(args_[index]); + } + + // + // Specializations for optionRead + // + template<> inline Foam::string - Foam::argList::optionRead<Foam::string>(const word& opt) const + argList::optionRead<Foam::string>(const word& opt) const { return options_[opt]; } - // Template specialization for word template<> inline Foam::word - Foam::argList::optionRead<Foam::word>(const word& opt) const + argList::optionRead<Foam::word>(const word& opt) const { return options_[opt]; } - // Template specialization for fileName template<> inline Foam::fileName - Foam::argList::optionRead<Foam::fileName>(const word& opt) const + argList::optionRead<Foam::fileName>(const word& opt) const { return options_[opt]; } + + template<> + inline Foam::label + argList::optionRead<Foam::label>(const word& opt) const + { + return Foam::readLabel(options_[opt]); + } + + template<> + inline Foam::scalar + argList::optionRead<Foam::scalar>(const word& opt) const + { + return Foam::readScalar(options_[opt]); + } + } diff --git a/src/OpenFOAM/global/fileOperations/collatedFileOperation/threadedCollatedOFstream.H b/src/OpenFOAM/global/fileOperations/collatedFileOperation/threadedCollatedOFstream.H index e296e1132ca8ea99b6cd3097abe5d94378630449..7efd8d0daf22508793d8cb5e700c4b5095be5db5 100644 --- a/src/OpenFOAM/global/fileOperations/collatedFileOperation/threadedCollatedOFstream.H +++ b/src/OpenFOAM/global/fileOperations/collatedFileOperation/threadedCollatedOFstream.H @@ -35,7 +35,7 @@ SourceFiles #ifndef threadedCollatedOFstream_H #define threadedCollatedOFstream_H -#include "OStringStream.H" +#include "StringStream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C b/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C index 2ee8ad8b6154db2847c1900d4fc7fd26658ff468..e6a509e74c2f19c83868ca8272683baf1a77245d 100644 --- a/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C +++ b/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C @@ -25,8 +25,7 @@ License #include "uncollatedFileOperation.H" #include "Time.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "addToRunTimeSelectionTable.H" #include "masterUncollatedFileOperation.H" #include "decomposedBlockData.H" diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C index ae2c0cb5e06b499e53e6343492564c4fdbcd615e..51adcb3381cab245be0b65761ed35bff86b6de65 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C @@ -71,7 +71,7 @@ namespace Foam << exit(FatalError); } - return readScalar(IStringStream(splitted[componentColumns_[0]])()); + return readScalar(splitted[componentColumns_[0]]); } @@ -80,7 +80,7 @@ namespace Foam { Type result; - for(label i = 0;i < pTraits<Type>::nComponents; i++) + for (label i = 0; i < pTraits<Type>::nComponents; ++i) { if (componentColumns_[i] >= splitted.size()) { @@ -90,10 +90,7 @@ namespace Foam << exit(FatalError); } - result[i] = readScalar - ( - IStringStream(splitted[componentColumns_[i]])() - ); + result[i] = readScalar(splitted[componentColumns_[i]]); } return result; @@ -150,7 +147,7 @@ void Foam::csvTableReader<Type>::operator() break; } - scalar time = readScalar(IStringStream(splitted[timeColumn_])()); + scalar time = readScalar(splitted[timeColumn_]); Type value = readValue(splitted); values.append(Tuple2<scalar,Type>(time, value)); diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index a0e3cffeadcb4b888a411d79053d3bab301017c3..98a1f6104dbf6de4998b261549f17d54829070a9 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -656,7 +656,11 @@ Foam::label Foam::polyBoundaryMesh::findIndex(const keyType& key) const } -Foam::label Foam::polyBoundaryMesh::findPatchID(const word& patchName) const +Foam::label Foam::polyBoundaryMesh::findPatchID +( + const word& patchName, + bool allowNotFound +) const { const polyPatchList& patches = *this; @@ -668,6 +672,20 @@ Foam::label Foam::polyBoundaryMesh::findPatchID(const word& patchName) const } } + if (!allowNotFound) + { + string regionStr(""); + if (mesh_.name() != polyMesh::defaultRegion) + { + regionStr = "in region '" + mesh_.name() + "' "; + } + + FatalErrorInFunction + << "Patch '" << patchName << "' not found. " + << "Available patch names " << regionStr << "include: " << names() + << exit(FatalError); + } + // Patch not found if (debug) { diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H index 61ed872fa6709376c2535b0e2287bb58d74f9f39..32ad8ee634440b9bc86d74183ee85d25819688c1 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H @@ -171,7 +171,11 @@ public: label findIndex(const keyType&) const; //- Find patch index given a name - label findPatchID(const word& patchName) const; + label findPatchID + ( + const word& patchName, + const bool allowNotFound = true + ) const; //- Find patch indices for a given polyPatch type template<class Type> diff --git a/src/OpenFOAM/primitives/Scalar/Scalar.C b/src/OpenFOAM/primitives/Scalar/Scalar.C index 941349cce66314793c405c09af1827db90a64c9e..d8eb7e06fc96c902396d0901d8c60dca7eadb28b 100644 --- a/src/OpenFOAM/primitives/Scalar/Scalar.C +++ b/src/OpenFOAM/primitives/Scalar/Scalar.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -42,9 +42,9 @@ const Scalar pTraits<Scalar>::rootMax = ScalarROOTVGREAT; const char* const pTraits<Scalar>::componentNames[] = { "" }; -pTraits<Scalar>::pTraits(const Scalar& p) +pTraits<Scalar>::pTraits(const Scalar& val) : - p_(p) + p_(val) {} @@ -54,7 +54,7 @@ pTraits<Scalar>::pTraits(Istream& is) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * IO/Conversion * * * * * * * * * * * * * * * // word name(const Scalar val) { @@ -76,18 +76,59 @@ word name(const std::string& fmt, const Scalar val) } +Scalar ScalarRead(const char* buf) +{ + char* endptr = nullptr; + errno = 0; + + const Scalar val = ScalarConvert(buf, &endptr); + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + FatalIOErrorInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << exit(FatalIOError); + } + + return val; +} + + +bool readScalar(const char* buf, Scalar& val) +{ + char* endptr = nullptr; + errno = 0; + + val = ScalarConvert(buf, &endptr); + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + #ifdef FULLDEBUG + IOWarningInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << endl; + #endif + return false; + } + + return true; +} + + // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Scalar readScalar(Istream& is) +Scalar ScalarRead(Istream& is) { - Scalar rs; - is >> rs; + Scalar val; + is >> val; - return rs; + return val; } -Istream& operator>>(Istream& is, Scalar& s) +Istream& operator>>(Istream& is, Scalar& val) { token t(is); @@ -99,7 +140,7 @@ Istream& operator>>(Istream& is, Scalar& s) if (t.isNumber()) { - s = t.number(); + val = t.number(); } else { @@ -116,9 +157,9 @@ Istream& operator>>(Istream& is, Scalar& s) } -Ostream& operator<<(Ostream& os, const Scalar s) +Ostream& operator<<(Ostream& os, const Scalar val) { - os.write(s); + os.write(val); os.check(FUNCTION_NAME); return os; } diff --git a/src/OpenFOAM/primitives/Scalar/Scalar.H b/src/OpenFOAM/primitives/Scalar/Scalar.H index ea5c5239daa04df5236c75d803f0d073b20a0499..798ca75a23a93a18be413aedb5a42f073419cab2 100644 --- a/src/OpenFOAM/primitives/Scalar/Scalar.H +++ b/src/OpenFOAM/primitives/Scalar/Scalar.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,7 +25,7 @@ Typedef Foam::Scalar Description - Single floating point number (float or double) + Floating-point number (float or double) SourceFiles Scalar.C @@ -81,10 +81,10 @@ public: // Constructors //- Construct from primitive - explicit pTraits(const Scalar&); + explicit pTraits(const Scalar& val); //- Construct from Istream - pTraits(Istream&); + pTraits(Istream& is); // Member Functions @@ -103,22 +103,48 @@ public: }; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * IO/Conversion * * * * * * * * * * * * * * * // //- Return a string representation of a Scalar -word name(const Scalar); - +word name(const Scalar val); //- Return a word representation of a Scalar, using printf-style formatter. // The representation is not checked for valid word characters. -word name(const char* fmt, const Scalar); - +word name(const char* fmt, const Scalar val); //- Return a word representation of a Scalar, using printf-style formatter. // The representation is not checked for valid word characters. -word name(const std::string& fmt, const Scalar); +word name(const std::string& fmt, const Scalar val); + +//- Parse entire buffer as a float/double, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +Scalar ScalarRead(const char* buf); + +//- Parse entire string as a float/double, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +inline Scalar ScalarRead(const std::string& str) +{ + return ScalarRead(str.c_str()); +} + +//- Parse entire buffer as a float/double, skipping leading/trailing whitespace. +// \return True if successful. +bool readScalar(const char* buf, Scalar& val); + +//- Parse entire string as a float/double, skipping leading/trailing whitespace. +// \return True if successful. +inline bool readScalar(const std::string& str, Scalar& val) +{ + return readScalar(str.c_str(), val); +} + +Scalar ScalarRead(Istream& is); +Istream& operator>>(Istream& is, Scalar& val); +Ostream& operator<<(Ostream& os, const Scalar val); +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // Standard C++ transcendental functions transFunc(sqrt) @@ -344,8 +370,8 @@ inline Scalar cmptMag(const Scalar s) inline Scalar sqrtSumSqr(const Scalar a, const Scalar b) { - Scalar maga = mag(a); - Scalar magb = mag(b); + const Scalar maga = mag(a); + const Scalar magb = mag(b); if (maga > magb) { @@ -372,12 +398,6 @@ inline Scalar stabilise(const Scalar s, const Scalar small) } -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // - -Scalar readScalar(Istream&); -Istream& operator>>(Istream&, Scalar&); -Ostream& operator<<(Ostream&, const Scalar); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.C b/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.C index 378b7d592a9ff276905f85bcf40c3a50e57c79da..da73874c63374ed49a357ae4f86e8103053ae66f 100644 --- a/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.C +++ b/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,24 +24,32 @@ License \*---------------------------------------------------------------------------*/ #include "doubleScalar.H" +#include "error.H" +#include "parsing.H" #include "IOstreams.H" #include <sstream> // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Scalar.C is used for template-like substitution + #define Scalar doubleScalar #define ScalarVGREAT doubleScalarVGREAT #define ScalarVSMALL doubleScalarVSMALL #define ScalarROOTVGREAT doubleScalarROOTVGREAT #define ScalarROOTVSMALL doubleScalarROOTVSMALL -#define readScalar readDoubleScalar +#define ScalarRead readDouble +#define ScalarConvert ::strtod + #include "Scalar.C" + #undef Scalar #undef ScalarVGREAT #undef ScalarVSMALL #undef ScalarROOTVGREAT #undef ScalarROOTVSMALL -#undef readScalar +#undef ScalarRead +#undef ScalarConvert // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.H b/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.H index 308994785302345d82895c6b5798bc44bfa7dd8a..b7a0b8fd562ea94a08add0af9add7dc4b5ba8255 100644 --- a/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.H +++ b/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,7 +25,7 @@ Typedef Foam::doubleScalar Description - Double precision floating point scalar type. + Floating-point double precision scalar type. SourceFiles doubleScalar.C @@ -59,48 +59,20 @@ static const doubleScalar doubleScalarROOTSMALL = 3.0e-8; static const doubleScalar doubleScalarVSMALL = 1.0e-300; static const doubleScalar doubleScalarROOTVSMALL = 1.0e-150; -//- Read whole of buf as a scalar. Return true if succesful. -inline bool readScalar(const char* buf, doubleScalar& s) -{ - char* endPtr; - s = strtod(buf, &endPtr); - - return (*endPtr == '\0'); -} #define Scalar doubleScalar #define ScalarVGREAT doubleScalarVGREAT #define ScalarVSMALL doubleScalarVSMALL #define ScalarROOTVGREAT doubleScalarROOTVGREAT #define ScalarROOTVSMALL doubleScalarROOTVSMALL -#define readScalar readDoubleScalar +#define ScalarRead readDouble + inline Scalar mag(const Scalar s) { return ::fabs(s); } -#define transFunc(func) \ -inline Scalar func(const Scalar s) \ -{ \ - return ::func(s); \ -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "Scalar.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - inline Scalar hypot(const Scalar x, const Scalar y) { return ::hypot(x, y); @@ -121,19 +93,30 @@ inline Scalar yn(const int n, const Scalar s) return ::yn(n, s); } +// Normal (double-precision) transcendental functions +#define transFunc(func) \ +inline Scalar func(const Scalar s) \ +{ \ + return ::func(s); \ +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "Scalar.H" + #undef Scalar #undef ScalarVGREAT #undef ScalarVSMALL #undef ScalarROOTVGREAT #undef ScalarROOTVSMALL -#undef readScalar +#undef ScalarRead #undef transFunc -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.C b/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.C index dec0b215d39340e84321fc82747d5922729051bd..94d40441f7a59b47dd4fe5e3ea1f61d99b12ea26 100644 --- a/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.C +++ b/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,24 +24,32 @@ License \*---------------------------------------------------------------------------*/ #include "floatScalar.H" +#include "error.H" +#include "parsing.H" #include "IOstreams.H" #include <sstream> // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Scalar.C is used for template-like substitution + #define Scalar floatScalar #define ScalarVGREAT floatScalarVGREAT #define ScalarVSMALL floatScalarVSMALL #define ScalarROOTVGREAT floatScalarROOTVGREAT #define ScalarROOTVSMALL floatScalarROOTVSMALL -#define readScalar readFloatScalar +#define ScalarRead readFloat +#define ScalarConvert ::strtof + #include "Scalar.C" + #undef Scalar -#undef ScalarVSMALL +#undef ScalarVGREAT #undef ScalarVSMALL #undef ScalarROOTVGREAT #undef ScalarROOTVSMALL -#undef readScalar +#undef ScalarRead +#undef ScalarConvert // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H b/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H index 1cfb728a235d2b925ada448541415fea2e576588..07c8a4aa66052323750a685ec29e68210b7c899e 100644 --- a/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H +++ b/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,7 +25,7 @@ Typedef Foam::floatScalar Description - Float precision floating point scalar type. + Floating-point single precision scalar type. SourceFiles floatScalar.C @@ -48,7 +48,7 @@ namespace Foam typedef float floatScalar; -// Largest and smallest scalar values allowed in certain parts of the code +// Largest and smallest scalar values allowed in certain parts of the code. // (6 is the number of significant figures in an // IEEE single precision number. See limits.h or float.h) static const floatScalar floatScalarGREAT = 1.0e+6; @@ -59,48 +59,20 @@ static const floatScalar floatScalarROOTSMALL = 1.0e-3; static const floatScalar floatScalarVSMALL = 1.0e-37; static const floatScalar floatScalarROOTVSMALL = 1.0e-18; -//- Read whole of buf as a scalar. Return true if succesful. -inline bool readScalar(const char* buf, floatScalar& s) -{ - char* endPtr; - s = strtof(buf, &endPtr); - - return (*endPtr == '\0'); -} #define Scalar floatScalar #define ScalarVGREAT floatScalarVGREAT #define ScalarVSMALL floatScalarVSMALL #define ScalarROOTVGREAT floatScalarROOTVGREAT #define ScalarROOTVSMALL floatScalarROOTVSMALL -#define readScalar readFloatScalar +#define ScalarRead readFloat + inline Scalar mag(const Scalar s) { return ::fabsf(s); } -#define transFunc(func) \ -inline Scalar func(const Scalar s) \ -{ \ - return ::func##f(s); \ -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "Scalar.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - inline Scalar hypot(const Scalar x, const Scalar y) { return ::hypotf(x, y); @@ -121,19 +93,30 @@ inline Scalar yn(const int n, const Scalar s) return ::ynf(n, s); } +// Single-precision transcendental functions (with 'f' appended to the name) +#define transFunc(func) \ +inline Scalar func(const Scalar s) \ +{ \ + return ::func##f(s); \ +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "Scalar.H" + #undef Scalar #undef ScalarVGREAT #undef ScalarVSMALL #undef ScalarROOTVGREAT #undef ScalarROOTVSMALL -#undef readScalar +#undef ScalarRead #undef transFunc -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/src/OpenFOAM/primitives/Scalar/scalar/scalar.C b/src/OpenFOAM/primitives/Scalar/scalar/scalar.C index 4b9748979ad3959f7ebf9380bbb418a72ef95bc1..a863db21e20c2fcd03df1b8e1ea010ed70070fa7 100644 --- a/src/OpenFOAM/primitives/Scalar/scalar/scalar.C +++ b/src/OpenFOAM/primitives/Scalar/scalar/scalar.C @@ -24,24 +24,17 @@ License \*---------------------------------------------------------------------------*/ #include "scalar.H" +#include "IOstreams.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -namespace Foam +Foam::scalar Foam::readScalar(Istream& is) { + scalar val; + is >> val; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -scalar readScalar(Istream& is) -{ - scalar rs; - is >> rs; - - return rs; + return val; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/Scalar/scalar/scalar.H b/src/OpenFOAM/primitives/Scalar/scalar/scalar.H index 7c7c00cefc268c6a606c3f3c2d349744217bbe3e..e705dc8550a53094a2645acc79e2321bbf972520 100644 --- a/src/OpenFOAM/primitives/Scalar/scalar/scalar.H +++ b/src/OpenFOAM/primitives/Scalar/scalar/scalar.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,7 +25,7 @@ Typedef Foam::scalar Description - Single floating point number identical to float or double depending on + A floating-point number identical to float or double depending on whether WM_SP or WM_DP is defined. SourceFiles @@ -58,6 +58,11 @@ namespace Foam static const scalar ROOTVSMALL = floatScalarROOTVSMALL; scalar readScalar(Istream& is); + + inline scalar readScalar(const std::string& str) + { + return readFloat(str); + } } #elif defined(WM_DP) @@ -77,6 +82,11 @@ namespace Foam static const scalar ROOTVSMALL = doubleScalarROOTVSMALL; scalar readScalar(Istream& is); + + inline scalar readScalar(const std::string& str) + { + return readDouble(str); + } } #endif diff --git a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C index 1ddf2cc1ca3ec34632a13f9474d73e4549f117bf..4ddc9123dcbd5acbfa3aeaa11f8bcc66b3196d8c 100644 --- a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C +++ b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C @@ -43,7 +43,7 @@ Foam::label Foam::Function1Types::CSV<Foam::label>::readValue << exit(FatalError); } - return readLabel(IStringStream(splitted[componentColumns_[0]])()); + return readLabel(splitted[componentColumns_[0]]); } @@ -61,7 +61,7 @@ Foam::scalar Foam::Function1Types::CSV<Foam::scalar>::readValue << exit(FatalError); } - return readScalar(IStringStream(splitted[componentColumns_[0]])()); + return readScalar(splitted[componentColumns_[0]]); } @@ -70,18 +70,17 @@ Type Foam::Function1Types::CSV<Type>::readValue(const List<string>& splitted) { Type result; - for (label i = 0; i < pTraits<Type>::nComponents; i++) + for (label i = 0; i < pTraits<Type>::nComponents; ++i) { if (componentColumns_[i] >= splitted.size()) { FatalErrorInFunction - << "No column " << componentColumns_[i] << " in " + << "No column " << componentColumns_[i] << " in " << splitted << endl << exit(FatalError); } - result[i] = - readScalar(IStringStream(splitted[componentColumns_[i]])()); + result[i] = readScalar(splitted[componentColumns_[i]]); } return result; @@ -189,7 +188,7 @@ void Foam::Function1Types::CSV<Type>::read() break; } - scalar x = readScalar(IStringStream(splitted[refColumn_])()); + scalar x = readScalar(splitted[refColumn_]); Type value = readValue(splitted); values.append(Tuple2<scalar,Type>(x, value)); diff --git a/src/OpenFOAM/primitives/ints/int/int.H b/src/OpenFOAM/primitives/ints/int/int.H index a3ab4b5ac1d226619b6524ef65663687aa3f75cf..aa865c3f39d7a95d45162ee5c623563b2f6eef44 100644 --- a/src/OpenFOAM/primitives/ints/int/int.H +++ b/src/OpenFOAM/primitives/ints/int/int.H @@ -25,7 +25,7 @@ Primitive int Description - System integer + System signed integer SourceFiles intIO.C @@ -67,7 +67,30 @@ MAXMIN(int64_t, int64_t, int64_t) // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -int readInt(Istream&); +//- Read int from stream +int readInt(Istream& is); + +//- Parse entire buffer as an int, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +int readInt(const char* buf); + +//- Parse entire string as an int, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +inline int readInt(const std::string& str) +{ + return readInt(str.c_str()); +} + +//- Read entire buffer as an int, skipping leading/trailing whitespace. +// \return True if successful. +bool readInt(const char* buf, int& val); + +//- Read entire string as an int32_t, skipping leading/trailing whitespace. +// \return True if successful. +inline bool readInt(const std::string& str, int& val) +{ + return readInt(str.c_str(), val); +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/ints/int/intIO.C b/src/OpenFOAM/primitives/ints/int/intIO.C index 9250e373136d82258a7d9c685f54b5ca63c466e8..6a2901aefb04eba927a1e822cbbde69e57e57372 100644 --- a/src/OpenFOAM/primitives/ints/int/intIO.C +++ b/src/OpenFOAM/primitives/ints/int/intIO.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,10 +24,68 @@ License \*---------------------------------------------------------------------------*/ #include "int.H" +#include "error.H" +#include "parsing.H" #include "IOstreams.H" +#include <cinttypes> // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // +int Foam::readInt(const char* buf) +{ + char *endptr = nullptr; + errno = 0; + const intmax_t parsed = ::strtoimax(buf, &endptr, 10); + + const int val = int(parsed); + + if (parsed < INT_MIN || parsed > INT_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + FatalIOErrorInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << exit(FatalIOError); + } + + return val; +} + + +bool Foam::readInt(const char* buf, int& val) +{ + char *endptr = nullptr; + errno = 0; + const intmax_t parsed = ::strtoimax(buf, &endptr, 10); + + val = int(parsed); + + if (parsed < INT_MIN || parsed > INT_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + #ifdef FULLDEBUG + IOWarningInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << endl; + #endif + return false; + } + + return true; +} + + int Foam::readInt(Istream& is) { int val; diff --git a/src/OpenFOAM/primitives/ints/int32/int32.C b/src/OpenFOAM/primitives/ints/int32/int32.C index 4a209fc50b9d0b011bd62b58221cdf5378160821..daa14a004e6f1e1bfaca6381b953db43ff11ab6f 100644 --- a/src/OpenFOAM/primitives/ints/int32/int32.C +++ b/src/OpenFOAM/primitives/ints/int32/int32.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,6 +24,21 @@ License \*---------------------------------------------------------------------------*/ #include "int32.H" +#include "stringOps.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::word Foam::name(const char* fmt, const int32_t val) +{ + return stringOps::name(fmt, val); +} + + +Foam::word Foam::name(const std::string& fmt, const int32_t val) +{ + return stringOps::name(fmt, val); +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -36,9 +51,9 @@ const int32_t Foam::pTraits<int32_t>::rootMax = pTraits<int32_t>::max; const char* const Foam::pTraits<int32_t>::componentNames[] = { "" }; -Foam::pTraits<int32_t>::pTraits(const int32_t& p) +Foam::pTraits<int32_t>::pTraits(const int32_t& val) : - p_(p) + p_(val) {} Foam::pTraits<int32_t>::pTraits(Istream& is) diff --git a/src/OpenFOAM/primitives/ints/int32/int32.H b/src/OpenFOAM/primitives/ints/int32/int32.H index 62ae4b7af76693e00c0b5782db4daf8a3d8535ff..3e883827fb482b6bcf645bd66cbd8123fb6bf9e8 100644 --- a/src/OpenFOAM/primitives/ints/int32/int32.H +++ b/src/OpenFOAM/primitives/ints/int32/int32.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Primitive - int32 + int32_t Description - 32bit integer + 32bit signed integer SourceFiles int32.C @@ -57,34 +57,72 @@ class Ostream; //- Return a word representation of an int32 inline word name(const int32_t val) { - // no stripping required + // No stripping required return word(std::to_string(val), false); } //- Return a word representation of an int32, using printf-style formatter. // The representation is not checked for valid word characters. -word name(const char* fmt, const int32_t); +word name(const char* fmt, const int32_t val); //- Return a word representation of an int32, using printf-style formatter. // The representation is not checked for valid word characters. -word name(const std::string&, const int32_t); +word name(const std::string&, const int32_t val); // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -int32_t readInt32(Istream&); -bool read(const char*, int32_t&); -Istream& operator>>(Istream&, int32_t&); -Ostream& operator<<(Ostream&, const int32_t); +//- Read int32_t from stream +int32_t readInt32(Istream& is); + +//- Parse entire buffer as a int32_t, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +int32_t readInt32(const char* buf); + +//- Parse entire string as a int32_t, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +inline int32_t readInt32(const std::string& str) +{ + return readInt32(str.c_str()); +} + +//- Read entire buffer as a int32_t, skipping leading/trailing whitespace. +// \return True if successful. +bool readInt32(const char* buf, int32_t& val); + +//- Read entire string as a int32_t, skipping leading/trailing whitespace. +// \return True if successful. +inline bool readInt32(const std::string& str, int32_t& val) +{ + return readInt32(str.c_str(), val); +} + +//- Same as readInt32 +// \return True if successful. +inline bool read(const char* buf, int32_t& val) +{ + return readInt32(buf, val); +} + +//- Same as readInt32 +// \return True if successful. +inline bool read(const std::string& str, int32_t& val) +{ + return readInt32(str, val); +} + + +Istream& operator>>(Istream& is, int32_t& val); +Ostream& operator<<(Ostream& os, const int32_t val); // On 32bit OSs long is not unambiguously int32_t (or int64_t) causing problems // for IO operator resolution. // This problem is avoided by explicitly defining the following operators: #if WM_ARCH_OPTION == 32 - Istream& operator>>(Istream&, long&); - Ostream& operator<<(Ostream&, const long); + Istream& operator>>(Istream& is, long& val); + Ostream& operator<<(Ostream& os, const long val); #endif @@ -127,10 +165,10 @@ public: // Constructors //- Construct from primitive - explicit pTraits(const int32_t&); + explicit pTraits(const int32_t& val); //- Construct from Istream - pTraits(Istream&); + pTraits(Istream& is); // Member Functions @@ -149,9 +187,9 @@ public: }; -inline int32_t mag(const int32_t l) +inline int32_t mag(const int32_t val) { - return ::abs(l); + return ::abs(val); } diff --git a/src/OpenFOAM/primitives/ints/int32/int32IO.C b/src/OpenFOAM/primitives/ints/int32/int32IO.C index 0a7f18b6f2f2aab2cb2b036a112b1d426c4c4ba0..f1b4f23fb05a214e3fea27789bc425fe68cb6f95 100644 --- a/src/OpenFOAM/primitives/ints/int32/int32IO.C +++ b/src/OpenFOAM/primitives/ints/int32/int32IO.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,29 +24,69 @@ License \*---------------------------------------------------------------------------*/ #include "int32.H" -#include "stringOps.H" +#include "error.H" +#include "parsing.H" #include "IOstreams.H" +#include <cinttypes> -#include <inttypes.h> -#include <cerrno> - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::word Foam::name(const char* fmt, const int32_t val) +int32_t Foam::readInt32(const char* buf) { - return stringOps::name(fmt, val); + char *endptr = nullptr; + errno = 0; + const intmax_t parsed = ::strtoimax(buf, &endptr, 10); + + const int32_t val = int32_t(parsed); + + if (parsed < INT32_MIN || parsed > INT32_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + FatalIOErrorInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << exit(FatalIOError); + } + + return val; } -Foam::word Foam::name(const std::string& fmt, const int32_t val) +bool Foam::readInt32(const char* buf, int32_t& val) { - return stringOps::name(fmt, val); -} + char *endptr = nullptr; + errno = 0; + const intmax_t parsed = ::strtoimax(buf, &endptr, 10); + val = int32_t(parsed); + + if (parsed < INT32_MIN || parsed > INT32_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + #ifdef FULLDEBUG + IOWarningInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << endl; + #endif + return false; + } + + return true; +} -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::Istream& Foam::operator>>(Istream& is, int32_t& i) +Foam::Istream& Foam::operator>>(Istream& is, int32_t& val) { token t(is); @@ -58,7 +98,7 @@ Foam::Istream& Foam::operator>>(Istream& is, int32_t& i) if (t.isLabel()) { - i = int32_t(t.labelToken()); + val = int32_t(t.labelToken()); } else { @@ -84,35 +124,23 @@ int32_t Foam::readInt32(Istream& is) } -bool Foam::read(const char* buf, int32_t& s) -{ - char *endptr = nullptr; - errno = 0; - intmax_t l = strtoimax(buf, &endptr, 10); - s = int32_t(l); - return - (*endptr == 0) && (errno == 0) - && (l >= INT32_MIN) && (l <= INT32_MAX); -} - - -Foam::Ostream& Foam::operator<<(Ostream& os, const int32_t i) +Foam::Ostream& Foam::operator<<(Ostream& os, const int32_t val) { - os.write(label(i)); + os.write(label(val)); os.check(FUNCTION_NAME); return os; } #if WM_ARCH_OPTION == 32 -Foam::Istream& Foam::operator>>(Istream& is, long& i) +Foam::Istream& Foam::operator>>(Istream& is, long& val) { - return operator>>(is, reinterpret_cast<int32_t&>(i)); + return operator>>(is, reinterpret_cast<int32_t&>(val)); } -Foam::Ostream& Foam::operator<<(Ostream& os, const long i) +Foam::Ostream& Foam::operator<<(Ostream& os, const long val) { - os << int32_t(i); + os << int32_t(val); return os; } #endif diff --git a/src/OpenFOAM/primitives/ints/int64/int64.C b/src/OpenFOAM/primitives/ints/int64/int64.C index f182c9d2760e453509428fe8980214541941d191..ecc1eb3731bff493b3ee8b7c2ef39c5c16e5b1d9 100644 --- a/src/OpenFOAM/primitives/ints/int64/int64.C +++ b/src/OpenFOAM/primitives/ints/int64/int64.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,6 +24,21 @@ License \*---------------------------------------------------------------------------*/ #include "int64.H" +#include "stringOps.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::word Foam::name(const char* fmt, const int64_t val) +{ + return stringOps::name(fmt, val); +} + + +Foam::word Foam::name(const std::string& fmt, const int64_t val) +{ + return stringOps::name(fmt, val); +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -36,9 +51,9 @@ const int64_t Foam::pTraits<int64_t>::rootMax = pTraits<int64_t>::max; const char* const Foam::pTraits<int64_t>::componentNames[] = { "" }; -Foam::pTraits<int64_t>::pTraits(const int64_t& p) +Foam::pTraits<int64_t>::pTraits(const int64_t& val) : - p_(p) + p_(val) {} Foam::pTraits<int64_t>::pTraits(Istream& is) diff --git a/src/OpenFOAM/primitives/ints/int64/int64.H b/src/OpenFOAM/primitives/ints/int64/int64.H index addb637a7792452839cd4b502fafeb863adfdb4e..8c53bbe4438a655ff836519a35dcdcf2789c6b4a 100644 --- a/src/OpenFOAM/primitives/ints/int64/int64.H +++ b/src/OpenFOAM/primitives/ints/int64/int64.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Primitive - int64 + int64_t Description - 64bit integer + 64bit signed integer SourceFiles int64.C @@ -58,7 +58,7 @@ class Ostream; //- Return a word representation of an int64 inline word name(const int64_t val) { - // no stripping required + // No stripping required return word(std::to_string(val), false); } @@ -75,10 +75,48 @@ word name(const std::string& fmt, const int64_t); // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -int64_t readInt64(Istream&); -bool read(const char*, int64_t&); -Istream& operator>>(Istream&, int64_t&); -Ostream& operator<<(Ostream&, const int64_t); +//- Read int64_t from stream +int64_t readInt64(Istream& is); + +//- Parse entire buffer as a int64_t, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +int64_t readInt64(const char* buf); + +//- Parse entire string as a int64_t, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +inline int64_t readInt64(const std::string& str) +{ + return readInt64(str.c_str()); +} + +//- Read entire buffer as a int64_t, skipping leading/trailing whitespace. +// \return True if successful. +bool readInt64(const char* buf, int64_t& val); + +//- Read entire string as a int64_t, skipping leading/trailing whitespace. +// \return True if successful. +inline bool readInt64(const std::string& str, int64_t& val) +{ + return readInt64(str.c_str(), val); +} + +//- Same as readInt64 +// \return True if successful. +inline bool read(const char* buf, int64_t& val) +{ + return readInt64(buf, val); +} + +//- Same as readInt64 +// \return True if successful. +inline bool read(const std::string& str, int64_t& val) +{ + return readInt64(str, val); +} + + +Istream& operator>>(Istream& is, int64_t& val); +Ostream& operator<<(Ostream& os, const int64_t val); //- Template specialization for pTraits<int64_t> template<> @@ -119,10 +157,10 @@ public: // Constructors //- Construct from primitive - explicit pTraits(const int64_t&); + explicit pTraits(const int64_t& val); //- Construct from Istream - pTraits(Istream&); + pTraits(Istream& is); // Member Functions @@ -141,9 +179,9 @@ public: }; -inline int64_t mag(const int64_t l) +inline int64_t mag(const int64_t val) { - return ::labs(l); + return ::labs(val); } diff --git a/src/OpenFOAM/primitives/ints/int64/int64IO.C b/src/OpenFOAM/primitives/ints/int64/int64IO.C index 19d93bf8a8f8fd9a0b3ccc17783f9ca4601357e7..d16d979d6f21a1ebec28ede6a1376b7e65c82615 100644 --- a/src/OpenFOAM/primitives/ints/int64/int64IO.C +++ b/src/OpenFOAM/primitives/ints/int64/int64IO.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,29 +24,69 @@ License \*---------------------------------------------------------------------------*/ #include "int64.H" -#include "stringOps.H" +#include "error.H" +#include "parsing.H" #include "IOstreams.H" +#include <cinttypes> -#include <inttypes.h> -#include <cerrno> - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::word Foam::name(const char* fmt, const int64_t val) +int64_t Foam::readInt64(const char* buf) { - return stringOps::name(fmt, val); + char *endptr = nullptr; + errno = 0; + const intmax_t parsed = ::strtoimax(buf, &endptr, 10); + + const int64_t val = int64_t(parsed); + + if (parsed < INT64_MIN || parsed > INT64_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + FatalIOErrorInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << exit(FatalIOError); + } + + return val; } -Foam::word Foam::name(const std::string& fmt, const int64_t val) +bool Foam::readInt64(const char* buf, int64_t& val) { - return stringOps::name(fmt, val); -} + char *endptr = nullptr; + errno = 0; + const intmax_t parsed = ::strtoimax(buf, &endptr, 10); + val = int64_t(parsed); + + if (parsed < INT64_MIN || parsed > INT64_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + #ifdef FULLDEBUG + IOWarningInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << endl; + #endif + return false; + } + + return true; +} -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::Istream& Foam::operator>>(Istream& is, int64_t& i) +Foam::Istream& Foam::operator>>(Istream& is, int64_t& val) { token t(is); @@ -58,7 +98,7 @@ Foam::Istream& Foam::operator>>(Istream& is, int64_t& i) if (t.isLabel()) { - i = int64_t(t.labelToken()); + val = int64_t(t.labelToken()); } else { @@ -84,19 +124,9 @@ int64_t Foam::readInt64(Istream& is) } -bool Foam::read(const char* buf, int64_t& s) -{ - char *endptr = nullptr; - errno = 0; - intmax_t l = strtoimax(buf, &endptr, 10); - s = int64_t(l); - return (*endptr == 0) && (errno == 0); -} - - -Foam::Ostream& Foam::operator<<(Ostream& os, const int64_t i) +Foam::Ostream& Foam::operator<<(Ostream& os, const int64_t val) { - os.write(label(i)); + os.write(label(val)); os.check(FUNCTION_NAME); return os; } diff --git a/src/OpenFOAM/primitives/ints/label/label.H b/src/OpenFOAM/primitives/ints/label/label.H index 846803d08166a6329cbf40355511e4072cfc403e..08b4d1ff39cfbb1e47b29f4b2c31cd603957e41c 100644 --- a/src/OpenFOAM/primitives/ints/label/label.H +++ b/src/OpenFOAM/primitives/ints/label/label.H @@ -61,11 +61,45 @@ typedef INT_SIZE(int, _t) label; static const label labelMin = INT_SIZE(INT, _MIN); static const label labelMax = INT_SIZE(INT, _MAX); +//- Read label from stream. +// Uses readInt32 or readInt64 according to WM_LABEL_SIZE inline label readLabel(Istream& is) { return INT_SIZE(readInt,) (is); } +//- Parse entire buffer as a label, skipping leading/trailing whitespace. +// Uses readInt32 or readInt64 according to WM_LABEL_SIZE +// \return Parsed value or FatalIOError on any problem +inline label readLabel(const char* buf) +{ + return INT_SIZE(readInt,) (buf); +} + +//- Parse entire string as a label, skipping leading/trailing whitespace. +// Uses readInt32 or readInt64 according to WM_LABEL_SIZE +// \return Parsed value or FatalIOError on any problem +inline label readLabel(const std::string& str) +{ + return INT_SIZE(readInt,) (str); +} + +//- Parse entire buffer as a label, skipping leading/trailing whitespace. +// Uses readInt32 or readInt64 according to WM_LABEL_SIZE +// \return True if successful. +inline bool readLabel(const char* buf, label& val) +{ + return INT_SIZE(readInt,) (buf, val); +} + +//- Parse entire string as a label, skipping leading/trailing whitespace. +// Uses readInt32 or readInt64 according to WM_LABEL_SIZE +// \return True if successful. +inline bool readLabel(const std::string& str, label& val) +{ + return INT_SIZE(readInt,) (str, val); +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/ints/uLabel/uLabel.H b/src/OpenFOAM/primitives/ints/uLabel/uLabel.H index 0c712fa37689cc64633c6d7f48f535a1defff52d..9a8713f7338f338337b63b11a3964872f791442f 100644 --- a/src/OpenFOAM/primitives/ints/uLabel/uLabel.H +++ b/src/OpenFOAM/primitives/ints/uLabel/uLabel.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,7 +28,7 @@ Description A uLabel is an uint32_t or uint64_t as specified by the pre-processor macro WM_LABEL_SIZE. - A readLabel function is defined so that uLabel can be constructed from + A readULabel function is defined so that uLabel can be constructed from Istream. \*---------------------------------------------------------------------------*/ @@ -60,11 +60,46 @@ typedef UINT_SIZE(uint, _t) uLabel; static const uLabel uLabelMax = UINT_SIZE(UINT, _MAX); +//- Read uLabel from stream. +// Uses readUint32 or readUint64 according to WM_LABEL_SIZE inline uLabel readULabel(Istream& is) { return UINT_SIZE(readUint,) (is); } +//- Parse entire buffer as a uLabel, skipping leading/trailing whitespace. +// Uses readUint32 or readUint64 according to WM_LABEL_SIZE +// \return Parsed value or FatalIOError on any problem +inline uLabel readULabel(const char* buf) +{ + return UINT_SIZE(readUint,) (buf); +} + +//- Parse entire string as a uLabel, skipping leading/trailing whitespace. +// Uses readUint32 or readUint64 according to WM_LABEL_SIZE +// \return Parsed value or FatalIOError on any problem +inline uLabel readULabel(const std::string& str) +{ + return UINT_SIZE(readUint,) (str); +} + +//- Parse entire buffer as a uLabel, skipping leading/trailing whitespace. +// Uses readUint32 or readUint64 according to WM_LABEL_SIZE +// \return True if successful. +inline bool readULabel(const char* buf, uLabel& val) +{ + return UINT_SIZE(readUint,) (buf, val); +} + + +//- Parse entire string as a uLabel, skipping leading/trailing whitespace. +// Uses readUint32 or readUint64 according to WM_LABEL_SIZE +// \return True if successful. +inline bool readULabel(const std::string& str, uLabel& val) +{ + return UINT_SIZE(readUint,) (str, val); +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/ints/uint/uint.H b/src/OpenFOAM/primitives/ints/uint/uint.H index ea2430dc3535c01f79fe063dc25e536a456415aa..8234ed996aa22f3d5ed6f8fa9c40805fd65643b4 100644 --- a/src/OpenFOAM/primitives/ints/uint/uint.H +++ b/src/OpenFOAM/primitives/ints/uint/uint.H @@ -25,7 +25,7 @@ Primitive uint Description - System uinteger + System unsigned integer SourceFiles uintIO.C @@ -67,7 +67,8 @@ MAXMIN(uint64_t, uint64_t, uint64_t) // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -unsigned int readUint(Istream&); +//- Read unsigned int from stream +unsigned int readUint(Istream& is); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/ints/uint32/uint32.C b/src/OpenFOAM/primitives/ints/uint32/uint32.C index 2fec72846d5da0b3c74557783046c70522f458e8..16fd477ea6adeded9c52f918362debd2ad7b8e82 100644 --- a/src/OpenFOAM/primitives/ints/uint32/uint32.C +++ b/src/OpenFOAM/primitives/ints/uint32/uint32.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,6 +24,21 @@ License \*---------------------------------------------------------------------------*/ #include "uint32.H" +#include "stringOps.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::word Foam::name(const char* fmt, const uint32_t val) +{ + return stringOps::name(fmt, val); +} + + +Foam::word Foam::name(const std::string& fmt, const uint32_t val) +{ + return stringOps::name(fmt, val); +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -36,9 +51,9 @@ const uint32_t Foam::pTraits<uint32_t>::rootMax = pTraits<uint32_t>::max; const char* const Foam::pTraits<uint32_t>::componentNames[] = { "" }; -Foam::pTraits<uint32_t>::pTraits(const uint32_t& p) +Foam::pTraits<uint32_t>::pTraits(const uint32_t& val) : - p_(p) + p_(val) {} Foam::pTraits<uint32_t>::pTraits(Istream& is) diff --git a/src/OpenFOAM/primitives/ints/uint32/uint32.H b/src/OpenFOAM/primitives/ints/uint32/uint32.H index 72707d30dae12ae83de37c3b92850cb65ee07456..d7b7c1b41d2c08b8711c437f8c026a1cbc6a2674 100644 --- a/src/OpenFOAM/primitives/ints/uint32/uint32.H +++ b/src/OpenFOAM/primitives/ints/uint32/uint32.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Primitive - uint32 + uint32_t Description - 32bit uinteger + 32bit unsigned integer SourceFiles uint32.C @@ -57,7 +57,7 @@ class Ostream; //- Return a word representation of a uint32 inline word name(const uint32_t val) { - // no stripping required + // No stripping required return word(std::to_string(val), false); } @@ -74,10 +74,48 @@ word name(const std::string& fmt, const uint32_t); // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -uint32_t readUint32(Istream&); -bool read(const char*, uint32_t&); -Istream& operator>>(Istream&, uint32_t&); -Ostream& operator<<(Ostream&, const uint32_t); +//- Read uint32_t from stream +uint32_t readUint32(Istream& is); + +//- Parse entire buffer as a uint32_t, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +uint32_t readUint32(const char* buf); + +//- Parse entire string as a uint32_t, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +inline uint32_t readUint32(const std::string& str) +{ + return readUint32(str.c_str()); +} + +//- Read entire buffer as a uint32_t, skipping leading/trailing whitespace. +// \return True if successful. +bool readUint32(const char* buf, uint32_t& val); + +//- Read entire string as a uint32_t, skipping leading/trailing whitespace. +// \return True if successful. +inline bool readUint32(const std::string& str, uint32_t& val) +{ + return readUint32(str.c_str(), val); +} + +//- Same as readUint32 +// \return True if successful. +inline bool read(const char* buf, uint32_t& val) +{ + return readUint32(buf, val); +} + +//- Same as readUint32 +// \return True if successful. +inline bool read(const std::string& str, uint32_t& val) +{ + return readUint32(str, val); +} + + +Istream& operator>>(Istream& is, uint32_t& val); +Ostream& operator<<(Ostream& os, const uint32_t val); //- Template specialization for pTraits<uint32_t> template<> @@ -118,10 +156,10 @@ public: // Constructors //- Construct from primitive - explicit pTraits(const uint32_t&); + explicit pTraits(const uint32_t& val); //- Construct from Istream - pTraits(Istream&); + pTraits(Istream& is); // Member Functions diff --git a/src/OpenFOAM/primitives/ints/uint32/uint32IO.C b/src/OpenFOAM/primitives/ints/uint32/uint32IO.C index 240c1029a88025a701c135eb5a6edd3be99b8351..bf4e6fb8a02c2a2a53bd2a698a07fe65fbb429f5 100644 --- a/src/OpenFOAM/primitives/ints/uint32/uint32IO.C +++ b/src/OpenFOAM/primitives/ints/uint32/uint32IO.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,26 +24,68 @@ License \*---------------------------------------------------------------------------*/ #include "uint32.H" -#include "stringOps.H" +#include "parsing.H" #include "IOstreams.H" +#include <cinttypes> -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::word Foam::name(const char* fmt, const uint32_t val) +uint32_t Foam::readUint32(const char* buf) { - return stringOps::name(fmt, val); + char *endptr = nullptr; + errno = 0; + const uintmax_t parsed = ::strtoumax(buf, &endptr, 10); + + const uint32_t val = uint32_t(parsed); + + if (parsed > UINT32_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + FatalIOErrorInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << exit(FatalIOError); + } + + return val; } -Foam::word Foam::name(const std::string& fmt, const uint32_t val) +bool Foam::readUint32(const char* buf, uint32_t& val) { - return stringOps::name(fmt, val); -} + char *endptr = nullptr; + errno = 0; + const uintmax_t parsed = ::strtoumax(buf, &endptr, 10); + val = uint32_t(parsed); + + if (parsed > UINT32_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + #ifdef FULLDEBUG + IOWarningInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << endl; + #endif + return false; + } + + return true; +} -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::Istream& Foam::operator>>(Istream& is, uint32_t& i) +Foam::Istream& Foam::operator>>(Istream& is, uint32_t& val) { token t(is); @@ -55,7 +97,7 @@ Foam::Istream& Foam::operator>>(Istream& is, uint32_t& i) if (t.isLabel()) { - i = uint32_t(t.labelToken()); + val = uint32_t(t.labelToken()); } else { @@ -81,18 +123,9 @@ uint32_t Foam::readUint32(Istream& is) } -bool Foam::read(const char* buf, uint32_t& s) -{ - char *endptr = nullptr; - long l = strtol(buf, &endptr, 10); - s = uint32_t(l); - return (*endptr == 0); -} - - -Foam::Ostream& Foam::operator<<(Ostream& os, const uint32_t i) +Foam::Ostream& Foam::operator<<(Ostream& os, const uint32_t val) { - os.write(label(i)); + os.write(label(val)); os.check(FUNCTION_NAME); return os; } diff --git a/src/OpenFOAM/primitives/ints/uint64/uint64.C b/src/OpenFOAM/primitives/ints/uint64/uint64.C index b4ca245d250a2fb6655a8fc6115727c02f7cc670..c154a7f917312fe75ef596e3b71578602eb52210 100644 --- a/src/OpenFOAM/primitives/ints/uint64/uint64.C +++ b/src/OpenFOAM/primitives/ints/uint64/uint64.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,6 +24,21 @@ License \*---------------------------------------------------------------------------*/ #include "uint64.H" +#include "stringOps.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::word Foam::name(const char* fmt, const uint64_t val) +{ + return stringOps::name(fmt, val); +} + + +Foam::word Foam::name(const std::string& fmt, const uint64_t val) +{ + return stringOps::name(fmt, val); +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -36,9 +51,9 @@ const uint64_t Foam::pTraits<uint64_t>::rootMax = pTraits<uint64_t>::max; const char* const Foam::pTraits<uint64_t>::componentNames[] = { "" }; -Foam::pTraits<uint64_t>::pTraits(const uint64_t& p) +Foam::pTraits<uint64_t>::pTraits(const uint64_t& val) : - p_(p) + p_(val) {} Foam::pTraits<uint64_t>::pTraits(Istream& is) diff --git a/src/OpenFOAM/primitives/ints/uint64/uint64.H b/src/OpenFOAM/primitives/ints/uint64/uint64.H index af79433e3fb5cfb24d5b83385043afb48a6eefe1..fa803f5f54d53ed87f5248251d308ed676ff1300 100644 --- a/src/OpenFOAM/primitives/ints/uint64/uint64.H +++ b/src/OpenFOAM/primitives/ints/uint64/uint64.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Primitive - uint64 + uint64_t Description - 64bit uinteger + 64bit unsigned integer SourceFiles uint64.C @@ -44,7 +44,6 @@ SourceFiles #include "pTraits.H" #include "direction.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -58,7 +57,7 @@ class Ostream; //- Return a word representation of a uint64 inline word name(const uint64_t val) { - // no stripping required + // No stripping required return word(std::to_string(val), false); } @@ -75,10 +74,48 @@ word name(const std::string& fmt, const uint64_t); // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -uint64_t readUint64(Istream&); -bool read(const char*, uint64_t&); -Istream& operator>>(Istream&, uint64_t&); -Ostream& operator<<(Ostream&, const uint64_t); +//- Read uint64_t from stream. +uint64_t readUint64(Istream& is); + +//- Parse entire buffer as uint64_t, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +uint64_t readUint64(const char* buf); + +//- Parse entire string as uint64_t, skipping leading/trailing whitespace. +// \return Parsed value or FatalIOError on any problem +inline uint64_t readUint64(const std::string& str) +{ + return readUint64(str.c_str()); +} + +//- Parse entire buffer as uint64_t, skipping leading/trailing whitespace. +// \return True if successful. +bool readUint64(const char* buf, uint64_t& val); + +//- Parse entire string as uint64_t, skipping leading/trailing whitespace. +// \return True if successful. +inline bool readUint64(const std::string& str, uint64_t& val) +{ + return readUint64(str.c_str(), val); +} + +//- Same as readUint64 +// \return True if successful. +inline bool read(const char* buf, uint64_t& val) +{ + return readUint64(buf, val); +} + +//- Same as readUint64 +// \return True if successful. +inline bool read(const std::string& str, uint64_t& val) +{ + return readUint64(str, val); +} + + +Istream& operator>>(Istream& is, uint64_t& val); +Ostream& operator<<(Ostream& os, const uint64_t val); //- Template specialization for pTraits<uint64_t> template<> @@ -119,10 +156,10 @@ public: // Constructors //- Construct from primitive - explicit pTraits(const uint64_t&); + explicit pTraits(const uint64_t& val); //- Construct from Istream - pTraits(Istream&); + pTraits(Istream& is); // Member Functions diff --git a/src/OpenFOAM/primitives/ints/uint64/uint64IO.C b/src/OpenFOAM/primitives/ints/uint64/uint64IO.C index 18eb5ab5f4797bd1960486ec1afdb607151c1a0f..2f23b89dddefab74e8e05814e34efd563818b7de 100644 --- a/src/OpenFOAM/primitives/ints/uint64/uint64IO.C +++ b/src/OpenFOAM/primitives/ints/uint64/uint64IO.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,26 +24,68 @@ License \*---------------------------------------------------------------------------*/ #include "uint64.H" -#include "stringOps.H" +#include "parsing.H" #include "IOstreams.H" +#include <cinttypes> -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::word Foam::name(const char* fmt, const uint64_t val) +uint64_t Foam::readUint64(const char* buf) { - return stringOps::name(fmt, val); + char *endptr = nullptr; + errno = 0; + const uintmax_t parsed = ::strtoumax(buf, &endptr, 10); + + const uint64_t val = uint64_t(parsed); + + if (parsed > UINT64_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + FatalIOErrorInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << exit(FatalIOError); + } + + return val; } -Foam::word Foam::name(const std::string& fmt, const uint64_t val) +bool Foam::readUint64(const char* buf, uint64_t& val) { - return stringOps::name(fmt, val); -} + char *endptr = nullptr; + errno = 0; + const uintmax_t parsed = ::strtoumax(buf, &endptr, 10); + val = uint64_t(parsed); + + if (parsed > UINT64_MAX) + { + // Range error + errno = ERANGE; + } + + const parsing::errorType err = parsing::checkConversion(buf, endptr); + if (err != parsing::errorType::NONE) + { + #ifdef FULLDEBUG + IOWarningInFunction("unknown") + << parsing::errorNames[err] << " '" << buf << "'" + << endl; + #endif + return false; + } + + return true; +} -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::Istream& Foam::operator>>(Istream& is, uint64_t& i) +Foam::Istream& Foam::operator>>(Istream& is, uint64_t& val) { token t(is); @@ -55,7 +97,7 @@ Foam::Istream& Foam::operator>>(Istream& is, uint64_t& i) if (t.isLabel()) { - i = uint64_t(t.labelToken()); + val = uint64_t(t.labelToken()); } else { @@ -81,18 +123,9 @@ uint64_t Foam::readUint64(Istream& is) } -bool Foam::read(const char* buf, uint64_t& s) -{ - char *endptr = nullptr; - long l = strtol(buf, &endptr, 10); - s = uint64_t(l); - return (*endptr == 0); -} - - -Foam::Ostream& Foam::operator<<(Ostream& os, const uint64_t i) +Foam::Ostream& Foam::operator<<(Ostream& os, const uint64_t val) { - os.write(label(i)); + os.write(label(val)); os.check(FUNCTION_NAME); return os; } diff --git a/src/OpenFOAM/primitives/predicates/predicates.H b/src/OpenFOAM/primitives/predicates/predicates.H index e751c7e957f662c98f2d643d6559985c3aa206f0..0d7d8539fa24394ddb2e743888df4ace222ad59c 100644 --- a/src/OpenFOAM/primitives/predicates/predicates.H +++ b/src/OpenFOAM/primitives/predicates/predicates.H @@ -72,7 +72,7 @@ public: return true; } - //- Binary predicate returning false + //- Binary predicate returning true template<class T1, class T2> inline bool operator()(const T1&, const T2&) const { diff --git a/src/OpenFOAM/primitives/strings/parsing/parsing.C b/src/OpenFOAM/primitives/strings/parsing/parsing.C new file mode 100644 index 0000000000000000000000000000000000000000..2b818295284d70567d8e50d4c6a69aebdd1a528c --- /dev/null +++ b/src/OpenFOAM/primitives/strings/parsing/parsing.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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 "parsing.H" + +// * * * * * * * * * * * * * * * * Global Data * * * * * * * * * * * * * * * // + +const Foam::Enum<Foam::parsing::errorType> +Foam::parsing::errorNames +{ + { errorType::GENERAL, "General error parsing" }, + { errorType::TRAILING, "Trailing content found parsing" }, +}; + + +// ************************************************************************* // diff --git a/src/OpenFOAM/primitives/strings/parsing/parsing.H b/src/OpenFOAM/primitives/strings/parsing/parsing.H new file mode 100644 index 0000000000000000000000000000000000000000..bef3d34f9c0c92b55ff33b87e2a6c0daa2d678fd --- /dev/null +++ b/src/OpenFOAM/primitives/strings/parsing/parsing.H @@ -0,0 +1,85 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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/>. + +Namespace + Foam::parsing + +Description + Collection of static functions and data related to parsing + +SourceFiles + parsing.C + parsingI.H + +\*---------------------------------------------------------------------------*/ +#ifndef parsing_H +#define parsing_H + +#include "Enum.H" +#include <cerrno> + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace parsing Declaration +\*---------------------------------------------------------------------------*/ + +namespace parsing +{ + // Enumerations + + //- Enumeration for possible parsing error + enum class errorType + { + NONE = 0, //!< No error encountered + GENERAL = 1, //!< General parsing error + TRAILING = 2, //!< Trailing content detected + }; + + + //- Strings corresponding to the errorType + extern const Foam::Enum<errorType> errorNames; + + //- Sanity check after strtof, strtod, etc. + // Should set errno = 0 prior to the conversion. + inline errorType checkConversion(const char* buf, char* endptr); + + +} // End namespace parsing + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "parsingI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/primitives/strings/parsing/parsingI.H b/src/OpenFOAM/primitives/strings/parsing/parsingI.H new file mode 100644 index 0000000000000000000000000000000000000000..7f6a4087a1715170feb10b2e7cbfd6ebd056a8bb --- /dev/null +++ b/src/OpenFOAM/primitives/strings/parsing/parsingI.H @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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/>. + +\*---------------------------------------------------------------------------*/ + +inline Foam::parsing::errorType Foam::parsing::checkConversion +( + const char* buf, + char* endptr +) +{ + if (errno || endptr == buf) + { + // Some type of error OR no conversion + return errorType::GENERAL; + } + + // Trailing spaces are permitted + while (isspace(*endptr)) + { + ++endptr; + } + + if (*endptr != '\0') + { + // Trailing content + return errorType::TRAILING; + } + + // Valid conversion + return errorType::NONE; +} + + +// ************************************************************************* // diff --git a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C index 253b1a0cb07e45fcd0aaeb990f4d5f3e1b186ad1..69e347ecdc8bba44c1e2450b459ff090fb46f719 100644 --- a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C @@ -118,8 +118,7 @@ Foam::IncompressibleTurbulenceModel<TransportModel>::divDevReff template<class TransportModel> Foam::tmp<Foam::volSymmTensorField> -Foam::IncompressibleTurbulenceModel<TransportModel>:: -devRhoReff() const +Foam::IncompressibleTurbulenceModel<TransportModel>::devRhoReff() const { NotImplemented; @@ -129,8 +128,7 @@ devRhoReff() const template<class TransportModel> Foam::tmp<Foam::fvVectorMatrix> -Foam::IncompressibleTurbulenceModel<TransportModel>:: -divDevRhoReff +Foam::IncompressibleTurbulenceModel<TransportModel>::divDevRhoReff ( volVectorField& U ) const @@ -143,8 +141,7 @@ divDevRhoReff template<class TransportModel> Foam::tmp<Foam::fvVectorMatrix> -Foam::IncompressibleTurbulenceModel<TransportModel>:: -divDevRhoReff +Foam::IncompressibleTurbulenceModel<TransportModel>::divDevRhoReff ( const volScalarField& rho, volVectorField& U diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C index e281b04d69b2224310ade2d4ca816bb3b0c0d327..fb67a8560ad3a07f5c1a16f4d87420bfdc044f7a 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C @@ -54,7 +54,7 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcNut() const const scalarField& nuw = tnuw(); tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus.ref(); + const scalarField& yPlus = tyPlus(); tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw.ref(); diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C index c88e12919e60699931f75b7b06ec1b9d081407b3..7716c669086d19337f845c0c25560b272e77e239 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C @@ -151,8 +151,7 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::yPlus() const const tmp<volScalarField> tk = turbModel.k(); const volScalarField& k = tk(); tmp<scalarField> kwc = k.boundaryField()[patchi].patchInternalField(); - const tmp<scalarField> tnuw = turbModel.nu(patchi); - const scalarField& nuw = tnuw(); + tmp<scalarField> nuw = turbModel.nu(patchi); return pow025(Cmu_)*y*sqrt(kwc)/nuw; } diff --git a/src/conversion/ccm/reader/ccmReader.C b/src/conversion/ccm/reader/ccmReader.C index 78495c4ba512b2e3798bc5a28188c02efadc9d53..4db674ed2ee822dc9478ec5cdbdaf33c6e8341f2 100644 --- a/src/conversion/ccm/reader/ccmReader.C +++ b/src/conversion/ccm/reader/ccmReader.C @@ -587,7 +587,8 @@ void Foam::ccm::reader::writeMesh ( fmt, IOstream::currentVersion, - IOstream::UNCOMPRESSED + IOstream::UNCOMPRESSED, + true ); writeAux(mesh); } diff --git a/src/conversion/ccm/reader/ccmReaderAux.C b/src/conversion/ccm/reader/ccmReaderAux.C index 717cdd20e884a97c093262c1e542d3947333f038..eead7bb1c98add7d98d90b8e4d719025bae388a5 100644 --- a/src/conversion/ccm/reader/ccmReaderAux.C +++ b/src/conversion/ccm/reader/ccmReaderAux.C @@ -174,7 +174,8 @@ void Foam::ccm::reader::writeMeshLabelList ( fmt, IOstream::currentVersion, - IOstream::UNCOMPRESSED + IOstream::UNCOMPRESSED, + true ); } diff --git a/src/conversion/ccm/reader/ccmReaderMesh.C b/src/conversion/ccm/reader/ccmReaderMesh.C index cd696c8619475939eaf6bfa212843e1e251ea8bf..089b3f65bbdbb1535152bf85e3f408690a2dfede 100644 --- a/src/conversion/ccm/reader/ccmReaderMesh.C +++ b/src/conversion/ccm/reader/ccmReaderMesh.C @@ -28,8 +28,7 @@ License #include "emptyPolyPatch.H" #include "symmetryPolyPatch.H" #include "wallPolyPatch.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "IOdictionary.H" #include "ccmBoundaryInfo.H" diff --git a/src/fileFormats/coordSet/coordSet.C b/src/fileFormats/coordSet/coordSet.C index bb311a62edd47a2eb239e603a0c5dad190cd91d2..56a398131c09c6c8f47377639a677438a05c17c4 100644 --- a/src/fileFormats/coordSet/coordSet.C +++ b/src/fileFormats/coordSet/coordSet.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -41,6 +41,21 @@ Foam::coordSet::coordFormatNames_ }; +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::coordSet::checkDimensions() const +{ + if (size() != curveDist_.size()) + { + FatalErrorInFunction + << "Size of points and curve distance must be the same" << nl + << " points size : " << size() + << " curve size : " << curveDist_.size() + << abort(FatalError); + } +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::coordSet::coordSet @@ -68,49 +83,61 @@ Foam::coordSet::coordSet name_(name), axis_(coordFormatNames_[axis]), curveDist_(curveDist) -{} +{ + checkDimensions(); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::coordSet::hasVectorAxis() const { - return axis_ == XYZ; + return axis_ == coordFormat::XYZ; } -Foam::scalar Foam::coordSet::scalarCoord -( - const label index -) const +Foam::scalar Foam::coordSet::scalarCoord(const label index) const { const point& p = operator[](index); - if (axis_ == X) - { - return p.x(); - } - else if (axis_ == Y) + switch (axis_) { - return p.y(); - } - else if (axis_ == Z) - { - return p.z(); - } - else if (axis_ == DISTANCE) - { - // Use distance to reference point - return curveDist_[index]; - } - else - { - FatalErrorInFunction - << "Illegal axis specification " << axis_ - << " for sampling line " << name_ - << exit(FatalError); - - return 0; + case coordFormat::X: + { + return p.x(); + } + case coordFormat::Y: + { + return p.y(); + } + case coordFormat::Z: + { + return p.z(); + } + case coordFormat::DISTANCE: + { + // Note: If this has been constructed from the 'name' and 'axis' + // constructor the curveDist list will not have been set + + if (curveDist_.empty()) + { + FatalErrorInFunction + << "Axis type '" << coordFormatNames_[axis_] + << "' requested but curve distance has not been set" + << abort(FatalError); + } + + return curveDist_[index]; + } + default: + { + FatalErrorInFunction + << "Illegal axis specification '" << coordFormatNames_[axis_] + << "' for sampling line " << name_ + << exit(FatalError); + + return 0; + } } } @@ -125,14 +152,14 @@ Foam::point Foam::coordSet::vectorCoord(const label index) const Foam::Ostream& Foam::coordSet::write(Ostream& os) const { - os << "name:" << name_ << " axis:" << axis_ - << endl - << endl << "\t(coord)" + os << "name:" << name_ << " axis:" << coordFormatNames_[axis_] + << nl + << nl << "\t(coord)" << endl; - forAll(*this, sampleI) + for (const point& pt : *this) { - os << '\t' << operator[](sampleI) << endl; + os << '\t' << pt << endl; } return os; diff --git a/src/fileFormats/coordSet/coordSet.H b/src/fileFormats/coordSet/coordSet.H index bf764cc143cb87213e9bbd48b939ae74fafab75c..179e4f2adcaf60426e953be9d14c57e3a4cf94de 100644 --- a/src/fileFormats/coordSet/coordSet.H +++ b/src/fileFormats/coordSet/coordSet.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class coordSet Declaration + Class coordSet Declaration \*---------------------------------------------------------------------------*/ class coordSet @@ -58,7 +58,7 @@ public: // Public data types //- Enumeration defining the output format for coordinates - enum coordFormat + enum class coordFormat { XYZ, X, @@ -73,6 +73,9 @@ private: //- String representation of coordFormat enums static const Enum<coordFormat> coordFormatNames_; + //- Check for consistent dimensions of points and curve distance + void checkDimensions() const; + protected: @@ -91,11 +94,8 @@ public: // Constructors //- Construct from components - coordSet - ( - const word& name, - const word& axis - ); + // Note: curveDist will be empty + coordSet(const word& name, const word& axis); //- Construct from components @@ -126,6 +126,13 @@ public: return curveDist_; } + //- Set cumulative distance + void setCurveDist(const scalarList& curveDist) + { + curveDist_ = curveDist; + checkDimensions(); + } + //- Is axis specification a vector bool hasVectorAxis() const; @@ -136,6 +143,7 @@ public: //- Get point according to axis="xyz" specification vector vectorCoord(const label index) const; + //- Write to stream Ostream& write(Ostream& os) const; }; diff --git a/src/fileFormats/nas/NASCore.C b/src/fileFormats/nas/NASCore.C index 705f3e62c0c60c58cef805651e2875fd545f0e62..45fe1f30cce6f8ebde6e6336787a9f718dcd167b 100644 --- a/src/fileFormats/nas/NASCore.C +++ b/src/fileFormats/nas/NASCore.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -24,44 +24,60 @@ License \*---------------------------------------------------------------------------*/ #include "NASCore.H" -#include "StringStream.H" +#include "parsing.H" -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // -Foam::fileFormats::NASCore::NASCore() -{} +Foam::scalar Foam::fileFormats::NASCore::readNasScalar(const string& str) +{ + const auto signPos = str.find_last_of("+-"); + + if + ( + signPos == std::string::npos + || signPos == 0 + || str[signPos-1] == 'E' || str[signPos-1] == 'e' + || isspace(str[signPos-1]) + ) + { + // A normal number format + return readScalar(str); + } -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + // Nastran compact number format. + // Eg, "1234-2" instead of "1234E-2" -Foam::scalar Foam::fileFormats::NASCore::parseNASCoord(const string& s) -{ scalar value = 0; + int exponent = 0; // Any integer - const size_t expSign = s.find_last_of("+-"); - - if (expSign != std::string::npos && expSign > 0 && !isspace(s[expSign-1])) + if + ( + readScalar(str.substr(0, signPos), value) // Mantissa + && readInt(str.substr(signPos), exponent) // Exponent (with sign) + ) { - scalar exponent = 0; - - // Parse as per strtod/strtof - allowing trailing space or [Ee] - readScalar(s.substr(0, expSign).c_str(), value); // mantissa - readScalar(s.substr(expSign+1).c_str(), exponent); - - if (s[expSign] == '-') - { - exponent = -exponent; - } - + // Note: this does not catch underflow/overflow + // (especially when scalar is a float) value *= ::pow(10, exponent); } else { - readScalar(s.c_str(), value); + FatalIOErrorInFunction("unknown") + << parsing::errorNames[parsing::errorType::GENERAL] << str + << exit(FatalIOError); + + value = 0; } return value; } +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::fileFormats::NASCore::NASCore() +{} + + // ************************************************************************* // diff --git a/src/fileFormats/nas/NASCore.H b/src/fileFormats/nas/NASCore.H index ebe3dabb977c4965fc3c153e4a8f3455f4653dce..41c6f466cc09c59933269faf9de63bc3d02e604d 100644 --- a/src/fileFormats/nas/NASCore.H +++ b/src/fileFormats/nas/NASCore.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +56,14 @@ public: // Public Member Functions //- Extract numbers from things like "-2.358-8" (same as "-2.358e-8") - static scalar parseNASCoord(const string& s); + static scalar readNasScalar(const string& str); + + //- Extract numbers from things like "-2.358-8" (same as "-2.358e-8") + // \deprecated use readNasScalar instead (deprecated Sep 2017) + inline static scalar parseNASCoord(const string& str) + { + return readNasScalar(str); + } // Constructors diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H index 99d8d4c2134b6eea99d8edff9b073d6a5d64b092..758300a21afad84e0dde6b924529e17171793055 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H @@ -104,7 +104,9 @@ class fixedNormalInletOutletVelocityFvPatchVectorField : public directionMixedFvPatchVectorField { - // Private data +protected: + + // Protected data //- Flux field name word phiName_; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index 1f81e6fb63f8cce46a1180febdd06c694ea5d023..5d1bce06740e9ce5d804114e818d346865360b75 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -29,8 +29,7 @@ License #include "fvPatchFieldMapper.H" #include "momentOfInertia.H" #include "cartesianCS.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "globalIndex.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/functionObjects/field/externalCoupled/externalCoupled.C b/src/functionObjects/field/externalCoupled/externalCoupled.C index 17a2be571de7064c58197c3c96b625a8d3149e63..5f710e331869d617a93f5bed716c3566459bcb54 100644 --- a/src/functionObjects/field/externalCoupled/externalCoupled.C +++ b/src/functionObjects/field/externalCoupled/externalCoupled.C @@ -26,8 +26,7 @@ License #include "externalCoupled.H" #include "addToRunTimeSelectionTable.H" #include "OSspecific.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "volFields.H" #include "globalIndex.H" #include "fvMesh.H" diff --git a/src/functionObjects/field/externalCoupled/externalCoupledTemplates.C b/src/functionObjects/field/externalCoupled/externalCoupledTemplates.C index 3a4a3633c4e32c6ffbe1cf45bbe625d89dce50f0..77373bb37e411d0b7f5fc360b9c2c44ff699228c 100644 --- a/src/functionObjects/field/externalCoupled/externalCoupledTemplates.C +++ b/src/functionObjects/field/externalCoupled/externalCoupledTemplates.C @@ -26,8 +26,7 @@ License #include "externalCoupled.H" //#include "fvMesh.H" #include "OSspecific.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "volFields.H" #include "externalCoupledMixedFvPatchFields.H" #include "mixedFvPatchFields.H" diff --git a/src/functionObjects/field/wallShearStress/wallShearStress.C b/src/functionObjects/field/wallShearStress/wallShearStress.C index c90a02ea03b9d88bf47ae3bb67c738780b81fba9..ce8281fa10068c2b69342f1a9982c30d18048d23 100644 --- a/src/functionObjects/field/wallShearStress/wallShearStress.C +++ b/src/functionObjects/field/wallShearStress/wallShearStress.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -188,29 +188,22 @@ bool Foam::functionObjects::wallShearStress::read(const dictionary& dict) bool Foam::functionObjects::wallShearStress::execute() { - typedef compressible::turbulenceModel cmpModel; - typedef incompressible::turbulenceModel icoModel; - volVectorField& wallShearStress = - const_cast<volVectorField&> - ( - mesh_.lookupObject<volVectorField>(type()) - ); + mesh_.lookupObjectRef<volVectorField>(type()); - tmp<volSymmTensorField> Reff; - if (mesh_.foundObject<cmpModel>(turbulenceModel::propertiesName)) - { - const cmpModel& model = - mesh_.lookupObject<cmpModel>(turbulenceModel::propertiesName); + const word& turbModelName = turbulenceModel::propertiesName; + auto cmpModelPtr = + mesh_.lookupObjectPtr<compressible::turbulenceModel>(turbModelName); + auto icoModelPtr = + mesh_.lookupObjectPtr<incompressible::turbulenceModel>(turbModelName); - Reff = model.devRhoReff(); + if (cmpModelPtr) + { + calcShearStress(cmpModelPtr->devRhoReff(), wallShearStress); } - else if (mesh_.foundObject<icoModel>(turbulenceModel::propertiesName)) + else if (icoModelPtr) { - const icoModel& model = - mesh_.lookupObject<icoModel>(turbulenceModel::propertiesName); - - Reff = model.devReff(); + calcShearStress(icoModelPtr->devReff(), wallShearStress); } else { @@ -219,8 +212,6 @@ bool Foam::functionObjects::wallShearStress::execute() << "database" << exit(FatalError); } - calcShearStress(Reff(), wallShearStress); - return true; } diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C index fe7fa6a32a72d1023b722311ab4ae2fb36a0d5a5..2ba95833c194451975de5066e4a67606344e64bd 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C @@ -73,15 +73,15 @@ const Foam::basicThermo& Foam::fv::tabulatedNTUHeatTransfer::thermo const fvMesh& mesh ) const { - if (!mesh.foundObject<basicThermo>("thermophysicalProperties")) + if (!mesh.foundObject<basicThermo>(basicThermo::dictName)) { FatalErrorInFunction << " on mesh " << mesh.name() - << " could not find thermophysicalProperties " + << " could not find " << basicThermo::dictName << exit(FatalError); } - return mesh.lookupObject<basicThermo>("thermophysicalProperties"); + return mesh.lookupObject<basicThermo>(basicThermo::dictName); } diff --git a/src/lagrangian/basic/particle/particle.C b/src/lagrangian/basic/particle/particle.C index 904f4c5723549c1bddc67d9a39473750b095a04f..9725ba4358b63aea28a4f9b8be2e3550541b3562 100644 --- a/src/lagrangian/basic/particle/particle.C +++ b/src/lagrangian/basic/particle/particle.C @@ -512,7 +512,10 @@ void Foam::particle::locate // We hit a boundary ... if (boundaryFail) { - FatalErrorInFunction << boundaryMsg << exit(FatalError); + FatalErrorInFunction << boundaryMsg + << " when tracking from centre " << mesh_.cellCentres()[celli_] + << " of cell " << celli_ << " to position " << position + << exit(FatalError); } else { @@ -1210,11 +1213,11 @@ void Foam::particle::autoMap } -void Foam::particle::relocate() +void Foam::particle::relocate(const point& position) { locate ( - position(), + position, nullptr, celli_, true, diff --git a/src/lagrangian/basic/particle/particle.H b/src/lagrangian/basic/particle/particle.H index 67c4dc393d1ae392e756e27053b1114ef87aece4..50e7e2755edded32326c4a2019b3ba92210c8afd 100644 --- a/src/lagrangian/basic/particle/particle.H +++ b/src/lagrangian/basic/particle/particle.H @@ -662,9 +662,9 @@ public: //- Map after a topology change void autoMap(const vector& position, const mapPolyMesh& mapper); - //- Set the addressing based on the current position and cell + //- Set the addressing based on the provided position and current cell // Used for e.g. redistributePar - void relocate(); + void relocate(const point& position); // I-O diff --git a/src/lagrangian/basic/particle/particleIO.C b/src/lagrangian/basic/particle/particleIO.C index 15ab90ff9e85e111591bcdd717d37314ba4a95b8..5ed13963da66da0d6dba2d15f95fb847ba1aa6c4 100644 --- a/src/lagrangian/basic/particle/particleIO.C +++ b/src/lagrangian/basic/particle/particleIO.C @@ -114,17 +114,20 @@ Foam::particle::particle } else { - const size_t s = - offsetof(oldParticle, facei) - offsetof(oldParticle, position); - - is.read(reinterpret_cast<char*>(&p.position), s); - if (readFields) { + // Read whole struct const size_t s = - sizeof(oldParticle) - offsetof(oldParticle, facei); - - is.read(reinterpret_cast<char*>(&p.facei), s); + sizeof(oldParticle) - offsetof(oldParticle, position); + is.read(reinterpret_cast<char*>(&p.position), s); + } + else + { + // Read only position and cell + const size_t s = + offsetof(oldParticle, facei) + - offsetof(oldParticle, position); + is.read(reinterpret_cast<char*>(&p.position), s); } } diff --git a/src/lumpedPointMotion/lumpedPointMovement.C b/src/lumpedPointMotion/lumpedPointMovement.C index 7683ab5fd950b48881924e9958e3c97e77075eac..21cd34dc33f28f218a5d9082dee7a615a5d05acb 100644 --- a/src/lumpedPointMotion/lumpedPointMovement.C +++ b/src/lumpedPointMotion/lumpedPointMovement.C @@ -27,8 +27,7 @@ License #include "lumpedPointIOMovement.H" #include "demandDrivenData.H" #include "linearInterpolationWeights.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "volFields.H" #include "surfaceFields.H" #include "PtrMap.H" diff --git a/src/meshTools/AABBTree/AABBTree.C b/src/meshTools/AABBTree/AABBTree.C index a8f02d3aa2f89404add3e9c8d40e95dddc26a9cd..3ebd4805d1fc3301a61dc3db0a77eac8e460294b 100644 --- a/src/meshTools/AABBTree/AABBTree.C +++ b/src/meshTools/AABBTree/AABBTree.C @@ -43,29 +43,26 @@ void Foam::AABBTree<Type>::writeOBJ ) const { const pointField pts(bb.points()); - forAll(pts, i) + for (const point& pt : pts) { - meshTools::writeOBJ(os, pts[i]); + meshTools::writeOBJ(os, pt); } if (writeLinesOnly) { - forAll(bb.edges, i) + for (const edge& e : bb.edges) { - const edge& e = bb.edges[i]; os << "l " << e[0] + vertI + 1 << ' ' << e[1] + vertI + 1 << nl; } } else { - forAll(bb.faces, i) + for (const face& f : bb.faces) { - const face& f = bb.faces[i]; - os << 'f'; - forAll(f, fp) + for (const label fpi : f) { - os << ' ' << f[fp] + vertI + 1; + os << ' ' << fpi + vertI + 1; } os << nl; } @@ -144,7 +141,7 @@ void Foam::AABBTree<Type>::createBoxes direction maxDir = 0; scalar maxSpan = span[maxDir]; - for (label dirI = 1; dirI < 3; dirI++) + for (label dirI = 1; dirI < 3; ++dirI) { if (span[dirI] > maxSpan) { @@ -163,14 +160,12 @@ void Foam::AABBTree<Type>::createBoxes PackedBoolList isUsedPoint(points.size()); DynamicList<scalar> component(points.size()); - forAll(objectIDs, i) + for (const label objI : objectIDs) { - const label objI = objectIDs[i]; const Type& obj = objects[objI]; - forAll(obj, pI) + for (const label pointI : obj) { - const label pointI = obj[pI]; if (isUsedPoint.set(pointI)) { component.append(points[pointI][maxDir]); @@ -203,17 +198,15 @@ void Foam::AABBTree<Type>::createBoxes DynamicList<label> maxBinObjectIDs(objectIDs.size()); treeBoundBox maxBb(boundBox::invertedBox); - forAll(objectIDs, i) + for (const label objI : objectIDs) { - const label objI = objectIDs[i]; const Type& obj = objects[objI]; bool intoMin = false; bool intoMax = false; - forAll(obj, pI) + for (const label pointI : obj) { - const label pointI = obj[pI]; const point& pt = points[pointI]; if (pt[maxDir] < divMin) { @@ -225,7 +218,8 @@ void Foam::AABBTree<Type>::createBoxes } } - + // Note: object is inserted into both min/max child boxes (duplicated) + // if it crosses the bin boundaries if (intoMin) { minBinObjectIDs.append(objI); @@ -238,7 +232,7 @@ void Foam::AABBTree<Type>::createBoxes } } - // inflate box in case geometry reduces to 2-D + // Inflate box in case geometry reduces to 2-D if (minBinObjectIDs.size()) { minBb.inflate(0.01); @@ -255,13 +249,13 @@ void Foam::AABBTree<Type>::createBoxes label minI; if (minBinObjectIDs.size() > minLeafSize_ && level < maxLevel_) { - // new leaf + // New leaf minI = nodes.size(); nodes.append(labelPair(-1, -1)); } else { - // update existing leaf + // Update existing leaf minI = -addressing.size() - 1; addressing.append(minBinObjectIDs); } @@ -269,13 +263,13 @@ void Foam::AABBTree<Type>::createBoxes label maxI; if (maxBinObjectIDs.size() > minLeafSize_ && level < maxLevel_) { - // new leaf + // New leaf maxI = nodes.size(); nodes.append(labelPair(-1, -1)); } else { - // update existing leaf + // Update existing leaf maxI = -addressing.size() - 1; addressing.append(maxBinObjectIDs); } @@ -283,7 +277,7 @@ void Foam::AABBTree<Type>::createBoxes nodes(nodeI) = labelPair(minI, maxI); bbs(nodeI) = Pair<treeBoundBox>(minBb, maxBb); - // recurse + // Recurse if (minI >= 0) { createBoxes @@ -437,10 +431,8 @@ const Foam::List<Foam::labelList>& Foam::AABBTree<Type>::addressing() const template<class Type> bool Foam::AABBTree<Type>::pointInside(const point& pt) const { - forAll(boundBoxes_, i) + for (const treeBoundBox& bb : boundBoxes_) { - const treeBoundBox& bb = boundBoxes_[i]; - if (bb.contains(pt)) { return true; @@ -454,10 +446,8 @@ bool Foam::AABBTree<Type>::pointInside(const point& pt) const template<class Type> bool Foam::AABBTree<Type>::overlaps(const boundBox& bbIn) const { - forAll(boundBoxes_, i) + for (const treeBoundBox& bb : boundBoxes_) { - const treeBoundBox& bb = boundBoxes_[i]; - if (bb.overlaps(bbIn)) { return true; diff --git a/src/meshTools/edgeMesh/edgeMeshFormats/edgeMeshFormatsCore.C b/src/meshTools/edgeMesh/edgeMeshFormats/edgeMeshFormatsCore.C index 45ea4229c70e5137dcb19a52a297ea5b0e17928c..71d25e518b20a03dd55196f1fb82d6ac750d0484 100644 --- a/src/meshTools/edgeMesh/edgeMeshFormats/edgeMeshFormatsCore.C +++ b/src/meshTools/edgeMesh/edgeMeshFormats/edgeMeshFormatsCore.C @@ -26,8 +26,7 @@ License #include "edgeMeshFormatsCore.H" #include "Time.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "edgeMesh.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/meshTools/edgeMesh/edgeMeshFormats/nas/NASedgeFormat.C b/src/meshTools/edgeMesh/edgeMeshFormats/nas/NASedgeFormat.C index 7bcc2d32439f629416ed693166d5eecc4bc27192..761ec70b31750e4e9749d624eef9ce9ea6a1b164 100644 --- a/src/meshTools/edgeMesh/edgeMeshFormats/nas/NASedgeFormat.C +++ b/src/meshTools/edgeMesh/edgeMeshFormats/nas/NASedgeFormat.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -103,9 +103,9 @@ bool Foam::fileFormats::NASedgeFormat::read { edge e; - // label groupId = readLabel(IStringStream(line.substr(16,8))()); - e[0] = readLabel(IStringStream(line.substr(24,8))()); - e[1] = readLabel(IStringStream(line.substr(32,8))()); + // label groupId = readLabel(line.substr(16,8)); + e[0] = readLabel(line.substr(24,8)); + e[1] = readLabel(line.substr(32,8)); // discard groupID dynEdges.append(e); @@ -114,19 +114,19 @@ bool Foam::fileFormats::NASedgeFormat::read { edge e; - // label groupId = readLabel(IStringStream(line.substr(16,8))()); - e[0] = readLabel(IStringStream(line.substr(16,8))()); - e[1] = readLabel(IStringStream(line.substr(24,8))()); + // label groupId = readLabel(line.substr(16,8)); + e[0] = readLabel(line.substr(16,8)); + e[1] = readLabel(line.substr(24,8)); // discard groupID dynEdges.append(e); } else if (cmd == "GRID") { - label index = readLabel(IStringStream(line.substr(8,8))()); - scalar x = parseNASCoord(line.substr(24, 8)); - scalar y = parseNASCoord(line.substr(32, 8)); - scalar z = parseNASCoord(line.substr(40, 8)); + label index = readLabel(line.substr(8,8)); + scalar x = readNasScalar(line.substr(24, 8)); + scalar y = readNasScalar(line.substr(32, 8)); + scalar z = readNasScalar(line.substr(40, 8)); pointId.append(index); dynPoints.append(point(x, y, z)); @@ -139,9 +139,9 @@ bool Foam::fileFormats::NASedgeFormat::read // GRID* 126 0 -5.55999875E+02 -5.68730474E+02 // * 2.14897901E+02 - label index = readLabel(IStringStream(line.substr(8,16))()); - scalar x = parseNASCoord(line.substr(40, 16)); - scalar y = parseNASCoord(line.substr(56, 16)); + label index = readLabel(line.substr(8,16)); + scalar x = readNasScalar(line.substr(40, 16)); + scalar y = readNasScalar(line.substr(56, 16)); is.getLine(line); if (line[0] != '*') @@ -153,7 +153,7 @@ bool Foam::fileFormats::NASedgeFormat::read << "File:" << is.name() << " line:" << is.lineNumber() << exit(FatalError); } - scalar z = parseNASCoord(line.substr(8, 16)); + scalar z = readNasScalar(line.substr(8, 16)); pointId.append(index); dynPoints.append(point(x, y, z)); diff --git a/src/meshTools/edgeMesh/edgeMeshFormats/obj/OBJedgeFormat.C b/src/meshTools/edgeMesh/edgeMeshFormats/obj/OBJedgeFormat.C index e93dfead989c4139a0e592f61af2b037ffbbcc7c..5153b212e304ed82bdc270afe87fc8fa52bbe250 100644 --- a/src/meshTools/edgeMesh/edgeMeshFormats/obj/OBJedgeFormat.C +++ b/src/meshTools/edgeMesh/edgeMeshFormats/obj/OBJedgeFormat.C @@ -25,10 +25,9 @@ License #include "OBJedgeFormat.H" #include "clock.H" -#include "IFstream.H" -#include "StringStream.H" +#include "Fstream.H" #include "Ostream.H" -#include "OFstream.H" +#include "StringStream.H" #include "ListOps.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/meshTools/edgeMesh/edgeMeshFormats/obj/OBJedgeFormat.H b/src/meshTools/edgeMesh/edgeMeshFormats/obj/OBJedgeFormat.H index baa87877315e4d4f1ebc37d6d6899cbba73402b7..77a06d7bead91ae5fd33c271a3acd97376fb0467 100644 --- a/src/meshTools/edgeMesh/edgeMeshFormats/obj/OBJedgeFormat.H +++ b/src/meshTools/edgeMesh/edgeMeshFormats/obj/OBJedgeFormat.H @@ -38,9 +38,8 @@ SourceFiles #define OBJedgeFormat_H #include "edgeMesh.H" -#include "IFstream.H" +#include "Fstream.H" #include "Ostream.H" -#include "OFstream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/edgeMesh/edgeMeshFormats/starcd/STARCDedgeFormat.H b/src/meshTools/edgeMesh/edgeMeshFormats/starcd/STARCDedgeFormat.H index a6b0bbfb2f67849b26ee327740cd71bfba3663d0..277ef7f65b189b71250f5d79c1bcf5a8c16174f6 100644 --- a/src/meshTools/edgeMesh/edgeMeshFormats/starcd/STARCDedgeFormat.H +++ b/src/meshTools/edgeMesh/edgeMeshFormats/starcd/STARCDedgeFormat.H @@ -44,9 +44,8 @@ SourceFiles #include "edgeMesh.H" #include "STARCDCore.H" -#include "IFstream.H" +#include "Fstream.H" #include "Ostream.H" -#include "OFstream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/edgeMesh/edgeMeshFormats/vtk/VTKedgeFormat.C b/src/meshTools/edgeMesh/edgeMeshFormats/vtk/VTKedgeFormat.C index 4accc8044eed87fa49d011d9b09416077af382fc..fd72bf1b87b1e8232379c77dd7a29dd4d1681774 100644 --- a/src/meshTools/edgeMesh/edgeMeshFormats/vtk/VTKedgeFormat.C +++ b/src/meshTools/edgeMesh/edgeMeshFormats/vtk/VTKedgeFormat.C @@ -24,9 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "VTKedgeFormat.H" -#include "OFstream.H" +#include "Fstream.H" #include "clock.H" -#include "IFstream.H" #include "vtkUnstructuredReader.H" #include "Time.H" diff --git a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C index c727121a60144f4854e012946b37f35c50500496..8da032518b1ed182c9021b5df8ff35d6d01c50e6 100644 --- a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C +++ b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C @@ -30,8 +30,7 @@ License #include "treeDataPoint.H" #include "meshTools.H" #include "linePointRef.H" -#include "OFstream.H" -#include "IFstream.H" +#include "Fstream.H" #include "unitConversion.H" #include "EdgeMap.H" diff --git a/src/sampling/sampledSurface/writers/ensight/ensightSurfaceWriterTemplates.C b/src/sampling/sampledSurface/writers/ensight/ensightSurfaceWriterTemplates.C index 2c058293e887891a9209bbe946f8587843c04c5f..6db990686d140bbd64b044b59d7cd20a933e3e3d 100644 --- a/src/sampling/sampledSurface/writers/ensight/ensightSurfaceWriterTemplates.C +++ b/src/sampling/sampledSurface/writers/ensight/ensightSurfaceWriterTemplates.C @@ -24,8 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "IOmanip.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "OSspecific.H" #include "ensightPartFaces.H" #include "ensightSerialOutput.H" diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C index ab426dc13d12e91c946db4f95be5337aacc49298..2df9b42fdc3f43245ef282450d57826227aefd0a 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C @@ -26,8 +26,7 @@ License #include "MeshedSurface.H" #include "UnsortedMeshedSurface.H" #include "MeshedSurfaceProxy.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "Time.H" #include "ListOps.H" #include "polyBoundaryMesh.H" diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.H b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.H index 602ca1856540c3c579b5270506b09f08061538f1..6054cb804fccee553e48de60635def2222b140b6 100644 --- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.H +++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.H @@ -35,9 +35,8 @@ SourceFiles #ifndef AC3DsurfaceFormatCore_H #define AC3DsurfaceFormatCore_H -#include "IFstream.H" +#include "Fstream.H" #include "Ostream.H" -#include "OFstream.H" #include "MeshedSurface.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C index 65910225fca0c2dcdefc126f942358b8a8775fec..e0cbfe401c3d04bd946976dba9c7ea6cf88f19dc 100644 --- a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C @@ -26,9 +26,8 @@ License #include "GTSsurfaceFormat.H" #include "surfaceFormatsCore.H" #include "clock.H" -#include "IFstream.H" +#include "Fstream.H" #include "StringStream.H" -#include "OFstream.H" #include "faceTraits.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C index ab37ac9a9005514121f0c79a7bf99b1783c31a09..a7ec90fc4d5b7e36681ec05c9afced9492d066ae 100644 --- a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C @@ -92,9 +92,9 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read // ANSA extension if (line.startsWith("$ANSA_NAME")) { - string::size_type sem0 = line.find(';', 0); - string::size_type sem1 = line.find(';', sem0+1); - string::size_type sem2 = line.find(';', sem1+1); + const auto sem0 = line.find(';', 0); + const auto sem1 = line.find(';', sem0+1); + const auto sem2 = line.find(';', sem1+1); if ( @@ -103,10 +103,7 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read && sem2 != string::npos ) { - ansaId = readLabel - ( - IStringStream(line.substr(sem0+1, sem1-sem0-1))() - ); + ansaId = readLabel(line.substr(sem0+1, sem1-sem0-1)); ansaType = line.substr(sem1+1, sem2-sem1-1); string rawName; @@ -125,11 +122,7 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read // $HMNAME COMP 1"partName" if (line.startsWith("$HMNAME COMP") && line.find('"') != string::npos) { - label groupId = readLabel - ( - IStringStream(line.substr(16, 16))() - ); - + label groupId = readLabel(line.substr(16, 16)); IStringStream lineStream(line.substr(32)); string rawName; @@ -177,10 +170,10 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read if (cmd == "CTRIA3") { - label groupId = readLabel(IStringStream(line.substr(16,8))()); - label a = readLabel(IStringStream(line.substr(24,8))()); - label b = readLabel(IStringStream(line.substr(32,8))()); - label c = readLabel(IStringStream(line.substr(40,8))()); + label groupId = readLabel(line.substr(16,8)); + label a = readLabel(line.substr(24,8)); + label b = readLabel(line.substr(32,8)); + label c = readLabel(line.substr(40,8)); // Convert groupID into zoneId Map<label>::const_iterator fnd = lookup.find(groupId); @@ -207,11 +200,11 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read } else if (cmd == "CQUAD4") { - label groupId = readLabel(IStringStream(line.substr(16,8))()); - label a = readLabel(IStringStream(line.substr(24,8))()); - label b = readLabel(IStringStream(line.substr(32,8))()); - label c = readLabel(IStringStream(line.substr(40,8))()); - label d = readLabel(IStringStream(line.substr(48,8))()); + label groupId = readLabel(line.substr(16,8)); + label a = readLabel(line.substr(24,8)); + label b = readLabel(line.substr(32,8)); + label c = readLabel(line.substr(40,8)); + label d = readLabel(line.substr(48,8)); // Convert groupID into zoneId Map<label>::const_iterator fnd = lookup.find(groupId); @@ -249,10 +242,10 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read } else if (cmd == "GRID") { - label index = readLabel(IStringStream(line.substr(8,8))()); - scalar x = parseNASCoord(line.substr(24, 8)); - scalar y = parseNASCoord(line.substr(32, 8)); - scalar z = parseNASCoord(line.substr(40, 8)); + label index = readLabel(line.substr(8,8)); + scalar x = readNasScalar(line.substr(24, 8)); + scalar y = readNasScalar(line.substr(32, 8)); + scalar z = readNasScalar(line.substr(40, 8)); pointId.append(index); dynPoints.append(point(x, y, z)); @@ -265,9 +258,9 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read // GRID* 126 0 -5.55999875E+02 -5.68730474E+02 // * 2.14897901E+02 - label index = readLabel(IStringStream(line.substr(8,16))()); - scalar x = parseNASCoord(line.substr(40, 16)); - scalar y = parseNASCoord(line.substr(56, 16)); + label index = readLabel(line.substr(8,16)); + scalar x = readNasScalar(line.substr(40, 16)); + scalar y = readNasScalar(line.substr(56, 16)); is.getLine(line); if (line[0] != '*') @@ -279,7 +272,7 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read << "File:" << is.name() << " line:" << is.lineNumber() << exit(FatalError); } - scalar z = parseNASCoord(line.substr(8, 16)); + scalar z = readNasScalar(line.substr(8, 16)); pointId.append(index); dynPoints.append(point(x, y, z)); @@ -287,7 +280,7 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read else if (cmd == "PSHELL") { // pshell type for zone names with the Ansa extension - label groupId = readLabel(IStringStream(line.substr(8,8))()); + label groupId = readLabel(line.substr(8,8)); if (groupId == ansaId && ansaType == "PSHELL") { diff --git a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C index e7a16d36758cf864911c2fe37f53abf51d843aba..57376d2eaf2534a59b803bd087d71c9f1717a441 100644 --- a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C @@ -25,9 +25,8 @@ License #include "OBJsurfaceFormat.H" #include "clock.H" -#include "IFstream.H" +#include "Fstream.H" #include "StringStream.H" -#include "OFstream.H" #include "ListOps.H" #include "faceTraits.H" diff --git a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C index 80047476fda4bec3132b354f9e38a0fea7bcb249..e666faab460accf3e5c9c87ad9a41492fc6afbe4 100644 --- a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C @@ -25,10 +25,9 @@ License #include "OFFsurfaceFormat.H" #include "clock.H" -#include "IFstream.H" +#include "Fstream.H" #include "StringStream.H" #include "faceTraits.H" -#include "OFstream.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormatCore.H b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormatCore.H index 4f01ebea3796d50f9db701209a339a3737618fa1..970ff3929ec2a15889015194d923f5532b94da01 100644 --- a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormatCore.H +++ b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormatCore.H @@ -35,9 +35,8 @@ SourceFiles #ifndef STARCDsurfaceFormatCore_H #define STARCDsurfaceFormatCore_H -#include "IFstream.H" +#include "Fstream.H" #include "Ostream.H" -#include "OFstream.H" #include "MeshedSurface.H" #include "STARCDCore.H" diff --git a/src/surfMesh/surfaceFormats/surfaceFormatsCore.C b/src/surfMesh/surfaceFormats/surfaceFormatsCore.C index cff6e37d141821e0f07c6e1a7c18d106ce34e265..f6e2118bbd7d51c40d2b5a9b88478d5121c94c3c 100644 --- a/src/surfMesh/surfaceFormats/surfaceFormatsCore.C +++ b/src/surfMesh/surfaceFormats/surfaceFormatsCore.C @@ -27,8 +27,7 @@ License #include "Time.H" #include "ListOps.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "surfMesh.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/surfMesh/triSurface/interfaces/NAS/readNAS.C b/src/surfMesh/triSurface/interfaces/NAS/readNAS.C index 4c6cdb1eb85aa10e33ea522a9aabef340f316146..dfd7955ebfe3fbe23637acef88d555bc5435c7c5 100644 --- a/src/surfMesh/triSurface/interfaces/NAS/readNAS.C +++ b/src/surfMesh/triSurface/interfaces/NAS/readNAS.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -47,9 +47,9 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // Do weird things to extract number -static inline scalar parseNASCoord(const string& s) +static inline scalar readNasScalar(const string& s) { - return fileFormats::NASCore::parseNASCoord(s); + return Foam::fileFormats::NASCore::readNasScalar(s); } @@ -118,9 +118,9 @@ bool triSurface::readNAS(const fileName& fName) // ANSA extension if (line.startsWith("$ANSA_NAME")) { - string::size_type sem0 = line.find(';', 0); - string::size_type sem1 = line.find(';', sem0+1); - string::size_type sem2 = line.find(';', sem1+1); + const auto sem0 = line.find(';', 0); + const auto sem1 = line.find(';', sem0+1); + const auto sem2 = line.find(';', sem1+1); if ( @@ -129,10 +129,7 @@ bool triSurface::readNAS(const fileName& fName) && sem2 != string::npos ) { - ansaId = readLabel - ( - IStringStream(line.substr(sem0+1, sem1-sem0-1))() - ); + ansaId = readLabel(line.substr(sem0+1, sem1-sem0-1)); ansaType = line.substr(sem1+1, sem2-sem1-1); string nameString; @@ -152,11 +149,7 @@ bool triSurface::readNAS(const fileName& fName) // $HMNAME COMP 1"partName" if (line.startsWith("$HMNAME COMP") && line.find('"') != string::npos) { - label groupId = readLabel - ( - IStringStream(line.substr(16, 16))() - ); - + label groupId = readLabel(line.substr(16, 16)); IStringStream lineStream(line.substr(32)); string rawName; @@ -202,11 +195,10 @@ bool triSurface::readNAS(const fileName& fName) if (cmd == "CTRIA3") { readNASToken(line, 8, linei); - label groupId = - readLabel(IStringStream(readNASToken(line, 8, linei))()); - label a = readLabel(IStringStream(readNASToken(line, 8, linei))()); - label b = readLabel(IStringStream(readNASToken(line, 8, linei))()); - label c = readLabel(IStringStream(readNASToken(line, 8, linei))()); + label groupId = readLabel(readNASToken(line, 8, linei)); + label a = readLabel(readNASToken(line, 8, linei)); + label b = readLabel(readNASToken(line, 8, linei)); + label c = readLabel(readNASToken(line, 8, linei)); // Convert group into patch Map<label>::const_iterator iter = groupToPatch.find(groupId); @@ -228,12 +220,11 @@ bool triSurface::readNAS(const fileName& fName) else if (cmd == "CQUAD4") { readNASToken(line, 8, linei); - label groupId = - readLabel(IStringStream(readNASToken(line, 8, linei))()); - label a = readLabel(IStringStream(readNASToken(line, 8, linei))()); - label b = readLabel(IStringStream(readNASToken(line, 8, linei))()); - label c = readLabel(IStringStream(readNASToken(line, 8, linei))()); - label d = readLabel(IStringStream(readNASToken(line, 8, linei))()); + label groupId = readLabel(readNASToken(line, 8, linei)); + label a = readLabel(readNASToken(line, 8, linei)); + label b = readLabel(readNASToken(line, 8, linei)); + label c = readLabel(readNASToken(line, 8, linei)); + label d = readLabel(readNASToken(line, 8, linei)); // Convert group into patch Map<label>::const_iterator iter = groupToPatch.find(groupId); @@ -256,8 +247,7 @@ bool triSurface::readNAS(const fileName& fName) else if (cmd == "PSHELL") { // Read shell type since group gives patchnames - label groupId = - readLabel(IStringStream(readNASToken(line, 8, linei))()); + label groupId = readLabel(readNASToken(line, 8, linei)); if (groupId == ansaId && ansaType == "PSHELL") { const word groupName = word::validate(ansaName); @@ -267,12 +257,11 @@ bool triSurface::readNAS(const fileName& fName) } else if (cmd == "GRID") { - label index = - readLabel(IStringStream(readNASToken(line, 8, linei))()); + label index = readLabel(readNASToken(line, 8, linei)); readNASToken(line, 8, linei); - scalar x = parseNASCoord(readNASToken(line, 8, linei)); - scalar y = parseNASCoord(readNASToken(line, 8, linei)); - scalar z = parseNASCoord(readNASToken(line, 8, linei)); + scalar x = readNasScalar(readNASToken(line, 8, linei)); + scalar y = readNasScalar(readNASToken(line, 8, linei)); + scalar z = readNasScalar(readNASToken(line, 8, linei)); indices.append(index); points.append(point(x, y, z)); @@ -284,11 +273,10 @@ bool triSurface::readNAS(const fileName& fName) // Typical line (spaces compacted) // GRID* 126 0 -5.55999875E+02 -5.68730474E+02 // * 2.14897901E+02 - label index = - readLabel(IStringStream(readNASToken(line, 16, linei))()); + label index = readLabel(readNASToken(line, 16, linei)); readNASToken(line, 16, linei); - scalar x = parseNASCoord(readNASToken(line, 16, linei)); - scalar y = parseNASCoord(readNASToken(line, 16, linei)); + scalar x = readNasScalar(readNASToken(line, 16, linei)); + scalar y = readNasScalar(readNASToken(line, 16, linei)); linei = 0; is.getLine(line); @@ -303,7 +291,7 @@ bool triSurface::readNAS(const fileName& fName) << exit(FatalError); } readNASToken(line, 8, linei); - scalar z = parseNASCoord(readNASToken(line, 16, linei)); + scalar z = readNasScalar(readNASToken(line, 16, linei)); indices.append(index); points.append(point(x, y, z)); diff --git a/src/surfMesh/triSurface/triSurface.C b/src/surfMesh/triSurface/triSurface.C index 921e410593e0cc349c38068b423f3baf6821e8d4..b67da2ec63fd75c6a4cee034b884c3d33f390d0f 100644 --- a/src/surfMesh/triSurface/triSurface.C +++ b/src/surfMesh/triSurface/triSurface.C @@ -25,8 +25,7 @@ License #include "triSurface.H" #include "demandDrivenData.H" -#include "IFstream.H" -#include "OFstream.H" +#include "Fstream.H" #include "Time.H" #include "boundBox.H" #include "SortableList.H" diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 7368a003f78c27bee0aae84e1e89f6777619c164..9f0323b9cbfd7697dd8e8f77d0038c0680eaf574 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -49,8 +49,7 @@ const Foam::word Foam::basicThermo::dictName("thermophysicalProperties"); Foam::wordList Foam::basicThermo::heBoundaryBaseTypes() { - const volScalarField::Boundary& tbf = - this->T_.boundaryField(); + const volScalarField::Boundary& tbf = this->T_.boundaryField(); wordList hbt(tbf.size(), word::null); @@ -81,8 +80,7 @@ Foam::wordList Foam::basicThermo::heBoundaryBaseTypes() Foam::wordList Foam::basicThermo::heBoundaryTypes() { - const volScalarField::Boundary& tbf = - this->T_.boundaryField(); + const volScalarField::Boundary& tbf = this->T_.boundaryField(); wordList hbt = tbf.types(); diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C index 3eace6af4cdbc5ff04934af0c95353f39012e218..b8f959c1568606624d7a2e8995c8ba28bb51f6c8 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C @@ -531,11 +531,11 @@ void Foam::radiation::fvDOM::setRayIdLambdaId ) const { // assuming name is in the form: CHARS_rayId_lambdaId - const size_type i1 = name.find('_'); - const size_type i2 = name.rfind('_'); + const auto i1 = name.find('_'); + const auto i2 = name.rfind('_'); - rayId = readLabel(IStringStream(name.substr(i1+1, i2-1))()); - lambdaId = readLabel(IStringStream(name.substr(i2+1))()); + rayId = readLabel(name.substr(i1+1, i2-1)); + lambdaId = readLabel(name.substr(i2+1)); } diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/WatersKing/WatersKing.C b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/WatersKing/WatersKing.C index 4f9ebd896be0c7c0c8ad9119fb929f0454ef09b2..dc55cf90989fb1f7551be3171668051dc97200f1 100644 --- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/WatersKing/WatersKing.C +++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/WatersKing/WatersKing.C @@ -45,6 +45,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" +#include "IFstream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/chemistryProperties b/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/chemistryProperties index d7830cd44e123fe5f2b57bd0d3dc8af76503ebd4..a5128ba625b0b9f3f974f0452aa1fba948c77a71 100644 --- a/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/chemistryProperties +++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/chemistryProperties @@ -18,7 +18,7 @@ FoamFile chemistryType { chemistrySolver noChemistrySolver; - chemistryThermo psi; + chemistryThermo rho; } chemistry off; diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/combustionProperties index ba10c40e158e405a21f5f1736ce770b6e5b42acd..4f553732d0ebe4739865cef2303e94948d22d3bf 100644 --- a/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/combustionProperties +++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/combustionProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel PaSR<psiChemistryCombustion>; +combustionModel PaSR<rhoChemistryCombustion>; active false; diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/thermophysicalProperties index 35a78300b4cbeef158894a0328d730222c53af69..3fc2b5374091bd3bcb41fcb3cb011b4bef4fbc13 100644 --- a/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/constant/thermophysicalProperties @@ -17,7 +17,7 @@ FoamFile thermoType { - type hePsiThermo; + type heRhoThermo; mixture reactingMixture; transport sutherland; thermo janaf; diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/si b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/si deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/tutorials/mesh/parallel/filter/0.orig/U b/tutorials/mesh/parallel/filter/0.orig/U index 88b33643b4cacdec33919a9a1c07cad8cd96c591..3e05c93586cc51a32d73a3562874d0edf64a5740 100644 --- a/tutorials/mesh/parallel/filter/0.orig/U +++ b/tutorials/mesh/parallel/filter/0.orig/U @@ -15,21 +15,20 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 1 -1 0 0 0 0 ]; +dimensions [0 1 -1 0 0 0 0]; -internalField uniform ( 0 0 0 ); +internalField uniform (0 0 0); boundaryField { walls { - type fixedValue; - value uniform ( 0 0 0 ); + type noSlip; } inlet { type fixedValue; - value uniform ( 5 0 0 ); + value uniform (5 0 0); } outlet { diff --git a/tutorials/mesh/parallel/filter/0.orig/p b/tutorials/mesh/parallel/filter/0.orig/p index 6deac046a86e02cddadd3d078fd0d5141ad156e5..7d9e755a5d7278fccb0c0339050a0fb5300f8055 100644 --- a/tutorials/mesh/parallel/filter/0.orig/p +++ b/tutorials/mesh/parallel/filter/0.orig/p @@ -10,12 +10,11 @@ FoamFile version 2.0; format ascii; class volScalarField; - location "1"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -2 0 0 0 0 ]; +dimensions [1 -1 -2 0 0 0 0]; internalField uniform 100000; @@ -23,33 +22,42 @@ boundaryField { walls { - type zeroGradient; + type calculated; + value $internalField; } + inlet { - type zeroGradient; + type calculated; + value $internalField; } + outlet { - type fixedValue; - value uniform 100000; + type calculated; + value $internalField; } + cycLeft_half0 { type cyclic; } + cycRight_half0 { type cyclic; } + frontAndBack { type empty; } + cycLeft_half1 { type cyclic; } + cycRight_half1 { type cyclic; diff --git a/tutorials/mesh/parallel/filter/0.orig/p_rgh b/tutorials/mesh/parallel/filter/0.orig/p_rgh new file mode 100644 index 0000000000000000000000000000000000000000..889e4cf111374c8bbb5eae7cdd4e47156ac8ddcd --- /dev/null +++ b/tutorials/mesh/parallel/filter/0.orig/p_rgh @@ -0,0 +1,66 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + walls + { + type fixedFluxPressure; + } + + inlet + { + type fixedFluxPressure; + } + + outlet + { + type prghPressure; + p uniform 100000; + } + + cycLeft_half0 + { + type cyclic; + } + + cycRight_half0 + { + type cyclic; + } + + frontAndBack + { + type empty; + } + + cycLeft_half1 + { + type cyclic; + } + + cycRight_half1 + { + type cyclic; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/parallel/filter/constant/combustionProperties b/tutorials/mesh/parallel/filter/constant/combustionProperties index 93afc3cd0a299bba6392cebcd07600c6ad5a0f7f..3d8f12afb4012c6280e4676f756cffa80a3a67de 100644 --- a/tutorials/mesh/parallel/filter/constant/combustionProperties +++ b/tutorials/mesh/parallel/filter/constant/combustionProperties @@ -15,15 +15,12 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel PaSR<rhoChemistryCombustion>; +combustionModel laminar<rhoChemistryCombustion>; active false; -PaSRCoeffs -{ - Cmix 1.0; - turbulentReaction off; -} +laminarCoeffs +{} // ************************************************************************* // diff --git a/tutorials/mesh/parallel/filter/constant/thermophysicalProperties b/tutorials/mesh/parallel/filter/constant/thermophysicalProperties index 15863209043de0f02aa9d88a5a1b6f95ad72fe5d..56d265f7aa579aaeb4d30fb42c20006db527f342 100644 --- a/tutorials/mesh/parallel/filter/constant/thermophysicalProperties +++ b/tutorials/mesh/parallel/filter/constant/thermophysicalProperties @@ -36,16 +36,11 @@ foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly"; liquids { - H2O - { - defaultCoeffs yes; - } + H2O; } solids -{ - // none -} +{} inertSpecie N2; diff --git a/tutorials/mesh/parallel/filter/system/fvSolution b/tutorials/mesh/parallel/filter/system/fvSolution index ab5ba3875d2c16dc7163caf83d7f874530dea907..93cfefe3817e50c9fa7e763283636dbf9f29574e 100644 --- a/tutorials/mesh/parallel/filter/system/fvSolution +++ b/tutorials/mesh/parallel/filter/system/fvSolution @@ -47,23 +47,17 @@ solvers relTol 0; } - p + p_rgh { solver GAMG; tolerance 0; relTol 0.1; smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; } - pFinal + p_rghFinal { - $p; + $p_rgh; tolerance 1e-06; relTol 0; } @@ -99,9 +93,6 @@ PIMPLE relaxationFactors { - fields - { - } equations { ".*Final" 1; diff --git a/wmake/rules/linux64Clang/c++ b/wmake/rules/linux64Clang/c++ index 014eff3461fae216b0201f0cb3016f3154a7fa22..fde81c3609f87cab2e5797c38a9abd253672dd05 100644 --- a/wmake/rules/linux64Clang/c++ +++ b/wmake/rules/linux64Clang/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-undefined-var-template diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++ index 48bd03b3b980ead64497411b9b9711a77033e37e..a94b22983abaeda3ad49345daf03c20b2a0096ee 100644 --- a/wmake/rules/linux64Gcc/c++ +++ b/wmake/rules/linux64Gcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes diff --git a/wmake/rules/linux64GccKNL/c++ b/wmake/rules/linux64GccKNL/c++ index caeee4f5cc9e28632cea286fbfca3c34fe6da33b..cdc820c556896b2f4ba81cd885941e2bf5be424b 100644 --- a/wmake/rules/linux64GccKNL/c++ +++ b/wmake/rules/linux64GccKNL/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes diff --git a/wmake/rules/linux64Icc/c++ b/wmake/rules/linux64Icc/c++ index 0f48796fa071dab259981b29903db5d579f524a0..c03b08671a87bdea52ed5012e8e3a308011a1970 100644 --- a/wmake/rules/linux64Icc/c++ +++ b/wmake/rules/linux64Icc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \ -diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076 diff --git a/wmake/rules/linux64IccKNL/c++ b/wmake/rules/linux64IccKNL/c++ index a84129bd73fe5400d8889f64a9b8b7734ed79c8a..f0938a4da25c6cc8fe6dba81a3acf3fdfe3a91bb 100644 --- a/wmake/rules/linux64IccKNL/c++ +++ b/wmake/rules/linux64IccKNL/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \ -diag-disable 654,1125,1292,2304 diff --git a/wmake/rules/linuxARM7Gcc/c++ b/wmake/rules/linuxARM7Gcc/c++ index bc5ccb42bf42319b0e89ef1df249cecef83e19a3..3985f54a9be5b7b40efcf55194780fefbf7a33f8 100644 --- a/wmake/rules/linuxARM7Gcc/c++ +++ b/wmake/rules/linuxARM7Gcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes diff --git a/wmake/rules/linuxClang/c++ b/wmake/rules/linuxClang/c++ index 746cdb13bb6ae08d8b12f9b88893469935ca7779..32d33e9d218ff7cfac7438ead4ced391d3d8dc8a 100644 --- a/wmake/rules/linuxClang/c++ +++ b/wmake/rules/linuxClang/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-undefined-var-template diff --git a/wmake/rules/linuxGcc/c++ b/wmake/rules/linuxGcc/c++ index 94bf75319798f56b6b7457ba44b9a356bcdcf744..3076e7e6c036017aeccbca83212e3a8bd99c5e3b 100644 --- a/wmake/rules/linuxGcc/c++ +++ b/wmake/rules/linuxGcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes diff --git a/wmake/rules/linuxIA64Gcc/c++ b/wmake/rules/linuxIA64Gcc/c++ index f91f1d82709ec0114db19b53067d838414bb09b4..de9a95ab4b12742b68ab19027ea3b94d150d73a4 100644 --- a/wmake/rules/linuxIA64Gcc/c++ +++ b/wmake/rules/linuxIA64Gcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes diff --git a/wmake/rules/linuxIA64Icc/c++ b/wmake/rules/linuxIA64Icc/c++ index 70c00d3ead021887df0dc2b6515a3750ece1a5cd..021f97c5276fca5fa59108d7ab6a13a7dc0af5c9 100644 --- a/wmake/rules/linuxIA64Icc/c++ +++ b/wmake/rules/linuxIA64Icc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \ -diag-disable 2304,1292 diff --git a/wmake/rules/linuxIcc/c++ b/wmake/rules/linuxIcc/c++ index 8e59e33cc2d748479fc4c777af600fd6f1e8364c..7c5c4d5e5b037acddf156126f39c0bd2cf1fe7b6 100644 --- a/wmake/rules/linuxIcc/c++ +++ b/wmake/rules/linuxIcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \ -diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076 diff --git a/wmake/rules/linuxPPC64Gcc/c++ b/wmake/rules/linuxPPC64Gcc/c++ index 35d902a04c0a5d11f5e669fa11b24d28b0ee8e92..1bc42bc7cf7ba725af7a8b3d796ca5389269d771 100644 --- a/wmake/rules/linuxPPC64Gcc/c++ +++ b/wmake/rules/linuxPPC64Gcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes diff --git a/wmake/rules/linuxPPC64leGcc/c++ b/wmake/rules/linuxPPC64leGcc/c++ index 69b4f5f9813ef77805da55337a6e6e39aad05d94..341a2b59550e3d1f7f6a2a5d52b9fb433c9d1462 100644 --- a/wmake/rules/linuxPPC64leGcc/c++ +++ b/wmake/rules/linuxPPC64leGcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes diff --git a/wmake/rules/solaris64Gcc/c++ b/wmake/rules/solaris64Gcc/c++ index 0844f2afab3d54f2e0f0b6e6ce169415176e20fc..74b72eecd8faeca3164146f79da10ff2ade3675a 100644 --- a/wmake/rules/solaris64Gcc/c++ +++ b/wmake/rules/solaris64Gcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes diff --git a/wmake/rules/solarisGcc/c++ b/wmake/rules/solarisGcc/c++ index 7bc009b73cc5f39f0748f26e114bab9f66fb7f93..cf37d4c57b92b931d5eb4c7b5af4ae076807fb79 100644 --- a/wmake/rules/solarisGcc/c++ +++ b/wmake/rules/solarisGcc/c++ @@ -1,4 +1,4 @@ -SUFFIXES += .C +SUFFIXES += .C .cc .cpp .cxx c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ -Wno-invalid-offsetof -Wno-attributes