diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H index 2b9b50d124..d93311ece1 100644 --- a/applications/solvers/combustion/XiFoam/bEqn.H +++ b/applications/solvers/combustion/XiFoam/bEqn.H @@ -30,7 +30,7 @@ if (ign.ignited()) n /= mgb; -# include "StCorr.H" + #include "StCorr.H" // Calculate turbulent flame speed flux // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -58,7 +58,7 @@ if (ign.ignited()) // Add ignition cell contribution to b-equation // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# include "ignite.H" + #include "ignite.H" // Solve for b @@ -134,7 +134,7 @@ if (ign.ignited()) (sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt) /(sqr(Su0 - SuInf) + sqr(SuMin)); - solve + fvScalarMatrix SuEqn ( fvm::ddt(rho, Su) + fvm::div(phi + phiXi, Su, "div(phiXi,Su)") @@ -144,6 +144,9 @@ if (ign.ignited()) - fvm::SuSp(rho*(sigmas + Rc), Su) ); + SuEqn.relax(); + SuEqn.solve(); + // Limit the maximum Su // ~~~~~~~~~~~~~~~~~~~~ Su.min(SuMax); @@ -196,7 +199,7 @@ if (ign.ignited()) // Solve for the flame wrinkling // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - solve + fvScalarMatrix XiEqn ( fvm::ddt(rho, Xi) + fvm::div(phi + phiXi, Xi, "div(phiXi,Xi)") @@ -215,6 +218,8 @@ if (ign.ignited()) ) ); + XiEqn.relax(); + XiEqn.solve(); // Correct boundedness of Xi // ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/applications/solvers/combustion/dieselEngineFoam/YEqn.H b/applications/solvers/combustion/dieselEngineFoam/YEqn.H index 9d46c0d611..f6251d1c30 100644 --- a/applications/solvers/combustion/dieselEngineFoam/YEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/YEqn.H @@ -14,7 +14,7 @@ tmp > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i. - -\*---------------------------------------------------------------------------*/ - -#include "solidWallHeatFluxTemperatureFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::solidWallHeatFluxTemperatureFvPatchScalarField:: -solidWallHeatFluxTemperatureFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedGradientFvPatchScalarField(p, iF), - q_(p.size(), 0.0), - KName_("undefined-K") -{} - - -Foam::solidWallHeatFluxTemperatureFvPatchScalarField:: -solidWallHeatFluxTemperatureFvPatchScalarField -( - const solidWallHeatFluxTemperatureFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedGradientFvPatchScalarField(ptf, p, iF, mapper), - q_(ptf.q_, mapper), - KName_(ptf.KName_) -{} - - -Foam::solidWallHeatFluxTemperatureFvPatchScalarField:: -solidWallHeatFluxTemperatureFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedGradientFvPatchScalarField(p, iF, dict), - q_("q", dict, p.size()), - KName_(dict.lookup("K")) -{} - - -Foam::solidWallHeatFluxTemperatureFvPatchScalarField:: -solidWallHeatFluxTemperatureFvPatchScalarField -( - const solidWallHeatFluxTemperatureFvPatchScalarField& tppsf -) -: - fixedGradientFvPatchScalarField(tppsf), - q_(tppsf.q_), - KName_(tppsf.KName_) -{} - - -Foam::solidWallHeatFluxTemperatureFvPatchScalarField:: -solidWallHeatFluxTemperatureFvPatchScalarField -( - const solidWallHeatFluxTemperatureFvPatchScalarField& tppsf, - const DimensionedField& iF -) -: - fixedGradientFvPatchScalarField(tppsf, iF), - q_(tppsf.q_), - KName_(tppsf.KName_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::autoMap -( - const fvPatchFieldMapper& m -) -{ - fixedGradientFvPatchScalarField::autoMap(m); - q_.autoMap(m); -} - - -void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::rmap -( - const fvPatchScalarField& ptf, - const labelList& addr -) -{ - fixedGradientFvPatchScalarField::rmap(ptf, addr); - - const solidWallHeatFluxTemperatureFvPatchScalarField& hfptf = - refCast(ptf); - - q_.rmap(hfptf.q_, addr); -} - - -void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const scalarField& Kw = patch().lookupPatchField - ( - KName_ - ); - - gradient() = q_/Kw; - - fixedGradientFvPatchScalarField::updateCoeffs(); -} - - -void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::write -( - Ostream& os -) const -{ - fixedGradientFvPatchScalarField::write(os); - q_.writeEntry("q", os); - os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl; - this->writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchScalarField, - solidWallHeatFluxTemperatureFvPatchScalarField - ); -} - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionSimpleFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionSimpleFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H deleted file mode 100644 index ffbcf52ed5..0000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionSimpleFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H +++ /dev/null @@ -1,180 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 . - -Class - solidWallHeatFluxTemperatureFvPatchScalarField - -Description - Heat flux boundary condition for temperature on solid region - - Example usage: - myWallPatch - { - type solidWallHeatFluxTemperature; - K K; // Name of K field - q uniform 1000; // Heat flux / [W/m2] - value 300.0; // Initial temperature / [K] - } - - -SourceFiles - solidWallHeatFluxTemperatureFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H -#define solidWallHeatFluxTemperatureFvPatchScalarField_H - -#include "fixedGradientFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class solidWallHeatFluxTemperatureFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class solidWallHeatFluxTemperatureFvPatchScalarField -: - public fixedGradientFvPatchScalarField -{ - // Private data - - //- Heat flux / [W/m2] - scalarField q_; - - //- Name of thermal conductivity field - word KName_; - - -public: - - //- Runtime type information - TypeName("solidWallHeatFluxTemperature"); - - - // Constructors - - //- Construct from patch and internal field - solidWallHeatFluxTemperatureFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - solidWallHeatFluxTemperatureFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // solidWallHeatFluxTemperatureFvPatchScalarField - // onto a new patch - solidWallHeatFluxTemperatureFvPatchScalarField - ( - const solidWallHeatFluxTemperatureFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - solidWallHeatFluxTemperatureFvPatchScalarField - ( - const solidWallHeatFluxTemperatureFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new solidWallHeatFluxTemperatureFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - solidWallHeatFluxTemperatureFvPatchScalarField - ( - const solidWallHeatFluxTemperatureFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new solidWallHeatFluxTemperatureFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap - ( - const fvPatchFieldMapper& - ); - - //- Reverse map the given fvPatchField onto this fvPatchField - virtual void rmap - ( - const fvPatchScalarField&, - const labelList& - ); - - - // I-O - - //- Write - void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index dd2f6416ee..0c8c1bd115 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -1,4 +1,4 @@ - Info << "Reading field p\n" << endl; + Info<< "Reading field p\n" << endl; volScalarField p ( IOobject @@ -12,7 +12,7 @@ mesh ); - Info << "Reading field U\n" << endl; + Info<< "Reading field U\n" << endl; volVectorField U ( IOobject @@ -34,7 +34,7 @@ setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); - Info << "Reading field pa\n" << endl; + Info<< "Reading field pa\n" << endl; volScalarField pa ( IOobject @@ -48,7 +48,7 @@ mesh ); - Info << "Reading field Ua\n" << endl; + Info<< "Reading field Ua\n" << endl; volVectorField Ua ( IOobject @@ -84,10 +84,8 @@ dimensionedScalar lambda(laminarTransport.lookup("lambda")); dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax")); - const labelList& inletCells = - mesh.boundary()[mesh.boundaryMesh().findPatchID("inlet")].faceCells(); - //const labelList& outletCells = - // mesh.boundary()[mesh.boundaryMesh().findPatchID("outlet")].faceCells(); + const labelList& inletCells = mesh.boundary()["inlet"].faceCells(); + //const labelList& outletCells = mesh.boundary()["outlet"].faceCells(); volScalarField alpha ( diff --git a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H index f1651d8df3..f137c0027f 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H +++ b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H @@ -27,7 +27,7 @@ zeroGradientFvPatchScalarField::typeName ); - for (label i=0; icorrect(); + turbulence->correct(); + } runTime.write(); diff --git a/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/incompressibleUncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/incompressibleUncoupledKinematicParcelFoam.C index bc87b5118f..8d3f2279bc 100644 --- a/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/incompressibleUncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/incompressibleUncoupledKinematicParcelFoam.C @@ -41,7 +41,12 @@ Description int main(int argc, char *argv[]) { - argList::addOption("cloudName", "cloud name"); + argList::addOption + ( + "cloudName", + "name", + "specify alternative cloud name. default is 'kinematicCloud'" + ); #include "setRootCase.H" #include "createTime.H" diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H index 5cf44cb09f..c687f2035b 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H @@ -14,7 +14,7 @@ tmp > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i(Ua.boundaryField()[i])) { diff --git a/applications/solvers/multiphase/bubbleFoam/createPhib.H b/applications/solvers/multiphase/bubbleFoam/createPhib.H index 77bb467063..bdf4c46bcc 100644 --- a/applications/solvers/multiphase/bubbleFoam/createPhib.H +++ b/applications/solvers/multiphase/bubbleFoam/createPhib.H @@ -36,7 +36,7 @@ calculatedFvPatchScalarField::typeName ); - for (label i=0; i(Ub.boundaryField()[i])) { diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H index 3da1b5e9c1..9d3be93d0e 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H @@ -135,7 +135,7 @@ zeroGradientFvPatchScalarField::typeName ); - for (label i=0; i(U_.boundaryField()[i])) { diff --git a/applications/test/FixedList/FixedListTest.C b/applications/test/FixedList/FixedListTest.C index 79abb4a34a..208ff277b1 100644 --- a/applications/test/FixedList/FixedListTest.C +++ b/applications/test/FixedList/FixedListTest.C @@ -43,7 +43,6 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList args(argc, argv); FixedList list; diff --git a/applications/test/ODETest/ODETest.C b/applications/test/ODETest/ODETest.C index e8d29553e1..2a3b8357b9 100644 --- a/applications/test/ODETest/ODETest.C +++ b/applications/test/ODETest/ODETest.C @@ -104,7 +104,6 @@ public: int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::validArgs.append("ODESolver"); argList args(argc, argv); diff --git a/applications/test/prefixOSstream/prefixOSstreamTest.C b/applications/test/prefixOSstream/prefixOSstreamTest.C index 98bcee40c4..093c540e96 100644 --- a/applications/test/prefixOSstream/prefixOSstreamTest.C +++ b/applications/test/prefixOSstream/prefixOSstreamTest.C @@ -45,7 +45,6 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList args(argc, argv); //Pout.prefix() = '[' + name(Pstream::myProcNo()) + "] "; diff --git a/applications/test/primitivePatch/testPrimitivePatch.C b/applications/test/primitivePatch/testPrimitivePatch.C index e2336530e6..f85b65435b 100644 --- a/applications/test/primitivePatch/testPrimitivePatch.C +++ b/applications/test/primitivePatch/testPrimitivePatch.C @@ -220,10 +220,7 @@ int main(int argc, char *argv[]) # include "createPolyMesh.H" const word patchName = args[1]; - - label patchI = mesh.boundaryMesh().findPatchID(patchName); - - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchName]; Info<< "Patch:" << patch.name() << endl; diff --git a/applications/test/readCHEMKINIII/readCHEMKINIII.C b/applications/test/readCHEMKINIII/readCHEMKINIII.C index 9165f84839..7005f93592 100644 --- a/applications/test/readCHEMKINIII/readCHEMKINIII.C +++ b/applications/test/readCHEMKINIII/readCHEMKINIII.C @@ -35,7 +35,6 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::validArgs.append("CHEMKINIIIFile"); argList::addOption("thermo", "fileName"); argList args(argc, argv); diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index c3d671d232..56ea5e124f 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -38,7 +38,7 @@ Description E.g. to allow all faces on same patch to be merged: - combinePatchFaces .. cavity 180 -concaveAngle 90 + combinePatchFaces 180 -concaveAngle 90 \*---------------------------------------------------------------------------*/ @@ -429,15 +429,18 @@ int main(int argc, char *argv[]) { # include "addOverwriteOption.H" - argList::validArgs.append("feature angle [0..180]"); + argList::validArgs.append("featureAngle [0..180]"); argList::addOption ( "concaveAngle", - "[0..180]", - "specify concave angle [0..180] degrees (default: 30.0 degrees)" + "degrees", + "specify concave angle [0..180] (default: 30 degrees)" + ); + argList::addBoolOption + ( + "snapMesh", + "use system/snapMeshDict" ); - - argList::addBoolOption("snapMesh"); # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 5e0ce9248f..4a1a9b5a08 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -46,12 +46,18 @@ using namespace Foam; int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" + #include "addOverwriteOption.H" argList::noParallel(); argList::validArgs.append("patchName"); argList::validArgs.append("edgeWeight"); - argList::addOption("useSet", "cellSet"); + argList::addOption + ( + "useSet", + "name", + "restrict cells to refine based on specified cellSet name" + ); + # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index acaa9bf48d..0224943836 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -96,11 +96,15 @@ bool limitRefinementLevel int main(int argc, char *argv[]) { - argList::addBoolOption("readLevel"); + argList::addBoolOption + ( + "readLevel", + "read level from refinementLevel file" + ); -# include "setRootCase.H" -# include "createTime.H" -# include "createPolyMesh.H" + #include "setRootCase.H" + #include "createTime.H" + #include "createPolyMesh.H" Info<< "Dividing cells into bins depending on cell volume.\nThis will" << " correspond to refinement levels for a mesh with only 2x2x2" @@ -109,7 +113,7 @@ int main(int argc, char *argv[]) << " to allow for some truncation error." << nl << endl; - bool readLevel = args.optionFound("readLevel"); + const bool readLevel = args.optionFound("readLevel"); const scalarField& vols = mesh.cellVolumes(); diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 19828287bc..3967a51516 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -517,17 +517,35 @@ void collectCuts int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" + argList::addNote + ( + "split cells with flat faces" + ); + #include "addOverwriteOption.H" argList::noParallel(); - argList::addOption("set", "cellSet name"); - argList::addBoolOption("geometry"); - argList::addOption("tol", "edge snap tolerance"); - argList::validArgs.append("edge angle [0..360]"); + argList::validArgs.append("edgeAngle [0..360]"); -# include "setRootCase.H" -# include "createTime.H" + argList::addOption + ( + "set", + "name", + "split cells from specified cellSet only" + ); + argList::addBoolOption + ( + "geometry", + "use geometric cut for hexes as well" + ); + argList::addOption + ( + "tol", + "scalar", "edge snap tolerance (default 0.2)" + ); + + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createPolyMesh.H" + #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); const scalar featureAngle = args.argRead(1); @@ -538,7 +556,7 @@ int main(int argc, char *argv[]) const bool geometry = args.optionFound("geometry"); const bool overwrite = args.optionFound("overwrite"); - scalar edgeTol = args.optionLookupOrDefault("tol", 0.2); + const scalar edgeTol = args.optionLookupOrDefault("tol", 0.2); Info<< "Trying to split cells with internal angles > feature angle\n" << nl << "featureAngle : " << featureAngle << nl diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 2fb1c77043..16e3b9efe3 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -235,7 +235,12 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("ANSYS input file"); - argList::addOption("scale", "scale factor"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -244,8 +249,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C index 02b758b569..2de1b840e9 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C @@ -49,7 +49,12 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("CFX geom file"); - argList::addOption("scale", "scale factor"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -58,8 +63,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 02da5e6829..6c3a0c315a 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -761,10 +761,30 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("Fluent mesh file"); - argList::addOption("scale", "scale factor"); - argList::addOption("ignoreCellGroups", "cell group names"); - argList::addOption("ignoreFaceGroups", "face group names"); - argList::addBoolOption("cubit"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); + argList::addOption + ( + "ignoreCellGroups", + "names", + "specify cell groups to ignore" + ); + argList::addOption + ( + "ignoreFaceGroups", + "names", + "specify face groups to ignore" + ); + + argList::addBoolOption + ( + "cubit", + "special parsing of (incorrect) cubit files" + ); argList args(argc, argv); diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt b/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt index 1dcfe05a8e..43c0963746 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt @@ -20,8 +20,7 @@ Notes for fluentMeshToFoam with zone preservation with the cellZones(), faceZones() and pointZones() member functions - Example (Members from polyMesh.H and ZoneMesh.H): - label thisCellZoneID = mesh.cellZones().findZoneID("thisZoneName"); - const labelList& thisCellZone = mesh.cellZones()[thisCellZoneID]; + const labelList& thisCellZone = mesh.cellZones()["thisZoneName"]; - Zone integrity is preserved during mesh modification and decompomposition. diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index 8c954cd1cb..619374396f 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -866,9 +866,22 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("Fluent mesh file"); - argList::addOption("scale", "scale factor"); - argList::addBoolOption("writeSets"); - argList::addBoolOption("writeZones"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); + argList::addBoolOption + ( + "writeSets", + "write cell zones and patches as sets" + ); + argList::addBoolOption + ( + "writeZones", + "write cell zones as zones" + ); argList args(argc, argv); @@ -877,8 +890,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); const bool writeSets = args.optionFound("writeSets"); const bool writeZones = args.optionFound("writeZones"); @@ -1554,7 +1566,7 @@ int main(int argc, char *argv[]) // interior boundaries are handled via faceSets // cell zones will only be written if there is more than one - if (writeZones && cellGroupZoneID.size()>1) + if (writeZones && cellGroupZoneID.size() > 1) { Info<< "Adding Zones" << endl; List pz(0); diff --git a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C index fbb2c3b12f..09e34235e5 100644 --- a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C +++ b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) ( "scale", "factor", - "specify geometry scaling factor - default is 1000 ([m] to [mm])" + "geometry scaling factor - default is 1000 ([m] to [mm])" ); argList::addBoolOption ( diff --git a/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C b/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C index 1616173a83..28ced25e87 100644 --- a/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C +++ b/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C @@ -61,8 +61,8 @@ int main(int argc, char *argv[]) argList::addOption ( "scale", - "scale", - "specify geometry scaling factor" + "factor", + "geometry scaling factor - default is 1" ); argList::addBoolOption ( diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index 5e3b62bec5..c1d2b44e82 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -628,7 +628,12 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("GAMBIT file"); - argList::addOption("scale", "scale factor"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -637,8 +642,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 1bcc998ae9..a3f607ba0b 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -716,7 +716,11 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append(".msh file"); - argList::addBoolOption("keepOrientation"); + argList::addBoolOption + ( + "keepOrientation", + "retain raw orientation for prisms/hexs" + ); # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C index 5adeb68236..ab764547a3 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C +++ b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C @@ -46,7 +46,7 @@ Description using namespace Foam; -// Supported KIVA versions +//- Supported KIVA versions enum kivaVersions { kiva3, @@ -59,37 +59,51 @@ enum kivaVersions int main(int argc, char *argv[]) { argList::noParallel(); - argList::addOption("file", "fileName"); - argList::addOption("version", "[kiva3|kiva3v]"); - argList::addOption("zHeadMin", "scalar"); + argList::addOption + ( + "file", + "name", + "specify alternative input file name - default is otape17" + ); + argList::addOption + ( + "version", + "version", + "specify kiva version [kiva3|kiva3v] - default is '3v'" + ); + argList::addOption + ( + "zHeadMin", + "scalar", + "minimum z-height for transferring liner faces to cylinder-head" + ); # include "setRootCase.H" # include "createTime.H" - fileName kivaFileName("otape17"); - args.optionReadIfPresent("file", kivaFileName); + const fileName kivaFileName = + args.optionLookupOrDefault("file", "otape17"); kivaVersions kivaVersion = kiva3v; if (args.optionFound("version")) { - const word kivaVersionName = args["version"]; + const word versionName = args["version"]; - if (kivaVersionName == "kiva3") + if (versionName == "kiva3") { kivaVersion = kiva3; } - else if (kivaVersionName == "kiva3v") + else if (versionName == "kiva3v") { kivaVersion = kiva3v; } else { FatalErrorIn("main(int argc, char *argv[])") - << "KIVA file version " << kivaVersionName << " not supported" + << "KIVA file version " << versionName << " not supported" << exit(FatalError); args.printUsage(); - FatalError.exit(1); } } diff --git a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H index 6c50c02fcd..d4356c2cdc 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H +++ b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H @@ -315,7 +315,7 @@ for (label i=0; i \n - Specify an alternative dictionary for the block mesh description. + Specify alternative dictionary for the block mesh description. \*---------------------------------------------------------------------------*/ @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) ( "dict", "file", - "specify an alternative dictionary for the blockMesh description" + "specify alternative dictionary for the blockMesh description" ); # include "addRegionOption.H" diff --git a/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H b/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H index c8a25abeec..fa25d815ea 100644 --- a/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H +++ b/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H @@ -27,10 +27,7 @@ // Master patch const word masterPatchName(mergePatchPairs[pairI].first()); const polyPatch& masterPatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(masterPatchName) - ]; + mesh.boundaryMesh()[masterPatchName]; labelList isf(masterPatch.size()); @@ -51,10 +48,7 @@ // Slave patch const word slavePatchName(mergePatchPairs[pairI].second()); const polyPatch& slavePatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(slavePatchName) - ]; + mesh.boundaryMesh()[slavePatchName]; labelList osf(slavePatch.size()); diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index d325f159f9..1d0ce53e73 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -123,7 +123,7 @@ void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName) label findPatchID(const polyBoundaryMesh& patches, const word& name) { - label patchID = patches.findPatchID(name); + const label patchID = patches.findPatchID(name); if (patchID == -1) { diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C index dfcfb91471..6a3b7dd7ea 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -632,7 +632,7 @@ int main(int argc, char *argv[]) argList::validArgs.append("thickness"); #include "addRegionOption.H" - argList::validOptions.insert("overwrite", ""); + #include "addOverwriteOption.H" #include "setRootCase.H" #include "createTime.H" #include "createNamedMesh.H" @@ -849,8 +849,7 @@ int main(int argc, char *argv[]) nExtrudeFaces = 0; forAll(zoneNames, i) { - label zoneI = faceZones.findZoneID(zoneNames[i]); - const faceZone& fz = faceZones[zoneI]; + const faceZone& fz = faceZones[zoneNames[i]]; forAll(fz, j) { extrudeTopPatchID[nExtrudeFaces] = interRegionTopPatch[i]; diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C index c426128e31..8662f404c1 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C @@ -48,9 +48,21 @@ int main(int argc, char *argv[]) { timeSelector::addOptions(); # include "addRegionOption.H" - argList::addBoolOption("noTopology"); - argList::addBoolOption("allGeometry"); - argList::addBoolOption("allTopology"); + argList::addBoolOption + ( + "noTopology", + "skip checking the mesh topology" + ); + argList::addBoolOption + ( + "allGeometry", + "include bounding box checks" + ); + argList::addBoolOption + ( + "allTopology", + "include extra topology checks" + ); # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index e02d0e1420..22720cbf65 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -107,7 +107,7 @@ void modifyOrAddFace label findPatchID(const polyMesh& mesh, const word& name) { - label patchI = mesh.boundaryMesh().findPatchID(name); + const label patchI = mesh.boundaryMesh().findPatchID(name); if (patchI == -1) { @@ -124,18 +124,35 @@ label findPatchID(const polyMesh& mesh, const word& name) int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" -# include "addRegionOption.H" + argList::addNote + ( + "Makes internal faces into boundary faces.\n" + "Does not duplicate points, unlike mergeOrSplitBaffles." + ); + + #include "addOverwriteOption.H" + #include "addRegionOption.H" argList::validArgs.append("faceZone"); argList::validArgs.append("patch"); - argList::addOption("additionalPatches", "(patch2 .. patchN)"); - argList::addBoolOption("internalFacesOnly"); -# include "setRootCase.H" -# include "createTime.H" + argList::addOption + ( + "additionalPatches", + "(patch2 .. patchN)", + "specify additional patches for creating baffles" + ); + argList::addBoolOption + ( + "internalFacesOnly", + "do not convert boundary faces" + ); + + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createNamedMesh.H" + #include "createNamedMesh.H" + const word oldInstance = mesh.pointsInstance(); const polyBoundaryMesh& patches = mesh.boundaryMesh(); diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 5e186a6d0a..8ec77b0111 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -681,17 +681,17 @@ int main(int argc, char *argv[]) { const dictionary& dict = patchSources[addedI]; - word patchName(dict.lookup("name")); - + const word patchName(dict.lookup("name")); label destPatchI = patches.findPatchID(patchName); if (destPatchI == -1) { - FatalErrorIn(args.executable()) << "patch " << patchName - << " not added. Problem." << abort(FatalError); + FatalErrorIn(args.executable()) + << "patch " << patchName << " not added. Problem." + << abort(FatalError); } - word sourceType(dict.lookup("constructFrom")); + const word sourceType(dict.lookup("constructFrom")); if (sourceType == "patches") { @@ -719,7 +719,7 @@ int main(int argc, char *argv[]) } else if (sourceType == "set") { - word setName(dict.lookup("set")); + const word setName(dict.lookup("set")); faceSet faces(mesh, setName); diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H b/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H index 4098a89e6e..01f173f10c 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H +++ b/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H @@ -1,15 +1,22 @@ Info<< nl << "Create Times" << endl; + const fileName masterCasePath = masterCase.path(); + const fileName masterCaseName = masterCase.name(); + Time runTimeMaster ( Time::controlDictName, - rootDirMaster, - caseDirMaster + masterCasePath, + masterCaseName ); + const fileName addCasePath = addCase.path(); + const fileName addCaseName = addCase.name(); + Time runTimeToAdd ( Time::controlDictName, - rootDirToAdd, - caseDirToAdd + addCasePath, + addCaseName ); + diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C index 502f1b7dd6..af09f07933 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C +++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C @@ -32,16 +32,74 @@ Description using namespace Foam; +void getRootCase(fileName& casePath) +{ + casePath.clean(); + + if (casePath.empty() || casePath == ".") + { + // handle degenerate form and '.' + casePath = cwd(); + } + else if (casePath[0] != '/' && casePath.name() == "..") + { + // avoid relative cases ending in '..' - makes for very ugly names + casePath = cwd()/casePath; + casePath.clean(); + } +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: int main(int argc, char *argv[]) { - argList::noParallel(); -# include "setRoots.H" -# include "createTimes.H" + argList::addNote + ( + "merge two meshes" + ); - Info<< "Reading master mesh for time = " << runTimeMaster.timeName() << endl; + argList::noParallel(); + argList::validArgs.append("masterCase"); + argList::addOption + ( + "masterRegion", + "name", + "specify alternative mesh region for the master mesh" + ); + + argList::validArgs.append("addCase"); + argList::addOption + ( + "addRegion", + "name", + "specify alternative mesh region for the additional mesh" + ); + + argList args(argc, argv); + if (!args.check()) + { + FatalError.exit(); + } + + fileName masterCase = args[1]; + word masterRegion = polyMesh::defaultRegion; + args.optionReadIfPresent("masterRegion", masterRegion); + + fileName addCase = args[2]; + word addRegion = polyMesh::defaultRegion; + args.optionReadIfPresent("addRegion", addRegion); + + getRootCase(masterCase); + getRootCase(addCase); + + Info<< "Master: " << masterCase << " region " << masterRegion << nl + << "mesh to add: " << addCase << " region " << addRegion << endl; + + #include "createTimes.H" + + Info<< "Reading master mesh for time = " << runTimeMaster.timeName() << nl; Info<< "Create mesh\n" << endl; mergePolyMesh masterMesh @@ -55,7 +113,7 @@ int main(int argc, char *argv[]) ); - Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << endl; + Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << nl; Info<< "Create mesh\n" << endl; polyMesh meshToAdd diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/setRoots.H b/applications/utilities/mesh/manipulation/mergeMeshes/setRoots.H deleted file mode 100644 index 3d1fdd0132..0000000000 --- a/applications/utilities/mesh/manipulation/mergeMeshes/setRoots.H +++ /dev/null @@ -1,32 +0,0 @@ - argList::validArgs.clear(); - - argList::validArgs.append("master root"); - argList::validArgs.append("master case"); - argList::addOption("masterRegion", "name"); - - argList::validArgs.append("root to add"); - argList::validArgs.append("case to add"); - argList::addOption("addRegion", "name"); - - argList args(argc, argv); - - if (!args.check()) - { - FatalError.exit(); - } - - fileName rootDirMaster = args[1]; - fileName caseDirMaster = args[2]; - word masterRegion = polyMesh::defaultRegion; - args.optionReadIfPresent("masterRegion", masterRegion); - - fileName rootDirToAdd = args[3]; - fileName caseDirToAdd = args[4]; - word addRegion = polyMesh::defaultRegion; - args.optionReadIfPresent("addRegion", addRegion); - - Info<< "Master: " << rootDirMaster << " " << caseDirMaster - << " region " << masterRegion << nl - << "mesh to add: " << rootDirToAdd << " " << caseDirToAdd - << " region " << addRegion << endl; - diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C index d7a24a2bf9..399fcb0421 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C @@ -221,15 +221,30 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces) int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" -# include "addRegionOption.H" - argList::addBoolOption("split"); - argList::addBoolOption("detectOnly"); + argList::addNote + ( + "Detect faces that share points (baffles).\n" + "Merge them or duplicate the points." + ); -# include "setRootCase.H" -# include "createTime.H" + #include "addOverwriteOption.H" + #include "addRegionOption.H" + argList::addBoolOption + ( + "detectOnly", + "find baffles only, but do not merge or split them" + ); + argList::addBoolOption + ( + "split", + "topologically split duplicate surfaces" + ); + + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createNamedMesh.H" + #include "createNamedMesh.H" + const word oldInstance = mesh.pointsInstance(); const bool split = args.optionFound("split"); @@ -248,12 +263,10 @@ int main(int argc, char *argv[]) if (detectOnly) { findBaffles(mesh, boundaryFaces); - return 0; } - // Read objects in time directory IOobjectList objects(mesh, runTime.timeName()); diff --git a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C index 2cb7ef6c5b..55a2238757 100644 --- a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C +++ b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C @@ -110,7 +110,6 @@ labelList parseVertices(const string& line) int main(int argc, char *argv[]) { argList::noParallel(); - argList::validArgs.clear(); argList::validArgs.append("OBJ file"); argList::validArgs.append("output VTK file"); argList args(argc, argv); diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index 783848d09b..ba3170d281 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -290,18 +290,26 @@ label twoDNess(const polyMesh& mesh) int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" - argList::addBoolOption("dict"); + argList::addNote + ( + "refine cells in multiple directions" + ); -# include "setRootCase.H" -# include "createTime.H" + #include "addOverwriteOption.H" + argList::addBoolOption + ( + "dict", + "refine according to system/refineMeshDict" + ); + + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createPolyMesh.H" + #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); printEdgeStats(mesh); - // // Read/construct control dictionary // diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 11bf6e853d..80f9b6f93a 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -363,9 +363,21 @@ autoPtr reorderMesh int main(int argc, char *argv[]) { - argList::addBoolOption("blockOrder"); - argList::addBoolOption("orderPoints"); - argList::addBoolOption("writeMaps"); + argList::addBoolOption + ( + "blockOrder", + "order cells into regions (using decomposition)" + ); + argList::addBoolOption + ( + "orderPoints", + "order points into internal and boundary points" + ); + argList::addBoolOption + ( + "writeMaps", + "write cellMap, faceMap, pointMap in polyMesh/" + ); # include "addOverwriteOption.H" # include "addTimeOptions.H" diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index d8c216c662..54ff169f16 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -828,7 +828,12 @@ int main(int argc, char *argv[]) # include "addRegionOption.H" argList::addBoolOption("noVTK", "do not write VTK files"); argList::addBoolOption("loop", "execute batch commands for all timesteps"); - argList::addOption("batch", "file"); + argList::addOption + ( + "batch", + "file", + "process in batch mode, using input from specified file" + ); # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index 8a30d3bdf8..5a2cdfdccc 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -57,14 +57,23 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::addBoolOption("noFlipMap"); + argList::addNote + ( + "add point/face/cell Zones from similar named point/face/cell Sets" + ); -# include "addRegionOption.H" -# include "addTimeOptions.H" -# include "setRootCase.H" -# include "createTime.H" + argList::addBoolOption + ( + "noFlipMap", + "ignore orientation of faceSet" + ); - bool noFlipMap = args.optionFound("noFlipMap"); + #include "addRegionOption.H" + #include "addTimeOptions.H" + #include "setRootCase.H" + #include "createTime.H" + + const bool noFlipMap = args.optionFound("noFlipMap"); // Get times list instantList Times = runTime.times(); @@ -73,11 +82,11 @@ int main(int argc, char *argv[]) label endTime = Times.size(); // check -time and -latestTime options -# include "checkTimeOption.H" + #include "checkTimeOption.H" runTime.setTime(Times[startTime], startTime); -# include "createNamedPolyMesh.H" + #include "createNamedPolyMesh.H" // Search for list of objects for the time of the mesh word setsInstance = runTime.findInstance @@ -153,9 +162,19 @@ int main(int argc, char *argv[]) DynamicList