From 9707e5c100f1de7370633c23fcecb59769b2829b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 19 Apr 2010 10:54:23 +0200 Subject: [PATCH 1/9] ENH: "wmake all" makes 'libso' instead of 'exe' where appropriate - adds more DWIM (do what I mean) intelligence to wmake ENH: use ~/.OpenFOAM/.wmake instead of ~/.wmakeScheduler for the lock dir - keeps more of the OpenFOAM bits together --- wmake/wclean | 34 ++++++++++++++----------------- wmake/wmake | 44 +++++++++++++++++++++-------------------- wmake/wmakeLnIncludeAll | 6 +++--- wmake/wmakeScheduler | 3 +-- 4 files changed, 42 insertions(+), 45 deletions(-) diff --git a/wmake/wclean b/wmake/wclean index 80c189dbb3..6595352a98 100755 --- a/wmake/wclean +++ b/wmake/wclean @@ -46,12 +46,10 @@ Clean up the wmake control directory Make/\$WM_OPTIONS and remove the lnInclude directories generated for libraries. The targets correspond to a subset of the 'wmake' special targets: - all all subdirectories - (NB: any Allwclean or Allclean files will be used if they exist) - exe clean dir/Make - lib clean dir/Make and dir/lnInclude - libo clean dir/Make and dir/lnInclude - libso clean dir/Make and dir/lnInclude + all all subdirectories, uses any Allwclean or Allclean + files if they exist + exe | lib | libo | libso + clean Make, any *.dep files and lnInclude directories USAGE exit 1 @@ -122,20 +120,21 @@ then exit 0 fi - # This is the end of the recursion down the application directories tree - # so remove the "all" option so that the call to make builds the application - makeOption= fi +# makeOption is not needed beyond this point +unset makeOption + + #------------------------------------------------------------------------------ -# Check the existance of the Make directory +# Require the existence of the 'Make' directory #------------------------------------------------------------------------------ -if [ ! -d $MakeDir ] -then +[ -d $MakeDir ] || { echo "$Script error: '$MakeDir' directory does not exist" 1>&2 exit 1 -fi +} + # ----------------------------------------------------------------------------- @@ -143,13 +142,10 @@ rm -rf $MakeDir/$WM_OPTIONS $MakeDir/classes 2>/dev/null find . -name "*.dep" -exec rm {} \; -case "$makeOption" in -lib | libo | libso ) - rm -rf lnInclude 2>/dev/null - ;; -esac +# always safe to remove lnInclude +rm -rf lnInclude 2>/dev/null rm -rf ii_files Templates.DB 2>/dev/null -rm -f so_locations +rm -f so_locations 2>/dev/null #------------------------------------------------------------------------------ diff --git a/wmake/wmake b/wmake/wmake index 4086453554..faa6871340 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -44,16 +44,15 @@ options: A general, easy-to-use make system for multi-platform development The 'target' is a Makefile target: - e.g., Make/linux64GccDPOpt/fvMesh.o + e.g., Make/linux64GccDPOpt/fvMesh.o or a special target: - all all subdirectories - (NB: any Allwmake files will be used if they exist) - exe build statically linked executable - lib build statically linked archive lib (.a) - libo build statically linked lib (.o) - libso build dynamically linked lib (.so) - jar build Java jar + all all subdirectories, uses any Allwmake files if they exist + exe build statically linked executable + lib build statically linked archive lib (.a) + libo build statically linked lib (.o) + libso build dynamically linked lib (.so) + jar build Java jar USAGE exit 1 @@ -104,7 +103,7 @@ if [ "$WM_NCOMPPROCS" ] then if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ] then - lockDir=$HOME/.wmakeScheduler + lockDir=$HOME/.$WM_PROJECT/.wmake if [ -d $lockDir ] then @@ -168,16 +167,11 @@ then $make -k -f $WM_DIR/MakefileApps FOAM_APPS="$FOAM_APPS" exit $? fi - - # This is the end of the recursion down the application directories tree - # so remove the "all" option so that the call to make builds the application - makeOption= fi #------------------------------------------------------------------------------ -# Check the existance of the Make directory and files file -# If both exist, make the wmake derived files +# Require the existence of the 'Make' directory and 'files' file #------------------------------------------------------------------------------ [ -d $MakeDir ] || { @@ -190,6 +184,18 @@ fi exit 1 } +# transform "all" option to "libso" if that looks appropriate or remove it +# so that the call to make builds the application +if [ "$makeOption" = all ] +then + unset makeOption + if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1 + then + makeOption=libso + fi +fi + + # Spawn a sub-shell and unset MAKEFLAGS in that sub-shell to avoid # files and options being built in parallel ( @@ -227,12 +233,8 @@ esac $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontIncludeDeps $OBJECTS_DIR/dependencies -retVal=$? -if [ $retVal -ne 0 ] -then - exit $retVal -fi - +rc=$? +[ $rc -eq 0 ] || exit $rc #------------------------------------------------------------------------------ # make the object files and link diff --git a/wmake/wmakeLnIncludeAll b/wmake/wmakeLnIncludeAll index cfcb6dab78..208c59ad12 100755 --- a/wmake/wmakeLnIncludeAll +++ b/wmake/wmakeLnIncludeAll @@ -78,12 +78,12 @@ do continue fi - find $checkDir -depth -type d -name Make -print | while read makeDir + find $checkDir -depth -type d -name Make -print | while read MakeDir do - topDir=${makeDir%/Make} # trim /Make from the end + topDir=${MakeDir%/Make} # trim /Make from the end if [ -d "$topDir" ] then - if grep -e '^ *LIB *=' "$makeDir/files" >/dev/null 2>&1 + if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1 then wmakeLnInclude -f $topDir elif [ -d "$topDir/lnInclude" ] diff --git a/wmake/wmakeScheduler b/wmake/wmakeScheduler index b4b5ce1b80..be5f4ba58b 100755 --- a/wmake/wmakeScheduler +++ b/wmake/wmakeScheduler @@ -48,8 +48,7 @@ # eg, export WM_NCOMPPROCS=$(wmakeScheduler -count) # #------------------------------------------------------------------------------- -lockDir=$HOME/.wmakeScheduler - +lockDir=$HOME/.$WM_PROJECT/.wmake # fallback - 1 core on current host : ${WM_HOSTS:=$HOST:1} From 5cfa97624eedd60d0d15fef4b9bfb685ababba44 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 20 Apr 2010 17:13:35 +0200 Subject: [PATCH 2/9] STYLE: more consistent New methods, use unregistered IOobject where appropriate --- .../dragModels/PDRDragModel/PDRDragModelNew.C | 14 ++- .../XiEqModels/XiEqModel/XiEqModelNew.C | 16 ++- .../XiModels/XiGModels/XiGModel/XiGModelNew.C | 16 ++- .../PDRFoam/XiModels/XiModel/XiModelNew.C | 16 ++- .../combustionModel/combustionModelNew.C | 18 +-- .../coalChemistryFoam/createFields.H | 2 +- .../createFields.H | 2 +- .../reactingParcelFilmFoam/createFields.H | 2 +- .../reactingParcelFoam/createFields.H | 2 +- .../phaseChangeTwoPhaseMixtureNew.C | 31 +++-- .../multiphase/settlingFoam/createFields.H | 2 +- .../dragModels/dragModel/dragModelNew.C | 24 ++-- .../conductivityModel/conductivityModelNew.C | 28 +++-- .../frictionalStressModelNew.C | 29 +++-- .../granularPressureModelNew.C | 28 +++-- .../radialModel/radialModel/radialModelNew.C | 29 +++-- .../viscosityModel/viscosityModelNew.C | 25 ++-- .../phaseModel/phaseModel/phaseModel.C | 3 +- .../star3ToFoam/createBoundaryFaces.C | 4 +- .../extrudeModel/extrudeModelNew.C | 24 ++-- .../mesh/manipulation/cellSet/cellSet.C | 5 +- .../mesh/manipulation/faceSet/faceSet.C | 5 +- .../mesh/manipulation/pointSet/pointSet.C | 5 +- .../mesh/manipulation/refineMesh/refineMesh.C | 2 +- .../decomposePar/decomposePar.C | 12 +- .../foamToFieldview9/calcFaceAddressing.C | 7 +- .../foamToGMV/readConversionProperties.H | 6 +- .../adiabaticFlameT/adiabaticFlameT.C | 2 +- .../equilibriumFlameT/equilibriumFlameT.C | 4 +- etc/codeTemplates/source/_Template.C | 3 +- src/ODE/ODESolvers/ODESolver/ODESolverNew.C | 7 +- src/OpenFOAM/db/IOobject/IOobjectReadHeader.C | 2 +- src/OpenFOAM/db/IOstreams/token/token.C | 3 +- src/OpenFOAM/db/Time/Time.C | 2 +- src/OpenFOAM/db/Time/TimeIO.C | 2 +- src/OpenFOAM/db/dictionary/dictionaryIO.C | 3 +- src/OpenFOAM/db/dictionary/entry/entryIO.C | 3 +- .../functionEntry/functionEntry.C | 4 +- .../functionObject/functionObject.C | 5 +- .../pointPatchField/pointPatchFieldNew.C | 32 +++-- src/OpenFOAM/graph/graph.C | 41 +++---- .../LUscalarMatrix/procLduInterface.C | 3 +- .../lduMatrix/lduMatrix/lduMatrixSmoother.C | 3 +- .../lduMatrix/lduMatrix/lduMatrixSolver.C | 5 +- .../GAMGAgglomeration/GAMGAgglomeration.C | 4 +- .../GAMGInterfaceFieldNew.C | 8 +- .../GAMGInterface/GAMGInterfaceNew.C | 5 +- src/OpenFOAM/matrices/tolerances/tolerances.C | 2 +- .../facePointPatch/facePointPatchNew.C | 14 +-- .../polyPatches/polyPatch/polyPatchNew.C | 16 +-- .../polyMesh/zones/cellZone/cellZoneNew.C | 11 +- .../polyMesh/zones/faceZone/faceZoneNew.C | 11 +- .../polyMesh/zones/pointZone/pointZoneNew.C | 11 +- .../meshes/primitiveShapes/plane/plane.C | 2 +- src/conversion/ensight/part/ensightPart.C | 8 +- .../dynamicFvMesh/dynamicFvMeshNew.C | 17 ++- .../solidBodyMotionFunctionNew.C | 18 +-- .../meshCut/cellLooper/cellLooper.C | 24 ++-- .../meshCut/directions/directions.C | 10 +- src/dynamicMesh/motionSolver/motionSolver.C | 11 +- .../polyMeshModifier/polyMeshModifierNew.C | 19 +-- .../engineMesh/engineMesh/engineMeshNew.C | 29 ++--- .../SRF/SRFModel/SRFModel/SRFModelNew.C | 44 +++---- .../fvPatchField/fvPatchFieldNew.C | 10 +- .../fvsPatchField/fvsPatchFieldNew.C | 10 +- .../convectionScheme/convectionScheme.C | 8 +- .../d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C | 4 +- .../ddtSchemes/ddtScheme/ddtScheme.C | 4 +- .../divSchemes/divScheme/divScheme.C | 5 +- .../gradSchemes/gradScheme/gradScheme.C | 4 +- .../laplacianScheme/laplacianScheme.C | 4 +- .../snGradSchemes/snGradScheme/snGradScheme.C | 6 +- .../fvMesh/fvPatches/fvPatch/fvPatchNew.C | 5 +- .../limitedSurfaceInterpolationScheme.C | 12 +- .../multivariateSurfaceInterpolationScheme.C | 4 +- .../surfaceInterpolationScheme.C | 12 +- .../motionDiffusivity/motionDiffusivity.C | 14 +-- src/lagrangian/basic/Cloud/CloudIO.C | 8 +- .../injector/injectorType/injectorType.C | 17 +-- src/lagrangian/dieselSpray/spray/spray.C | 5 +- .../atomizationModel/atomizationModelNew.C | 33 ++--- .../breakupModel/breakupModelNew.C | 30 ++--- .../collisionModel/collisionModelNew.C | 35 ++---- .../dispersionModel/dispersionModelNew.C | 35 ++---- .../dragModel/dragModel/dragModelNew.C | 28 ++--- .../evaporationModel/evaporationModelNew.C | 10 +- .../heatTransferModel/heatTransferModelNew.C | 27 ++-- .../injectorModel/Chomiak/Chomiak.C | 3 +- .../blobsSwirl/blobsSwirlInjector.C | 3 +- .../injectorModel/injectorModelNew.C | 27 ++-- .../wallModel/wallModel/wallModelNew.C | 27 ++-- .../BinaryCollisionModelNew.C | 21 ++-- .../InflowBoundaryModelNew.C | 19 +-- .../WallInteractionModelNew.C | 20 +-- .../IO/DataEntry/DataEntry/DataEntryNew.C | 14 ++- .../DispersionModel/DispersionModelNew.C | 19 +-- .../DragModel/DragModel/DragModelNew.C | 19 +-- .../InjectionModel/InjectionModel.C | 2 +- .../InjectionModel/InjectionModelNew.C | 16 +-- .../PatchInteractionModelNew.C | 20 +-- .../PostProcessingModelNew.C | 19 +-- .../SurfaceFilmModel/SurfaceFilmModelNew.C | 17 +-- .../CompositionModel/CompositionModelNew.C | 16 +-- .../PhaseChangeModel/PhaseChangeModelNew.C | 19 +-- .../DevolatilisationModelNew.C | 20 +-- .../SurfaceReactionModelNew.C | 20 +-- .../HeatTransferModel/HeatTransferModelNew.C | 19 +-- .../molecule/moleculeCloud/moleculeCloud.C | 11 +- .../basic/energyScalingFunctionNew.C | 21 ++-- .../pairPotential/basic/pairPotentialNew.C | 24 ++-- .../potential/potential/potential.C | 28 ++--- .../potential/potential/potential.H | 2 +- .../basic/tetherPotentialNew.C | 29 ++--- src/mesh/blockMesh/curvedEdges/curvedEdge.C | 8 +- .../coordinateRotation/coordinateRotation.C | 6 +- .../coordinateSystems/coordinateSystemNew.C | 15 ++- .../searchableSurface/searchableSurface.C | 16 +-- .../sets/topoSetSource/topoSetSource.C | 74 +++++------ src/meshTools/sets/topoSets/topoSet.C | 78 ++++++------ .../decompositionMethod/decompositionMethod.C | 30 +++-- .../hierarchGeomDecomp/hierarchGeomDecomp.C | 2 +- .../foamCalcFunctions/calcType/calcTypeNew.C | 8 +- .../sixDoFRigidBodyMotionConstraintNew.C | 17 ++- .../sixDoFRigidBodyMotionRestraintNew.C | 17 ++- .../tabulatedAxialAngularSpring.C | 4 +- .../sampledSet/sampledSet/sampledSet.C | 16 ++- src/sampling/sampledSet/writers/writer.C | 7 +- .../sampledSurface/sampledSurface.C | 9 +- .../injectionModel/injectionModelNew.C | 5 +- .../phaseChangeModel/phaseChangeModelNew.C | 5 +- .../surfaceFilmModel/surfaceFilmModelNew.C | 14 +-- .../barotropicCompressibilityModelNew.C | 11 +- .../basicPsiThermo/basicPsiThermoNew.C | 30 +++-- .../basicRhoThermo/basicRhoThermoNew.C | 31 +++-- .../psiChemistryModel/psiChemistryModelNew.C | 54 ++++---- .../rhoChemistryModel/rhoChemistryModelNew.C | 62 +++++----- .../chemistrySolver/chemistrySolver.C | 7 -- .../chemistrySolver/chemistrySolverNew.C | 12 +- .../laminarFlameSpeed/laminarFlameSpeedNew.C | 16 +-- .../liquidMixture/liquidMixture.C | 3 +- .../liquids/liquid/liquid.C | 16 +-- src/thermophysicalModels/pdfs/pdf/pdfNew.C | 14 ++- .../radiationModel/radiationModelNew.C | 40 ++---- .../absorptionEmissionModelNew.C | 17 +-- .../scatterModel/scatterModelNew.C | 19 +-- .../chemistryReader/chemistryReader.C | 4 +- .../hCombustionThermo/hCombustionThermoNew.C | 111 ++++++++--------- .../hhuCombustionThermoNew.C | 40 +++--- .../hsCombustionThermoNew.C | 114 ++++++++--------- .../hReactionThermo/hReactionThermoNew.C | 116 +++++++++--------- .../hsReactionThermo/hsReactionThermoNew.C | 106 ++++++++-------- .../solidMixture/solidMixture/solidMixture.C | 4 +- .../solids/solid/solidNew.C | 12 +- .../reaction/Reactions/Reaction/Reaction.C | 42 +++---- .../thermalPorousZone/thermalPorousZone.C | 2 +- .../thermophysicalFunction.C | 19 ++- .../transportModel/transportModel.C | 14 +-- .../viscosityModel/viscosityModelNew.C | 26 ++-- .../LES/LESdeltas/LESdelta/LESdelta.C | 24 ++-- .../LES/LESfilters/LESfilter/LESfilter.C | 25 ++-- .../compressible/LES/LESModel/LESModel.C | 31 +++-- .../compressible/RAS/RASModel/RASModel.C | 31 +++-- .../turbulenceModel/turbulenceModel.C | 31 +++-- .../incompressible/LES/LESModel/LESModel.C | 31 +++-- .../incompressible/RAS/RASModel/RASModel.C | 31 +++-- .../turbulenceModel/turbulenceModel.C | 31 +++-- 166 files changed, 1498 insertions(+), 1540 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 3208681241..869f9da12e 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::PDRDragModel::New +Foam::autoPtr +Foam::PDRDragModel::New ( const dictionary& PDRProperties, const compressible::RASModel& turbulence, @@ -36,12 +37,15 @@ Foam::autoPtr Foam::PDRDragModel::New const surfaceScalarField& phi ) { - word PDRDragModelTypeName = PDRProperties.lookup("PDRDragModel"); + const word modelType + ( + PDRProperties.lookup("PDRDragModel") + ); - Info<< "Selecting flame-wrinkling model " << PDRDragModelTypeName << endl; + Info<< "Selecting flame-wrinkling model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PDRDragModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -49,7 +53,7 @@ Foam::autoPtr Foam::PDRDragModel::New ( "PDRDragModel::New" ) << "Unknown PDRDragModel type " - << PDRDragModelTypeName << endl << endl + << modelType << nl << nl << "Valid PDRDragModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C index b785c5b8e0..90a5d60787 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::XiEqModel::New +Foam::autoPtr +Foam::XiEqModel::New ( const dictionary& XiEqProperties, const hhuCombustionThermo& thermo, @@ -35,12 +36,15 @@ Foam::autoPtr Foam::XiEqModel::New const volScalarField& Su ) { - word XiEqModelTypeName = XiEqProperties.lookup("XiEqModel"); + const word modelType + ( + XiEqProperties.lookup("XiEqModel") + ); - Info<< "Selecting flame-wrinkling model " << XiEqModelTypeName << endl; + Info<< "Selecting flame-wrinkling model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(XiEqModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -53,8 +57,8 @@ Foam::autoPtr Foam::XiEqModel::New " const volScalarField& Su" ")" ) << "Unknown XiEqModel type " - << XiEqModelTypeName << endl << endl - << "Valid XiEqModels are : " << endl + << modelType << nl << nl + << "Valid XiEqModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C index 728bce124b..9f229740cc 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::XiGModel::New +Foam::autoPtr +Foam::XiGModel::New ( const dictionary& XiGProperties, const hhuCombustionThermo& thermo, @@ -35,12 +36,15 @@ Foam::autoPtr Foam::XiGModel::New const volScalarField& Su ) { - word XiGModelTypeName = XiGProperties.lookup("XiGModel"); + const word modelType + ( + XiGProperties.lookup("XiGModel") + ); - Info<< "Selecting flame-wrinkling model " << XiGModelTypeName << endl; + Info<< "Selecting flame-wrinkling model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(XiGModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -53,8 +57,8 @@ Foam::autoPtr Foam::XiGModel::New " const volScalarField& Su" ")" ) << "Unknown XiGModel type " - << XiGModelTypeName << endl << endl - << "Valid XiGModels are : " << endl + << modelType << nl << nl + << "Valid XiGModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C index dfd748265c..ae3d5b4988 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::XiModel::New +Foam::autoPtr +Foam::XiModel::New ( const dictionary& XiProperties, const hhuCombustionThermo& thermo, @@ -38,12 +39,15 @@ Foam::autoPtr Foam::XiModel::New const surfaceScalarField& phi ) { - word XiModelTypeName = XiProperties.lookup("XiModel"); + const word modelType + ( + XiProperties.lookup("XiModel") + ); - Info<< "Selecting flame-wrinkling model " << XiModelTypeName << endl; + Info<< "Selecting flame-wrinkling model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(XiModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,8 +55,8 @@ Foam::autoPtr Foam::XiModel::New ( "XiModel::New" ) << "Unknown XiModel type " - << XiModelTypeName << endl << endl - << "Valid XiModels are : " << endl + << modelType << nl << nl + << "Valid XiModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C index 40f2bb2e2f..09291807c3 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::combustionModel::New +Foam::autoPtr +Foam::combustionModel::New ( const dictionary& combustionProperties, const hsCombustionThermo& thermo, @@ -36,15 +37,18 @@ Foam::autoPtr Foam::combustionModel::New const volScalarField& rho ) { - word combustionModelTypeName = combustionProperties.lookup + const word modelType ( - "combustionModel" + combustionProperties.lookup + ( + "combustionModel" + ) ); - Info<< "Selecting combustion model " << combustionModelTypeName << endl; + Info<< "Selecting combustion model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(combustionModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,8 +56,8 @@ Foam::autoPtr Foam::combustionModel::New ( "combustionModel::New" ) << "Unknown combustionModel type " - << combustionModelTypeName << endl << endl - << "Valid combustionModels are : " << endl + << modelType << nl << nl + << "Valid combustionModels are : " << endl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index 65be09775c..ea325dabe0 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -11,7 +11,7 @@ basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); - word inertSpecie(thermo.lookup("inertSpecie")); + const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H index cf3f484bdb..3ad06c22b3 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H @@ -11,7 +11,7 @@ basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); - word inertSpecie(thermo.lookup("inertSpecie")); + const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 9c196e2905..8048acd648 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -11,7 +11,7 @@ basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); - word inertSpecie(thermo.lookup("inertSpecie")); + const word inertSpecie(thermo.lookup("inertSpecie")); volScalarField& p = thermo.p(); volScalarField& hs = thermo.hs(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index e071ac8b3d..0fd631fb7f 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -11,7 +11,7 @@ basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); - word inertSpecie(thermo.lookup("inertSpecie")); + const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C index c45a772e4a..b78b018880 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C @@ -36,22 +36,21 @@ Foam::phaseChangeTwoPhaseMixture::New const word& alpha1Name ) { - IOdictionary transportPropertiesDict + // get model name, but do not register the dictionary + const word phaseChangeTwoPhaseMixtureTypeName ( - IOobject + IOdictionary ( - "transportProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ) - ); - - word phaseChangeTwoPhaseMixtureTypeName - ( - transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture") + IOobject + ( + "transportProperties", + U.time().constant(), + U.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ).lookup("phaseChangeTwoPhaseMixture") ); Info<< "Selecting phaseChange model " @@ -67,8 +66,8 @@ Foam::phaseChangeTwoPhaseMixture::New ( "phaseChangeTwoPhaseMixture::New" ) << "Unknown phaseChangeTwoPhaseMixture type " - << phaseChangeTwoPhaseMixtureTypeName << endl << endl - << "Valid phaseChangeTwoPhaseMixtures are : " << endl + << phaseChangeTwoPhaseMixtureTypeName << nl << nl + << "Valid phaseChangeTwoPhaseMixture types are : " << endl << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H index 6833c90ec9..c8e05c4209 100644 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ b/applications/solvers/multiphase/settlingFoam/createFields.H @@ -159,7 +159,7 @@ Info<< "Selecting Drift-Flux model " << endl; - word VdjModel(transportProperties.lookup("VdjModel")); + const word VdjModel(transportProperties.lookup("VdjModel")); Info<< tab << VdjModel << " selected\n" << endl; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C index 2f147a0dee..773a6c70f9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::dragModel::New +Foam::autoPtr +Foam::dragModel::New ( const dictionary& interfaceDict, const volScalarField& alpha, @@ -35,7 +36,7 @@ Foam::autoPtr Foam::dragModel::New const phaseModel& phaseb ) { - word dragModelType + const word modelType ( interfaceDict.lookup("dragModel" + phasea.name()) ); @@ -43,20 +44,21 @@ Foam::autoPtr Foam::dragModel::New Info<< "Selecting dragModel for phase " << phasea.name() << ": " - << dragModelType << endl; + << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "dragModel::New : " << endl - << " unknown dragModelType type " - << dragModelType - << ", constructor not in hash table" << endl << endl - << " Valid dragModel types are : " << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "dragModel::New(...)" + ) << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return cstrIter()(interfaceDict, alpha, phasea, phaseb); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C index 74b2a1fbcc..66c851a48d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C @@ -27,28 +27,32 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::conductivityModel::New +Foam::autoPtr +Foam::conductivityModel::New ( const dictionary& dict ) { - word conductivityModelType(dict.lookup("conductivityModel")); + const word modelType + ( + dict.lookup("conductivityModel") + ); - Info<< "Selecting conductivityModel " - << conductivityModelType << endl; + Info<< "Selecting conductivityModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(conductivityModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "conductivityModel::New(const dictionary&) : " << endl - << " unknown conductivityModelType type " - << conductivityModelType - << ", constructor not in hash table" << endl << endl - << " Valid conductivityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "conductivityModel::New(const dictionary&)" + ) << "Unknown conductivityModel type " + << modelType << nl << nl + << "Valid conductivityModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C index 391737f16b..7ce2ce03fc 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C @@ -27,28 +27,33 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::frictionalStressModel::New +Foam::autoPtr +Foam::frictionalStressModel::New ( const dictionary& dict ) { - word frictionalStressModelType(dict.lookup("frictionalStressModel")); + const word modelType + ( + dict.lookup("frictionalStressModel") + ); - Info<< "Selecting frictionalStressModel " - << frictionalStressModelType << endl; + Info<< "Selecting frictionalStressModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(frictionalStressModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "frictionalStressModel::New(const dictionary&) : " << endl - << " unknown frictionalStressModelType type " - << frictionalStressModelType - << ", constructor not in hash table" << endl << endl - << " Valid frictionalStressModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "frictionalStressModel::New(const dictionary&)" + ) + << "Unknown frictionalStressModel type " + << modelType << nl << nl + << "Valid frictionalStressModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C index f9697eca51..d7f4d745f6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C @@ -27,28 +27,32 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::granularPressureModel::New +Foam::autoPtr +Foam::granularPressureModel::New ( const dictionary& dict ) { - word granularPressureModelType(dict.lookup("granularPressureModel")); + const word modelType + ( + dict.lookup("granularPressureModel") + ); - Info<< "Selecting granularPressureModel " - << granularPressureModelType << endl; + Info<< "Selecting granularPressureModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(granularPressureModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "granularPressureModel::New(const dictionary&) : " << endl - << " unknown granularPressureModelType type " - << granularPressureModelType - << ", constructor not in hash table" << endl << endl - << " Valid granularPressureModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "granularPressureModel::New(const dictionary&)" + ) << "Unknown granularPressureModel type " + << modelType << nl << nl + << "Valid granularPressureModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C index f2a46d79c4..3e729140ce 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C @@ -27,28 +27,33 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::radialModel::New +Foam::autoPtr +Foam::radialModel::New ( const dictionary& dict ) { - word radialModelType(dict.lookup("radialModel")); + const word modelType + ( + dict.lookup("radialModel") + ); - Info<< "Selecting radialModel " - << radialModelType << endl; + Info<< "Selecting radialModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(radialModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "radialModel::New(const dictionary&) : " << endl - << " unknown radialModelType type " - << radialModelType - << ", constructor not in hash table" << endl << endl - << " Valid radialModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "radialModel::New(const dictionary&)" + ) + << "Unknown radialModel type " + << modelType << nl << nl + << "Valid radialModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C index 8998c45053..32e3dc7fe1 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C @@ -33,23 +33,26 @@ Foam::kineticTheoryModels::viscosityModel::New const dictionary& dict ) { - word viscosityModelType(dict.lookup("viscosityModel")); + const word modelType + ( + dict.lookup("viscosityModel") + ); - Info<< "Selecting viscosityModel " - << viscosityModelType << endl; + Info<< "Selecting viscosityModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(viscosityModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "viscosityModel::New(const dictionary&) : " << endl - << " unknown viscosityModelType type " - << viscosityModelType - << ", constructor not in hash table" << endl << endl - << " Valid viscosityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "viscosityModel::New(const dictionary&)" + ) << "Unknown viscosityModel type " + << modelType << nl << nl + << "Valid viscosityModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C index 805cd23845..055cbb2773 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -134,7 +134,8 @@ Foam::phaseModel::phaseModel } -Foam::autoPtr Foam::phaseModel::New +Foam::autoPtr +Foam::phaseModel::New ( const fvMesh& mesh, const dictionary& transportProperties, diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C index 5f6c995929..341b2b8e26 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C @@ -166,7 +166,9 @@ void starMesh::markBoundaryFaces() } } - FatalError << " $ bset,add,vset,all" << abort(FatalError); + FatalError + << " $ bset,add,vset,all" + << abort(FatalError); } } } diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C index e242e5fada..1e91ed4c0d 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C @@ -27,25 +27,30 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::extrudeModel::New +Foam::autoPtr +Foam::extrudeModel::New ( const dictionary& dict ) { - word extrudeModelType(dict.lookup("extrudeModel")); + const word modelType + ( + dict.lookup("extrudeModel") + ); - Info<< "Selecting extrudeModel " << extrudeModelType << endl; + Info<< "Selecting extrudeModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(extrudeModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("extrudeModel::New(const dictionary&)") - << "Unknown extrudeModelType type " - << extrudeModelType - << ", constructor not in hash table" << nl << nl - << " Valid extrudeModel types are :" << nl + FatalErrorIn + ( + "extrudeModel::New(const dictionary&)" + ) << "Unknown extrudeModel type " + << modelType << nl << nl + << "Valid extrudeModel types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } @@ -55,4 +60,3 @@ Foam::autoPtr Foam::extrudeModel::New // ************************************************************************* // - diff --git a/applications/utilities/mesh/manipulation/cellSet/cellSet.C b/applications/utilities/mesh/manipulation/cellSet/cellSet.C index 276614687a..3eafef872b 100644 --- a/applications/utilities/mesh/manipulation/cellSet/cellSet.C +++ b/applications/utilities/mesh/manipulation/cellSet/cellSet.C @@ -59,9 +59,8 @@ int main(int argc, char *argv[]) ); - word setName(cellSetDict.lookup("name")); - - word actionName(cellSetDict.lookup("action")); + const word setName(cellSetDict.lookup("name")); + const word actionName(cellSetDict.lookup("action")); topoSetSource::setAction action = topoSetSource::toAction(actionName); diff --git a/applications/utilities/mesh/manipulation/faceSet/faceSet.C b/applications/utilities/mesh/manipulation/faceSet/faceSet.C index 63e7a68c66..7c97b95ef5 100644 --- a/applications/utilities/mesh/manipulation/faceSet/faceSet.C +++ b/applications/utilities/mesh/manipulation/faceSet/faceSet.C @@ -59,9 +59,8 @@ int main(int argc, char *argv[]) ); - word setName(faceSetDict.lookup("name")); - - word actionName(faceSetDict.lookup("action")); + const word setName(faceSetDict.lookup("name")); + const word actionName(faceSetDict.lookup("action")); topoSetSource::setAction action = topoSetSource::toAction(actionName); diff --git a/applications/utilities/mesh/manipulation/pointSet/pointSet.C b/applications/utilities/mesh/manipulation/pointSet/pointSet.C index 79ed4fae71..8219ec41b6 100644 --- a/applications/utilities/mesh/manipulation/pointSet/pointSet.C +++ b/applications/utilities/mesh/manipulation/pointSet/pointSet.C @@ -59,9 +59,8 @@ int main(int argc, char *argv[]) ); - word setName(pointSetDict.lookup("name")); - - word actionName(pointSetDict.lookup("action")); + const word setName(pointSetDict.lookup("name")); + const word actionName(pointSetDict.lookup("action")); topoSetSource::setAction action = topoSetSource::toAction(actionName); diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index b3a8efdc79..783848d09b 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -331,7 +331,7 @@ int main(int argc, char *argv[]) ) ); - word setName(refineDict.lookup("set")); + const word setName(refineDict.lookup("set")); cellSet cells(mesh, setName); diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 321fd92ff3..f63026e3f0 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -154,9 +154,9 @@ int main(int argc, char *argv[]) } // get requested numberOfSubdomains - label nDomains = 0; - { - IOdictionary decompDict + const label nDomains = readLabel + ( + IOdictionary ( IOobject ( @@ -168,10 +168,8 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE, false ) - ); - - decompDict.lookup("numberOfSubdomains") >> nDomains; - } + ).lookup("numberOfSubdomains") + ); if (decomposeFieldsOnly) { diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/calcFaceAddressing.C b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/calcFaceAddressing.C index 1546fcdea5..0aa65dc1b5 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/calcFaceAddressing.C +++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/calcFaceAddressing.C @@ -72,14 +72,17 @@ labelList calcFaceAddressing << " face labels:" << faces << endl << " cellI:" << cellI << endl; - FatalError << "Faces consist of vertices:" << endl; + FatalError + << "Faces consist of vertices:" << endl; + forAll(faces, faceI) { FatalError << " face:" << faces[faceI] << allFaces[faces[faceI]] << endl; } - FatalError << exit(FatalError); + FatalError + << exit(FatalError); } } return shapeToMesh; diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H b/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H index c1a0cd7c78..b19e03ab19 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H +++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H @@ -28,7 +28,8 @@ word format if ((format != "ascii") && (format != "ieeei4r8")) { - FatalError << "format type: " << format << " unknown." + FatalError + << "format type: " << format << " unknown." << " Valid options are: ascii ieeei4r8" << abort(FatalError); @@ -44,6 +45,7 @@ if (cells != "hex") ) { - FatalError << "cells type: " << cells << " unknown." + FatalError + << "cells type: " << cells << " unknown." << abort(FatalError); } diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C index d7d282ec9b..5139b8c499 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C +++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) scalar T0(readScalar(control.lookup("T0"))); - word fuelName(control.lookup("fuel")); + const word fuelName(control.lookup("fuel")); scalar n(readScalar(control.lookup("n"))); scalar m(readScalar(control.lookup("m"))); diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C index 0549688e34..2990cc81dc 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C +++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) scalar P(readScalar(control.lookup("P"))); - word fuel(control.lookup("fuel")); + const word fuelName(control.lookup("fuel")); scalar n(readScalar(control.lookup("n"))); scalar m(readScalar(control.lookup("m"))); @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) Info<< nl << "Reading Burcat data for relevant species" << nl << endl; // Reactants - thermo FUEL(thermoData.lookup(fuel)); + thermo FUEL(thermoData.lookup(fuelName)); thermo O2(thermoData.lookup("O2")); thermo N2(thermoData.lookup("N2")); diff --git a/etc/codeTemplates/source/_Template.C b/etc/codeTemplates/source/_Template.C index 43c2dc7253..ed2b7283af 100644 --- a/etc/codeTemplates/source/_Template.C +++ b/etc/codeTemplates/source/_Template.C @@ -64,7 +64,8 @@ Foam::CLASSNAME::CLASSNAME(const CLASSNAME&) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::CLASSNAME::New() +Foam::autoPtr +Foam::CLASSNAME::New() { return autoPtr(new CLASSNAME); } diff --git a/src/ODE/ODESolvers/ODESolver/ODESolverNew.C b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C index 03b1578017..add1e02b05 100644 --- a/src/ODE/ODESolvers/ODESolver/ODESolverNew.C +++ b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::ODESolver::New +Foam::autoPtr +Foam::ODESolver::New ( const Foam::word& ODESolverTypeName, const Foam::ODE& ode @@ -44,8 +45,8 @@ Foam::autoPtr Foam::ODESolver::New ( "ODESolver::New(const word& ODESolverTypeName, const ODE& ode)" ) << "Unknown ODESolver type " - << ODESolverTypeName << endl << endl - << "Valid ODESolvers are : " << endl + << ODESolverTypeName << nl << nl + << "Valid ODESolvers are : " << endl << ODEConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C index 3fb364d9bb..fc85d5fa26 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C +++ b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C @@ -72,7 +72,7 @@ bool Foam::IOobject::readHeader(Istream& is) is.format(headerDict.lookup("format")); headerClassName_ = word(headerDict.lookup("class")); - word headerObject(headerDict.lookup("object")); + const word headerObject(headerDict.lookup("object")); if (IOobject::debug && headerObject != name()) { IOWarningIn("IOobject::readHeader(Istream&)", is) diff --git a/src/OpenFOAM/db/IOstreams/token/token.C b/src/OpenFOAM/db/IOstreams/token/token.C index 50c0d80f3c..487f903839 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.C +++ b/src/OpenFOAM/db/IOstreams/token/token.C @@ -52,7 +52,8 @@ Foam::token::compound::~compound() // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::token::compound::New +Foam::autoPtr +Foam::token::compound::New ( const word& compoundType, Istream& is diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 35525f65f4..0afa8d69b3 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -95,7 +95,7 @@ void Foam::Time::adjustDeltaT() void Foam::Time::setControls() { // default is to resume calculation from "latestTime" - word startFrom = controlDict_.lookupOrDefault + const word startFrom = controlDict_.lookupOrDefault ( "startFrom", "latestTime" diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index d16b4c8014..11031875df 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -94,7 +94,7 @@ void Foam::Time::readDict() if (controlDict_.found("timeFormat")) { - word formatName(controlDict_.lookup("timeFormat")); + const word formatName(controlDict_.lookup("timeFormat")); if (formatName == "general") { diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C index 1c452bafaf..4ee2af5750 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C @@ -118,7 +118,8 @@ Foam::dictionary::dictionary(Istream& is) } -Foam::autoPtr Foam::dictionary::New(Istream& is) +Foam::autoPtr +Foam::dictionary::New(Istream& is) { return autoPtr(new dictionary(is)); } diff --git a/src/OpenFOAM/db/dictionary/entry/entryIO.C b/src/OpenFOAM/db/dictionary/entry/entryIO.C index cbe2179172..ea1f91a495 100644 --- a/src/OpenFOAM/db/dictionary/entry/entryIO.C +++ b/src/OpenFOAM/db/dictionary/entry/entryIO.C @@ -191,7 +191,8 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is) } -Foam::autoPtr Foam::entry::New(Istream& is) +Foam::autoPtr +Foam::entry::New(Istream& is) { is.fatalCheck("entry::New(Istream&)"); diff --git a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C index dfd4a27417..e19c807bf8 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C @@ -82,7 +82,7 @@ bool Foam::functionEntry::execute "(const word& functionName, dictionary& parentDict, Istream&)" ) << "Unknown functionEntry '" << functionName << "' in " << is.name() << " near line " << is.lineNumber() - << endl << endl + << nl << nl << "Valid functionEntries are :" << endl << executedictionaryIstreamMemberFunctionTablePtr_->toc() << exit(FatalError); @@ -128,7 +128,7 @@ bool Foam::functionEntry::execute "(const word&, const dictionary&, primitiveEntry&, Istream&)" ) << "Unknown functionEntry '" << functionName << "' in " << is.name() << " near line " << is.lineNumber() - << endl << endl + << nl << nl << "Valid functionEntries are :" << endl << executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc() << exit(FatalError); diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index 79bfcdb3b2..35a20392ef 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -43,14 +43,15 @@ Foam::functionObject::functionObject(const word& name) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::functionObject::New +Foam::autoPtr +Foam::functionObject::New ( const word& name, const Time& t, const dictionary& functionDict ) { - word functionType(functionDict.lookup("type")); + const word functionType(functionDict.lookup("type")); if (debug) { diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C index 749511b2cf..0eace332cc 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C @@ -26,7 +26,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::autoPtr > Foam::pointPatchField::New +Foam::autoPtr< Foam::pointPatchField > +Foam::pointPatchField::New ( const word& patchFieldType, const word& actualPatchType, @@ -53,8 +54,7 @@ Foam::autoPtr > Foam::pointPatchField::New "PointPatchField::New" "(const word&, const word&, const pointPatch&, const Field&)" ) << "Unknown patchFieldType type " - << patchFieldType - << endl << endl + << patchFieldType << nl << nl << "Valid patchField types are :" << endl << pointPatchConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -96,7 +96,8 @@ Foam::autoPtr > Foam::pointPatchField::New template -Foam::autoPtr > Foam::pointPatchField::New +Foam::autoPtr< Foam::pointPatchField > +Foam::pointPatchField::New ( const word& patchFieldType, const pointPatch& p, @@ -108,7 +109,8 @@ Foam::autoPtr > Foam::pointPatchField::New template -Foam::autoPtr > Foam::pointPatchField::New +Foam::autoPtr< Foam::pointPatchField > +Foam::pointPatchField::New ( const pointPatch& p, const DimensionedField& iF, @@ -143,7 +145,7 @@ Foam::autoPtr > Foam::pointPatchField::New "New(const pointPatch&, const Field&, const dictionary&)", dict ) << "Unknown patchField type " << patchFieldType - << " for patch type " << p.type() << endl << endl + << " for patch type " << p.type() << nl << nl << "Valid patchField types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -194,7 +196,8 @@ Foam::autoPtr > Foam::pointPatchField::New // Return a pointer to a new patch created on freestore from // a given pointPatchField mapped onto a new patch template -Foam::autoPtr > Foam::pointPatchField::New +Foam::autoPtr< Foam::pointPatchField > +Foam::pointPatchField::New ( const pointPatchField& ptf, const pointPatch& p, @@ -219,12 +222,15 @@ Foam::autoPtr > Foam::pointPatchField::New { FatalErrorIn ( - "PointPatchField::" - "New(const pointPatchField&, " - "const pointPatch&, const Field&, " - "const pointPatchFieldMapper&)" - ) << "unknown patchTypefield type " - << ptf.type() << endl << endl + "PointPatchField::New" + "(" + "const pointPatchField&, " + "const pointPatch&, " + "const DimensionedField&, " + "const pointPatchFieldMapper&" + ")" + ) << "Unknown patchField type " + << ptf.type() << nl << nl << "Valid patchField types are :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/OpenFOAM/graph/graph.C b/src/OpenFOAM/graph/graph.C index 1257377608..930badb76d 100644 --- a/src/OpenFOAM/graph/graph.C +++ b/src/OpenFOAM/graph/graph.C @@ -28,19 +28,18 @@ License #include "IOmanip.H" #include "Pair.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(graph::writer, 0); + defineRunTimeSelectionTable(graph::writer, word); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(graph::writer, 0); -defineRunTimeSelectionTable(graph::writer, word); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void graph::readCurves(Istream& is) +void Foam::graph::readCurves(Istream& is) { List xyData(is); @@ -59,7 +58,7 @@ void graph::readCurves(Istream& is) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -graph::graph +Foam::graph::graph ( const string& title, const string& xName, @@ -74,7 +73,7 @@ graph::graph {} -graph::graph +Foam::graph::graph ( const string& title, const string& xName, @@ -92,7 +91,7 @@ graph::graph } -graph::graph +Foam::graph::graph ( const string& title, const string& xName, @@ -108,7 +107,7 @@ graph::graph } -graph::graph(Istream& is) +Foam::graph::graph(Istream& is) : title_(is), xName_(is), @@ -118,7 +117,7 @@ graph::graph(Istream& is) } -const scalarField& graph::y() const +const Foam::scalarField& Foam::graph::y() const { if (size() != 1) { @@ -130,7 +129,8 @@ const scalarField& graph::y() const return *begin()(); } -scalarField& graph::y() + +Foam::scalarField& Foam::graph::y() { if (size() != 1) { @@ -143,7 +143,8 @@ scalarField& graph::y() } -autoPtr graph::writer::New(const word& graphFormat) +Foam::autoPtr +Foam::graph::writer::New(const word& graphFormat) { if (!wordConstructorTablePtr_) { @@ -173,7 +174,7 @@ autoPtr graph::writer::New(const word& graphFormat) } -void graph::writer::writeXY +void Foam::graph::writer::writeXY ( const scalarField& x, const scalarField& y, @@ -187,7 +188,7 @@ void graph::writer::writeXY } -void graph::writeTable(Ostream& os) const +void Foam::graph::writeTable(Ostream& os) const { forAll(x_, xi) { @@ -202,13 +203,13 @@ void graph::writeTable(Ostream& os) const } -void graph::write(Ostream& os, const word& format) const +void Foam::graph::write(Ostream& os, const word& format) const { writer::New(format)().write(*this, os); } -void graph::write(const fileName& fName, const word& format) const +void Foam::graph::write(const fileName& fName, const word& format) const { autoPtr graphWriter(writer::New(format)); @@ -227,7 +228,7 @@ void graph::write(const fileName& fName, const word& format) const } -Ostream& operator<<(Ostream& os, const graph& g) +Foam::Ostream& Foam::operator<<(Ostream& os, const graph& g) { g.writeTable(os); os.check("Ostream& operator<<(Ostream&, const graph&)"); @@ -235,8 +236,4 @@ Ostream& operator<<(Ostream& os, const graph& g) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.C b/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.C index e374ea0f76..a66d777dc7 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.C +++ b/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.C @@ -58,7 +58,8 @@ Foam::procLduInterface::procLduInterface ( "procLduInterface::procLduInterface" "(const lduInterfaceField&, const scalarField&" - ) << "unknown lduInterface type " << interface.interface().type() + ) << "Unknown lduInterface type " + << interface.interface().type() << exit(FatalError); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C index da2406d66a..c5864b52b9 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C @@ -58,7 +58,8 @@ Foam::lduMatrix::smoother::getName } -Foam::autoPtr Foam::lduMatrix::smoother::New +Foam::autoPtr +Foam::lduMatrix::smoother::New ( const word& fieldName, const lduMatrix& matrix, diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C index f34e5334dc..edbd8e4226 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C @@ -37,7 +37,8 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::lduMatrix::solver::New +Foam::autoPtr +Foam::lduMatrix::solver::New ( const word& fieldName, const lduMatrix& matrix, @@ -47,7 +48,7 @@ Foam::autoPtr Foam::lduMatrix::solver::New const dictionary& solverControls ) { - word name(solverControls.lookup("solver")); + const word name(solverControls.lookup("solver")); if (matrix.diagonal()) { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 4431db24df..9196ad0a12 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -102,7 +102,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New ) ) { - word agglomeratorType(controlDict.lookup("agglomerator")); + const word agglomeratorType(controlDict.lookup("agglomerator")); dlLibraryTable::open ( @@ -157,7 +157,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New ) ) { - word agglomeratorType(controlDict.lookup("agglomerator")); + const word agglomeratorType(controlDict.lookup("agglomerator")); dlLibraryTable::open ( diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C index c5d1cebda6..e1e06c965f 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C @@ -27,13 +27,14 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::GAMGInterfaceField::New +Foam::autoPtr +Foam::GAMGInterfaceField::New ( const GAMGInterface& GAMGCp, const lduInterfaceField& fineInterface ) { - word coupleType(fineInterface.interfaceFieldType()); + const word coupleType(fineInterface.interfaceFieldType()); lduInterfaceConstructorTable::iterator cstrIter = lduInterfaceConstructorTablePtr_->find(coupleType); @@ -45,7 +46,8 @@ Foam::autoPtr Foam::GAMGInterfaceField::New "GAMGInterfaceField::New" "(const GAMGInterface& GAMGCp, " "const lduInterfaceField& fineInterface)" - ) << "Unknown GAMGInterfaceField type " << coupleType << ".\n" + ) << "Unknown GAMGInterfaceField type " + << coupleType << nl << "Valid GAMGInterfaceField types are :" << lduInterfaceConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C index ddbd89eea2..fac2aea8a5 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C @@ -29,14 +29,15 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::GAMGInterface::New +Foam::autoPtr +Foam::GAMGInterface::New ( const lduInterface& fineInterface, const labelField& localRestrictAddressing, const labelField& neighbourRestrictAddressing ) { - word coupleType(fineInterface.type()); + const word coupleType(fineInterface.type()); lduInterfaceConstructorTable::iterator cstrIter = lduInterfaceConstructorTablePtr_->find(coupleType); diff --git a/src/OpenFOAM/matrices/tolerances/tolerances.C b/src/OpenFOAM/matrices/tolerances/tolerances.C index 487d8ec1a7..dead8a2490 100644 --- a/src/OpenFOAM/matrices/tolerances/tolerances.C +++ b/src/OpenFOAM/matrices/tolerances/tolerances.C @@ -62,7 +62,7 @@ bool tolerances::read() { if (regIOobject::read()) { - word toleranceSetName(lookup("toleranceSet")); + const word toleranceSetName(lookup("toleranceSet")); const dictionary& toleranceSet(subDict(toleranceSetName)); if (toleranceSet.found("relaxationFactors")) diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C index 718bbab1bf..a05b8d37a9 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C @@ -27,12 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr facePointPatch::New +Foam::autoPtr +Foam::facePointPatch::New ( const polyPatch& patch, const pointBoundaryMesh& bm @@ -57,7 +53,7 @@ autoPtr facePointPatch::New "const pointBoundaryMesh&) : " ) << "Unknown facePointPatch type " << patch.type() - << endl << endl + << nl << nl << "Valid facePointPatch types are :" << endl << polyPatchConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -67,8 +63,4 @@ autoPtr facePointPatch::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C index 2e821e9036..d2ea21bd0a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::polyPatch::New +Foam::autoPtr +Foam::polyPatch::New ( const word& patchType, const word& name, @@ -55,8 +56,8 @@ Foam::autoPtr Foam::polyPatch::New ( "polyPatch::New(const word&, const word&, const label, " "const label, const label, const polyBoundaryMesh&) " - ) << "Unknown polyPatch type " << patchType << " for patch " << name - << endl << endl + ) << "Unknown polyPatch type " + << patchType << " for patch " << name << nl << nl << "Valid polyPatch types are :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -66,7 +67,8 @@ Foam::autoPtr Foam::polyPatch::New } -Foam::autoPtr Foam::polyPatch::New +Foam::autoPtr +Foam::polyPatch::New ( const word& name, const dictionary& dict, @@ -82,7 +84,6 @@ Foam::autoPtr Foam::polyPatch::New } word patchType(dict.lookup("type")); - dict.readIfPresent("geometricType", patchType); dictionaryConstructorTable::iterator cstrIter = @@ -102,9 +103,8 @@ Foam::autoPtr Foam::polyPatch::New "polyPatch::New(const word&, const dictionary&, " "const label, const polyBoundaryMesh&)", dict - ) << "Unknown polyPatch type " << patchType - << " for patch " << name - << endl << endl + ) << "Unknown polyPatch type " + << patchType << " for patch " << name << nl << nl << "Valid polyPatch types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C index 3c1efbb1a2..a5ec479f68 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::cellZone::New +Foam::autoPtr +Foam::cellZone::New ( const word& name, const dictionary& dict, @@ -43,7 +44,10 @@ Foam::autoPtr Foam::cellZone::New << endl; } - word zoneType(dict.lookup("type")); + const word zoneType + ( + dict.lookup("type") + ); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); @@ -55,7 +59,8 @@ Foam::autoPtr Foam::cellZone::New "cellZone::New(const word&, const dictionary&, " "const label, const cellZoneMesh&)", dict - ) << "Unknown cellZone type " << zoneType << endl << endl + ) << "Unknown cellZone type " + << zoneType << nl << nl << "Valid cellZone types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C index 8948833404..f8e41d8947 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::faceZone::New +Foam::autoPtr +Foam::faceZone::New ( const word& name, const dictionary& dict, @@ -43,7 +44,10 @@ Foam::autoPtr Foam::faceZone::New << endl; } - word zoneType(dict.lookup("type")); + const word zoneType + ( + dict.lookup("type") + ); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); @@ -55,7 +59,8 @@ Foam::autoPtr Foam::faceZone::New "faceZone::New(const word&, const dictionary&, " "const label, const faceZoneMesh&)", dict - ) << "Unknown faceZone type " << zoneType << endl << endl + ) << "Unknown faceZone type " + << zoneType << nl << nl << "Valid faceZone types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C index bac22f1e18..e1ce962d50 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::pointZone::New +Foam::autoPtr +Foam::pointZone::New ( const word& name, const dictionary& dict, @@ -43,7 +44,10 @@ Foam::autoPtr Foam::pointZone::New << endl; } - word zoneType(dict.lookup("type")); + const word zoneType + ( + dict.lookup("type") + ); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); @@ -55,7 +59,8 @@ Foam::autoPtr Foam::pointZone::New "pointZone::New(const word&, const dictionary&, " "const label, const pointZoneMesh&)", dict - ) << "Unknown pointZone type " << zoneType << endl << endl + ) << "Unknown pointZone type " + << zoneType << nl << nl << "Valid pointZone types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C index 9fadac3ca5..5cdc5e9d89 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C +++ b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C @@ -189,7 +189,7 @@ Foam::plane::plane(const dictionary& dict) unitVector_(vector::zero), basePoint_(point::zero) { - word planeType(dict.lookup("planeType")); + const word planeType(dict.lookup("planeType")); if (planeType == "planeEquation") { diff --git a/src/conversion/ensight/part/ensightPart.C b/src/conversion/ensight/part/ensightPart.C index 2321946d3a..aa1eacd628 100644 --- a/src/conversion/ensight/part/ensightPart.C +++ b/src/conversion/ensight/part/ensightPart.C @@ -126,9 +126,10 @@ Foam::ensightPart::ensightPart(const ensightPart& part) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::ensightPart::New(Istream& is) +Foam::autoPtr +Foam::ensightPart::New(Istream& is) { - word partType(is); + const word partType(is); istreamConstructorTable::iterator cstrIter = istreamConstructorTablePtr_->find(partType); @@ -139,7 +140,8 @@ Foam::autoPtr Foam::ensightPart::New(Istream& is) ( "ensightPart::New(Istream&)", is - ) << "unknown ensightPart type " << partType << endl << endl + ) << "unknown ensightPart type " + << partType << nl << nl << "Valid ensightPart types are :" << endl << istreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index 536c397923..57311b38dd 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -29,12 +29,11 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::dynamicFvMesh::New(const IOobject& io) +Foam::autoPtr +Foam::dynamicFvMesh::New(const IOobject& io) { - // Enclose the creation of the dynamicMesh to ensure it is - // deleted before the dynamicFvMesh is created otherwise the dictionary - // is entered in the database twice - IOdictionary dynamicMeshDict + // do not register the dictionary + IOdictionary dict ( IOobject ( @@ -47,13 +46,13 @@ Foam::autoPtr Foam::dynamicFvMesh::New(const IOobject& io) ) ); - word dynamicFvMeshTypeName(dynamicMeshDict.lookup("dynamicFvMesh")); + const word dynamicFvMeshTypeName(dict.lookup("dynamicFvMesh")); Info<< "Selecting dynamicFvMesh " << dynamicFvMeshTypeName << endl; dlLibraryTable::open ( - dynamicMeshDict, + dict, "dynamicFvMeshLibs", IOobjectConstructorTablePtr_ ); @@ -75,8 +74,8 @@ Foam::autoPtr Foam::dynamicFvMesh::New(const IOobject& io) FatalErrorIn ( "dynamicFvMesh::New(const IOobject&)" - ) << "Unknown dynamicFvMesh type " << dynamicFvMeshTypeName - << endl << endl + ) << "Unknown dynamicFvMesh type " + << dynamicFvMeshTypeName << nl << nl << "Valid dynamicFvMesh types are :" << endl << IOobjectConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C index 3619122c6b..9b996ff876 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C @@ -27,20 +27,22 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::solidBodyMotionFunction::New +Foam::autoPtr +Foam::solidBodyMotionFunction::New ( const dictionary& SBMFCoeffs, const Time& runTime ) { - word solidBodyMotionFunctionTypeName = - SBMFCoeffs.lookup("solidBodyMotionFunction"); + const word motionType + ( + SBMFCoeffs.lookup("solidBodyMotionFunction") + ); - Info<< "Selecting solid-body motion function " - << solidBodyMotionFunctionTypeName << endl; + Info<< "Selecting solid-body motion function " << motionType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(solidBodyMotionFunctionTypeName); + dictionaryConstructorTablePtr_->find(motionType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,8 +54,8 @@ Foam::autoPtr Foam::solidBodyMotionFunction::New " const Time& runTime" ")" ) << "Unknown solidBodyMotionFunction type " - << solidBodyMotionFunctionTypeName << endl << endl - << "Valid solidBodyMotionFunctions are : " << endl + << motionType << nl << nl + << "Valid solidBodyMotionFunctions are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C index 0dbb3e7377..aadb0781d6 100644 --- a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C @@ -28,36 +28,34 @@ License #include "ListOps.H" #include "meshTools.H" - +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(cellLooper, 0); -defineRunTimeSelectionTable(cellLooper, word); + defineTypeNameAndDebug(cellLooper, 0); + defineRunTimeSelectionTable(cellLooper, word); +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Construct named object from given arguments -autoPtr cellLooper::New +Foam::autoPtr +Foam::cellLooper::New ( const word& type, const polyMesh& mesh ) { wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_ - ->find(type); + wordConstructorTablePtr_->find(type); if (cstrIter == wordConstructorTablePtr_->end()) { FatalErrorIn ( "cellLooper::New(const word&, const polyMesh&)" - ) << "Unknown set type " << type - << endl << endl + ) << "Unknown set type " + << type << nl << nl << "Valid cellLooper types : " << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -66,7 +64,6 @@ autoPtr cellLooper::New return autoPtr(cstrIter()(mesh)); } -} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -207,7 +204,6 @@ Foam::label Foam::cellLooper::getMisAlignedEdge // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::cellLooper::cellLooper(const polyMesh& mesh) : edgeVertex(mesh) diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index 0ea45f5f04..b49dc435dc 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -303,7 +303,7 @@ Foam::directions::directions label nDirs = 0; - word coordSystem(dict.lookup("coordinateSystem")); + const word coordSystem(dict.lookup("coordinateSystem")); if (coordSystem == "global") { @@ -341,7 +341,7 @@ Foam::directions::directions { const dictionary& patchDict = dict.subDict("patchLocalCoeffs"); - word patchName(patchDict.lookup("patch")); + const word patchName(patchDict.lookup("patch")); label patchI = mesh.boundaryMesh().findPatchID(patchName); @@ -352,7 +352,8 @@ Foam::directions::directions "directions::directions(const polyMesh&, const dictionary&," "const twoDPointCorrector*" ) << "Cannot find patch " - << patchName << exit(FatalError); + << patchName + << exit(FatalError); } // Take zeroth face on patch @@ -440,7 +441,8 @@ Foam::directions::directions "const twoDPointCorrector*" ) << "Unknown coordinate system " << coordSystem << endl - << "Known types are global and patchLocal" << exit(FatalError); + << "Known types are global and patchLocal" + << exit(FatalError); } } diff --git a/src/dynamicMesh/motionSolver/motionSolver.C b/src/dynamicMesh/motionSolver/motionSolver.C index 764ad193ad..2979d1fe06 100644 --- a/src/dynamicMesh/motionSolver/motionSolver.C +++ b/src/dynamicMesh/motionSolver/motionSolver.C @@ -58,7 +58,8 @@ Foam::motionSolver::motionSolver(const polyMesh& mesh) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::motionSolver::New(const polyMesh& mesh) +Foam::autoPtr +Foam::motionSolver::New(const polyMesh& mesh) { IOdictionary solverDict ( @@ -75,7 +76,7 @@ Foam::autoPtr Foam::motionSolver::New(const polyMesh& mesh) Istream& msData = solverDict.lookup("solver"); - word solverTypeName(msData); + const word solverTypeName(msData); Info<< "Selecting motion solver: " << solverTypeName << endl; @@ -103,9 +104,9 @@ Foam::autoPtr Foam::motionSolver::New(const polyMesh& mesh) FatalErrorIn ( "motionSolver::New(const polyMesh& mesh)" - ) << "Unknown solver type " << solverTypeName - << endl << endl - << "Valid solver types are: " << endl + ) << "Unknown solver type " + << solverTypeName << nl << nl + << "Valid solver types are:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C index f900853459..f7b74a432e 100644 --- a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C +++ b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C @@ -26,14 +26,10 @@ License #include "polyMeshModifier.H" #include "dictionary.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -autoPtr polyMeshModifier::New +Foam::autoPtr +Foam::polyMeshModifier::New ( const word& name, const dictionary& dict, @@ -49,10 +45,10 @@ autoPtr polyMeshModifier::New << endl; } - word patchType(dict.lookup("type")); + const word modifierType(dict.lookup("type")); dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(patchType); + dictionaryConstructorTablePtr_->find(modifierType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -61,7 +57,8 @@ autoPtr polyMeshModifier::New "polyMeshModifier::New(const word&, const dictionary&, " "const label, const polyMesh&)", dict - ) << "Unknown polyMeshModifier type " << patchType << endl << endl + ) << "Unknown polyMeshModifier type " + << modifierType << nl << nl << "Valid polyMeshModifier types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -71,8 +68,4 @@ autoPtr polyMeshModifier::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/engine/engineMesh/engineMesh/engineMeshNew.C b/src/engine/engineMesh/engineMesh/engineMeshNew.C index 16db348f1f..d34011d279 100644 --- a/src/engine/engineMesh/engineMesh/engineMeshNew.C +++ b/src/engine/engineMesh/engineMesh/engineMeshNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::engineMesh::New +Foam::autoPtr +Foam::engineMesh::New ( const Foam::IOobject& io ) { - word engineMeshTypeName; - - // Enclose the creation of the engineGeometry to ensure it is - // deleted before the engineMesh is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary engineGeometryDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -50,23 +49,21 @@ Foam::autoPtr Foam::engineMesh::New IOobject::NO_WRITE, false ) - ); + ).lookup("engineMesh") + ); - engineGeometryDict.lookup("engineMesh") >> engineMeshTypeName; - } - - Info<< "Selecting engineMesh " << engineMeshTypeName << endl; + Info<< "Selecting engineMesh " << modelType << endl; IOobjectConstructorTable::iterator cstrIter = - IOobjectConstructorTablePtr_->find(engineMeshTypeName); + IOobjectConstructorTablePtr_->find(modelType); if (cstrIter == IOobjectConstructorTablePtr_->end()) { FatalErrorIn ( "engineMesh::New(const IOobject&)" - ) << "Unknown engineMesh type " << engineMeshTypeName - << endl << endl + ) << "Unknown engineMesh type " + << modelType << nl << nl << "Valid engineMesh types are :" << endl << IOobjectConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C index d181f56835..db5a422ad1 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C @@ -25,27 +25,19 @@ License #include "SRFModel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace SRF -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr SRFModel::New +Foam::autoPtr +Foam::SRF::SRFModel::New ( const volVectorField& Urel ) { - word SRFModelTypeName; - - // Enclose the creation of the SRFPropertiesDict to ensure it is - // deleted before the SRFModel is created - otherwise the dictionary - // is entered in the database twice - { - IOdictionary SRFPropertiesDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -53,25 +45,24 @@ autoPtr SRFModel::New Urel.time().constant(), Urel.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("SRFModel") + ); - SRFPropertiesDict.lookup("SRFModel") >> SRFModelTypeName; - } - - Info<< "Selecting SRFModel " << SRFModelTypeName << endl; + Info<< "Selecting SRFModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(SRFModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "SRFModel::New(const fvMesh&)" - ) << "Unknown SRFModel type " << SRFModelTypeName - << nl << nl + ) << "Unknown SRFModel type " + << modelType << nl << nl << "Valid SRFModel types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -81,9 +72,4 @@ autoPtr SRFModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace SRF -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C index 86884666a9..0e119e7d32 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C @@ -52,8 +52,8 @@ Foam::tmp > Foam::fvPatchField::New ( "fvPatchField::New(const word&, const word&, const fvPatch&, " "const DimensionedField&)" - ) << "Unknown patchTypefield type " << patchFieldType - << endl << endl + ) << "Unknown patchField type " + << patchFieldType << nl << nl << "Valid patchField types are :" << endl << patchConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -104,7 +104,7 @@ Foam::tmp > Foam::fvPatchField::New const dictionary& dict ) { - word patchFieldType(dict.lookup("type")); + const word patchFieldType(dict.lookup("type")); if (debug) { @@ -133,7 +133,7 @@ Foam::tmp > Foam::fvPatchField::New "const dictionary&)", dict ) << "Unknown patchField type " << patchFieldType - << " for patch type " << p.type() << endl << endl + << " for patch type " << p.type() << nl << nl << "Valid patchField types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -200,7 +200,7 @@ Foam::tmp > Foam::fvPatchField::New "fvPatchField::New(const fvPatchField&, " "const fvPatch&, const DimensionedField&, " "const fvPatchFieldMapper&)" - ) << "unknown patchTypefield type " << ptf.type() << endl << endl + ) << "Unknown patchField type " << ptf.type() << nl << nl << "Valid patchField types are :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C index b8ad302fdd..dd9b25f1a4 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C @@ -56,8 +56,8 @@ tmp > fvsPatchField::New ( "fvsPatchField::New(const word&, const word&, const fvPatch&" ", const Field&)" - ) << "Unknown patchTypefield type " << patchFieldType - << endl << endl + ) << "Unknown patchField type " + << patchFieldType << nl << nl << "Valid patchField types are :" << endl << patchConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -116,7 +116,7 @@ tmp > fvsPatchField::New << endl; } - word patchFieldType(dict.lookup("type")); + const word patchFieldType(dict.lookup("type")); typename dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(patchFieldType); @@ -136,7 +136,7 @@ tmp > fvsPatchField::New "const dictionary&)", dict ) << "Unknown patchField type " << patchFieldType - << " for patch type " << p.type() << endl << endl + << " for patch type " << p.type() << nl << nl << "Valid patchField types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -204,7 +204,7 @@ tmp > fvsPatchField::New "fvsPatchField::New(const fvsPatchField&, " "const fvPatch&, const Field&, " "const fvPatchFieldMapper&)" - ) << "unknown patchTypefield type " << ptf.type() << endl << endl + ) << "Unknown patchField type " << ptf.type() << nl << nl << "Valid patchField types are :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C index 225aea40c2..f072f57001 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C @@ -82,7 +82,7 @@ tmp > convectionScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -94,7 +94,7 @@ tmp > convectionScheme::New "convectionScheme::New" "(const fvMesh&, const surfaceScalarField&, Istream&)", schemeData - ) << "unknown convection scheme " << schemeName << endl << endl + ) << "Unknown convection scheme " << schemeName << nl << nl << "Valid convection schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -139,7 +139,7 @@ tmp > convectionScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename MultivariateConstructorTable::iterator cstrIter = MultivariateConstructorTablePtr_->find(schemeName); @@ -153,7 +153,7 @@ tmp > convectionScheme::New "const typename multivariateSurfaceInterpolationScheme" "::fieldTable&, const surfaceScalarField&, Istream&)", schemeData - ) << "unknown convection scheme " << schemeName << endl << endl + ) << "Unknown convection scheme " << schemeName << nl << nl << "Valid convection schemes are :" << endl << MultivariateConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C index 858e6ecd9a..72c3b907cf 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C @@ -67,7 +67,7 @@ tmp > d2dt2Scheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -78,7 +78,7 @@ tmp > d2dt2Scheme::New ( "d2dt2Scheme::New(const fvMesh&, Istream&)", schemeData - ) << "unknown d2dt2 scheme " << schemeName << endl << endl + ) << "Unknown d2dt2 scheme " << schemeName << nl << nl << "Valid d2dt2 schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C index 71022e571f..260eaec08f 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C @@ -65,7 +65,7 @@ tmp > ddtScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -76,7 +76,7 @@ tmp > ddtScheme::New ( "ddtScheme::New(const fvMesh&, Istream&)", schemeData - ) << "unknown ddt scheme " << schemeName << endl << endl + ) << "Unknown ddt scheme " << schemeName << nl << nl << "Valid ddt schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C index 51502b701a..9045e8b509 100644 --- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C +++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C @@ -68,7 +68,7 @@ tmp > divScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -79,7 +79,8 @@ tmp > divScheme::New ( "divScheme::New(const fvMesh&, Istream&)", schemeData - ) << "unknown div scheme " << schemeName << endl << endl + ) << "unknown div scheme " + << schemeName << nl << nl << "Valid div schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C index 7667e6325f..faba3c984d 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C @@ -57,7 +57,7 @@ Foam::tmp > Foam::fv::gradScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -69,7 +69,7 @@ Foam::tmp > Foam::fv::gradScheme::New "gradScheme::New" "(const fvMesh& mesh, Istream& schemeData)", schemeData - ) << "unknown grad scheme " << schemeName << endl << endl + ) << "Unknown grad scheme " << schemeName << nl << nl << "Valid grad schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C index 6ee704dbe4..fa55b32dbd 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C @@ -66,7 +66,7 @@ tmp > laplacianScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -77,7 +77,7 @@ tmp > laplacianScheme::New ( "laplacianScheme::New(const fvMesh&, Istream&)", schemeData - ) << "unknown laplacian scheme " << schemeName << endl << endl + ) << "Unknown laplacian scheme " << schemeName << nl << nl << "Valid laplacian schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C index 9ebba2a0f1..4c0cf42e7f 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C @@ -68,7 +68,7 @@ tmp > snGradScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename MeshConstructorTable::iterator constructorIter = MeshConstructorTablePtr_->find(schemeName); @@ -79,8 +79,8 @@ tmp > snGradScheme::New ( "snGradScheme::New(const fvMesh&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C index 4a7facee23..b371396989 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::fvPatch::New +Foam::autoPtr +Foam::fvPatch::New ( const polyPatch& patch, const fvBoundaryMesh& bm @@ -47,7 +48,7 @@ Foam::autoPtr Foam::fvPatch::New if (cstrIter == polyPatchConstructorTablePtr_->end()) { FatalErrorIn("fvPatch::New(const polyPatch&, const fvBoundaryMesh&)") - << "Unknown fvPatch type " << patch.type() << ".\n" + << "Unknown fvPatch type " << patch.type() << nl << "Valid fvPatch types are :" << polyPatchConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C index 2618a1a570..313f6ad1d8 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C @@ -65,7 +65,7 @@ limitedSurfaceInterpolationScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename MeshConstructorTable::iterator constructorIter = MeshConstructorTablePtr_->find(schemeName); @@ -77,8 +77,8 @@ limitedSurfaceInterpolationScheme::New "limitedSurfaceInterpolationScheme::" "New(const fvMesh&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -120,7 +120,7 @@ limitedSurfaceInterpolationScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename MeshFluxConstructorTable::iterator constructorIter = MeshFluxConstructorTablePtr_->find(schemeName); @@ -132,8 +132,8 @@ limitedSurfaceInterpolationScheme::New "limitedSurfaceInterpolationScheme::New" "(const fvMesh&, const surfaceScalarField&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshFluxConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C index aa349204a8..c7d3cfb451 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C @@ -76,7 +76,7 @@ multivariateSurfaceInterpolationScheme::New << endl; } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator constructorIter = IstreamConstructorTablePtr_->find(schemeName); @@ -89,7 +89,7 @@ multivariateSurfaceInterpolationScheme::New "(const fvMesh& mesh, const fieldTable&, " "const surfaceScalarField&, Istream&)", schemeData - ) << "unknown discretisation scheme " << schemeName << endl << endl + ) << "Unknown discretisation scheme " << schemeName << nl << nl << "Valid schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C index 0a51f574f1..43f52f271b 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C @@ -59,7 +59,7 @@ tmp > surfaceInterpolationScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); if (surfaceInterpolation::debug || surfaceInterpolationScheme::debug) { @@ -79,8 +79,8 @@ tmp > surfaceInterpolationScheme::New ( "surfaceInterpolationScheme::New(const fvMesh&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -113,7 +113,7 @@ tmp > surfaceInterpolationScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); if (surfaceInterpolation::debug || surfaceInterpolationScheme::debug) { @@ -134,8 +134,8 @@ tmp > surfaceInterpolationScheme::New "surfaceInterpolationScheme::New" "(const fvMesh&, const surfaceScalarField&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshFluxConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C index aad5896b41..3f3b570fff 100644 --- a/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C @@ -30,7 +30,6 @@ License namespace Foam { defineTypeNameAndDebug(motionDiffusivity, 0); - defineRunTimeSelectionTable(motionDiffusivity, Istream); } @@ -45,18 +44,19 @@ Foam::motionDiffusivity::motionDiffusivity(const fvMotionSolver& mSolver) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::motionDiffusivity::New +Foam::autoPtr +Foam::motionDiffusivity::New ( const fvMotionSolver& mSolver, Istream& mdData ) { - word diffTypeName(mdData); + const word motionType(mdData); - Info<< "Selecting motion diffusion: " << diffTypeName << endl; + Info<< "Selecting motion diffusion: " << motionType << endl; IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(diffTypeName); + IstreamConstructorTablePtr_->find(motionType); if (cstrIter == IstreamConstructorTablePtr_->end()) { @@ -64,8 +64,8 @@ Foam::autoPtr Foam::motionDiffusivity::New ( "motionDiffusivity::New(const tetPolyMesh& tetMesh, " "const Istream& dict)" - ) << "Unknown diffusion type " << diffTypeName - << endl << endl + ) << "Unknown diffusion type " + << motionType << nl << nl << "Valid diffusion types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C index d607a3a068..067378c3cf 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -39,7 +39,7 @@ Foam::word Foam::Cloud::cloudPropertiesName("cloudProperties"); template void Foam::Cloud::readCloudUniformProperties() { - IOobject uniformPropsDictHeader + IOobject dictObj ( cloudPropertiesName, time().timeName(), @@ -50,11 +50,11 @@ void Foam::Cloud::readCloudUniformProperties() false ); - if (uniformPropsDictHeader.headerOk()) + if (dictObj.headerOk()) { - const IOdictionary uniformPropsDict(uniformPropsDictHeader); + const IOdictionary uniformPropsDict(dictObj); - word procName("processor" + Foam::name(Pstream::myProcNo())); + const word procName("processor" + Foam::name(Pstream::myProcNo())); if (uniformPropsDict.found(procName)) { uniformPropsDict.subDict(procName).lookup("particleCount") diff --git a/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C b/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C index a78356f9d5..83c9207c4b 100644 --- a/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C +++ b/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C @@ -46,26 +46,29 @@ Foam::injectorType::injectorType // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::injectorType::New +Foam::autoPtr +Foam::injectorType::New ( const Time& t, const dictionary& dict ) { - word injectorTypeName(dict.lookup("injectorType")); + const word modelType + ( + dict.lookup("injectorType") + ); - Info<< "Selecting injectorType " << injectorTypeName << endl; + Info<< "Selecting injectorType " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(injectorTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("injectorType::New(const dictionary&)") << "Unknown injectorType type " - << injectorTypeName - << ", constructor not in hash table" << nl << nl - << " Valid injector types are:" << nl + << modelType << nl << nl + << "Valid injectorTypes are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/lagrangian/dieselSpray/spray/spray.C b/src/lagrangian/dieselSpray/spray/spray.C index 925a6335c3..e21063b569 100644 --- a/src/lagrangian/dieselSpray/spray/spray.C +++ b/src/lagrangian/dieselSpray/spray/spray.C @@ -51,7 +51,6 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::spray::spray ( const volVectorField& U, @@ -340,8 +339,8 @@ Foam::spray::spray Info<< specieName << endl; } - FatalError<< - "The liquid component " << liquidName + FatalError + << "The liquid component " << liquidName << " does not exist in the species composition.Y() list.\n" << "(Probably not defined in )" << abort(FatalError); diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C index 1772cace2b..6dda97beae 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C @@ -28,47 +28,40 @@ License #include "LISA.H" #include "noAtomization.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr atomizationModel::New +Foam::autoPtr +Foam::atomizationModel::New ( const dictionary& dict, spray& sm ) { - word atomizationModelType + const word modelType ( dict.lookup("atomizationModel") ); - Info<< "Selecting atomizationModel " - << atomizationModelType << endl; + Info<< "Selecting atomizationModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(atomizationModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "atomizationModel::New(const dictionary&, const spray&) : " << endl - << " unknown atomizationModelType type " - << atomizationModelType - << ", constructor not in hash table" << endl << endl - << " Valid atomizationModel types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "atomizationModel::New(const dictionary&, const spray&)" + ) << "Unknown atomizationModel type " + << modelType << nl << nl + << "Valid atomizationModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict, sm)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C index 42376b3352..a1e04ffe38 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C @@ -29,41 +29,37 @@ License #include "reitzDiwakar.H" #include "reitzKHRT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr breakupModel::New +Foam::autoPtr +Foam::breakupModel::New ( const dictionary& dict, spray& sm ) { - word breakupModelType(dict.lookup("breakupModel")); + const word modelType + ( + dict.lookup("breakupModel") + ); - Info<< "Selecting breakupModel " << breakupModelType << endl; + Info<< "Selecting breakupModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(breakupModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("breakupModel::New(const dictionary&, const spray&)") - << " unknown breakupModelType type " << breakupModelType - << ", constructor not in hash table" << nl << nl - << " Valid breakupModel types are :" << nl - << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + << "Unknown breakupModel type " + << modelType << nl << nl + << "Valid breakupModel types are :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict, sm)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C index ffed012ff4..e0d86aa903 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C @@ -30,43 +30,36 @@ License #include "ORourkeCollisionModel.H" #include "trajectoryModel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr collisionModel::New +Foam::autoPtr +Foam::collisionModel::New ( const dictionary& dict, spray& sm, Random& rndGen ) { - word collisionModelType + const word modelType ( dict.lookup("collisionModel") ); - Info<< "Selecting collisionModel " - << collisionModelType << endl; - + Info<< "Selecting collisionModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(collisionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "collisionModel::New(const dictionary&, const spray&) : " - << endl - << " unknown collisionModelType type " - << collisionModelType - << ", constructor not in hash table" << endl << endl - << " Valid collisionModel types are :" - << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() + FatalErrorIn + ( + "collisionModel::New(const dictionary&, const spray&)" + ) << "Unknown collisionModel type " + << modelType << nl << nl + << "Valid collisionModel types are :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -74,8 +67,4 @@ autoPtr collisionModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C index 9cb0ae8f0e..f5fc96605a 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C @@ -28,48 +28,39 @@ License #include "dispersionModel.H" #include "noDispersion.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr dispersionModel::New +Foam::autoPtr +Foam::dispersionModel::New ( const dictionary& dict, spray& sm ) { - word dispersionModelType + const word modelType ( dict.lookup("dispersionModel") ); - Info<< "Selecting dispersionModel " - << dispersionModelType << endl; + Info<< "Selecting dispersionModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dispersionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "dispersionModel::New(const dictionary&, const spray&) : " - << endl - << " unknown dispersionModelType type " - << dispersionModelType - << ", constructor not in hash table" << endl << endl - << " Valid dispersionModel types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "dispersionModel::New(const dictionary&, const spray&)" + ) << "Unknown dispersionModel type " + << modelType << nl << nl + << "Valid dispersionModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict, sm)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C index cfa4cd8493..4bc7e5f898 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C @@ -30,27 +30,25 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam +Foam::autoPtr +Foam::dragModel::New(const dictionary& dict) { + const word modelType + ( + dict.lookup("dragModel") + ); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr dragModel::New(const dictionary& dict) -{ - word dragModelType(dict.lookup("dragModel")); - - Info<< "Selecting dragModel " - << dragModelType << endl; + Info<< "Selecting dragModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("dragModel::New(const dictionary&)") - << "Unknown dragModelType type " << dragModelType - << ", constructor not in hash table" << nl << nl - << " Valid dragModel types are:" << nl + << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -59,8 +57,4 @@ autoPtr dragModel::New(const dictionary& dict) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C index 57d0c0157b..59e80075ff 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C @@ -34,7 +34,10 @@ License Foam::autoPtr Foam::evaporationModel::New(const dictionary& dict) { - word modelType(dict.lookup("evaporationModel")); + const word modelType + ( + dict.lookup("evaporationModel") + ); Info<< "Selecting evaporationModel " << modelType << endl; @@ -44,9 +47,8 @@ Foam::evaporationModel::New(const dictionary& dict) if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("evaporationModel::New(const dictionary&)") - << "Unknown evaporationModelType type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid evaporationModel types are: " << nl + << "Unknown evaporationModel type " + << modelType << nl << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C index e1b8c42336..3c691edfac 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C @@ -28,32 +28,31 @@ License #include "heatTransferModel.H" #include "noHeatTransfer.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr heatTransferModel::New +Foam::autoPtr +Foam::heatTransferModel::New ( const dictionary& dict ) { - word heatTransferModelType(dict.lookup("heatTransferModel")); + const word modelType + ( + dict.lookup("heatTransferModel") + ); - Info<< "Selecting heatTransferModel " << heatTransferModelType << endl; + Info<< "Selecting heatTransferModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(heatTransferModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("heatTransferModel::New(const dictionary&)") - << "Unknown heatTransferModelType type " - << heatTransferModelType - << ", constructor not in hash table" << nl << nl - << " Valid heatTransferModel types are:" << nl + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -62,8 +61,4 @@ autoPtr heatTransferModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C index 343d01a311..7ab341a38e 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C @@ -65,7 +65,8 @@ Foam::ChomiakInjector::ChomiakInjector if (sm.injectors().size() != maxSprayAngle_.size()) { - FatalError << "ChomiakInjector::ChomiakInjector" + FatalError + << "ChomiakInjector::ChomiakInjector" << "(const dictionary& dict, spray& sm)\n" << "Wrong number of entries in maxSprayAngle" << abort(FatalError); diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C index 52c24b17f8..de57c436e6 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C @@ -68,7 +68,8 @@ Foam::blobsSwirlInjector::blobsSwirlInjector if (sm.injectors().size() != coneAngle_.size()) { - FatalError << "blobsSwirlInjector::blobsSwirlInjector" + FatalError + << "blobsSwirlInjector::blobsSwirlInjector" << "(const dictionary& dict, spray& sm)\n" << "Wrong number of entries in innerAngle" << abort(FatalError); diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C index e92af2e29a..616b0d243a 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C @@ -28,33 +28,32 @@ License #include "injectorModel.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr injectorModel::New +Foam::autoPtr +Foam::injectorModel::New ( const dictionary& dict, spray& sm ) { - word injectorModelType(dict.lookup("injectorModel")); + const word modelType + ( + dict.lookup("injectorModel") + ); - Info<< "Selecting injectorModel " - << injectorModelType << endl; + Info<< "Selecting injectorModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(injectorModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("injectorModel::New(const dictionary&, spray&)") - << "Unknown injectorModelType type " << injectorModelType - << ", constructor not in hash table" << nl << nl - << " Valid injectorModel types are:" << nl + << "Unknown injectorModel type " + << modelType << nl << nl + << "Valid injectorModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -63,8 +62,4 @@ autoPtr injectorModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C index 75a390123a..d281e6a58e 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C @@ -27,33 +27,32 @@ License #include "wallModel.H" #include "removeParcel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr wallModel::New +Foam::autoPtr +Foam::wallModel::New ( const dictionary& dict, const volVectorField& U, spray& sm ) { - word wallModelType(dict.lookup("wallModel")); + const word modelType + ( + dict.lookup("wallModel") + ); - Info<< "Selecting wallModel " << wallModelType << endl; + Info<< "Selecting wallModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(wallModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("wallModel::New(const dictionary&, const spray&)") - << "Unknown wallModelType type " << wallModelType - << ", constructor not in hash table" << nl << nl - << " Valid wallModel types are:" << nl + << "Unknown wallModel type " + << modelType << nl << nl + << "Valid wallModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -62,8 +61,4 @@ autoPtr wallModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C index 1746dc608c..24196871fd 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C @@ -35,14 +35,15 @@ Foam::BinaryCollisionModel::New CloudType& owner ) { - word BinaryCollisionModelType(dict.lookup("BinaryCollisionModel")); + const word modelType + ( + dict.lookup("BinaryCollisionModel") + ); - Info<< "Selecting BinaryCollisionModel " - << BinaryCollisionModelType - << endl; + Info<< "Selecting BinaryCollisionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(BinaryCollisionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +52,11 @@ Foam::BinaryCollisionModel::New "BinaryCollisionModel::New" "(const dictionary&, CloudType&)" ) - << "Unknown BinaryCollisionModelType type " - << BinaryCollisionModelType - << ", constructor not in hash table" << nl << nl - << " Valid BinaryCollisionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown BinaryCollisionModel type " + << modelType << nl << nl + << "Valid BinaryCollisionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr > diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C index 27388eb389..8a682da17e 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C @@ -35,12 +35,15 @@ Foam::InflowBoundaryModel::New CloudType& owner ) { - word InflowBoundaryModelType(dict.lookup("InflowBoundaryModel")); + const word modelType + ( + dict.lookup("InflowBoundaryModel") + ); - Info<< "Selecting InflowBoundaryModel " << InflowBoundaryModelType << endl; + Info<< "Selecting InflowBoundaryModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(InflowBoundaryModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -48,11 +51,11 @@ Foam::InflowBoundaryModel::New ( "InflowBoundaryModel::New" "(const dictionary&, CloudType&)" - ) << "Unknown InflowBoundaryModelType type " - << InflowBoundaryModelType - << ", constructor not in hash table" << nl << nl - << " Valid InflowBoundaryModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown InflowBoundaryModel type " + << modelType << nl << nl + << "Valid InflowBoundaryModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C index b7cc575c25..bd421e2d56 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C @@ -35,13 +35,15 @@ Foam::WallInteractionModel::New CloudType& owner ) { - word WallInteractionModelType(dict.lookup("WallInteractionModel")); + const word modelType + ( + dict.lookup("WallInteractionModel") + ); - Info<< "Selecting WallInteractionModel " << WallInteractionModelType - << endl; + Info<< "Selecting WallInteractionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(WallInteractionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -50,11 +52,11 @@ Foam::WallInteractionModel::New "WallInteractionModel::New" "(const dictionary&, CloudType&)" ) - << "Unknown WallInteractionModelType type " - << WallInteractionModelType - << ", constructor not in hash table" << nl << nl - << " Valid WallInteractionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown WallInteractionModel type " + << modelType << nl << nl + << "Valid WallInteractionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C index 8cb18924cc..7110b8b7be 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::autoPtr > Foam::DataEntry::New +Foam::autoPtr< Foam::DataEntry > +Foam::DataEntry::New ( const word& entryName, const dictionary& dict @@ -43,10 +44,13 @@ Foam::autoPtr > Foam::DataEntry::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("DataEntry::New(Istream&)") - << "Unknown DataEntry type " << DataEntryType << " for DataEntry " - << entryName << ". Constructor not in hash table" << nl << nl - << " Valid DataEntry types are:" << nl + FatalErrorIn + ( + "DataEntry::New(Istream&)" + ) << "Unknown DataEntry type " + << DataEntryType << " for DataEntry " + << entryName << nl << nl + << "Valid DataEntry types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C index e81b6f021d..c503ba60f0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C @@ -35,12 +35,15 @@ Foam::DispersionModel::New CloudType& owner ) { - word DispersionModelType(dict.lookup("DispersionModel")); + const word modelType + ( + dict.lookup("DispersionModel") + ); - Info<< "Selecting DispersionModel " << DispersionModelType << endl; + Info<< "Selecting DispersionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(DispersionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +54,11 @@ Foam::DispersionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown DispersionModelType type " - << DispersionModelType - << ", constructor not in hash table" << nl << nl - << " Valid DispersionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown DispersionModel type " + << modelType << nl << nl + << "Valid DispersionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C index b7028737f6..429f60378c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C @@ -28,18 +28,22 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::autoPtr > Foam::DragModel::New +Foam::autoPtr > +Foam::DragModel::New ( const dictionary& dict, CloudType& owner ) { - word DragModelType(dict.lookup("DragModel")); + const word modelType + ( + dict.lookup("DragModel") + ); - Info<< "Selecting DragModel " << DragModelType << endl; + Info<< "Selecting DragModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(DragModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -50,10 +54,9 @@ Foam::autoPtr > Foam::DragModel::New "const dictionary&," "CloudType&" ")" - ) << "Unknown DragModelType type " - << DragModelType - << ", constructor not in hash table" << nl << nl - << " Valid DragModel types are:" << nl + ) << "Unknown DragModel type " + << modelType << nl << nl + << "Valid DragModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index f7436f5ada..52a64faa82 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -319,7 +319,7 @@ Foam::InjectionModel::InjectionModel Info<< " Constructing " << owner.mesh().nGeometricD() << "-D injection" << endl; - word parcelBasisType = coeffDict_.lookup("parcelBasisType"); + const word parcelBasisType = coeffDict_.lookup("parcelBasisType"); if (parcelBasisType == "mass") { parcelBasis_ = pbMass; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C index 6624718248..552a0cc67c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C @@ -35,12 +35,15 @@ Foam::InjectionModel::New CloudType& owner ) { - word InjectionModelType(dict.lookup("InjectionModel")); + const word modelType + ( + dict.lookup("InjectionModel") + ); - Info<< "Selecting InjectionModel " << InjectionModelType << endl; + Info<< "Selecting InjectionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(InjectionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,10 +54,9 @@ Foam::InjectionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown InjectionModelType type " - << InjectionModelType - << ", constructor not in hash table" << nl << nl - << " Valid InjectionModel types are:" << nl + ) << "Unknown InjectionModel type " + << modelType << nl << nl + << "Valid InjectionModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C index a894432e23..07751da5e0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C @@ -35,13 +35,15 @@ Foam::PatchInteractionModel::New CloudType& owner ) { - word PatchInteractionModelType(dict.lookup("PatchInteractionModel")); + const word modelType + ( + dict.lookup("PatchInteractionModel") + ); - Info<< "Selecting PatchInteractionModel " << PatchInteractionModelType - << endl; + Info<< "Selecting PatchInteractionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PatchInteractionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,11 +54,11 @@ Foam::PatchInteractionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown PatchInteractionModelType type " - << PatchInteractionModelType - << ", constructor not in hash table" << nl << nl - << " Valid PatchInteractionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown PatchInteractionModel type " + << modelType << nl << nl + << "Valid PatchInteractionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C index bde423cfc4..d4df99d7e8 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C @@ -35,12 +35,15 @@ Foam::PostProcessingModel::New CloudType& owner ) { - word PostProcessingModelType(dict.lookup("PostProcessingModel")); + const word modelType + ( + dict.lookup("PostProcessingModel") + ); - Info<< "Selecting PostProcessingModel " << PostProcessingModelType << endl; + Info<< "Selecting PostProcessingModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PostProcessingModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +54,11 @@ Foam::PostProcessingModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown PostProcessingModelType type " - << PostProcessingModelType - << ", constructor not in hash table" << nl << nl - << " Valid PostProcessingModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown PostProcessingModel type " + << modelType << nl << nl + << "Valid PostProcessingModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C index 97ced9e959..001972fcad 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C @@ -36,12 +36,15 @@ Foam::SurfaceFilmModel::New const dimensionedVector& g ) { - word SurfaceFilmModelType(dict.lookup("SurfaceFilmModel")); + const word modelType + ( + dict.lookup("SurfaceFilmModel") + ); - Info<< "Selecting SurfaceFilmModel " << SurfaceFilmModelType << endl; + Info<< "Selecting SurfaceFilmModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(SurfaceFilmModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -53,10 +56,10 @@ Foam::SurfaceFilmModel::New "CloudType&" ")" ) << "Unknown SurfaceFilmModel type " - << SurfaceFilmModelType - << ", constructor not in hash table" << nl << nl - << " Valid SurfaceFilmModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << modelType << nl << nl + << "Valid SurfaceFilmModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner, g)); diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C index fc3f5e8f06..8e08d54321 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C @@ -35,12 +35,15 @@ Foam::CompositionModel::New CloudType& owner ) { - word CompositionModelType(dict.lookup("CompositionModel")); + const word modelType + ( + dict.lookup("CompositionModel") + ); - Info<< "Selecting CompositionModel " << CompositionModelType << endl; + Info<< "Selecting CompositionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(CompositionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,10 +54,9 @@ Foam::CompositionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown CompositionModelType type " - << CompositionModelType - << ", constructor not in hash table" << nl << nl - << " Valid CompositionModel types are:" << nl + ) << "Unknown CompositionModel type " + << modelType << nl << nl + << "Valid CompositionModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C index 9f2fa34969..8b8987157d 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C @@ -35,12 +35,15 @@ Foam::PhaseChangeModel::New CloudType& owner ) { - word PhaseChangeModelType(dict.lookup("PhaseChangeModel")); + const word modelType + ( + dict.lookup("PhaseChangeModel") + ); - Info<< "Selecting PhaseChangeModel " << PhaseChangeModelType << endl; + Info<< "Selecting PhaseChangeModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PhaseChangeModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +54,11 @@ Foam::PhaseChangeModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown PhaseChangeModelType type " - << PhaseChangeModelType - << ", constructor not in hash table" << nl << nl - << " Valid PhaseChangeModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown PhaseChangeModel type " + << modelType << nl << nl + << "Valid PhaseChangeModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C index d5a24aecf6..0609c7b1b7 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C @@ -35,13 +35,15 @@ Foam::DevolatilisationModel::New CloudType& owner ) { - word DevolatilisationModelType(dict.lookup("DevolatilisationModel")); + const word modelType + ( + dict.lookup("DevolatilisationModel") + ); - Info<< "Selecting DevolatilisationModel " << DevolatilisationModelType - << endl; + Info<< "Selecting DevolatilisationModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(DevolatilisationModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,11 +54,11 @@ Foam::DevolatilisationModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown DevolatilisationModelType type " - << DevolatilisationModelType - << ", constructor not in hash table" << nl << nl - << " Valid DevolatilisationModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown DevolatilisationModel type " + << modelType << nl << nl + << "Valid DevolatilisationModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C index a5211728a7..caca8de814 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C @@ -35,13 +35,15 @@ Foam::SurfaceReactionModel::New CloudType& owner ) { - word SurfaceReactionModelType(dict.lookup("SurfaceReactionModel")); + const word modelType + ( + dict.lookup("SurfaceReactionModel") + ); - Info<< "Selecting SurfaceReactionModel " << SurfaceReactionModelType - << endl; + Info<< "Selecting SurfaceReactionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(SurfaceReactionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,11 +54,11 @@ Foam::SurfaceReactionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown SurfaceReactionModelType type " - << SurfaceReactionModelType - << ", constructor not in hash table" << nl << nl - << " Valid SurfaceReactionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown SurfaceReactionModel type " + << modelType << nl << nl + << "Valid SurfaceReactionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C index 3daef016a0..55719729b1 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C @@ -35,12 +35,15 @@ Foam::HeatTransferModel::New CloudType& owner ) { - word HeatTransferModelType(dict.lookup("HeatTransferModel")); + const word modelType + ( + dict.lookup("HeatTransferModel") + ); - Info<< "Selecting HeatTransferModel " << HeatTransferModelType << endl; + Info<< "Selecting HeatTransferModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(HeatTransferModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +54,11 @@ Foam::HeatTransferModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown HeatTransferModelType type " - << HeatTransferModelType - << ", constructor not in hash table" << nl << nl - << " Valid HeatTransferModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown HeatTransferModel type " + << modelType << nl << nl + << "Valid HeatTransferModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index b6d93b721d..b329a9a45a 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -64,9 +64,8 @@ void Foam::moleculeCloud::buildConstProps() forAll(idList, i) { - const word& id(idList[i]); - - const dictionary& molDict(moleculePropertiesDict.subDict(id)); + const word& id = idList[i]; + const dictionary& molDict = moleculePropertiesDict.subDict(id); List siteIdNames = molDict.lookup("siteIds"); @@ -1162,9 +1161,9 @@ void Foam::moleculeCloud::applyConstraintsAndThermostats void Foam::moleculeCloud::writeXYZ(const fileName& fName) const { - OFstream str(fName); + OFstream os(fName); - str << nSites() << nl << "moleculeCloud site positions in angstroms" << nl; + os << nSites() << nl << "moleculeCloud site positions in angstroms" << nl; forAllConstIter(moleculeCloud, *this, mol) { @@ -1174,7 +1173,7 @@ void Foam::moleculeCloud::writeXYZ(const fileName& fName) const { const point& sP = mol().sitePositions()[i]; - str << pot_.siteIdList()[cP.siteIds()[i]] + os << pot_.siteIdList()[cP.siteIds()[i]] << ' ' << sP.x()*1e10 << ' ' << sP.y()*1e10 << ' ' << sP.z()*1e10 diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C index c6348ccf55..66d8b4d636 100644 --- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C +++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C @@ -25,31 +25,28 @@ License #include "energyScalingFunction.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr energyScalingFunction::New +Foam::autoPtr +Foam::energyScalingFunction::New ( const word& name, const dictionary& energyScalingFunctionProperties, const pairPotential& pairPot ) { - word energyScalingFunctionTypeName + const word scalingType ( energyScalingFunctionProperties.lookup("energyScalingFunction") ); Info<< "Selecting energy scaling function " - << energyScalingFunctionTypeName << " for " + << scalingType << " for " << name << " potential energy." << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(energyScalingFunctionTypeName); + dictionaryConstructorTablePtr_->find(scalingType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -57,8 +54,8 @@ autoPtr energyScalingFunction::New ( "energyScalingFunction::New()" ) << "Unknown energyScalingFunction type " - << energyScalingFunctionTypeName << nl << nl - << "Valid energyScalingFunctions are: " << nl + << scalingType << nl << nl + << "Valid energyScalingFunctions are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -68,8 +65,4 @@ autoPtr energyScalingFunction::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C index 468c728777..acbec90e29 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C @@ -25,27 +25,27 @@ License #include "pairPotential.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr pairPotential::New +Foam::autoPtr +Foam::pairPotential::New ( const word& name, const dictionary& pairPotentialProperties ) { - word pairPotentialTypeName(pairPotentialProperties.lookup("pairPotential")); + const word potentialType + ( + pairPotentialProperties.lookup("pairPotential") + ); Info<< nl << "Selecting intermolecular pair potential " - << pairPotentialTypeName << " for " + << potentialType << " for " << name << " interaction." << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(pairPotentialTypeName); + dictionaryConstructorTablePtr_->find(potentialType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -53,8 +53,8 @@ autoPtr pairPotential::New ( "pairPotential::New()" ) << "Unknown pairPotential type " - << pairPotentialTypeName << nl << nl - << "Valid pairPotentials are: " << nl + << potentialType << nl << nl + << "Valid pairPotentials are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -64,8 +64,4 @@ autoPtr pairPotential::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.C b/src/lagrangian/molecularDynamics/potential/potential/potential.C index d84013236f..4b3475f66c 100644 --- a/src/lagrangian/molecularDynamics/potential/potential/potential.C +++ b/src/lagrangian/molecularDynamics/potential/potential/potential.C @@ -27,10 +27,9 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict) +void Foam::potential::setSiteIdList(const dictionary& moleculePropertiesDict) { DynamicList siteIdList; - DynamicList pairPotentialSiteIdList; forAll(idList_, i) @@ -39,7 +38,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict) if (!moleculePropertiesDict.found(id)) { - FatalErrorIn("potential::setSiteIdList(const IOdictionary&)") + FatalErrorIn("potential::setSiteIdList(const dictionary&)") << id << " molecule subDict not found" << nl << abort(FatalError); } @@ -66,7 +65,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict) if (findIndex(siteIdNames, siteId) == -1) { - FatalErrorIn("potential::setSiteIdList(const IOdictionary&)") + FatalErrorIn("potential::setSiteIdList(const dictionary&)") << siteId << " in pairPotentialSiteIds is not in siteIds: " << siteIdNames << nl << abort(FatalError); } @@ -112,21 +111,22 @@ void Foam::potential::potential::readPotentialDict() idList_ = List(idListDict.lookup("idList")); - IOdictionary moleculePropertiesDict + setSiteIdList ( - IOobject + IOdictionary ( - "moleculeProperties", - mesh_.time().constant(), - mesh_, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false + IOobject + ( + "moleculeProperties", + mesh_.time().constant(), + mesh_, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) ) ); - setSiteIdList(moleculePropertiesDict); - List pairPotentialSiteIdList ( SubList(siteIdList_, nPairPotIds_) diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.H b/src/lagrangian/molecularDynamics/potential/potential/potential.H index 8ea0043784..1ebf03a428 100644 --- a/src/lagrangian/molecularDynamics/potential/potential/potential.H +++ b/src/lagrangian/molecularDynamics/potential/potential/potential.H @@ -76,7 +76,7 @@ class potential // Private Member Functions - void setSiteIdList(const IOdictionary& moleculePropertiesDict); + void setSiteIdList(const dictionary& moleculePropertiesDict); void readPotentialDict(); diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C index 2950c4578d..917d2ad209 100644 --- a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C +++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C @@ -27,29 +27,24 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr tetherPotential::New +Foam::autoPtr +Foam::tetherPotential::New ( const word& name, const dictionary& tetherPotentialProperties ) { - word - tetherPotentialTypeName - ( - tetherPotentialProperties.lookup("tetherPotential") - ); + const word potentialType + ( + tetherPotentialProperties.lookup("tetherPotential") + ); Info<< nl << "Selecting tether potential " - << tetherPotentialTypeName << " for " + << potentialType << " for " << name << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(tetherPotentialTypeName); + dictionaryConstructorTablePtr_->find(potentialType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -57,8 +52,8 @@ autoPtr tetherPotential::New ( "tetherPotential::New()" ) << "Unknown tetherPotential type " - << tetherPotentialTypeName << nl << nl - << "Valid tetherPotentials are: " << nl + << potentialType << nl << nl + << "Valid tetherPotentials are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -68,8 +63,4 @@ autoPtr tetherPotential::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/mesh/blockMesh/curvedEdges/curvedEdge.C b/src/mesh/blockMesh/curvedEdges/curvedEdge.C index 85b2921fcc..84d2aa3460 100644 --- a/src/mesh/blockMesh/curvedEdges/curvedEdge.C +++ b/src/mesh/blockMesh/curvedEdges/curvedEdge.C @@ -74,7 +74,8 @@ Foam::autoPtr Foam::curvedEdge::clone() const } -Foam::autoPtr Foam::curvedEdge::New +Foam::autoPtr +Foam::curvedEdge::New ( const pointField& points, Istream& is @@ -87,7 +88,7 @@ Foam::autoPtr Foam::curvedEdge::New << endl; } - word edgeType(is); + const word edgeType(is); IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(edgeType); @@ -95,7 +96,8 @@ Foam::autoPtr Foam::curvedEdge::New if (cstrIter == IstreamConstructorTablePtr_->end()) { FatalErrorIn("curvedEdge::New(const pointField&, Istream&)") - << "Unknown curvedEdge type " << edgeType << endl << endl + << "Unknown curvedEdge type " + << edgeType << nl << nl << "Valid curvedEdge types are" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C index 18f6148270..54d8b2d895 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C @@ -127,7 +127,8 @@ Foam::coordinateRotation::coordinateRotation // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::coordinateRotation::New +Foam::autoPtr +Foam::coordinateRotation::New ( const dictionary& dict ) @@ -159,7 +160,8 @@ Foam::autoPtr Foam::coordinateRotation::New ( "coordinateRotation::New(const dictionary&)", dict - ) << "Unknown coordinateRotation type " << rotType << nl << nl + ) << "Unknown coordinateRotation type " + << rotType << nl << nl << "Valid coordinateRotation types are :" << nl << "[default: axes " << typeName_() << "]" << dictionaryConstructorTablePtr_->sortedToc() diff --git a/src/meshTools/coordinateSystems/coordinateSystemNew.C b/src/meshTools/coordinateSystems/coordinateSystemNew.C index 2ee1df3253..87af596881 100644 --- a/src/meshTools/coordinateSystems/coordinateSystemNew.C +++ b/src/meshTools/coordinateSystems/coordinateSystemNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::coordinateSystem::New +Foam::autoPtr +Foam::coordinateSystem::New ( const word& name, const dictionary& dict @@ -62,7 +63,8 @@ Foam::autoPtr Foam::coordinateSystem::New ( "coordinateSystem::New(const word&, const dictionary&)", dict - ) << "Unknown coordinateSystem type " << coordType << nl << nl + ) << "Unknown coordinateSystem type " + << coordType << nl << nl << "Valid coordinateSystem types are :" << nl << "[default: " << typeName_() << "]" << dictionaryConstructorTablePtr_->sortedToc() @@ -73,7 +75,8 @@ Foam::autoPtr Foam::coordinateSystem::New } -Foam::autoPtr Foam::coordinateSystem::New +Foam::autoPtr +Foam::coordinateSystem::New ( const word& coordType, const word& name, @@ -99,7 +102,8 @@ Foam::autoPtr Foam::coordinateSystem::New "coordinateSystem::New(const word&, const word&, " "const point&, const coordinateRotation&) : " "constructing coordinateSystem" - ) << "Unknown coordinateSystem type " << coordType << nl << nl + ) << "Unknown coordinateSystem type " + << coordType << nl << nl << "Valid coordinateSystem types are :" << nl << origRotationConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -109,7 +113,8 @@ Foam::autoPtr Foam::coordinateSystem::New } -Foam::autoPtr Foam::coordinateSystem::New +Foam::autoPtr +Foam::coordinateSystem::New ( Istream& is ) diff --git a/src/meshTools/searchableSurface/searchableSurface.C b/src/meshTools/searchableSurface/searchableSurface.C index 5d6f6eb7eb..8c2deab0c3 100644 --- a/src/meshTools/searchableSurface/searchableSurface.C +++ b/src/meshTools/searchableSurface/searchableSurface.C @@ -30,13 +30,16 @@ License namespace Foam { - -defineTypeNameAndDebug(searchableSurface, 0); -defineRunTimeSelectionTable(searchableSurface, dict); + defineTypeNameAndDebug(searchableSurface, 0); + defineRunTimeSelectionTable(searchableSurface, dict); +} -// Construct named object from dictionary -autoPtr searchableSurface::New +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +Foam::autoPtr +Foam::searchableSurface::New ( const word& searchableSurfaceType, const IOobject& io, @@ -78,7 +81,4 @@ Foam::searchableSurface::~searchableSurface() {} -} // End namespace Foam - - // ************************************************************************* // diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C index bddeca6e29..1830364750 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.C +++ b/src/meshTools/sets/topoSetSource/topoSetSource.C @@ -31,13 +31,43 @@ License namespace Foam { + defineTypeNameAndDebug(topoSetSource, 0); + defineRunTimeSelectionTable(topoSetSource, word); + defineRunTimeSelectionTable(topoSetSource, istream); +} -defineTypeNameAndDebug(topoSetSource, 0); -defineRunTimeSelectionTable(topoSetSource, word); -defineRunTimeSelectionTable(topoSetSource, istream); -// Construct named object from dictionary -autoPtr topoSetSource::New +Foam::HashTable* Foam::topoSetSource::usageTablePtr_ = NULL; + +template<> +const char* Foam::NamedEnum::names[] = +{ + "clear", + "new", + "invert", + "add", + "delete", + "subset", + "list", + "remove" +}; + + +const Foam::NamedEnum + Foam::topoSetSource::actionNames_; + + +const Foam::string Foam::topoSetSource::illegalSource_ +( + "Illegal topoSetSource name" +); + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::topoSetSource::New ( const word& topoSetSourceType, const polyMesh& mesh, @@ -65,8 +95,8 @@ autoPtr topoSetSource::New } -// Construct named object from Istream -autoPtr topoSetSource::New +Foam::autoPtr +Foam::topoSetSource::New ( const word& topoSetSourceType, const polyMesh& mesh, @@ -94,35 +124,6 @@ autoPtr topoSetSource::New } -} // End namespace Foam - - -Foam::HashTable* Foam::topoSetSource::usageTablePtr_ = NULL; - -template<> -const char* Foam::NamedEnum::names[] = -{ - "clear", - "new", - "invert", - "add", - "delete", - "subset", - "list", - "remove" -}; - - -const Foam::NamedEnum - Foam::topoSetSource::actionNames_; - - -const Foam::string Foam::topoSetSource::illegalSource_ -( - "Illegal topoSetSource name" -); - - Foam::Istream& Foam::topoSetSource::checkIs(Istream& is) { if (is.good() && !is.eof()) @@ -161,7 +162,6 @@ void Foam::topoSetSource::addOrDelete // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::topoSetSource::topoSetSource(const polyMesh& mesh) : mesh_(mesh) diff --git a/src/meshTools/sets/topoSets/topoSet.C b/src/meshTools/sets/topoSets/topoSet.C index c578771759..6e4bc3e885 100644 --- a/src/meshTools/sets/topoSets/topoSet.C +++ b/src/meshTools/sets/topoSets/topoSet.C @@ -29,21 +29,21 @@ License #include "boundBox.H" #include "Time.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(topoSet, 0); -defineRunTimeSelectionTable(topoSet, word); -defineRunTimeSelectionTable(topoSet, size); -defineRunTimeSelectionTable(topoSet, set); + defineTypeNameAndDebug(topoSet, 0); + defineRunTimeSelectionTable(topoSet, word); + defineRunTimeSelectionTable(topoSet, size); + defineRunTimeSelectionTable(topoSet, set); +} -// Construct named object from existing set. -autoPtr topoSet::New +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -73,8 +73,8 @@ autoPtr topoSet::New } -// Construct named object from size (non-existing set). -autoPtr topoSet::New +Foam::autoPtr +Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -104,8 +104,8 @@ autoPtr topoSet::New } -// Construct named object from existing set. -autoPtr topoSet::New +Foam::autoPtr +Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -135,7 +135,7 @@ autoPtr topoSet::New } -Foam::fileName topoSet::topoSet::localPath +Foam::fileName Foam::topoSet::topoSet::localPath ( const polyMesh& mesh, const word& name @@ -149,7 +149,7 @@ Foam::fileName topoSet::topoSet::localPath // Update stored cell numbers using map. // Do in two passes to prevent allocation if nothing changed. -void topoSet::topoSet::updateLabels(const labelList& map) +void Foam::topoSet::topoSet::updateLabels(const labelList& map) { // Iterate over map to see if anything changed bool changed = false; @@ -197,7 +197,7 @@ void topoSet::topoSet::updateLabels(const labelList& map) } -void topoSet::topoSet::check(const label maxLabel) +void Foam::topoSet::topoSet::check(const label maxLabel) { forAllConstIter(topoSet, *this, iter) { @@ -214,7 +214,7 @@ void topoSet::topoSet::check(const label maxLabel) // Write maxElem elements, starting at iter. Updates iter and elemI. -void topoSet::writeDebug +void Foam::topoSet::writeDebug ( Ostream& os, const label maxElem, @@ -239,7 +239,7 @@ void topoSet::writeDebug // Write maxElem elements, starting at iter. Updates iter and elemI. -void topoSet::writeDebug +void Foam::topoSet::writeDebug ( Ostream& os, const pointField& coords, @@ -264,7 +264,7 @@ void topoSet::writeDebug } -void topoSet::writeDebug +void Foam::topoSet::writeDebug ( Ostream& os, const pointField& coords, @@ -308,7 +308,7 @@ void topoSet::writeDebug // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -topoSet::topoSet(const IOobject& obj, const word& wantedType) +Foam::topoSet::topoSet(const IOobject& obj, const word& wantedType) : regIOobject(obj) { @@ -331,7 +331,7 @@ topoSet::topoSet(const IOobject& obj, const word& wantedType) } -topoSet::topoSet +Foam::topoSet::topoSet ( const polyMesh& mesh, const word& wantedType, @@ -378,7 +378,7 @@ topoSet::topoSet } -topoSet::topoSet +Foam::topoSet::topoSet ( const polyMesh& mesh, const word& name, @@ -408,7 +408,7 @@ topoSet::topoSet {} -topoSet::topoSet +Foam::topoSet::topoSet ( const polyMesh& mesh, const word& name, @@ -438,14 +438,14 @@ topoSet::topoSet {} -topoSet::topoSet(const IOobject& obj, const label size) +Foam::topoSet::topoSet(const IOobject& obj, const label size) : regIOobject(obj), labelHashSet(size) {} -topoSet::topoSet(const IOobject& obj, const labelHashSet& set) +Foam::topoSet::topoSet(const IOobject& obj, const labelHashSet& set) : regIOobject(obj), labelHashSet(set) @@ -455,13 +455,13 @@ topoSet::topoSet(const IOobject& obj, const labelHashSet& set) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -topoSet::~topoSet() +Foam::topoSet::~topoSet() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void topoSet::invert(const label maxLen) +void Foam::topoSet::invert(const label maxLen) { // Keep copy of current set. labelHashSet currentSet(*this); @@ -480,7 +480,7 @@ void topoSet::invert(const label maxLen) } -void topoSet::subset(const topoSet& set) +void Foam::topoSet::subset(const topoSet& set) { // Keep copy of current set. labelHashSet currentSet(*this); @@ -499,7 +499,7 @@ void topoSet::subset(const topoSet& set) } -void topoSet::addSet(const topoSet& set) +void Foam::topoSet::addSet(const topoSet& set) { forAllConstIter(topoSet, set, iter) { @@ -508,7 +508,7 @@ void topoSet::addSet(const topoSet& set) } -void topoSet::deleteSet(const topoSet& set) +void Foam::topoSet::deleteSet(const topoSet& set) { forAllConstIter(topoSet, set, iter) { @@ -517,13 +517,13 @@ void topoSet::deleteSet(const topoSet& set) } -void topoSet::sync(const polyMesh&) +void Foam::topoSet::sync(const polyMesh&) { notImplemented("topoSet::sync(const polyMesh&)"); } -void topoSet::writeDebug(Ostream& os, const label maxLen) const +void Foam::topoSet::writeDebug(Ostream& os, const label maxLen) const { label n = 0; @@ -554,7 +554,7 @@ void topoSet::writeDebug(Ostream& os, const label maxLen) const } -//void topoSet::writeDebug +//void Foam::topoSet::writeDebug //( // Ostream&, // const primitiveMesh&, @@ -568,13 +568,13 @@ void topoSet::writeDebug(Ostream& os, const label maxLen) const //} -bool topoSet::writeData(Ostream& os) const +bool Foam::topoSet::writeData(Ostream& os) const { return (os << *this).good(); } -void topoSet::updateMesh(const mapPolyMesh&) +void Foam::topoSet::updateMesh(const mapPolyMesh&) { notImplemented("topoSet::updateMesh(const mapPolyMesh&)"); } @@ -590,14 +590,10 @@ void topoSet::updateMesh(const mapPolyMesh&) // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -void topoSet::operator=(const topoSet& rhs) +void Foam::topoSet::operator=(const topoSet& rhs) { labelHashSet::operator=(rhs); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index 844272e98b..adc86641a8 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -42,18 +42,21 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::decompositionMethod::New +Foam::autoPtr +Foam::decompositionMethod::New ( const dictionary& decompositionDict ) { - word decompositionMethodTypeName(decompositionDict.lookup("method")); + const word methodType + ( + decompositionDict.lookup("method") + ); - Info<< "Selecting decompositionMethod " - << decompositionMethodTypeName << endl; + Info<< "Selecting decompositionMethod " << methodType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(decompositionMethodTypeName); + dictionaryConstructorTablePtr_->find(methodType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -62,7 +65,7 @@ Foam::autoPtr Foam::decompositionMethod::New "decompositionMethod::New" "(const dictionary& decompositionDict)" ) << "Unknown decompositionMethod " - << decompositionMethodTypeName << endl << endl + << methodType << nl << nl << "Valid decompositionMethods are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -72,19 +75,22 @@ Foam::autoPtr Foam::decompositionMethod::New } -Foam::autoPtr Foam::decompositionMethod::New +Foam::autoPtr +Foam::decompositionMethod::New ( const dictionary& decompositionDict, const polyMesh& mesh ) { - word decompositionMethodTypeName(decompositionDict.lookup("method")); + const word methodType + ( + decompositionDict.lookup("method") + ); - Info<< "Selecting decompositionMethod " - << decompositionMethodTypeName << endl; + Info<< "Selecting decompositionMethod " << methodType << endl; dictionaryMeshConstructorTable::iterator cstrIter = - dictionaryMeshConstructorTablePtr_->find(decompositionMethodTypeName); + dictionaryMeshConstructorTablePtr_->find(methodType); if (cstrIter == dictionaryMeshConstructorTablePtr_->end()) { @@ -94,7 +100,7 @@ Foam::autoPtr Foam::decompositionMethod::New "(const dictionary& decompositionDict, " "const polyMesh& mesh)" ) << "Unknown decompositionMethod " - << decompositionMethodTypeName << endl << endl + << methodType << nl << nl << "Valid decompositionMethods are : " << endl << dictionaryMeshConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C b/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C index 1c3619a17e..98f8081608 100644 --- a/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C +++ b/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C @@ -53,7 +53,7 @@ namespace Foam void Foam::hierarchGeomDecomp::setDecompOrder() { - word order(geomDecomDict_.lookup("order")); + const word order(geomDecomDict_.lookup("order")); if (order.size() != 3) { diff --git a/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C index e95a314581..ef2930b759 100644 --- a/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C +++ b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::calcType::New +Foam::autoPtr +Foam::calcType::New ( const word& calcTypeName ) @@ -40,9 +41,8 @@ Foam::autoPtr Foam::calcType::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("calcType::New()") - << " unknown calcType type " << calcTypeName - << ", constructor not in hash table" << nl << nl - << " Valid calcType selections are: " << nl + << "Unknown calcType type " << calcTypeName + << "Valid calcType selections are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << abort(FatalError); } diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C index 37a60039f6..19d639eaf2 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C @@ -30,17 +30,16 @@ License Foam::autoPtr Foam::sixDoFRigidBodyMotionConstraint::New(const dictionary& sDoFRBMCDict) { - word sixDoFRigidBodyMotionConstraintTypeName = - sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint"); + const word constraintType + ( + sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint") + ); // Info<< "Selecting sixDoFRigidBodyMotionConstraint function " - // << sixDoFRigidBodyMotionConstraintTypeName << endl; + // << constraintType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find - ( - sixDoFRigidBodyMotionConstraintTypeName - ); + dictionaryConstructorTablePtr_->find(constraintType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,8 +50,8 @@ Foam::sixDoFRigidBodyMotionConstraint::New(const dictionary& sDoFRBMCDict) "const dictionary& sDoFRBMCDict" ")" ) << "Unknown sixDoFRigidBodyMotionConstraint type " - << sixDoFRigidBodyMotionConstraintTypeName << endl << endl - << "Valid sixDoFRigidBodyMotionConstraints are : " << endl + << constraintType << nl << nl + << "Valid sixDoFRigidBodyMotionConstraints are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C index 71eb61ea3b..05b575e946 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C @@ -30,17 +30,16 @@ License Foam::autoPtr Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict) { - word sixDoFRigidBodyMotionRestraintTypeName = - sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint"); + const word restraintType + ( + sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint") + ); // Info<< "Selecting sixDoFRigidBodyMotionRestraint function " - // << sixDoFRigidBodyMotionRestraintTypeName << endl; + // << restraintType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find - ( - sixDoFRigidBodyMotionRestraintTypeName - ); + dictionaryConstructorTablePtr_->find(restraintType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,8 +50,8 @@ Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict) "const dictionary& sDoFRBMRDict" ")" ) << "Unknown sixDoFRigidBodyMotionRestraint type " - << sixDoFRigidBodyMotionRestraintTypeName << endl << endl - << "Valid sixDoFRigidBodyMotionRestraints are : " << endl + << restraintType << nl << nl + << "Valid sixDoFRigidBodyMotionRestraint types are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C index 285eb7ac10..d24ac8d366 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C @@ -193,7 +193,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read moment_ = interpolationTable(sDoFRBMRCoeffs_); - word angleFormat = sDoFRBMRCoeffs_.lookup("angleFormat"); + const word angleFormat = sDoFRBMRCoeffs_.lookup("angleFormat"); if (angleFormat == "degrees" || angleFormat == "degree") { @@ -210,7 +210,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read "Foam::sixDoFRigidBodyMotionRestraints::" "tabulatedAxialAngularSpring::read" "(" - "const dictionary& sDoFRBMCDict" + "const dictionary&" ")" ) << "angleFormat must be degree, degrees, radian or radians" diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C index 152016b7a3..fa867d813f 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.C +++ b/src/sampling/sampledSet/sampledSet/sampledSet.C @@ -406,7 +406,8 @@ Foam::sampledSet::~sampledSet() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::sampledSet::New +Foam::autoPtr +Foam::sampledSet::New ( const word& name, const polyMesh& mesh, @@ -414,7 +415,10 @@ Foam::autoPtr Foam::sampledSet::New const dictionary& dict ) { - word sampleType(dict.lookup("type")); + const word sampleType + ( + dict.lookup("type") + ); wordConstructorTable::iterator cstrIter = wordConstructorTablePtr_->find(sampleType); @@ -423,10 +427,10 @@ Foam::autoPtr Foam::sampledSet::New { FatalErrorIn ( - "sampledSet::New(const word&, " - "const polyMesh&, meshSearch&, const dictionary&)" - ) << "Unknown sample type " << sampleType - << endl << endl + "sampledSet::New" + "(const word&, const polyMesh&, meshSearch&, const dictionary&)" + ) << "Unknown sample type " + << sampleType << nl << nl << "Valid sample types : " << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/sampling/sampledSet/writers/writer.C b/src/sampling/sampledSet/writers/writer.C index e4a4b5f032..5accc37a0d 100644 --- a/src/sampling/sampledSet/writers/writer.C +++ b/src/sampling/sampledSet/writers/writer.C @@ -31,7 +31,8 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // template -Foam::autoPtr > Foam::writer::New +Foam::autoPtr< Foam::writer > +Foam::writer::New ( const word& writeType ) @@ -45,8 +46,8 @@ Foam::autoPtr > Foam::writer::New FatalErrorIn ( "writer::New(const word&)" - ) << "Unknown write type " << writeType - << endl << endl + ) << "Unknown write type " + << writeType << nl << nl << "Valid write types : " << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index 21e6ac7e96..8422825104 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -122,7 +122,10 @@ Foam::sampledSurface::New const dictionary& dict ) { - word sampleType(dict.lookup("type")); + const word sampleType + ( + dict.lookup("type") + ); if (debug) { Info<< "Selecting sampledType " << sampleType << endl; @@ -137,8 +140,8 @@ Foam::sampledSurface::New ( "sampledSurface::New" "(const word&, const polyMesh&, const dictionary&)" - ) << "Unknown sample type " << sampleType - << endl << endl + ) << "Unknown sample type " + << sampleType << nl << nl << "Valid sample types : " << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C index 7bddebcc8e..ff382bb6c3 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C @@ -34,7 +34,10 @@ Foam::surfaceFilmModels::injectionModel::New const dictionary& dict ) { - word modelType(dict.lookup("injectionModel")); + const word modelType + ( + dict.lookup("injectionModel") + ); Info<< " Selecting injectionModel " << modelType << endl; diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C index 7cc04c0027..4ac8687971 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C @@ -34,7 +34,10 @@ Foam::surfaceFilmModels::phaseChangeModel::New const dictionary& dict ) { - word modelType(dict.lookup("phaseChangeModel")); + const word modelType + ( + dict.lookup("phaseChangeModel") + ); Info<< " Selecting phaseChangeModel " << modelType << endl; diff --git a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C index fb9d7e3bb6..78ac50b30f 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C +++ b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C @@ -36,10 +36,10 @@ Foam::surfaceFilmModels::surfaceFilmModel::New const dimensionedVector& g ) { - word modelType; - - { - IOdictionary surfaceFilmPropertiesDict + // get model name, but do not register the dictionary + const word modelType + ( + IOdictionary ( IOobject ( @@ -50,10 +50,8 @@ Foam::surfaceFilmModels::surfaceFilmModel::New IOobject::NO_WRITE, false ) - ); - - surfaceFilmPropertiesDict.lookup("surfaceFilmModel") >> modelType; - } + ).lookup("surfaceFilmModel") + ); Info<< "Selecting surfaceFilmModel " << modelType << endl; diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C index 9d323327b8..bf22d0cb73 100644 --- a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C +++ b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C @@ -35,16 +35,15 @@ Foam::barotropicCompressibilityModel::New const word& psiName ) { - word bcModelTypeName + const word modelType ( compressibilityProperties.lookup("barotropicCompressibilityModel") ); - Info<< "Selecting compressibility model " - << bcModelTypeName << endl; + Info<< "Selecting compressibility model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(bcModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,8 +51,8 @@ Foam::barotropicCompressibilityModel::New ( "barotropicCompressibilityModel::New(const volScalarField&)" ) << "Unknown barotropicCompressibilityModel type " - << bcModelTypeName << endl << endl - << "Valid barotropicCompressibilityModels are : " << endl + << modelType << nl << nl + << "Valid barotropicCompressibilityModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C index 4fe563c9e6..81013626c8 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C +++ b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C @@ -27,18 +27,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::basicPsiThermo::New +Foam::autoPtr +Foam::basicPsiThermo::New ( const fvMesh& mesh ) { - word thermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -46,22 +45,21 @@ Foam::autoPtr Foam::basicPsiThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> thermoTypeName; - } - - Info<< "Selecting thermodynamics package " << thermoTypeName << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(thermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("basicPsiThermo::New(const fvMesh&)") - << "Unknown basicPsiThermo type " << thermoTypeName << nl << nl + << "Unknown basicPsiThermo type " << modelType << nl << nl << "Valid basicPsiThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C index 101f05d4fe..19ec52d434 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C @@ -27,18 +27,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::basicRhoThermo::New +Foam::autoPtr +Foam::basicRhoThermo::New ( const fvMesh& mesh ) { - word thermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -46,22 +45,22 @@ Foam::autoPtr Foam::basicRhoThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> thermoTypeName; - } - - Info<< "Selecting thermodynamics package " << thermoTypeName << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(thermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("basicRhoThermo::New(const fvMesh&)") - << "Unknown basicRhoThermo type " << thermoTypeName << nl << nl + << "Unknown basicRhoThermo type " + << modelType << nl << nl << "Valid basicRhoThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C index 85784a6ad5..8ba8a2b7e3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C @@ -27,20 +27,17 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::psiChemistryModel::New +Foam::autoPtr +Foam::psiChemistryModel::New ( const fvMesh& mesh ) { - word psiChemistryModelType; - word thermoTypeName; - word userModel; - - // Enclose the creation of the chemistrtyProperties to ensure it is - // deleted before the chemistrtyProperties is created otherwise the - // dictionary is entered in the database twice - { - IOdictionary chemistryPropertiesDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word userModel + ( + IOdictionary ( IOobject ( @@ -48,27 +45,26 @@ Foam::autoPtr Foam::psiChemistryModel::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("psiChemistryModel") + ); - chemistryPropertiesDict.lookup("psiChemistryModel") >> userModel; + // construct chemistry model type name by inserting first template argument + const label tempOpen = userModel.find('<'); + const label tempClose = userModel.find('>'); - // construct chemistry model type name by inserting first template - // argument - label tempOpen = userModel.find('<'); - label tempClose = userModel.find('>'); + const word className = userModel(0, tempOpen); + const word thermoTypeName = + userModel(tempOpen + 1, tempClose - tempOpen - 1); - word className = userModel(0, tempOpen); - thermoTypeName = userModel(tempOpen + 1, tempClose - tempOpen - 1); - - psiChemistryModelType = - className + '<' + typeName + ',' + thermoTypeName + '>'; - } + const word modelType = + className + '<' + typeName + ',' + thermoTypeName + '>'; if (debug) { - Info<< "Selecting psiChemistryModel " << psiChemistryModelType << endl; + Info<< "Selecting psiChemistryModel " << modelType << endl; } else { @@ -76,16 +72,18 @@ Foam::autoPtr Foam::psiChemistryModel::New } fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(psiChemistryModelType); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { if (debug) { FatalErrorIn("psiChemistryModelBase::New(const mesh&)") - << "Unknown psiChemistryModel type " << psiChemistryModelType - << nl << nl << "Valid psiChemistryModel types are:" << nl - << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); + << "Unknown psiChemistryModel type " + << modelType << nl << nl + << "Valid psiChemistryModel types are:" << nl + << fvMeshConstructorTablePtr_->sortedToc() << nl + << exit(FatalError); } else { diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C index 6f3b6c4b7c..049549a2e3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C @@ -27,20 +27,17 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::rhoChemistryModel::New +Foam::autoPtr +Foam::rhoChemistryModel::New ( const fvMesh& mesh ) { - word rhoChemistryModelType; - word thermoTypeName; - word userModel; - - // Enclose the creation of the chemistrtyProperties to ensure it is - // deleted before the chemistrtyProperties is created otherwise the - // dictionary is entered in the database twice - { - IOdictionary chemistryPropertiesDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word userModel + ( + IOdictionary ( IOobject ( @@ -48,27 +45,26 @@ Foam::autoPtr Foam::rhoChemistryModel::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("rhoChemistryModel") + ); - chemistryPropertiesDict.lookup("rhoChemistryModel") >> userModel; + // construct chemistry model type name by inserting first template argument + const label tempOpen = userModel.find('<'); + const label tempClose = userModel.find('>'); - // construct chemistry model type name by inserting first template - // argument - label tempOpen = userModel.find('<'); - label tempClose = userModel.find('>'); + const word className = userModel(0, tempOpen); + const word thermoTypeName = + userModel(tempOpen + 1, tempClose - tempOpen - 1); - word className = userModel(0, tempOpen); - thermoTypeName = userModel(tempOpen + 1, tempClose - tempOpen - 1); - - rhoChemistryModelType = - className + '<' + typeName + ',' + thermoTypeName + '>'; - } + const word modelType = + className + '<' + typeName + ',' + thermoTypeName + '>'; if (debug) { - Info<< "Selecting rhoChemistryModel " << rhoChemistryModelType << endl; + Info<< "Selecting rhoChemistryModel " << modelType << endl; } else { @@ -76,16 +72,18 @@ Foam::autoPtr Foam::rhoChemistryModel::New } fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(rhoChemistryModelType); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { if (debug) { FatalErrorIn("rhoChemistryModelBase::New(const mesh&)") - << "Unknown rhoChemistryModel type " << rhoChemistryModelType - << nl << nl << "Valid rhoChemistryModel types are:" << nl - << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); + << "Unknown rhoChemistryModel type " + << modelType << nl << nl + << "Valid rhoChemistryModel types are:" << nl + << fvMeshConstructorTablePtr_->sortedToc() << nl + << exit(FatalError); } else { @@ -96,9 +94,11 @@ Foam::autoPtr Foam::rhoChemistryModel::New } FatalErrorIn("rhoChemistryModelBase::New(const mesh&)") - << "Unknown rhoChemistryModel type " << userModel - << nl << nl << "Valid rhoChemistryModel types are:" << nl - << models << nl << exit(FatalError); + << "Unknown rhoChemistryModel type " + << userModel << nl << nl + << "Valid rhoChemistryModel types are:" << nl + << models << nl + << exit(FatalError); } } diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C index 44551e14cd..38c7f9d8a8 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C @@ -25,9 +25,6 @@ License #include "chemistrySolver.H" -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -49,8 +46,4 @@ Foam::chemistrySolver::~chemistrySolver() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C index f7d7a36a39..625c5b3b69 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C @@ -36,9 +36,12 @@ Foam::chemistrySolver::New const word& thermoTypeName ) { - word modelName(model.lookup("chemistrySolver")); + const word modelName + ( + model.lookup("chemistrySolver") + ); - word chemistrySolverType = + const word chemistrySolverType = modelName + '<' + compTypeName + ',' + thermoTypeName + '>'; Info<< "Selecting chemistrySolver " << modelName << endl; @@ -66,8 +69,9 @@ Foam::chemistrySolver::New "const word&, " "const word&" ")" - ) << "Unknown chemistrySolver type " << modelName - << nl << nl << "Valid chemistrySolver types are:" << nl + ) << "Unknown chemistrySolver type " + << modelName << nl << nl + << "Valid chemistrySolver types are:" << nl << models << nl << exit(FatalError); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C index 4ed4165d0a..990f84d591 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -27,12 +27,14 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::laminarFlameSpeed::New +Foam::autoPtr +Foam::laminarFlameSpeed::New ( const hhuCombustionThermo& ct ) { - IOdictionary laminarFlameSpeedDict + // do not register the dictionary + IOdictionary propDict ( IOobject ( @@ -45,9 +47,9 @@ Foam::autoPtr Foam::laminarFlameSpeed::New ) ); - word laminarFlameSpeedType + const word laminarFlameSpeedType ( - laminarFlameSpeedDict.lookup("laminarFlameSpeedCorrelation") + propDict.lookup("laminarFlameSpeedCorrelation") ); Info<< "Selecting laminar flame speed correlation " @@ -61,15 +63,15 @@ Foam::autoPtr Foam::laminarFlameSpeed::New FatalIOErrorIn ( "laminarFlameSpeed::New(const hhuCombustionThermo&)", - laminarFlameSpeedDict + propDict ) << "Unknown laminarFlameSpeed type " - << laminarFlameSpeedType << endl << endl + << laminarFlameSpeedType << nl << nl << "Valid laminarFlameSpeed types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } - return autoPtr(cstrIter()(laminarFlameSpeedDict, ct)); + return autoPtr(cstrIter()(propDict, ct)); } diff --git a/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C b/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C index 19b88994d6..c3d7ded785 100644 --- a/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C +++ b/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C @@ -73,7 +73,8 @@ Foam::liquidMixture::liquidMixture // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::liquidMixture::New +Foam::autoPtr +Foam::liquidMixture::New ( const dictionary& thermophysicalProperties ) diff --git a/src/thermophysicalModels/liquids/liquid/liquid.C b/src/thermophysicalModels/liquids/liquid/liquid.C index 6d84424375..2d9b234859 100644 --- a/src/thermophysicalModels/liquids/liquid/liquid.C +++ b/src/thermophysicalModels/liquids/liquid/liquid.C @@ -39,7 +39,8 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr Foam::liquid::New(Istream& is) +Foam::autoPtr +Foam::liquid::New(Istream& is) { if (debug) { @@ -48,9 +49,8 @@ Foam::autoPtr Foam::liquid::New(Istream& is) << endl; } - word liquidType(is); - - word coeffs(is); + const word liquidType(is); + const word coeffs(is); if (coeffs == "defaultCoeffs") { @@ -60,8 +60,8 @@ Foam::autoPtr Foam::liquid::New(Istream& is) if (cstrIter == ConstructorTablePtr_->end()) { FatalErrorIn("liquid::New(Istream&)") - << "Unknown liquid type " << liquidType - << nl << nl + << "Unknown liquid type " + << liquidType << nl << nl << "Valid liquid types are:" << nl << ConstructorTablePtr_->sortedToc() << abort(FatalError); @@ -77,8 +77,8 @@ Foam::autoPtr Foam::liquid::New(Istream& is) if (cstrIter == IstreamConstructorTablePtr_->end()) { FatalErrorIn("liquid::New(Istream&)") - << "Unknown liquid type " << liquidType - << endl << endl + << "Unknown liquid type " + << liquidType << nl << nl << "Valid liquid types are:" << nl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); diff --git a/src/thermophysicalModels/pdfs/pdf/pdfNew.C b/src/thermophysicalModels/pdfs/pdf/pdfNew.C index 0ba75a59f0..ca7b5c3e63 100644 --- a/src/thermophysicalModels/pdfs/pdf/pdfNew.C +++ b/src/thermophysicalModels/pdfs/pdf/pdfNew.C @@ -27,23 +27,27 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::pdfs::pdf::New +Foam::autoPtr +Foam::pdfs::pdf::New ( const dictionary& dict, Random& rndGen ) { - word pdfType(dict.lookup("pdfType")); + const word modelType + ( + dict.lookup("pdfType") + ); - Info<< "Selecting pdfType " << pdfType << endl; + Info<< "Selecting pdfType " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(pdfType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("pdfs::pdf::New(const dictionary&, Random&)") - << "unknown pdf type " << pdfType << nl << nl + << "Unknown pdf type " << modelType << nl << nl << "Valid pdf types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C index b179864876..1437b9195d 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C @@ -26,26 +26,18 @@ License #include "error.H" #include "radiationModel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace radiation -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr radiationModel::New +Foam::autoPtr +Foam::radiation::radiationModel::New ( const volScalarField& T ) { - word radiationModelTypeName; - - // Note: no need to register/keep radiationProperties since models read - // it themselves. - { - IOdictionary radiationPropertiesDict + // get model name, but do not register the dictionary + const word modelType + ( + IOdictionary ( IOobject ( @@ -56,24 +48,21 @@ autoPtr radiationModel::New IOobject::NO_WRITE, false ) - ); + ).lookup("radiationModel") + ); - radiationPropertiesDict.lookup("radiationModel") - >> radiationModelTypeName; - } - - Info<< "Selecting radiationModel " << radiationModelTypeName << endl; + Info<< "Selecting radiationModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(radiationModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "radiationModel::New(const volScalarField&)" - ) << "Unknown radiationModel type " << radiationModelTypeName - << nl << nl + ) << "Unknown radiationModel type " + << modelType << nl << nl << "Valid radiationModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -83,9 +72,4 @@ autoPtr radiationModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End radiation -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C index 65ea51c018..827c9f2a62 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C @@ -35,23 +35,24 @@ Foam::radiation::absorptionEmissionModel::New const fvMesh& mesh ) { - word absorptionEmissionModelType(dict.lookup("absorptionEmissionModel")); + const word modelType + ( + dict.lookup("absorptionEmissionModel") + ); - Info<< "Selecting absorptionEmissionModel " - << absorptionEmissionModelType << endl; + Info<< "Selecting absorptionEmissionModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(absorptionEmissionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "absorptionEmissionModel::New(const dictionary&, const fvMesh&)" - ) << "Unknown absorptionEmissionModelType type " - << absorptionEmissionModelType - << ", constructor not in hash table" << nl << nl - << " Valid absorptionEmissionModel types are :" << nl + ) << "Unknown absorptionEmissionModel type " + << modelType << nl << nl + << "Valid absorptionEmissionModel types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C index 64d4bb567b..83ddcb58c2 100644 --- a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C @@ -28,28 +28,31 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr Foam::radiation::scatterModel::New +Foam::autoPtr +Foam::radiation::scatterModel::New ( const dictionary& dict, const fvMesh& mesh ) { - word scatterModelType(dict.lookup("scatterModel")); + const word modelType + ( + dict.lookup("scatterModel") + ); - Info<< "Selecting scatterModel " << scatterModelType << endl; + Info<< "Selecting scatterModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(scatterModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "scatterModel::New(const dictionary&, const fvMesh&)" - ) << "Unknown scatterModelType type " - << scatterModelType - << ", constructor not in hash table" << nl << nl - << " Valid scatterModel types are :" << nl + ) << "Unknown scatterModel type " + << modelType << nl << nl + << "Valid scatterModel types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C index 14733bf69f..fca68606a0 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C @@ -35,7 +35,7 @@ Foam::chemistryReader::New ) { // Let the chemistry reader type default to CHEMKIN - // for backward compatability + // for backward compatibility word chemistryReaderTypeName("chemkinReader"); // otherwise use the specified reader @@ -53,7 +53,7 @@ Foam::chemistryReader::New "chemistryReader::New(const dictionary& thermoDict)" ) << "Unknown chemistryReader type " << chemistryReaderTypeName << nl << nl - << "Valid chemistryReaders are: " << nl + << "Valid chemistryReader types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C index b19ab43654..309d4d2702 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hCombustionThermo::New +Foam::autoPtr +Foam::hCombustionThermo::New ( const fvMesh& mesh ) { - word hCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -47,24 +46,22 @@ Foam::autoPtr Foam::hCombustionThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hCombustionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " << hCombustionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hCombustionThermo::New(const fvMesh&)") << "Unknown hCombustionThermo type " - << hCombustionThermoTypeName << nl << nl + << modelType << nl << nl << "Valid hCombustionThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); @@ -74,19 +71,18 @@ Foam::autoPtr Foam::hCombustionThermo::New } -Foam::autoPtr Foam::hCombustionThermo::NewType +Foam::autoPtr +Foam::hCombustionThermo::NewType ( const fvMesh& mesh, const word& thermoType ) { - word hCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -94,50 +90,55 @@ Foam::autoPtr Foam::hCombustionThermo::NewType mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hCombustionThermoTypeName; - if (hCombustionThermoTypeName.find(thermoType) == string::npos) + if (modelType.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); + DynamicList validModels; + forAll(allModels, i) { - wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); - DynamicList validModels; - forAll(allModels, i) + if (allModels[i].find(thermoType) != string::npos) { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } + validModels.append(allModels[i]); } - - FatalErrorIn - ( - "autoPtr hCombustionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << hCombustionThermoTypeName << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); } + + FatalErrorIn + ( + "autoPtr hCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << modelType << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); } - Info<< "Selecting thermodynamics package " << hCombustionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hCombustionThermo::New(const fvMesh&)") - << "Unknown hCombustionThermo type " - << hCombustionThermoTypeName << nl << nl + FatalErrorIn + ( + "autoPtr hCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Unknown hCombustionThermo type " + << modelType << nl << nl << "Valid hCombustionThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C index 8353ee1a2d..805f44449a 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C @@ -28,20 +28,14 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam +Foam::autoPtr +Foam::hhuCombustionThermo::New(const fvMesh& mesh) { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr hhuCombustionThermo::New(const fvMesh& mesh) -{ - word hhuCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -49,24 +43,22 @@ autoPtr hhuCombustionThermo::New(const fvMesh& mesh) mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hhuCombustionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " - << hhuCombustionThermoTypeName << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hhuCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hhuCombustionThermo::New(const fvMesh&)") << "Unknown hhuCombustionThermo type " - << hhuCombustionThermoTypeName << endl << endl + << modelType << nl << nl << "Valid hhuCombustionThermo types are :" << endl << fvMeshConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -76,8 +68,4 @@ autoPtr hhuCombustionThermo::New(const fvMesh& mesh) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C index eae3805982..c7b94d1ace 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hsCombustionThermo::New +Foam::autoPtr +Foam::hsCombustionThermo::New ( const fvMesh& mesh ) { - word hsCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -47,25 +46,23 @@ Foam::autoPtr Foam::hsCombustionThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hsCombustionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " << hsCombustionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hsCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hsCombustionThermo::New(const fvMesh&)") << "Unknown hsCombustionThermo type " - << hsCombustionThermoTypeName << nl << nl - << "Valid hsCombustionThermo types are:" << nl + << modelType << nl << nl + << "Valid hsCombustionThermo types:" << nl << fvMeshConstructorTablePtr_->toc() << nl << exit(FatalError); } @@ -74,19 +71,18 @@ Foam::autoPtr Foam::hsCombustionThermo::New } -Foam::autoPtr Foam::hsCombustionThermo::NewType +Foam::autoPtr +Foam::hsCombustionThermo::NewType ( const fvMesh& mesh, const word& thermoType ) { - word hsCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -94,50 +90,54 @@ Foam::autoPtr Foam::hsCombustionThermo::NewType mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hsCombustionThermoTypeName; - - if (hsCombustionThermoTypeName.find(thermoType) == string::npos) + if (modelType.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->toc(); + DynamicList validModels; + forAll(allModels, i) { - wordList allModels = fvMeshConstructorTablePtr_->toc(); - DynamicList validModels; - forAll(allModels, i) + if (allModels[i].find(thermoType) != string::npos) { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } + validModels.append(allModels[i]); } - - FatalErrorIn - ( - "autoPtr hsCombustionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << hsCombustionThermoTypeName << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); } + + FatalErrorIn + ( + "autoPtr hsCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << modelType << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); } - Info<< "Selecting thermodynamics package " << hsCombustionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hsCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hsCombustionThermo::New(const fvMesh&)") - << "Unknown hsCombustionThermo type " - << hsCombustionThermoTypeName << nl << nl + FatalErrorIn + ( + "autoPtr hsCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Unknown hsCombustionThermo type " + << modelType << nl << nl << "Valid hsCombustionThermo types are:" << nl << fvMeshConstructorTablePtr_->toc() << nl << exit(FatalError); diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C index 64808fb72b..6afa8d33e6 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hReactionThermo::New +Foam::autoPtr +Foam::hReactionThermo::New ( const fvMesh& mesh ) { - word hReactionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -47,25 +46,23 @@ Foam::autoPtr Foam::hReactionThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hReactionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " << hReactionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hReactionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hReactionThermo::New(const fvMesh&)") << "Unknown hReactionThermo type " - << hReactionThermoTypeName << nl << nl - << "Valid hReactionThermo types are:" << nl + << modelType << nl << nl + << "Valid hReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } @@ -74,19 +71,18 @@ Foam::autoPtr Foam::hReactionThermo::New } -Foam::autoPtr Foam::hReactionThermo::NewType +Foam::autoPtr +Foam::hReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType ) { - word hReactionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -94,51 +90,55 @@ Foam::autoPtr Foam::hReactionThermo::NewType mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hReactionThermoTypeName; - - if (hReactionThermoTypeName.find(thermoType) == string::npos) + if (modelType.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); + DynamicList validModels; + forAll(allModels, i) { - wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); - DynamicList validModels; - forAll(allModels, i) + if (allModels[i].find(thermoType) != string::npos) { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } + validModels.append(allModels[i]); } - - FatalErrorIn - ( - "autoPtr hReactionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << hReactionThermoTypeName << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); } + + FatalErrorIn + ( + "autoPtr hReactionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << modelType << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); } - Info<< "Selecting thermodynamics package " << hReactionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hReactionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hReactionThermo::New(const fvMesh&)") - << "Unknown hReactionThermo type " - << hReactionThermoTypeName << nl << nl - << "Valid hReactionThermo types are:" << nl + FatalErrorIn + ( + "autoPtr hReactionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Unknown hReactionThermo type " + << modelType << nl << nl + << "Valid hReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C index e834777291..f8518cd45f 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hsReactionThermo::New +Foam::autoPtr +Foam::hsReactionThermo::New ( const fvMesh& mesh ) { - word hsReactionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -47,25 +46,23 @@ Foam::autoPtr Foam::hsReactionThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hsReactionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " << hsReactionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hsReactionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hsReactionThermo::New(const fvMesh&)") << "Unknown hsReactionThermo type " - << hsReactionThermoTypeName << nl << nl - << "Valid hsReactionThermo types are:" << nl + << modelType << nl << nl + << "Valid hsReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } @@ -74,19 +71,18 @@ Foam::autoPtr Foam::hsReactionThermo::New } -Foam::autoPtr Foam::hsReactionThermo::NewType +Foam::autoPtr +Foam::hsReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType ) { - word hsReactionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -94,51 +90,51 @@ Foam::autoPtr Foam::hsReactionThermo::NewType mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hsReactionThermoTypeName; + Info<< "Selecting thermodynamics package " << modelType << endl; - if (hsReactionThermoTypeName.find(thermoType) == string::npos) + if (modelType.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); + DynamicList validModels; + forAll(allModels, i) { - wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); - DynamicList validModels; - forAll(allModels, i) + if (allModels[i].find(thermoType) != string::npos) { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } + validModels.append(allModels[i]); } - - FatalErrorIn - ( - "autoPtr hsReactionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << hsReactionThermoTypeName << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); } + + FatalErrorIn + ( + "autoPtr hsReactionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << modelType << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); } - Info<< "Selecting thermodynamics package " << hsReactionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hsReactionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hsReactionThermo::New(const fvMesh&)") << "Unknown hsReactionThermo type " - << hsReactionThermoTypeName << nl << nl - << "Valid hsReactionThermo types are:" << nl + << modelType << nl << nl + << "Valid hsReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C index ab62e053bb..a69ddb4bf3 100644 --- a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C +++ b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C @@ -27,7 +27,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::solidMixture::solidMixture ( const dictionary& thermophysicalProperties @@ -50,7 +49,8 @@ Foam::solidMixture::solidMixture // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::solidMixture::New +Foam::autoPtr +Foam::solidMixture::New ( const dictionary& thermophysicalProperties ) diff --git a/src/thermophysicalModels/solids/solid/solidNew.C b/src/thermophysicalModels/solids/solid/solidNew.C index 9e690b4cae..c3695cec9e 100644 --- a/src/thermophysicalModels/solids/solid/solidNew.C +++ b/src/thermophysicalModels/solids/solid/solidNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::solid::New(Istream& is) +Foam::autoPtr +Foam::solid::New(Istream& is) { if (debug) { @@ -36,9 +37,8 @@ Foam::autoPtr Foam::solid::New(Istream& is) << endl; } - word solidType(is); - - word coeffs(is); + const word solidType(is); + const word coeffs(is); if (coeffs == "defaultCoeffs") { @@ -49,7 +49,7 @@ Foam::autoPtr Foam::solid::New(Istream& is) { FatalErrorIn("solid::New(Istream&)") << "Unknown solid type " << solidType << nl << nl - << "Valid solid types are:" << endl + << "Valid solid types are :" << endl << ConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -65,7 +65,7 @@ Foam::autoPtr Foam::solid::New(Istream& is) { FatalErrorIn("solid::New(Istream&)") << "Unknown solid type " << solidType << nl << nl - << "Valid solid types are:" << endl + << "Valid solid types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C index bf1c77931f..8a8700d29e 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C @@ -26,15 +26,10 @@ License #include "Reaction.H" #include "DynamicList.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -void Reaction::setThermo +void Foam::Reaction::setThermo ( const HashPtrTable& thermoDatabase ) @@ -62,9 +57,8 @@ void Reaction::setThermo } -// Construct from components template -Reaction::Reaction +Foam::Reaction::Reaction ( const speciesTable& species, const List& lhs, @@ -81,9 +75,8 @@ Reaction::Reaction } -// Construct as copy given new speciesTable template -Reaction::Reaction +Foam::Reaction::Reaction ( const Reaction& r, const speciesTable& species @@ -97,7 +90,7 @@ Reaction::Reaction template -Reaction::specieCoeffs::specieCoeffs +Foam::Reaction::specieCoeffs::specieCoeffs ( const speciesTable& species, Istream& is @@ -146,7 +139,7 @@ Reaction::specieCoeffs::specieCoeffs template -void Reaction::setLRhs(Istream& is) +void Foam::Reaction::setLRhs(Istream& is) { DynamicList dlrhs; @@ -187,9 +180,8 @@ void Reaction::setLRhs(Istream& is) } -//- Construct from Istream template -Reaction::Reaction +Foam::Reaction::Reaction ( const speciesTable& species, const HashPtrTable& thermoDatabase, @@ -207,7 +199,8 @@ Reaction::Reaction // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // template -autoPtr > Reaction::New +Foam::autoPtr > +Foam::Reaction::New ( const speciesTable& species, const HashPtrTable& thermoDatabase, @@ -221,13 +214,13 @@ autoPtr > Reaction::New "Reaction::New(const speciesTable& species," " const HashPtrTable& thermoDatabase, Istream&)", is - ) << "Reaction type not specified" << endl << endl + ) << "Reaction type not specified" << nl << nl << "Valid Reaction types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); } - word reactionTypeName(is); + const word reactionTypeName(is); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(reactionTypeName); @@ -239,7 +232,8 @@ autoPtr > Reaction::New "Reaction::New(const speciesTable& species," " const HashPtrTable& thermoDatabase, Istream&)", is - ) << "Unknown reaction type " << reactionTypeName << endl << endl + ) << "Unknown reaction type " + << reactionTypeName << nl << nl << "Valid reaction types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -255,7 +249,7 @@ autoPtr > Reaction::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void Reaction::write(Ostream& os) const +void Foam::Reaction::write(Ostream& os) const { os << type() << nl << " "; @@ -310,7 +304,7 @@ void Reaction::write(Ostream& os) const template -scalar Reaction::kf +Foam::scalar Foam::Reaction::kf ( const scalar T, const scalar p, @@ -322,7 +316,7 @@ scalar Reaction::kf template -scalar Reaction::kr +Foam::scalar Foam::Reaction::kr ( const scalar kfwd, const scalar T, @@ -334,7 +328,7 @@ scalar Reaction::kr } template -scalar Reaction::kr +Foam::scalar Foam::Reaction::kr ( const scalar T, const scalar p, @@ -345,8 +339,4 @@ scalar Reaction::kr } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C index 08fecc77a0..322260c643 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C @@ -42,7 +42,7 @@ Foam::thermalPorousZone::thermalPorousZone { if (const dictionary* dictPtr = dict.subDictPtr("thermalModel")) { - word thermalModel(dictPtr->lookup("type")); + const word thermalModel(dictPtr->lookup("type")); if (thermalModel == "fixedTemperature") { diff --git a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C index ad75ccb1ce..6497b05131 100644 --- a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C +++ b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C @@ -32,15 +32,15 @@ License namespace Foam { + defineTypeNameAndDebug(thermophysicalFunction, 0); + defineRunTimeSelectionTable(thermophysicalFunction, Istream); +} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(thermophysicalFunction, 0); -defineRunTimeSelectionTable(thermophysicalFunction, Istream); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr thermophysicalFunction::New(Istream& is) +Foam::autoPtr +Foam::thermophysicalFunction::New(Istream& is) { if (debug) { @@ -49,7 +49,7 @@ autoPtr thermophysicalFunction::New(Istream& is) << endl; } - word thermophysicalFunctionType(is); + const word thermophysicalFunctionType(is); IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(thermophysicalFunctionType); @@ -59,7 +59,7 @@ autoPtr thermophysicalFunction::New(Istream& is) FatalErrorIn("thermophysicalFunction::New(Istream&)") << "Unknown thermophysicalFunction type " << thermophysicalFunctionType - << endl << endl + << nl << nl << "Valid thermophysicalFunction types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); @@ -68,9 +68,4 @@ autoPtr thermophysicalFunction::New(Istream& is) return autoPtr(cstrIter()(is)); } - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/transportModels/incompressible/transportModel/transportModel.C b/src/transportModels/incompressible/transportModel/transportModel.C index d1b6ddc97f..c9a0c8e20d 100644 --- a/src/transportModels/incompressible/transportModel/transportModel.C +++ b/src/transportModels/incompressible/transportModel/transportModel.C @@ -27,14 +27,10 @@ License #include "viscosityModel.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -transportModel::transportModel +Foam::transportModel::transportModel ( const volVectorField& U, const surfaceScalarField& phi @@ -56,20 +52,16 @@ transportModel::transportModel // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // -transportModel::~transportModel() +Foam::transportModel::~transportModel() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -bool transportModel::read() +bool Foam::transportModel::read() { return regIOobject::read(); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C index 974cc2c5bd..d2424513c7 100644 --- a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C +++ b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C @@ -29,12 +29,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr viscosityModel::New +Foam::autoPtr +Foam::viscosityModel::New ( const word& name, const dictionary& viscosityProperties, @@ -42,13 +38,15 @@ autoPtr viscosityModel::New const surfaceScalarField& phi ) { - word viscosityModelTypeName(viscosityProperties.lookup("transportModel")); + const word modelType + ( + viscosityProperties.lookup("transportModel") + ); - Info<< "Selecting incompressible transport model " - << viscosityModelTypeName << endl; + Info<< "Selecting incompressible transport model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(viscosityModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -57,8 +55,8 @@ autoPtr viscosityModel::New "viscosityModel::New(const volVectorField&, " "const surfaceScalarField&)" ) << "Unknown viscosityModel type " - << viscosityModelTypeName << endl << endl - << "Valid viscosityModels are : " << endl + << modelType << nl << nl + << "Valid viscosityModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -68,8 +66,4 @@ autoPtr viscosityModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C index 1d9ca4172c..39efc1ee49 100644 --- a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C +++ b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C @@ -26,19 +26,17 @@ License #include "LESdelta.H" #include "calculatedFvPatchFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LESdelta, 0); -defineRunTimeSelectionTable(LESdelta, dictionary); + defineTypeNameAndDebug(LESdelta, 0); + defineRunTimeSelectionTable(LESdelta, dictionary); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -LESdelta::LESdelta(const word& name, const fvMesh& mesh) +Foam::LESdelta::LESdelta(const word& name, const fvMesh& mesh) : mesh_(mesh), delta_ @@ -60,14 +58,15 @@ LESdelta::LESdelta(const word& name, const fvMesh& mesh) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -autoPtr LESdelta::New +Foam::autoPtr +Foam::LESdelta::New ( const word& name, const fvMesh& mesh, const dictionary& dict ) { - word deltaType(dict.lookup("delta")); + const word deltaType(dict.lookup("delta")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(deltaType); @@ -77,7 +76,8 @@ autoPtr LESdelta::New FatalErrorIn ( "LESdelta::New(const fvMesh&, const dictionary&)" - ) << "Unknown LESdelta type " << deltaType << endl << endl + ) << "Unknown LESdelta type " + << deltaType << nl << nl << "Valid LESdelta types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -87,8 +87,4 @@ autoPtr LESdelta::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C index e865914a8a..56a503f8cd 100644 --- a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C +++ b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C @@ -24,29 +24,27 @@ License \*---------------------------------------------------------------------------*/ #include "error.H" - #include "LESfilter.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(LESfilter, 0); -defineRunTimeSelectionTable(LESfilter, dictionary); +namespace Foam +{ + defineTypeNameAndDebug(LESfilter, 0); + defineRunTimeSelectionTable(LESfilter, dictionary); +} // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -autoPtr LESfilter::New +Foam::autoPtr +Foam::LESfilter::New ( const fvMesh& mesh, const dictionary& dict ) { - word filterType(dict.lookup("filter")); + const word filterType(dict.lookup("filter")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(filterType); @@ -56,7 +54,8 @@ autoPtr LESfilter::New FatalErrorIn ( "LESfilter::New(const fvMesh&, const dictionary&)" - ) << "Unknown LESfilter type " << filterType << endl << endl + ) << "Unknown LESfilter type " + << filterType << nl << nl << "Valid LESfilter types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -65,9 +64,5 @@ autoPtr LESfilter::New return autoPtr(cstrIter()(mesh, dict)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - -} // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index da5925f6a3..e95f9def5c 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -100,13 +100,11 @@ autoPtr LESModel::New const basicThermo& thermoPhysicalModel ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -114,17 +112,16 @@ autoPtr LESModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("LESModel") + ); - dict.lookup("LESModel") >> modelName; - } - - Info<< "Selecting LES turbulence model " << modelName << endl; + Info<< "Selecting LES turbulence model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -136,9 +133,9 @@ autoPtr LESModel::New "const surfaceScalarField&, " "const basicThermo&" ")" - ) << "Unknown LESModel type " << modelName - << endl << endl - << "Valid LESModel types are :" << endl + ) << "Unknown LESModel type " + << modelType << nl << nl + << "Valid LESModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index f24a953e63..755318a1d8 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -106,13 +106,11 @@ autoPtr RASModel::New const basicThermo& thermophysicalModel ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -120,17 +118,16 @@ autoPtr RASModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("RASModel") + ); - dict.lookup("RASModel") >> modelName; - } - - Info<< "Selecting RAS turbulence model " << modelName << endl; + Info<< "Selecting RAS turbulence model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -143,9 +140,9 @@ autoPtr RASModel::New "const surfaceScalarField&, " "basicThermo&" ")" - ) << "Unknown RASModel type " << modelName - << endl << endl - << "Valid RASModel types are :" << endl + ) << "Unknown RASModel type " + << modelType << nl << nl + << "Valid RASModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index 2a9b567e65..5c936fa28e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -69,13 +69,11 @@ autoPtr turbulenceModel::New const basicThermo& thermophysicalModel ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -83,17 +81,16 @@ autoPtr turbulenceModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("simulationType") + ); - dict.lookup("simulationType") >> modelName; - } - - Info<< "Selecting turbulence model type " << modelName << endl; + Info<< "Selecting turbulence model type " << modelType << endl; turbulenceModelConstructorTable::iterator cstrIter = - turbulenceModelConstructorTablePtr_->find(modelName); + turbulenceModelConstructorTablePtr_->find(modelType); if (cstrIter == turbulenceModelConstructorTablePtr_->end()) { @@ -102,9 +99,9 @@ autoPtr turbulenceModel::New "turbulenceModel::New(const volScalarField&, " "const volVectorField&, const surfaceScalarField&, " "basicThermo&)" - ) << "Unknown turbulenceModel type " << modelName - << endl << endl - << "Valid turbulenceModel types are :" << endl + ) << "Unknown turbulenceModel type " + << modelType << nl << nl + << "Valid turbulenceModel types:" << endl << turbulenceModelConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 7b08a32e72..574e387f1c 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -97,13 +97,11 @@ autoPtr LESModel::New transportModel& transport ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -111,17 +109,16 @@ autoPtr LESModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("LESModel") + ); - dict.lookup("LESModel") >> modelName; - } - - Info<< "Selecting LES turbulence model " << modelName << endl; + Info<< "Selecting LES turbulence model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -133,9 +130,9 @@ autoPtr LESModel::New "const surfaceScalarField& ," "transportModel&" ")" - ) << "Unknown LESModel type " << modelName - << endl << endl - << "Valid LESModel types are :" << endl + ) << "Unknown LESModel type " + << modelType << nl << nl + << "Valid LESModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index dd921835cd..87d50dedd7 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -104,13 +104,11 @@ autoPtr RASModel::New transportModel& transport ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -118,17 +116,16 @@ autoPtr RASModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("RASModel") + ); - dict.lookup("RASModel") >> modelName; - } - - Info<< "Selecting RAS turbulence model " << modelName << endl; + Info<< "Selecting RAS turbulence model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -140,9 +137,9 @@ autoPtr RASModel::New "const surfaceScalarField&, " "transportModel&" ")" - ) << "Unknown RASModel type " << modelName - << endl << endl - << "Valid RASModel types are :" << endl + ) << "Unknown RASModel type " + << modelType << nl << nl + << "Valid RASModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index 445b9924d8..1aeea66fd3 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -66,13 +66,11 @@ autoPtr turbulenceModel::New transportModel& transport ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -80,17 +78,16 @@ autoPtr turbulenceModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("simulationType") + ); - dict.lookup("simulationType") >> modelName; - } - - Info<< "Selecting turbulence model type " << modelName << endl; + Info<< "Selecting turbulence model type " << modelType << endl; turbulenceModelConstructorTable::iterator cstrIter = - turbulenceModelConstructorTablePtr_->find(modelName); + turbulenceModelConstructorTablePtr_->find(modelType); if (cstrIter == turbulenceModelConstructorTablePtr_->end()) { @@ -98,9 +95,9 @@ autoPtr turbulenceModel::New ( "turbulenceModel::New(const volVectorField&, " "const surfaceScalarField&, transportModel&)" - ) << "Unknown turbulenceModel type " << modelName - << endl << endl - << "Valid turbulenceModel types are :" << endl + ) << "Unknown turbulenceModel type " + << modelType << nl << nl + << "Valid turbulenceModel types:" << endl << turbulenceModelConstructorTablePtr_->sortedToc() << exit(FatalError); } From 470b30b58cdbb3ce7a276cb0c7f5472bcf6789d9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 20 Apr 2010 19:14:42 +0200 Subject: [PATCH 3/9] ENH: avoid possibly non-portable 'find' with '-printf' --- wmake/wclean | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wmake/wclean b/wmake/wclean index 6595352a98..84459694bc 100755 --- a/wmake/wclean +++ b/wmake/wclean @@ -113,13 +113,12 @@ then exit $? elif [ ! -d $MakeDir ] then - for dir in `find . \( -type d -a -name Make \) -printf "%h "` + for dir in `find . \( -type d -a -name Make \)` do - $0 $dir + $0 ${dir%/Make} # parent directory - trim /Make from the end done exit 0 fi - fi # makeOption is not needed beyond this point From c7267ed9ad50c8583720e65012342ddca54acf01 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 21 Apr 2010 15:36:10 +0200 Subject: [PATCH 4/9] STYLE: remove disabled methods from autoPtr - (have been disabled for more than 1 year) --- src/OpenFOAM/memory/autoPtr/autoPtr.H | 8 +++---- src/OpenFOAM/memory/autoPtr/autoPtrI.H | 24 ++++--------------- .../memory/{tmp => refCount}/refCount.H | 2 +- src/OpenFOAM/memory/tmp/tmp.H | 2 +- src/OpenFOAM/memory/tmp/tmpI.H | 14 +++++------ 5 files changed, 16 insertions(+), 34 deletions(-) rename src/OpenFOAM/memory/{tmp => refCount}/refCount.H (98%) diff --git a/src/OpenFOAM/memory/autoPtr/autoPtr.H b/src/OpenFOAM/memory/autoPtr/autoPtr.H index 5f4afc765a..2ade60924a 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtr.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtr.H @@ -96,7 +96,7 @@ public: // pointer inline void reset(T* = 0); - //- Delete object and set pointer to NULL, if the pointer is valid. + //- Delete object (if the pointer is valid) and set pointer to NULL. inline void clear(); @@ -108,9 +108,7 @@ public: //- Return const reference to the object data inline const T& operator()() const; - // inline T& operator*(); - // inline const T& operator*() const; - + //- Const cast to the underlying type reference inline operator const T&() const; //- Return object pointer @@ -119,7 +117,7 @@ public: //- Return const object pointer inline const T* operator->() const; - //- Take over object pointer from parameter + //- Take over the object pointer from parameter inline void operator=(const autoPtr&); }; diff --git a/src/OpenFOAM/memory/autoPtr/autoPtrI.H b/src/OpenFOAM/memory/autoPtr/autoPtrI.H index 1a6fce01f7..ead0d62640 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtrI.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtrI.H @@ -80,7 +80,7 @@ inline void Foam::autoPtr::set(T* p) { if (ptr_) { - FatalErrorIn("void autoPtr::set(T*)") + FatalErrorIn("void Foam::autoPtr::set(T*)") << "object already allocated" << abort(FatalError); } @@ -115,7 +115,7 @@ inline T& Foam::autoPtr::operator()() { if (!ptr_) { - FatalErrorIn("T& autoPtr::operator()()") + FatalErrorIn("T& Foam::autoPtr::operator()()") << "object is not allocated" << abort(FatalError); } @@ -129,7 +129,7 @@ inline const T& Foam::autoPtr::operator()() const { if (!ptr_) { - FatalErrorIn("const T& autoPtr::operator()() const") + FatalErrorIn("const T& Foam::autoPtr::operator()() const") << "object is not allocated" << abort(FatalError); } @@ -138,22 +138,6 @@ inline const T& Foam::autoPtr::operator()() const } -/* -template -inline T& Foam::autoPtr::operator*() -{ - return operator()(); -} - - -template -inline const T& Foam::autoPtr::operator*() const -{ - return operator()(); -} -*/ - - template inline Foam::autoPtr::operator const T&() const { @@ -166,7 +150,7 @@ inline T* Foam::autoPtr::operator->() { if (!ptr_) { - FatalErrorIn("autoPtr::operator->()") + FatalErrorIn("Foam::autoPtr::operator->()") << "object is not allocated" << abort(FatalError); } diff --git a/src/OpenFOAM/memory/tmp/refCount.H b/src/OpenFOAM/memory/refCount/refCount.H similarity index 98% rename from src/OpenFOAM/memory/tmp/refCount.H rename to src/OpenFOAM/memory/refCount/refCount.H index 9974ff0cb1..c3b5914211 100644 --- a/src/OpenFOAM/memory/tmp/refCount.H +++ b/src/OpenFOAM/memory/refCount/refCount.H @@ -25,7 +25,7 @@ Class Foam::refCount Description - Reference counter for tmp\. + Reference counter for various OpenFOAM components. \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/memory/tmp/tmp.H b/src/OpenFOAM/memory/tmp/tmp.H index 90fa6f5684..f1a9f81fae 100644 --- a/src/OpenFOAM/memory/tmp/tmp.H +++ b/src/OpenFOAM/memory/tmp/tmp.H @@ -62,7 +62,7 @@ class tmp //- Pointer to temporary object mutable T* ptr_; - // Const reference to constant object + //- Const reference to constant object const T& ref_; diff --git a/src/OpenFOAM/memory/tmp/tmpI.H b/src/OpenFOAM/memory/tmp/tmpI.H index 144977f727..18c41ae646 100644 --- a/src/OpenFOAM/memory/tmp/tmpI.H +++ b/src/OpenFOAM/memory/tmp/tmpI.H @@ -60,7 +60,7 @@ inline Foam::tmp::tmp(const tmp& t) } else { - FatalErrorIn("tmp::tmp(const tmp&)") + FatalErrorIn("Foam::tmp::tmp(const tmp&)") << "attempted copy of a deallocated temporary" << abort(FatalError); } @@ -116,7 +116,7 @@ inline T* Foam::tmp::ptr() const { if (!ptr_) { - FatalErrorIn("tmp::ptr() const") + FatalErrorIn("Foam::tmp::ptr() const") << "temporary deallocated" << abort(FatalError); } @@ -155,7 +155,7 @@ inline T& Foam::tmp::operator()() { if (!ptr_) { - FatalErrorIn("T& tmp::operator()()") + FatalErrorIn("T& Foam::tmp::operator()()") << "temporary deallocated" << abort(FatalError); } @@ -184,7 +184,7 @@ inline const T& Foam::tmp::operator()() const { if (!ptr_) { - FatalErrorIn("const T& tmp::operator()() const") + FatalErrorIn("const T& Foam::tmp::operator()() const") << "temporary deallocated" << abort(FatalError); } @@ -212,7 +212,7 @@ inline T* Foam::tmp::operator->() { if (!ptr_) { - FatalErrorIn("tmp::operator->()") + FatalErrorIn("Foam::tmp::operator->()") << "temporary deallocated" << abort(FatalError); } @@ -260,14 +260,14 @@ inline void Foam::tmp::operator=(const tmp& t) } else { - FatalErrorIn("tmp::operator=(const tmp& t)") + FatalErrorIn("Foam::tmp::operator=(const tmp&)") << "attempted copy of a deallocated temporary" << abort(FatalError); } } else { - FatalErrorIn("tmp::operator=(const tmp& t)") + FatalErrorIn("Foam::tmp::operator=(const tmp&)") << "attempted to assign to a const reference to constant object" << abort(FatalError); } From 87f151c47b7db814016ab3ae910a93264fb0f37b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 21 Apr 2010 16:23:16 +0200 Subject: [PATCH 5/9] ENH: add wmake rules for gcc-4.5 ATTENTION: cpp now needs '-traditional-cpp' for single-line output --- wmake/rules/linux64Gcc45/X | 1 + wmake/rules/linux64Gcc45/c | 16 ++++++++++++++++ wmake/rules/linux64Gcc45/c++ | 21 +++++++++++++++++++++ wmake/rules/linux64Gcc45/c++Debug | 2 ++ wmake/rules/linux64Gcc45/c++Opt | 4 ++++ wmake/rules/linux64Gcc45/c++Prof | 2 ++ wmake/rules/linux64Gcc45/cDebug | 2 ++ wmake/rules/linux64Gcc45/cOpt | 2 ++ wmake/rules/linux64Gcc45/cProf | 2 ++ wmake/rules/linux64Gcc45/general | 10 ++++++++++ wmake/rules/linux64Gcc45/mplib | 1 + wmake/rules/linux64Gcc45/mplibGAMMA | 1 + wmake/rules/linux64Gcc45/mplibHPMPI | 3 +++ wmake/rules/linux64Gcc45/mplibMPICH | 1 + wmake/rules/linux64Gcc45/mplibMPICH-GM | 1 + wmake/rules/linux64Gcc45/mplibOPENMPI | 1 + wmake/rules/linux64Gcc45/mplibQSMPI | 1 + wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI | 1 + wmake/rules/linuxGcc45/X | 1 + wmake/rules/linuxGcc45/c | 16 ++++++++++++++++ wmake/rules/linuxGcc45/c++ | 21 +++++++++++++++++++++ wmake/rules/linuxGcc45/c++Debug | 2 ++ wmake/rules/linuxGcc45/c++Opt | 2 ++ wmake/rules/linuxGcc45/c++Prof | 2 ++ wmake/rules/linuxGcc45/cDebug | 2 ++ wmake/rules/linuxGcc45/cOpt | 2 ++ wmake/rules/linuxGcc45/cProf | 2 ++ wmake/rules/linuxGcc45/general | 11 +++++++++++ wmake/rules/linuxGcc45/mplib | 1 + wmake/rules/linuxGcc45/mplibGAMMA | 1 + wmake/rules/linuxGcc45/mplibHPMPI | 3 +++ wmake/rules/linuxGcc45/mplibMPICH | 1 + wmake/rules/linuxGcc45/mplibMPICH-GM | 1 + wmake/rules/linuxGcc45/mplibOPENMPI | 1 + wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI | 1 + 35 files changed, 142 insertions(+) create mode 120000 wmake/rules/linux64Gcc45/X create mode 100644 wmake/rules/linux64Gcc45/c create mode 100644 wmake/rules/linux64Gcc45/c++ create mode 100644 wmake/rules/linux64Gcc45/c++Debug create mode 100644 wmake/rules/linux64Gcc45/c++Opt create mode 100644 wmake/rules/linux64Gcc45/c++Prof create mode 100644 wmake/rules/linux64Gcc45/cDebug create mode 100644 wmake/rules/linux64Gcc45/cOpt create mode 100644 wmake/rules/linux64Gcc45/cProf create mode 100644 wmake/rules/linux64Gcc45/general create mode 120000 wmake/rules/linux64Gcc45/mplib create mode 120000 wmake/rules/linux64Gcc45/mplibGAMMA create mode 100644 wmake/rules/linux64Gcc45/mplibHPMPI create mode 120000 wmake/rules/linux64Gcc45/mplibMPICH create mode 120000 wmake/rules/linux64Gcc45/mplibMPICH-GM create mode 120000 wmake/rules/linux64Gcc45/mplibOPENMPI create mode 120000 wmake/rules/linux64Gcc45/mplibQSMPI create mode 120000 wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI create mode 120000 wmake/rules/linuxGcc45/X create mode 100644 wmake/rules/linuxGcc45/c create mode 100644 wmake/rules/linuxGcc45/c++ create mode 100644 wmake/rules/linuxGcc45/c++Debug create mode 100644 wmake/rules/linuxGcc45/c++Opt create mode 100644 wmake/rules/linuxGcc45/c++Prof create mode 100644 wmake/rules/linuxGcc45/cDebug create mode 100644 wmake/rules/linuxGcc45/cOpt create mode 100644 wmake/rules/linuxGcc45/cProf create mode 100644 wmake/rules/linuxGcc45/general create mode 120000 wmake/rules/linuxGcc45/mplib create mode 120000 wmake/rules/linuxGcc45/mplibGAMMA create mode 100644 wmake/rules/linuxGcc45/mplibHPMPI create mode 120000 wmake/rules/linuxGcc45/mplibMPICH create mode 120000 wmake/rules/linuxGcc45/mplibMPICH-GM create mode 120000 wmake/rules/linuxGcc45/mplibOPENMPI create mode 120000 wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI diff --git a/wmake/rules/linux64Gcc45/X b/wmake/rules/linux64Gcc45/X new file mode 120000 index 0000000000..73572d6c04 --- /dev/null +++ b/wmake/rules/linux64Gcc45/X @@ -0,0 +1 @@ +../General/X \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/c b/wmake/rules/linux64Gcc45/c new file mode 100644 index 0000000000..80bb80f32f --- /dev/null +++ b/wmake/rules/linux64Gcc45/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m64 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linux64Gcc45/c++ b/wmake/rules/linux64Gcc45/c++ new file mode 100644 index 0000000000..677b1e5bb4 --- /dev/null +++ b/wmake/rules/linux64Gcc45/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m64 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-60 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) diff --git a/wmake/rules/linux64Gcc45/c++Debug b/wmake/rules/linux64Gcc45/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linux64Gcc45/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linux64Gcc45/c++Opt b/wmake/rules/linux64Gcc45/c++Opt new file mode 100644 index 0000000000..3446f7f58c --- /dev/null +++ b/wmake/rules/linux64Gcc45/c++Opt @@ -0,0 +1,4 @@ +c++DBUG = +c++OPT = -O3 +#c++OPT = -march=nocona -O3 +# -ftree-vectorize -ftree-vectorizer-verbose=3 diff --git a/wmake/rules/linux64Gcc45/c++Prof b/wmake/rules/linux64Gcc45/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linux64Gcc45/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linux64Gcc45/cDebug b/wmake/rules/linux64Gcc45/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linux64Gcc45/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linux64Gcc45/cOpt b/wmake/rules/linux64Gcc45/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linux64Gcc45/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linux64Gcc45/cProf b/wmake/rules/linux64Gcc45/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linux64Gcc45/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linux64Gcc45/general b/wmake/rules/linux64Gcc45/general new file mode 100644 index 0000000000..bfe6574e81 --- /dev/null +++ b/wmake/rules/linux64Gcc45/general @@ -0,0 +1,10 @@ +# need single-line output from cpp +CPP = cpp -traditional-cpp + +PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/X +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linux64Gcc45/mplib b/wmake/rules/linux64Gcc45/mplib new file mode 120000 index 0000000000..1fa0d64ec8 --- /dev/null +++ b/wmake/rules/linux64Gcc45/mplib @@ -0,0 +1 @@ +../General/mplib \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibGAMMA b/wmake/rules/linux64Gcc45/mplibGAMMA new file mode 120000 index 0000000000..4b41692bf6 --- /dev/null +++ b/wmake/rules/linux64Gcc45/mplibGAMMA @@ -0,0 +1 @@ +../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibHPMPI b/wmake/rules/linux64Gcc45/mplibHPMPI new file mode 100644 index 0000000000..574492a236 --- /dev/null +++ b/wmake/rules/linux64Gcc45/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi diff --git a/wmake/rules/linux64Gcc45/mplibMPICH b/wmake/rules/linux64Gcc45/mplibMPICH new file mode 120000 index 0000000000..c83eb564e1 --- /dev/null +++ b/wmake/rules/linux64Gcc45/mplibMPICH @@ -0,0 +1 @@ +../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibMPICH-GM b/wmake/rules/linux64Gcc45/mplibMPICH-GM new file mode 120000 index 0000000000..621d0857d3 --- /dev/null +++ b/wmake/rules/linux64Gcc45/mplibMPICH-GM @@ -0,0 +1 @@ +../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibOPENMPI b/wmake/rules/linux64Gcc45/mplibOPENMPI new file mode 120000 index 0000000000..2d938a16a6 --- /dev/null +++ b/wmake/rules/linux64Gcc45/mplibOPENMPI @@ -0,0 +1 @@ +../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibQSMPI b/wmake/rules/linux64Gcc45/mplibQSMPI new file mode 120000 index 0000000000..d3446c68f1 --- /dev/null +++ b/wmake/rules/linux64Gcc45/mplibQSMPI @@ -0,0 +1 @@ +../General/mplibQSMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI new file mode 120000 index 0000000000..cc63a574c3 --- /dev/null +++ b/wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI @@ -0,0 +1 @@ +../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/X b/wmake/rules/linuxGcc45/X new file mode 120000 index 0000000000..73572d6c04 --- /dev/null +++ b/wmake/rules/linuxGcc45/X @@ -0,0 +1 @@ +../General/X \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/c b/wmake/rules/linuxGcc45/c new file mode 100644 index 0000000000..8db5da1047 --- /dev/null +++ b/wmake/rules/linuxGcc45/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m32 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxGcc45/c++ b/wmake/rules/linuxGcc45/c++ new file mode 100644 index 0000000000..7a7a46d9a0 --- /dev/null +++ b/wmake/rules/linuxGcc45/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m32 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-60 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) diff --git a/wmake/rules/linuxGcc45/c++Debug b/wmake/rules/linuxGcc45/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linuxGcc45/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxGcc45/c++Opt b/wmake/rules/linuxGcc45/c++Opt new file mode 100644 index 0000000000..2aedabd628 --- /dev/null +++ b/wmake/rules/linuxGcc45/c++Opt @@ -0,0 +1,2 @@ +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linuxGcc45/c++Prof b/wmake/rules/linuxGcc45/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linuxGcc45/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxGcc45/cDebug b/wmake/rules/linuxGcc45/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linuxGcc45/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxGcc45/cOpt b/wmake/rules/linuxGcc45/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linuxGcc45/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linuxGcc45/cProf b/wmake/rules/linuxGcc45/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linuxGcc45/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxGcc45/general b/wmake/rules/linuxGcc45/general new file mode 100644 index 0000000000..7e9226e795 --- /dev/null +++ b/wmake/rules/linuxGcc45/general @@ -0,0 +1,11 @@ +# need single-line output from cpp +CPP = cpp -traditional-cpp +LD = ld -melf_i386 + +PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/X +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc45/mplib b/wmake/rules/linuxGcc45/mplib new file mode 120000 index 0000000000..1fa0d64ec8 --- /dev/null +++ b/wmake/rules/linuxGcc45/mplib @@ -0,0 +1 @@ +../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibGAMMA b/wmake/rules/linuxGcc45/mplibGAMMA new file mode 120000 index 0000000000..4b41692bf6 --- /dev/null +++ b/wmake/rules/linuxGcc45/mplibGAMMA @@ -0,0 +1 @@ +../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibHPMPI b/wmake/rules/linuxGcc45/mplibHPMPI new file mode 100644 index 0000000000..8aff40632b --- /dev/null +++ b/wmake/rules/linuxGcc45/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi diff --git a/wmake/rules/linuxGcc45/mplibMPICH b/wmake/rules/linuxGcc45/mplibMPICH new file mode 120000 index 0000000000..c83eb564e1 --- /dev/null +++ b/wmake/rules/linuxGcc45/mplibMPICH @@ -0,0 +1 @@ +../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibMPICH-GM b/wmake/rules/linuxGcc45/mplibMPICH-GM new file mode 120000 index 0000000000..621d0857d3 --- /dev/null +++ b/wmake/rules/linuxGcc45/mplibMPICH-GM @@ -0,0 +1 @@ +../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibOPENMPI b/wmake/rules/linuxGcc45/mplibOPENMPI new file mode 120000 index 0000000000..2d938a16a6 --- /dev/null +++ b/wmake/rules/linuxGcc45/mplibOPENMPI @@ -0,0 +1 @@ +../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI new file mode 120000 index 0000000000..cc63a574c3 --- /dev/null +++ b/wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI @@ -0,0 +1 @@ +../General/mplibSYSTEMOPENMPI \ No newline at end of file From 4d2a297a676bf3261ac5ad3b0aebab963f1f0a32 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 22 Apr 2010 09:00:31 +0200 Subject: [PATCH 6/9] BUG: syntax problems found by gcc-4.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - "cpp -traditional-cpp" doesn't strip C++-style comments Probably need a workaround with sed -e 's@^ *//@@' if we wish to support C++-style comments in Make/{files,options} - lduMatrixTests.C:121:1: error: ‘Foam::lduMatrix::solverPerformance::solverPerformance’ names the constructor, not the type - edgeFaceCirculatorI.H:355:1: error: ‘Foam::edgeFaceCirculator::edgeFaceCirculator’ names the constructor, not the type - patchPointEdgeCirculatorI.H:236:1: error: ‘Foam::patchPointEdgeCirculator::patchPointEdgeCirculator’ names the constructor, not the type - objToVTK.C:116:5: error: ‘Foam::argList::argList’ names the constructor, not the type same in surfaceClean.C, surfaceRefineRedGreen.C, surfaceSplitByPatch.C - fireFoam/createFields.H:74:41: error: type/value mismatch at argument 1 in template parameter list for ‘template class Foam::autoPtr’ --- .../solvers/combustion/fireFoam/createFields.H | 4 ++-- .../extrudeToRegionMesh/patchPointEdgeCirculatorI.H | 2 +- .../utilities/mesh/manipulation/objToVTK/objToVTK.C | 2 +- .../utilities/surface/surfaceClean/surfaceClean.C | 2 +- .../surfaceRefineRedGreen/surfaceRefineRedGreen.C | 2 +- .../surface/surfaceSplitByPatch/surfaceSplitByPatch.C | 2 +- .../matrices/lduMatrix/lduMatrix/lduMatrixTests.C | 2 +- src/finiteVolume/Make/files | 10 +++++++--- src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H | 4 ++-- 9 files changed, 17 insertions(+), 13 deletions(-) diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index a399df8536..95bda05606 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -71,9 +71,9 @@ IOdictionary combustionProperties ); Info<< "Creating combustion model\n" << endl; -autoPtr combustion +autoPtr combustion ( - combustionModel::combustionModel::New + combustionModel::New ( combustionProperties, thermo, diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/patchPointEdgeCirculatorI.H b/applications/utilities/mesh/generation/extrudeToRegionMesh/patchPointEdgeCirculatorI.H index ae147cd102..78feb859a9 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/patchPointEdgeCirculatorI.H +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/patchPointEdgeCirculatorI.H @@ -233,7 +233,7 @@ void Foam::patchPointEdgeCirculator::setCanonical() //- Step to next edge. -Foam::patchPointEdgeCirculator::patchPointEdgeCirculator& +Foam::patchPointEdgeCirculator& Foam::patchPointEdgeCirculator::operator++() { if (index_ == -1) diff --git a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C index a9f3472ea1..2cb7ef6c5b 100644 --- a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C +++ b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) argList::validArgs.clear(); argList::validArgs.append("OBJ file"); argList::validArgs.append("output VTK file"); - argList::argList args(argc, argv); + argList args(argc, argv); const fileName objName = args[1]; const fileName outName = args[2]; diff --git a/applications/utilities/surface/surfaceClean/surfaceClean.C b/applications/utilities/surface/surfaceClean/surfaceClean.C index b5bf012549..46d9bb90da 100644 --- a/applications/utilities/surface/surfaceClean/surfaceClean.C +++ b/applications/utilities/surface/surfaceClean/surfaceClean.C @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) argList::validArgs.append("surface file"); argList::validArgs.append("min length"); argList::validArgs.append("output surface file"); - argList::argList args(argc, argv); + argList args(argc, argv); const fileName inFileName = args[1]; const scalar minLen = args.argRead(2); diff --git a/applications/utilities/surface/surfaceRefineRedGreen/surfaceRefineRedGreen.C b/applications/utilities/surface/surfaceRefineRedGreen/surfaceRefineRedGreen.C index 424e06a67a..d7e84e1303 100644 --- a/applications/utilities/surface/surfaceRefineRedGreen/surfaceRefineRedGreen.C +++ b/applications/utilities/surface/surfaceRefineRedGreen/surfaceRefineRedGreen.C @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) argList::validArgs.clear(); argList::validArgs.append("surface file"); argList::validArgs.append("output surface file"); - argList::argList args(argc, argv); + argList args(argc, argv); const fileName surfFileName = args[1]; const fileName outFileName = args[2]; diff --git a/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C b/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C index 87d27ed1e5..50502faebe 100644 --- a/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C +++ b/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) argList::noParallel(); argList::validArgs.clear(); argList::validArgs.append("input file"); - argList::argList args(argc, argv); + argList args(argc, argv); const fileName surfName = args[1]; diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTests.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTests.C index c4c8774098..6ec7861bc8 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTests.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTests.C @@ -118,7 +118,7 @@ void Foam::lduMatrix::solverPerformance::print() const } -Foam::lduMatrix::solverPerformance::solverPerformance Foam::max +Foam::lduMatrix::solverPerformance Foam::max ( const lduMatrix::solverPerformance& sp1, const lduMatrix::solverPerformance& sp2 diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index f1a91c869d..0fc8dbf70c 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -187,7 +187,9 @@ $(interpolation)/interpolationCellPointWallModified/cellPointWeightWallModified/ $(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C volPointInterpolation = interpolation/volPointInterpolation -/* $(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C */ +/* +$(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C +*/ $(volPointInterpolation)/volPointInterpolation.C surfaceInterpolation = interpolation/surfaceInterpolation @@ -305,8 +307,10 @@ $(snGradSchemes)/snGradScheme/snGradSchemes.C $(snGradSchemes)/correctedSnGrad/correctedSnGrads.C $(snGradSchemes)/limitedSnGrad/limitedSnGrads.C $(snGradSchemes)/uncorrectedSnGrad/uncorrectedSnGrads.C -//$(snGradSchemes)/quadraticFitSnGrad/quadraticFitSnGradData.C -//$(snGradSchemes)/quadraticFitSnGrad/quadraticFitSnGrads.C +/* +$(snGradSchemes)/quadraticFitSnGrad/quadraticFitSnGradData.C +$(snGradSchemes)/quadraticFitSnGrad/quadraticFitSnGrads.C +*/ convectionSchemes = finiteVolume/convectionSchemes $(convectionSchemes)/convectionScheme/convectionSchemes.C diff --git a/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H b/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H index ecf331fcfb..8c04f926a9 100644 --- a/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H +++ b/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H @@ -352,8 +352,8 @@ bool Foam::edgeFaceCirculator::operator!=(const edgeFaceCirculator& circ) const //- Step to next face. -Foam::edgeFaceCirculator::edgeFaceCirculator& - Foam::edgeFaceCirculator::operator++() +Foam::edgeFaceCirculator& +Foam::edgeFaceCirculator::operator++() { if (faceLabel_ == -1) { From 0d445841128b1f73a1661171711fe3209f897b4d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 22 Apr 2010 15:01:07 +0200 Subject: [PATCH 7/9] ENH: rationalize wmake rules to avoid unnecessary duplication - main mplib rules located in GENERAL_RULES with specializations (if any) under RULES. Modest change in a few options files, but cleans up the rules directories. previously in options: include $(RULES)/mplib$(WM_MPLIB) now in options: sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) sinclude $(RULES)/mplib$(WM_MPLIB) For GNU make it would be permissible to write both in a single line. --- src/Pstream/gamma/Make/options | 5 +++-- src/Pstream/mpi/Make/options | 5 +++-- src/parallel/decompose/ptscotchDecomp/Make/options | 3 ++- wmake/MakefileFiles | 2 +- wmake/MakefileOptions | 2 +- wmake/rules/General/standard | 2 ++ wmake/rules/SiCortex64Gcc/mplib | 1 - wmake/rules/SiCortex64Gcc/mplibSYSTEMOPENMPI | 1 - wmake/rules/SunOS64Gcc/mplib | 1 - wmake/rules/SunOS64Gcc/mplibOPENMPI | 1 - wmake/rules/SunOS64Gcc/mplibSYSTEMOPENMPI | 1 - wmake/rules/linux64Gcc/X | 1 - wmake/rules/linux64Gcc/general | 1 - wmake/rules/linux64Gcc/mplib | 1 - wmake/rules/linux64Gcc/mplibGAMMA | 1 - wmake/rules/linux64Gcc/mplibMPICH | 1 - wmake/rules/linux64Gcc/mplibMPICH-GM | 1 - wmake/rules/linux64Gcc/mplibOPENMPI | 1 - wmake/rules/linux64Gcc/mplibQSMPI | 1 - wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI | 1 - wmake/rules/linux64Gcc43/X | 1 - wmake/rules/linux64Gcc43/general | 1 - wmake/rules/linux64Gcc43/mplib | 1 - wmake/rules/linux64Gcc43/mplibGAMMA | 1 - wmake/rules/linux64Gcc43/mplibMPICH | 1 - wmake/rules/linux64Gcc43/mplibMPICH-GM | 1 - wmake/rules/linux64Gcc43/mplibOPENMPI | 1 - wmake/rules/linux64Gcc43/mplibQSMPI | 1 - wmake/rules/linux64Gcc43/mplibSYSTEMOPENMPI | 1 - wmake/rules/linux64Gcc44/X | 1 - wmake/rules/linux64Gcc44/general | 1 - wmake/rules/linux64Gcc44/mplib | 1 - wmake/rules/linux64Gcc44/mplibGAMMA | 1 - wmake/rules/linux64Gcc44/mplibMPICH | 1 - wmake/rules/linux64Gcc44/mplibMPICH-GM | 1 - wmake/rules/linux64Gcc44/mplibOPENMPI | 1 - wmake/rules/linux64Gcc44/mplibQSMPI | 1 - wmake/rules/linux64Gcc44/mplibSYSTEMOPENMPI | 1 - wmake/rules/linux64Gcc45/X | 1 - wmake/rules/linux64Gcc45/general | 1 - wmake/rules/linux64Gcc45/mplib | 1 - wmake/rules/linux64Gcc45/mplibGAMMA | 1 - wmake/rules/linux64Gcc45/mplibMPICH | 1 - wmake/rules/linux64Gcc45/mplibMPICH-GM | 1 - wmake/rules/linux64Gcc45/mplibOPENMPI | 1 - wmake/rules/linux64Gcc45/mplibQSMPI | 1 - wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI | 1 - wmake/rules/linux64Icc/X | 1 - wmake/rules/linux64Icc/general | 1 - wmake/rules/linux64Icc/mplib | 1 - wmake/rules/linux64Icc/mplibMPICH | 1 - wmake/rules/linux64Icc/mplibOPENMPI | 1 - wmake/rules/linux64Icc/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxGcc/X | 1 - wmake/rules/linuxGcc/general | 1 - wmake/rules/linuxGcc/mplib | 1 - wmake/rules/linuxGcc/mplibGAMMA | 1 - wmake/rules/linuxGcc/mplibMPICH | 1 - wmake/rules/linuxGcc/mplibMPICH-GM | 1 - wmake/rules/linuxGcc/mplibOPENMPI | 1 - wmake/rules/linuxGcc/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxGcc43/X | 1 - wmake/rules/linuxGcc43/general | 1 - wmake/rules/linuxGcc43/mplib | 1 - wmake/rules/linuxGcc43/mplibGAMMA | 1 - wmake/rules/linuxGcc43/mplibMPICH | 1 - wmake/rules/linuxGcc43/mplibMPICH-GM | 1 - wmake/rules/linuxGcc43/mplibOPENMPI | 1 - wmake/rules/linuxGcc43/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxGcc44/X | 1 - wmake/rules/linuxGcc44/general | 1 - wmake/rules/linuxGcc44/mplib | 1 - wmake/rules/linuxGcc44/mplibGAMMA | 1 - wmake/rules/linuxGcc44/mplibMPICH | 1 - wmake/rules/linuxGcc44/mplibMPICH-GM | 1 - wmake/rules/linuxGcc44/mplibOPENMPI | 1 - wmake/rules/linuxGcc44/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxGcc45/X | 1 - wmake/rules/linuxGcc45/general | 1 - wmake/rules/linuxGcc45/mplib | 1 - wmake/rules/linuxGcc45/mplibGAMMA | 1 - wmake/rules/linuxGcc45/mplibMPICH | 1 - wmake/rules/linuxGcc45/mplibMPICH-GM | 1 - wmake/rules/linuxGcc45/mplibOPENMPI | 1 - wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxIA64Gcc/mplib | 1 - wmake/rules/linuxIA64Gcc/mplibMPICH | 1 - wmake/rules/linuxIA64Gcc/mplibOPENMPI | 1 - wmake/rules/linuxIA64Gcc/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxIA64Icc/mplib | 1 - wmake/rules/linuxIA64Icc/mplibMPICH | 1 - wmake/rules/linuxIA64Icc/mplibOPENMPI | 1 - wmake/rules/linuxIA64Icc/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxIcc/X | 1 - wmake/rules/linuxIcc/general | 1 - wmake/rules/linuxIcc/mplib | 1 - wmake/rules/linuxIcc/mplibMPICH | 1 - wmake/rules/linuxIcc/mplibOPENMPI | 1 - wmake/rules/linuxIcc/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxPPC64Gcc/mplib | 1 - wmake/rules/linuxPPC64Gcc/mplibGAMMA | 1 - wmake/rules/linuxPPC64Gcc/mplibMPICH | 1 - wmake/rules/linuxPPC64Gcc/mplibMPICH-GM | 1 - wmake/rules/linuxPPC64Gcc/mplibOPENMPI | 1 - wmake/rules/linuxPPC64Gcc/mplibQSMPI | 1 - wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI | 1 - wmake/rules/linuxmingw32/mplib | 1 - wmake/rules/linuxmingw32/mplibGAMMA | 1 - wmake/rules/linuxmingw32/mplibMPICH | 1 - wmake/rules/linuxmingw32/mplibMPICH-GM | 1 - wmake/rules/linuxmingw32/mplibOPENMPI | 1 - wmake/rules/linuxmingw32/mplibSYSTEMOPENMPI | 1 - wmake/rules/solarisGcc/mplib | 1 - wmake/rules/solarisGcc/mplibOPENMPI | 1 - wmake/rules/solarisGcc/mplibSYSTEMOPENMPI | 1 - 115 files changed, 12 insertions(+), 116 deletions(-) delete mode 120000 wmake/rules/SiCortex64Gcc/mplib delete mode 120000 wmake/rules/SiCortex64Gcc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/SunOS64Gcc/mplib delete mode 120000 wmake/rules/SunOS64Gcc/mplibOPENMPI delete mode 120000 wmake/rules/SunOS64Gcc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linux64Gcc/X delete mode 120000 wmake/rules/linux64Gcc/mplib delete mode 120000 wmake/rules/linux64Gcc/mplibGAMMA delete mode 120000 wmake/rules/linux64Gcc/mplibMPICH delete mode 120000 wmake/rules/linux64Gcc/mplibMPICH-GM delete mode 120000 wmake/rules/linux64Gcc/mplibOPENMPI delete mode 120000 wmake/rules/linux64Gcc/mplibQSMPI delete mode 120000 wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linux64Gcc43/X delete mode 120000 wmake/rules/linux64Gcc43/mplib delete mode 120000 wmake/rules/linux64Gcc43/mplibGAMMA delete mode 120000 wmake/rules/linux64Gcc43/mplibMPICH delete mode 120000 wmake/rules/linux64Gcc43/mplibMPICH-GM delete mode 120000 wmake/rules/linux64Gcc43/mplibOPENMPI delete mode 120000 wmake/rules/linux64Gcc43/mplibQSMPI delete mode 120000 wmake/rules/linux64Gcc43/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linux64Gcc44/X delete mode 120000 wmake/rules/linux64Gcc44/mplib delete mode 120000 wmake/rules/linux64Gcc44/mplibGAMMA delete mode 120000 wmake/rules/linux64Gcc44/mplibMPICH delete mode 120000 wmake/rules/linux64Gcc44/mplibMPICH-GM delete mode 120000 wmake/rules/linux64Gcc44/mplibOPENMPI delete mode 120000 wmake/rules/linux64Gcc44/mplibQSMPI delete mode 120000 wmake/rules/linux64Gcc44/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linux64Gcc45/X delete mode 120000 wmake/rules/linux64Gcc45/mplib delete mode 120000 wmake/rules/linux64Gcc45/mplibGAMMA delete mode 120000 wmake/rules/linux64Gcc45/mplibMPICH delete mode 120000 wmake/rules/linux64Gcc45/mplibMPICH-GM delete mode 120000 wmake/rules/linux64Gcc45/mplibOPENMPI delete mode 120000 wmake/rules/linux64Gcc45/mplibQSMPI delete mode 120000 wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linux64Icc/X delete mode 120000 wmake/rules/linux64Icc/mplib delete mode 120000 wmake/rules/linux64Icc/mplibMPICH delete mode 120000 wmake/rules/linux64Icc/mplibOPENMPI delete mode 120000 wmake/rules/linux64Icc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxGcc/X delete mode 120000 wmake/rules/linuxGcc/mplib delete mode 120000 wmake/rules/linuxGcc/mplibGAMMA delete mode 120000 wmake/rules/linuxGcc/mplibMPICH delete mode 120000 wmake/rules/linuxGcc/mplibMPICH-GM delete mode 120000 wmake/rules/linuxGcc/mplibOPENMPI delete mode 120000 wmake/rules/linuxGcc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxGcc43/X delete mode 120000 wmake/rules/linuxGcc43/mplib delete mode 120000 wmake/rules/linuxGcc43/mplibGAMMA delete mode 120000 wmake/rules/linuxGcc43/mplibMPICH delete mode 120000 wmake/rules/linuxGcc43/mplibMPICH-GM delete mode 120000 wmake/rules/linuxGcc43/mplibOPENMPI delete mode 120000 wmake/rules/linuxGcc43/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxGcc44/X delete mode 120000 wmake/rules/linuxGcc44/mplib delete mode 120000 wmake/rules/linuxGcc44/mplibGAMMA delete mode 120000 wmake/rules/linuxGcc44/mplibMPICH delete mode 120000 wmake/rules/linuxGcc44/mplibMPICH-GM delete mode 120000 wmake/rules/linuxGcc44/mplibOPENMPI delete mode 120000 wmake/rules/linuxGcc44/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxGcc45/X delete mode 120000 wmake/rules/linuxGcc45/mplib delete mode 120000 wmake/rules/linuxGcc45/mplibGAMMA delete mode 120000 wmake/rules/linuxGcc45/mplibMPICH delete mode 120000 wmake/rules/linuxGcc45/mplibMPICH-GM delete mode 120000 wmake/rules/linuxGcc45/mplibOPENMPI delete mode 120000 wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxIA64Gcc/mplib delete mode 120000 wmake/rules/linuxIA64Gcc/mplibMPICH delete mode 120000 wmake/rules/linuxIA64Gcc/mplibOPENMPI delete mode 120000 wmake/rules/linuxIA64Gcc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxIA64Icc/mplib delete mode 120000 wmake/rules/linuxIA64Icc/mplibMPICH delete mode 120000 wmake/rules/linuxIA64Icc/mplibOPENMPI delete mode 120000 wmake/rules/linuxIA64Icc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxIcc/X delete mode 120000 wmake/rules/linuxIcc/mplib delete mode 120000 wmake/rules/linuxIcc/mplibMPICH delete mode 120000 wmake/rules/linuxIcc/mplibOPENMPI delete mode 120000 wmake/rules/linuxIcc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxPPC64Gcc/mplib delete mode 120000 wmake/rules/linuxPPC64Gcc/mplibGAMMA delete mode 120000 wmake/rules/linuxPPC64Gcc/mplibMPICH delete mode 120000 wmake/rules/linuxPPC64Gcc/mplibMPICH-GM delete mode 120000 wmake/rules/linuxPPC64Gcc/mplibOPENMPI delete mode 120000 wmake/rules/linuxPPC64Gcc/mplibQSMPI delete mode 120000 wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/linuxmingw32/mplib delete mode 120000 wmake/rules/linuxmingw32/mplibGAMMA delete mode 120000 wmake/rules/linuxmingw32/mplibMPICH delete mode 120000 wmake/rules/linuxmingw32/mplibMPICH-GM delete mode 120000 wmake/rules/linuxmingw32/mplibOPENMPI delete mode 120000 wmake/rules/linuxmingw32/mplibSYSTEMOPENMPI delete mode 120000 wmake/rules/solarisGcc/mplib delete mode 120000 wmake/rules/solarisGcc/mplibOPENMPI delete mode 120000 wmake/rules/solarisGcc/mplibSYSTEMOPENMPI diff --git a/src/Pstream/gamma/Make/options b/src/Pstream/gamma/Make/options index 90632e801e..74b6659671 100644 --- a/src/Pstream/gamma/Make/options +++ b/src/Pstream/gamma/Make/options @@ -1,4 +1,5 @@ -include $(RULES)/mplib$(WM_MPLIB) +sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) +sinclude $(RULES)/mplib$(WM_MPLIB) -EXE_INC = $(PFLAGS) $(PINC) +EXE_INC = $(PFLAGS) $(PINC) LIB_LIBS = $(PLIBS) diff --git a/src/Pstream/mpi/Make/options b/src/Pstream/mpi/Make/options index 90632e801e..74b6659671 100644 --- a/src/Pstream/mpi/Make/options +++ b/src/Pstream/mpi/Make/options @@ -1,4 +1,5 @@ -include $(RULES)/mplib$(WM_MPLIB) +sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) +sinclude $(RULES)/mplib$(WM_MPLIB) -EXE_INC = $(PFLAGS) $(PINC) +EXE_INC = $(PFLAGS) $(PINC) LIB_LIBS = $(PLIBS) diff --git a/src/parallel/decompose/ptscotchDecomp/Make/options b/src/parallel/decompose/ptscotchDecomp/Make/options index f8e8f92460..b2b76fce05 100644 --- a/src/parallel/decompose/ptscotchDecomp/Make/options +++ b/src/parallel/decompose/ptscotchDecomp/Make/options @@ -1,4 +1,5 @@ -include $(RULES)/mplib$(WM_MPLIB) +sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) +sinclude $(RULES)/mplib$(WM_MPLIB) EXE_INC = \ $(PFLAGS) $(PINC) \ diff --git a/wmake/MakefileFiles b/wmake/MakefileFiles index 59eabfe5a5..7303329f69 100644 --- a/wmake/MakefileFiles +++ b/wmake/MakefileFiles @@ -58,7 +58,7 @@ IFILES = $(WM_OPTIONS)/includeDeps allFiles : $(FILES) $(SFILES) $(OFILES) $(DFILES) $(IFILES) $(FILES) : files - @$(CPP) $(GFLAGS) $(FFLAGS) files > $(FILES) + @$(CPP) $(GFLAGS) $(FFLAGS) files | sed -e 's@ *@ @g' > $(FILES) $(SFILES): files @$(WM_SCRIPTS)/makeDerivedFiles diff --git a/wmake/MakefileOptions b/wmake/MakefileOptions index 0a31e6f69a..45d33ffb71 100644 --- a/wmake/MakefileOptions +++ b/wmake/MakefileOptions @@ -48,7 +48,7 @@ OPTIONS = $(WM_OPTIONS)/options #------------------------------------------------------------------------------ $(OPTIONS) : options - @$(WM_SCRIPTS)/makeDir $(WM_OPTIONS) ; $(CPP) $(GFLAGS) options > $(OPTIONS) + @$(WM_SCRIPTS)/makeDir $(WM_OPTIONS) ; $(CPP) $(GFLAGS) options | sed -e 's@ *@ @g' > $(OPTIONS) #------------------------------------------------------------------------------ diff --git a/wmake/rules/General/standard b/wmake/rules/General/standard index 9b2cbd2527..76a60a31ce 100644 --- a/wmake/rules/General/standard +++ b/wmake/rules/General/standard @@ -9,3 +9,5 @@ include $(GENERAL_RULES)/coco-cpp ## include $(GENERAL_RULES)/btyacc++ include $(GENERAL_RULES)/bison include $(GENERAL_RULES)/moc + +include $(GENERAL_RULES)/X diff --git a/wmake/rules/SiCortex64Gcc/mplib b/wmake/rules/SiCortex64Gcc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/SiCortex64Gcc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/SiCortex64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/SiCortex64Gcc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/SiCortex64Gcc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/SunOS64Gcc/mplib b/wmake/rules/SunOS64Gcc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/SunOS64Gcc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/SunOS64Gcc/mplibOPENMPI b/wmake/rules/SunOS64Gcc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/SunOS64Gcc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/SunOS64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/SunOS64Gcc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/SunOS64Gcc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc/X b/wmake/rules/linux64Gcc/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linux64Gcc/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linux64Gcc/general b/wmake/rules/linux64Gcc/general index 7285501d98..e7faa0c0f2 100644 --- a/wmake/rules/linux64Gcc/general +++ b/wmake/rules/linux64Gcc/general @@ -2,6 +2,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linux64Gcc/mplib b/wmake/rules/linux64Gcc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linux64Gcc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linux64Gcc/mplibGAMMA b/wmake/rules/linux64Gcc/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linux64Gcc/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linux64Gcc/mplibMPICH b/wmake/rules/linux64Gcc/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linux64Gcc/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linux64Gcc/mplibMPICH-GM b/wmake/rules/linux64Gcc/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linux64Gcc/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linux64Gcc/mplibOPENMPI b/wmake/rules/linux64Gcc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linux64Gcc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc/mplibQSMPI b/wmake/rules/linux64Gcc/mplibQSMPI deleted file mode 120000 index d3446c68f1..0000000000 --- a/wmake/rules/linux64Gcc/mplibQSMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibQSMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc43/X b/wmake/rules/linux64Gcc43/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linux64Gcc43/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linux64Gcc43/general b/wmake/rules/linux64Gcc43/general index 7285501d98..e7faa0c0f2 100644 --- a/wmake/rules/linux64Gcc43/general +++ b/wmake/rules/linux64Gcc43/general @@ -2,6 +2,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linux64Gcc43/mplib b/wmake/rules/linux64Gcc43/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linux64Gcc43/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linux64Gcc43/mplibGAMMA b/wmake/rules/linux64Gcc43/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linux64Gcc43/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linux64Gcc43/mplibMPICH b/wmake/rules/linux64Gcc43/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linux64Gcc43/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linux64Gcc43/mplibMPICH-GM b/wmake/rules/linux64Gcc43/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linux64Gcc43/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linux64Gcc43/mplibOPENMPI b/wmake/rules/linux64Gcc43/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linux64Gcc43/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc43/mplibQSMPI b/wmake/rules/linux64Gcc43/mplibQSMPI deleted file mode 120000 index d3446c68f1..0000000000 --- a/wmake/rules/linux64Gcc43/mplibQSMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibQSMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc43/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc43/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linux64Gcc43/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc44/X b/wmake/rules/linux64Gcc44/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linux64Gcc44/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linux64Gcc44/general b/wmake/rules/linux64Gcc44/general index 7285501d98..e7faa0c0f2 100644 --- a/wmake/rules/linux64Gcc44/general +++ b/wmake/rules/linux64Gcc44/general @@ -2,6 +2,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linux64Gcc44/mplib b/wmake/rules/linux64Gcc44/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linux64Gcc44/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linux64Gcc44/mplibGAMMA b/wmake/rules/linux64Gcc44/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linux64Gcc44/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linux64Gcc44/mplibMPICH b/wmake/rules/linux64Gcc44/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linux64Gcc44/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linux64Gcc44/mplibMPICH-GM b/wmake/rules/linux64Gcc44/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linux64Gcc44/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linux64Gcc44/mplibOPENMPI b/wmake/rules/linux64Gcc44/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linux64Gcc44/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc44/mplibQSMPI b/wmake/rules/linux64Gcc44/mplibQSMPI deleted file mode 120000 index d3446c68f1..0000000000 --- a/wmake/rules/linux64Gcc44/mplibQSMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibQSMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc44/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc44/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linux64Gcc44/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/X b/wmake/rules/linux64Gcc45/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linux64Gcc45/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/general b/wmake/rules/linux64Gcc45/general index bfe6574e81..f9bb2e6b1e 100644 --- a/wmake/rules/linux64Gcc45/general +++ b/wmake/rules/linux64Gcc45/general @@ -5,6 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linux64Gcc45/mplib b/wmake/rules/linux64Gcc45/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linux64Gcc45/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibGAMMA b/wmake/rules/linux64Gcc45/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linux64Gcc45/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibMPICH b/wmake/rules/linux64Gcc45/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linux64Gcc45/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibMPICH-GM b/wmake/rules/linux64Gcc45/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linux64Gcc45/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibOPENMPI b/wmake/rules/linux64Gcc45/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linux64Gcc45/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibQSMPI b/wmake/rules/linux64Gcc45/mplibQSMPI deleted file mode 120000 index d3446c68f1..0000000000 --- a/wmake/rules/linux64Gcc45/mplibQSMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibQSMPI \ No newline at end of file diff --git a/wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI b/wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linux64Gcc45/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Icc/X b/wmake/rules/linux64Icc/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linux64Icc/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linux64Icc/general b/wmake/rules/linux64Icc/general index 7285501d98..e7faa0c0f2 100644 --- a/wmake/rules/linux64Icc/general +++ b/wmake/rules/linux64Icc/general @@ -2,6 +2,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linux64Icc/mplib b/wmake/rules/linux64Icc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linux64Icc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linux64Icc/mplibMPICH b/wmake/rules/linux64Icc/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linux64Icc/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linux64Icc/mplibOPENMPI b/wmake/rules/linux64Icc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linux64Icc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linux64Icc/mplibSYSTEMOPENMPI b/wmake/rules/linux64Icc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linux64Icc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc/X b/wmake/rules/linuxGcc/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linuxGcc/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linuxGcc/general b/wmake/rules/linuxGcc/general index c19ca19394..ce84842fee 100644 --- a/wmake/rules/linuxGcc/general +++ b/wmake/rules/linuxGcc/general @@ -4,6 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc/mplib b/wmake/rules/linuxGcc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxGcc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxGcc/mplibGAMMA b/wmake/rules/linuxGcc/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linuxGcc/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linuxGcc/mplibMPICH b/wmake/rules/linuxGcc/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxGcc/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxGcc/mplibMPICH-GM b/wmake/rules/linuxGcc/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linuxGcc/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linuxGcc/mplibOPENMPI b/wmake/rules/linuxGcc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxGcc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxGcc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc43/X b/wmake/rules/linuxGcc43/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linuxGcc43/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linuxGcc43/general b/wmake/rules/linuxGcc43/general index c19ca19394..ce84842fee 100644 --- a/wmake/rules/linuxGcc43/general +++ b/wmake/rules/linuxGcc43/general @@ -4,6 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc43/mplib b/wmake/rules/linuxGcc43/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxGcc43/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxGcc43/mplibGAMMA b/wmake/rules/linuxGcc43/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linuxGcc43/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linuxGcc43/mplibMPICH b/wmake/rules/linuxGcc43/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxGcc43/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxGcc43/mplibMPICH-GM b/wmake/rules/linuxGcc43/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linuxGcc43/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linuxGcc43/mplibOPENMPI b/wmake/rules/linuxGcc43/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxGcc43/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc43/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc43/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxGcc43/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc44/X b/wmake/rules/linuxGcc44/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linuxGcc44/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linuxGcc44/general b/wmake/rules/linuxGcc44/general index c19ca19394..ce84842fee 100644 --- a/wmake/rules/linuxGcc44/general +++ b/wmake/rules/linuxGcc44/general @@ -4,6 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc44/mplib b/wmake/rules/linuxGcc44/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxGcc44/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxGcc44/mplibGAMMA b/wmake/rules/linuxGcc44/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linuxGcc44/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linuxGcc44/mplibMPICH b/wmake/rules/linuxGcc44/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxGcc44/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxGcc44/mplibMPICH-GM b/wmake/rules/linuxGcc44/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linuxGcc44/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linuxGcc44/mplibOPENMPI b/wmake/rules/linuxGcc44/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxGcc44/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc44/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc44/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxGcc44/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/X b/wmake/rules/linuxGcc45/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linuxGcc45/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/general b/wmake/rules/linuxGcc45/general index 7e9226e795..91c54db85d 100644 --- a/wmake/rules/linuxGcc45/general +++ b/wmake/rules/linuxGcc45/general @@ -6,6 +6,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc45/mplib b/wmake/rules/linuxGcc45/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxGcc45/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibGAMMA b/wmake/rules/linuxGcc45/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linuxGcc45/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibMPICH b/wmake/rules/linuxGcc45/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxGcc45/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibMPICH-GM b/wmake/rules/linuxGcc45/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linuxGcc45/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibOPENMPI b/wmake/rules/linuxGcc45/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxGcc45/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxGcc45/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxIA64Gcc/mplib b/wmake/rules/linuxIA64Gcc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxIA64Gcc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxIA64Gcc/mplibMPICH b/wmake/rules/linuxIA64Gcc/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxIA64Gcc/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxIA64Gcc/mplibOPENMPI b/wmake/rules/linuxIA64Gcc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxIA64Gcc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxIA64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxIA64Gcc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxIA64Gcc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxIA64Icc/mplib b/wmake/rules/linuxIA64Icc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxIA64Icc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxIA64Icc/mplibMPICH b/wmake/rules/linuxIA64Icc/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxIA64Icc/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxIA64Icc/mplibOPENMPI b/wmake/rules/linuxIA64Icc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxIA64Icc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxIA64Icc/mplibSYSTEMOPENMPI b/wmake/rules/linuxIA64Icc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxIA64Icc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxIcc/X b/wmake/rules/linuxIcc/X deleted file mode 120000 index 73572d6c04..0000000000 --- a/wmake/rules/linuxIcc/X +++ /dev/null @@ -1 +0,0 @@ -../General/X \ No newline at end of file diff --git a/wmake/rules/linuxIcc/general b/wmake/rules/linuxIcc/general index c19ca19394..ce84842fee 100644 --- a/wmake/rules/linuxIcc/general +++ b/wmake/rules/linuxIcc/general @@ -4,6 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X include $(RULES)/c include $(RULES)/c++ diff --git a/wmake/rules/linuxIcc/mplib b/wmake/rules/linuxIcc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxIcc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxIcc/mplibMPICH b/wmake/rules/linuxIcc/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxIcc/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxIcc/mplibOPENMPI b/wmake/rules/linuxIcc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxIcc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxIcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxIcc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxIcc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxPPC64Gcc/mplib b/wmake/rules/linuxPPC64Gcc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxPPC64Gcc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxPPC64Gcc/mplibGAMMA b/wmake/rules/linuxPPC64Gcc/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linuxPPC64Gcc/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linuxPPC64Gcc/mplibMPICH b/wmake/rules/linuxPPC64Gcc/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxPPC64Gcc/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM b/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linuxPPC64Gcc/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linuxPPC64Gcc/mplibOPENMPI b/wmake/rules/linuxPPC64Gcc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxPPC64Gcc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxPPC64Gcc/mplibQSMPI b/wmake/rules/linuxPPC64Gcc/mplibQSMPI deleted file mode 120000 index d3446c68f1..0000000000 --- a/wmake/rules/linuxPPC64Gcc/mplibQSMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibQSMPI \ No newline at end of file diff --git a/wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxmingw32/mplib b/wmake/rules/linuxmingw32/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/linuxmingw32/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/linuxmingw32/mplibGAMMA b/wmake/rules/linuxmingw32/mplibGAMMA deleted file mode 120000 index 4b41692bf6..0000000000 --- a/wmake/rules/linuxmingw32/mplibGAMMA +++ /dev/null @@ -1 +0,0 @@ -../General/mplibGAMMA \ No newline at end of file diff --git a/wmake/rules/linuxmingw32/mplibMPICH b/wmake/rules/linuxmingw32/mplibMPICH deleted file mode 120000 index c83eb564e1..0000000000 --- a/wmake/rules/linuxmingw32/mplibMPICH +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH \ No newline at end of file diff --git a/wmake/rules/linuxmingw32/mplibMPICH-GM b/wmake/rules/linuxmingw32/mplibMPICH-GM deleted file mode 120000 index 621d0857d3..0000000000 --- a/wmake/rules/linuxmingw32/mplibMPICH-GM +++ /dev/null @@ -1 +0,0 @@ -../General/mplibMPICH-GM \ No newline at end of file diff --git a/wmake/rules/linuxmingw32/mplibOPENMPI b/wmake/rules/linuxmingw32/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/linuxmingw32/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/linuxmingw32/mplibSYSTEMOPENMPI b/wmake/rules/linuxmingw32/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/linuxmingw32/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file diff --git a/wmake/rules/solarisGcc/mplib b/wmake/rules/solarisGcc/mplib deleted file mode 120000 index 1fa0d64ec8..0000000000 --- a/wmake/rules/solarisGcc/mplib +++ /dev/null @@ -1 +0,0 @@ -../General/mplib \ No newline at end of file diff --git a/wmake/rules/solarisGcc/mplibOPENMPI b/wmake/rules/solarisGcc/mplibOPENMPI deleted file mode 120000 index 2d938a16a6..0000000000 --- a/wmake/rules/solarisGcc/mplibOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibOPENMPI \ No newline at end of file diff --git a/wmake/rules/solarisGcc/mplibSYSTEMOPENMPI b/wmake/rules/solarisGcc/mplibSYSTEMOPENMPI deleted file mode 120000 index cc63a574c3..0000000000 --- a/wmake/rules/solarisGcc/mplibSYSTEMOPENMPI +++ /dev/null @@ -1 +0,0 @@ -../General/mplibSYSTEMOPENMPI \ No newline at end of file From b16ef5f0fae69474198738af69dee123bac4b58e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 22 Apr 2010 15:46:54 +0200 Subject: [PATCH 8/9] ENH: set PINC, PLIBS in the rules (not the env) for system-openmpi BUG: syntax error in settings.sh --- etc/settings.csh | 18 ++++++------------ etc/settings.sh | 14 +++++--------- wmake/rules/General/mplibSYSTEMOPENMPI | 4 ++++ 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/etc/settings.csh b/etc/settings.csh index b895263ba8..4bde0e7ee0 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -137,8 +137,7 @@ case OpenFOAM: _foamAddPath $gccDir/bin # 64-bit needs lib64, but 32-bit needs lib (not lib32) - if ( "$WM_ARCH_OPTION" = 64 ) then - then + if ($WM_ARCH_OPTION == 64) then _foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH else _foamAddLib $gccDir/lib @@ -150,7 +149,6 @@ case OpenFOAM: # add in mpc libraries (not need for older gcc) if ( $?mpc_version ) then - then _foamAddLib $mpcDir/lib endif @@ -209,18 +207,14 @@ case OPENMPI: breaksw case SYSTEMOPENMPI: - # This uses the installed openmpi. It needs mpicc installed! + # use the system installed openmpi, get library directory via mpicc set mpi_version=openmpi-system - - # Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI - setenv PINC `mpicc --showme:compile` - setenv PLIBS `mpicc --showme:link` - set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'` + set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'` if ($?FOAM_VERBOSE && $?prompt) then - echo "Using system installed MPI:" - echo " compile flags : $PINC" - echo " link flags : $PLIBS" + echo "Using system installed OpenMPI:" + echo " compile flags : `mpicc --showme:compile`" + echo " link flags : `mpicc --showme:link`" echo " libmpi dir : $libDir" endif diff --git a/etc/settings.sh b/etc/settings.sh index 37ecb1f2a1..17f029539a 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -235,19 +235,15 @@ OPENMPI) ;; SYSTEMOPENMPI) - # This uses the installed openmpi. It needs mpicc installed! + # use the system installed openmpi, get library directory via mpicc mpi_version=openmpi-system - - # Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI - export PINC=`mpicc --showme:compile` - export PLIBS=`mpicc --showme:link` - libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'` + libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'` if [ "$FOAM_VERBOSE" -a "$PS1" ] then - echo "Using system installed MPI:" - echo " compile flags : $PINC" - echo " link flags : $PLIBS" + echo "Using system installed OpenMPI:" + echo " compile flags : `mpicc --showme:compile`" + echo " link flags : `mpicc --showme:link`" echo " libmpi dir : $libDir" fi diff --git a/wmake/rules/General/mplibSYSTEMOPENMPI b/wmake/rules/General/mplibSYSTEMOPENMPI index 98fa814ce3..639c8ce277 100644 --- a/wmake/rules/General/mplibSYSTEMOPENMPI +++ b/wmake/rules/General/mplibSYSTEMOPENMPI @@ -1 +1,5 @@ +# use the system installed openmpi - mpicc must be installed + PFLAGS = -DOMPI_SKIP_MPICXX +PINC = $(shell mpicc --showme:compile) +PLIBS = $(shell mpicc --showme:link) From 03338b9ea99beafe10e59faa83b704fbbdc50532 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 23 Apr 2010 10:23:08 +0200 Subject: [PATCH 9/9] STYLE: partial revert for 5cfa97624eedd60d0d15fef4b9bfb685ababba44 --- .../dragModels/PDRDragModel/PDRDragModelNew.C | 8 ++------ .../XiEqModels/XiEqModel/XiEqModelNew.C | 13 ++++--------- .../XiModels/XiGModels/XiGModel/XiGModelNew.C | 13 ++++--------- .../PDRFoam/XiModels/XiModel/XiModelNew.C | 12 ++++-------- .../combustionModel/combustionModelNew.C | 15 ++++----------- .../compressible/sonicDyMFoam/sonicDyMFoam.C | 2 +- .../phaseChangeTwoPhaseMixtureNew.C | 10 ++++------ .../dragModels/dragModel/dragModelNew.C | 14 ++++---------- .../conductivityModel/conductivityModelNew.C | 8 ++------ .../frictionalStressModelNew.C | 8 ++------ .../granularPressureModelNew.C | 8 ++------ .../radialModel/radialModel/radialModelNew.C | 8 ++------ .../viscosityModel/viscosityModelNew.C | 5 +---- .../phaseModel/phaseModel/phaseModel.C | 3 +-- .../extrudeModel/extrudeModelNew.C | 8 ++------ .../mesh/manipulation/moveMesh/moveMesh.C | 2 +- src/ODE/ODESolvers/ODESolver/ODESolverNew.C | 3 +-- src/OpenFOAM/db/IOstreams/token/token.C | 3 +-- src/OpenFOAM/db/dictionary/dictionaryIO.C | 3 +-- src/OpenFOAM/db/dictionary/entry/entryIO.C | 3 +-- .../functionObject/functionObject.C | 3 +-- .../pointPatchField/pointPatchFieldNew.C | 12 ++++-------- src/OpenFOAM/graph/graph.C | 6 ++++-- .../lduMatrix/lduMatrixPreconditioner.C | 3 +-- .../lduMatrix/lduMatrix/lduMatrixSmoother.C | 3 +-- .../lduMatrix/lduMatrix/lduMatrixSolver.C | 3 +-- .../GAMGInterfaceField/GAMGInterfaceFieldNew.C | 3 +-- .../GAMGInterface/GAMGInterfaceNew.C | 3 +-- .../facePointPatch/facePointPatchNew.C | 3 +-- .../polyPatches/polyPatch/polyPatchNew.C | 6 ++---- .../polyMesh/zones/cellZone/cellZoneNew.C | 8 ++------ .../polyMesh/zones/faceZone/faceZoneNew.C | 8 ++------ .../polyMesh/zones/pointZone/pointZoneNew.C | 8 ++------ src/conversion/ensight/part/ensightPart.C | 3 +-- .../dynamicFvMesh/dynamicFvMeshNew.C | 3 +-- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 4 ++-- .../solidBodyMotionFunctionNew.C | 8 ++------ .../meshCut/cellLooper/cellLooper.C | 3 +-- src/dynamicMesh/motionSolver/motionSolver.C | 3 +-- .../polyMeshModifier/polyMeshModifierNew.C | 3 +-- src/edgeMesh/edgeMeshNew.C | 13 +++++++++---- .../engineMesh/engineMesh/engineMeshNew.C | 3 +-- .../SRF/SRFModel/SRFModel/SRFModelNew.C | 3 +-- .../fvMesh/fvPatches/fvPatch/fvPatchNew.C | 3 +-- .../interpolation/interpolationNew.C | 9 +++------ .../displacementLayeredMotionFvMotionSolver.C | 2 +- .../motionDiffusivity/motionDiffusivity.C | 3 +-- .../injector/injectorType/injectorType.C | 8 ++------ .../atomizationModel/atomizationModelNew.C | 8 ++------ .../breakupModel/breakupModelNew.C | 8 ++------ .../collisionModel/collisionModelNew.C | 8 ++------ .../dispersionModel/dispersionModelNew.C | 8 ++------ .../dragModel/dragModel/dragModelNew.C | 8 ++------ .../evaporationModel/evaporationModelNew.C | 11 +++++------ .../heatTransferModel/heatTransferModelNew.C | 8 ++------ .../injectorModel/injectorModelNew.C | 8 ++------ .../wallModel/wallModel/wallModelNew.C | 8 ++------ .../BinaryCollisionModelNew.C | 5 +---- .../InflowBoundaryModelNew.C | 5 +---- .../WallInteractionModelNew.C | 5 +---- .../IntegrationScheme/IntegrationSchemeNew.C | 10 ++++------ .../IO/DataEntry/DataEntry/DataEntryNew.C | 3 +-- .../DispersionModel/DispersionModelNew.C | 5 +---- .../DragModel/DragModel/DragModelNew.C | 8 ++------ .../InjectionModel/InjectionModelNew.C | 5 +---- .../PatchInteractionModelNew.C | 5 +---- .../StandardWallInteraction.C | 2 +- .../PostProcessingModelNew.C | 5 +---- .../SurfaceFilmModel/SurfaceFilmModelNew.C | 5 +---- .../CompositionModel/CompositionModelNew.C | 5 +---- .../PhaseChangeModel/PhaseChangeModelNew.C | 5 +---- .../DevolatilisationModelNew.C | 5 +---- .../SurfaceReactionModelNew.C | 5 +---- .../HeatTransferModel/HeatTransferModelNew.C | 5 +---- .../basic/energyScalingFunctionNew.C | 13 ++++--------- .../pairPotential/basic/pairPotentialNew.C | 13 ++++--------- .../tetherPotential/basic/tetherPotentialNew.C | 18 ++++++------------ src/mesh/blockMesh/curvedEdges/curvedEdge.C | 4 +--- .../coordinateRotation/coordinateRotation.C | 3 +-- .../coordinateSystems/coordinateSystemNew.C | 13 +++++-------- .../searchableSurface/searchableSurface.C | 10 ++++------ .../sets/topoSetSource/topoSetSource.C | 12 ++++-------- src/meshTools/sets/topoSets/topoSet.C | 18 ++++++------------ .../decompositionMethod/decompositionMethod.C | 16 ++++------------ .../foamCalcFunctions/calcType/calcTypeNew.C | 3 +-- .../sixDoFRigidBodyMotionRestraintNew.C | 2 +- .../sampledSet/sampledSet/sampledSet.C | 8 ++------ src/sampling/sampledSet/writers/writer.C | 6 ++---- .../sampledSurface/sampledSurface.C | 12 ++++-------- .../injectionModel/injectionModelNew.C | 5 +---- .../phaseChangeModel/phaseChangeModelNew.C | 5 +---- .../basicPsiThermo/basicPsiThermoNew.C | 3 +-- .../basicRhoThermo/basicRhoThermoNew.C | 3 +-- .../psiChemistryModel/psiChemistryModelNew.C | 3 +-- .../rhoChemistryModel/rhoChemistryModelNew.C | 3 +-- .../chemistrySolver/chemistrySolverNew.C | 5 +---- .../laminarFlameSpeed/laminarFlameSpeedNew.C | 15 +++++---------- .../liquidMixture/liquidMixture.C | 3 +-- .../liquids/liquid/liquid.C | 7 ++----- src/thermophysicalModels/pdfs/pdf/pdfNew.C | 8 ++------ .../absorptionEmissionModelNew.C | 5 +---- .../scatterModel/scatterModelNew.C | 8 ++------ .../hCombustionThermo/hCombustionThermoNew.C | 6 ++---- .../hhuCombustionThermoNew.C | 6 ++++-- .../hsCombustionThermo/hsCombustionThermoNew.C | 6 ++---- .../hReactionThermo/hReactionThermoNew.C | 6 ++---- .../hsReactionThermo/hsReactionThermoNew.C | 6 ++---- .../solidMixture/solidMixture/solidMixture.C | 3 +-- .../solids/solid/solidNew.C | 3 +-- .../thermophysicalFunction.C | 6 ++++-- .../viscosityModel/viscosityModelNew.C | 8 ++------ .../LES/LESdeltas/LESdelta/LESdelta.C | 3 +-- .../LES/LESfilters/LESfilter/LESfilter.C | 3 +-- 113 files changed, 228 insertions(+), 504 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 869f9da12e..0c208d44cc 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::PDRDragModel::New +Foam::autoPtr Foam::PDRDragModel::New ( const dictionary& PDRProperties, const compressible::RASModel& turbulence, @@ -37,10 +36,7 @@ Foam::PDRDragModel::New const surfaceScalarField& phi ) { - const word modelType - ( - PDRProperties.lookup("PDRDragModel") - ); + const word modelType(PDRProperties.lookup("PDRDragModel")); Info<< "Selecting flame-wrinkling model " << modelType << endl; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C index 90a5d60787..6f347bbe2d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -27,19 +27,15 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::XiEqModel::New +Foam::autoPtr Foam::XiEqModel::New ( - const dictionary& XiEqProperties, + const dictionary& propDict, const hhuCombustionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) { - const word modelType - ( - XiEqProperties.lookup("XiEqModel") - ); + const word modelType(propDict.lookup("XiEqModel")); Info<< "Selecting flame-wrinkling model " << modelType << endl; @@ -63,8 +59,7 @@ Foam::XiEqModel::New << exit(FatalError); } - return autoPtr - (cstrIter()(XiEqProperties, thermo, turbulence, Su)); + return autoPtr(cstrIter()(propDict, thermo, turbulence, Su)); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C index 9f229740cc..b675e7f334 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -27,19 +27,15 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::XiGModel::New +Foam::autoPtr Foam::XiGModel::New ( - const dictionary& XiGProperties, + const dictionary& propDict, const hhuCombustionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) { - const word modelType - ( - XiGProperties.lookup("XiGModel") - ); + const word modelType(propDict.lookup("XiGModel")); Info<< "Selecting flame-wrinkling model " << modelType << endl; @@ -63,8 +59,7 @@ Foam::XiGModel::New << exit(FatalError); } - return autoPtr - (cstrIter()(XiGProperties, thermo, turbulence, Su)); + return autoPtr(cstrIter()(propDict, thermo, turbulence, Su)); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C index ae3d5b4988..a77f8e8a20 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -27,10 +27,9 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::XiModel::New +Foam::autoPtr Foam::XiModel::New ( - const dictionary& XiProperties, + const dictionary& propDict, const hhuCombustionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, @@ -39,10 +38,7 @@ Foam::XiModel::New const surfaceScalarField& phi ) { - const word modelType - ( - XiProperties.lookup("XiModel") - ); + const word modelType(propDict.lookup("XiModel")); Info<< "Selecting flame-wrinkling model " << modelType << endl; @@ -62,7 +58,7 @@ Foam::XiModel::New } return autoPtr - (cstrIter()(XiProperties, thermo, turbulence, Su, rho, b, phi)); + (cstrIter()(propDict, thermo, turbulence, Su, rho, b, phi)); } diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C index 09291807c3..ff1e54b0dc 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C @@ -27,23 +27,16 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::combustionModel::New +Foam::autoPtr Foam::combustionModel::New ( - const dictionary& combustionProperties, + const dictionary& propDict, const hsCombustionThermo& thermo, const compressible::turbulenceModel& turbulence, const surfaceScalarField& phi, const volScalarField& rho ) { - const word modelType - ( - combustionProperties.lookup - ( - "combustionModel" - ) - ); + const word modelType(propDict.lookup("combustionModel")); Info<< "Selecting combustion model " << modelType << endl; @@ -63,7 +56,7 @@ Foam::combustionModel::New } return autoPtr - (cstrIter()(combustionProperties, thermo, turbulence, phi, rho)); + (cstrIter()(propDict, thermo, turbulence, phi, rho)); } diff --git a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C index 4bd0cdc61f..312952bcbf 100644 --- a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) Info<< "\nStarting time loop\n" << endl; - autoPtr motionPtr = motionSolver::New(mesh); + autoPtr motionPtr = motionSolver::New(mesh); while (runTime.loop()) { diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C index b78b018880..bffffd6aae 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C @@ -37,7 +37,7 @@ Foam::phaseChangeTwoPhaseMixture::New ) { // get model name, but do not register the dictionary - const word phaseChangeTwoPhaseMixtureTypeName + const word mixtureType ( IOdictionary ( @@ -53,12 +53,10 @@ Foam::phaseChangeTwoPhaseMixture::New ).lookup("phaseChangeTwoPhaseMixture") ); - Info<< "Selecting phaseChange model " - << phaseChangeTwoPhaseMixtureTypeName << endl; + Info<< "Selecting phaseChange model " << mixtureType << endl; componentsConstructorTable::iterator cstrIter = - componentsConstructorTablePtr_ - ->find(phaseChangeTwoPhaseMixtureTypeName); + componentsConstructorTablePtr_->find(mixtureType); if (cstrIter == componentsConstructorTablePtr_->end()) { @@ -66,7 +64,7 @@ Foam::phaseChangeTwoPhaseMixture::New ( "phaseChangeTwoPhaseMixture::New" ) << "Unknown phaseChangeTwoPhaseMixture type " - << phaseChangeTwoPhaseMixtureTypeName << nl << nl + << mixtureType << nl << nl << "Valid phaseChangeTwoPhaseMixture types are : " << endl << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C index 773a6c70f9..d916f84693 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::dragModel::New +Foam::autoPtr Foam::dragModel::New ( const dictionary& interfaceDict, const volScalarField& alpha, @@ -36,15 +35,10 @@ Foam::dragModel::New const phaseModel& phaseb ) { - const word modelType - ( - interfaceDict.lookup("dragModel" + phasea.name()) - ); + const word modelType(interfaceDict.lookup("dragModel" + phasea.name())); - Info<< "Selecting dragModel for phase " - << phasea.name() - << ": " - << modelType << endl; + Info<< "Selecting dragModel for phase " << phasea.name() + << ": " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(modelType); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C index 66c851a48d..8b29862356 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C @@ -27,16 +27,12 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::conductivityModel::New +Foam::autoPtr Foam::conductivityModel::New ( const dictionary& dict ) { - const word modelType - ( - dict.lookup("conductivityModel") - ); + const word modelType(dict.lookup("conductivityModel")); Info<< "Selecting conductivityModel " << modelType << endl; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C index 7ce2ce03fc..447298e219 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C @@ -27,16 +27,12 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::frictionalStressModel::New +Foam::autoPtr Foam::frictionalStressModel::New ( const dictionary& dict ) { - const word modelType - ( - dict.lookup("frictionalStressModel") - ); + const word modelType(dict.lookup("frictionalStressModel")); Info<< "Selecting frictionalStressModel " << modelType << endl; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C index d7f4d745f6..682ce1781a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C @@ -27,16 +27,12 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::granularPressureModel::New +Foam::autoPtr Foam::granularPressureModel::New ( const dictionary& dict ) { - const word modelType - ( - dict.lookup("granularPressureModel") - ); + const word modelType(dict.lookup("granularPressureModel")); Info<< "Selecting granularPressureModel " << modelType << endl; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C index 3e729140ce..14bd1a52e8 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C @@ -27,16 +27,12 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::radialModel::New +Foam::autoPtr Foam::radialModel::New ( const dictionary& dict ) { - const word modelType - ( - dict.lookup("radialModel") - ); + const word modelType(dict.lookup("radialModel")); Info<< "Selecting radialModel " << modelType << endl; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C index 32e3dc7fe1..35b9684509 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C @@ -33,10 +33,7 @@ Foam::kineticTheoryModels::viscosityModel::New const dictionary& dict ) { - const word modelType - ( - dict.lookup("viscosityModel") - ); + const word modelType(dict.lookup("viscosityModel")); Info<< "Selecting viscosityModel " << modelType << endl; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C index 055cbb2773..805cd23845 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -134,8 +134,7 @@ Foam::phaseModel::phaseModel } -Foam::autoPtr -Foam::phaseModel::New +Foam::autoPtr Foam::phaseModel::New ( const fvMesh& mesh, const dictionary& transportProperties, diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C index 1e91ed4c0d..eed1abdb70 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C @@ -27,16 +27,12 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::extrudeModel::New +Foam::autoPtr Foam::extrudeModel::New ( const dictionary& dict ) { - const word modelType - ( - dict.lookup("extrudeModel") - ); + const word modelType(dict.lookup("extrudeModel")); Info<< "Selecting extrudeModel " << modelType << endl; diff --git a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C index 191cfef5eb..c975f36e66 100644 --- a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C +++ b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) # include "createTime.H" # include "createMesh.H" - autoPtr motionPtr = motionSolver::New(mesh); + autoPtr motionPtr = motionSolver::New(mesh); while (runTime.loop()) { diff --git a/src/ODE/ODESolvers/ODESolver/ODESolverNew.C b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C index add1e02b05..10bb45f96d 100644 --- a/src/ODE/ODESolvers/ODESolver/ODESolverNew.C +++ b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::ODESolver::New +Foam::autoPtr Foam::ODESolver::New ( const Foam::word& ODESolverTypeName, const Foam::ODE& ode diff --git a/src/OpenFOAM/db/IOstreams/token/token.C b/src/OpenFOAM/db/IOstreams/token/token.C index 487f903839..50c0d80f3c 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.C +++ b/src/OpenFOAM/db/IOstreams/token/token.C @@ -52,8 +52,7 @@ Foam::token::compound::~compound() // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::token::compound::New +Foam::autoPtr Foam::token::compound::New ( const word& compoundType, Istream& is diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C index 4ee2af5750..1c452bafaf 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C @@ -118,8 +118,7 @@ Foam::dictionary::dictionary(Istream& is) } -Foam::autoPtr -Foam::dictionary::New(Istream& is) +Foam::autoPtr Foam::dictionary::New(Istream& is) { return autoPtr(new dictionary(is)); } diff --git a/src/OpenFOAM/db/dictionary/entry/entryIO.C b/src/OpenFOAM/db/dictionary/entry/entryIO.C index ea1f91a495..cbe2179172 100644 --- a/src/OpenFOAM/db/dictionary/entry/entryIO.C +++ b/src/OpenFOAM/db/dictionary/entry/entryIO.C @@ -191,8 +191,7 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is) } -Foam::autoPtr -Foam::entry::New(Istream& is) +Foam::autoPtr Foam::entry::New(Istream& is) { is.fatalCheck("entry::New(Istream&)"); diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index 35a20392ef..83c4b337fc 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -43,8 +43,7 @@ Foam::functionObject::functionObject(const word& name) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::functionObject::New +Foam::autoPtr Foam::functionObject::New ( const word& name, const Time& t, diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C index 0eace332cc..09a3a3e03c 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C @@ -26,8 +26,7 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::autoPtr< Foam::pointPatchField > -Foam::pointPatchField::New +Foam::autoPtr > Foam::pointPatchField::New ( const word& patchFieldType, const word& actualPatchType, @@ -96,8 +95,7 @@ Foam::pointPatchField::New template -Foam::autoPtr< Foam::pointPatchField > -Foam::pointPatchField::New +Foam::autoPtr > Foam::pointPatchField::New ( const word& patchFieldType, const pointPatch& p, @@ -109,8 +107,7 @@ Foam::pointPatchField::New template -Foam::autoPtr< Foam::pointPatchField > -Foam::pointPatchField::New +Foam::autoPtr > Foam::pointPatchField::New ( const pointPatch& p, const DimensionedField& iF, @@ -196,8 +193,7 @@ Foam::pointPatchField::New // Return a pointer to a new patch created on freestore from // a given pointPatchField mapped onto a new patch template -Foam::autoPtr< Foam::pointPatchField > -Foam::pointPatchField::New +Foam::autoPtr > Foam::pointPatchField::New ( const pointPatchField& ptf, const pointPatch& p, diff --git a/src/OpenFOAM/graph/graph.C b/src/OpenFOAM/graph/graph.C index 930badb76d..c0c15260f5 100644 --- a/src/OpenFOAM/graph/graph.C +++ b/src/OpenFOAM/graph/graph.C @@ -143,8 +143,10 @@ Foam::scalarField& Foam::graph::y() } -Foam::autoPtr -Foam::graph::writer::New(const word& graphFormat) +Foam::autoPtr Foam::graph::writer::New +( + const word& graphFormat +) { if (!wordConstructorTablePtr_) { diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C index b492ed9821..eb9d9190f0 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C @@ -36,8 +36,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::word -Foam::lduMatrix::preconditioner::getName +Foam::word Foam::lduMatrix::preconditioner::getName ( const dictionary& solverControls ) diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C index c5864b52b9..da2406d66a 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C @@ -58,8 +58,7 @@ Foam::lduMatrix::smoother::getName } -Foam::autoPtr -Foam::lduMatrix::smoother::New +Foam::autoPtr Foam::lduMatrix::smoother::New ( const word& fieldName, const lduMatrix& matrix, diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C index edbd8e4226..a9c3516aa8 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C @@ -37,8 +37,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::lduMatrix::solver::New +Foam::autoPtr Foam::lduMatrix::solver::New ( const word& fieldName, const lduMatrix& matrix, diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C index e1e06c965f..b5bd371d93 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::GAMGInterfaceField::New +Foam::autoPtr Foam::GAMGInterfaceField::New ( const GAMGInterface& GAMGCp, const lduInterfaceField& fineInterface diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C index fac2aea8a5..6c4bed7523 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C @@ -29,8 +29,7 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::GAMGInterface::New +Foam::autoPtr Foam::GAMGInterface::New ( const lduInterface& fineInterface, const labelField& localRestrictAddressing, diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C index a05b8d37a9..da4f8f6ec5 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::facePointPatch::New +Foam::autoPtr Foam::facePointPatch::New ( const polyPatch& patch, const pointBoundaryMesh& bm diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C index d2ea21bd0a..fb77cc19d9 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr -Foam::polyPatch::New +Foam::autoPtr Foam::polyPatch::New ( const word& patchType, const word& name, @@ -67,8 +66,7 @@ Foam::polyPatch::New } -Foam::autoPtr -Foam::polyPatch::New +Foam::autoPtr Foam::polyPatch::New ( const word& name, const dictionary& dict, diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C index a5ec479f68..83461c88a4 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr -Foam::cellZone::New +Foam::autoPtr Foam::cellZone::New ( const word& name, const dictionary& dict, @@ -44,10 +43,7 @@ Foam::cellZone::New << endl; } - const word zoneType - ( - dict.lookup("type") - ); + const word zoneType(dict.lookup("type")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C index f8e41d8947..417c614733 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr -Foam::faceZone::New +Foam::autoPtr Foam::faceZone::New ( const word& name, const dictionary& dict, @@ -44,10 +43,7 @@ Foam::faceZone::New << endl; } - const word zoneType - ( - dict.lookup("type") - ); + const word zoneType(dict.lookup("type")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C index e1ce962d50..90f739c782 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr -Foam::pointZone::New +Foam::autoPtr Foam::pointZone::New ( const word& name, const dictionary& dict, @@ -44,10 +43,7 @@ Foam::pointZone::New << endl; } - const word zoneType - ( - dict.lookup("type") - ); + const word zoneType(dict.lookup("type")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); diff --git a/src/conversion/ensight/part/ensightPart.C b/src/conversion/ensight/part/ensightPart.C index aa1eacd628..b20990137c 100644 --- a/src/conversion/ensight/part/ensightPart.C +++ b/src/conversion/ensight/part/ensightPart.C @@ -126,8 +126,7 @@ Foam::ensightPart::ensightPart(const ensightPart& part) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::ensightPart::New(Istream& is) +Foam::autoPtr Foam::ensightPart::New(Istream& is) { const word partType(is); diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index 57311b38dd..9a4c920dfa 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -29,8 +29,7 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::dynamicFvMesh::New(const IOobject& io) +Foam::autoPtr Foam::dynamicFvMesh::New(const IOobject& io) { // do not register the dictionary IOdictionary dict diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index d66982bb35..a8b9ec7987 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -1078,9 +1078,9 @@ bool Foam::dynamicRefineFvMesh::update() << exit(FatalError); } - word field(refineDict.lookup("field")); + const word fieldName(refineDict.lookup("field")); - const volScalarField& vFld = lookupObject(field); + const volScalarField& vFld = lookupObject(fieldName); const scalar lowerRefineLevel = readScalar(refineDict.lookup("lowerRefineLevel")); diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C index 9b996ff876..abc90561ae 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C @@ -27,17 +27,13 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::solidBodyMotionFunction::New +Foam::autoPtr Foam::solidBodyMotionFunction::New ( const dictionary& SBMFCoeffs, const Time& runTime ) { - const word motionType - ( - SBMFCoeffs.lookup("solidBodyMotionFunction") - ); + const word motionType(SBMFCoeffs.lookup("solidBodyMotionFunction")); Info<< "Selecting solid-body motion function " << motionType << endl; diff --git a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C index aadb0781d6..8484897761 100644 --- a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C @@ -39,8 +39,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::cellLooper::New +Foam::autoPtr Foam::cellLooper::New ( const word& type, const polyMesh& mesh diff --git a/src/dynamicMesh/motionSolver/motionSolver.C b/src/dynamicMesh/motionSolver/motionSolver.C index 2979d1fe06..efc29c2afc 100644 --- a/src/dynamicMesh/motionSolver/motionSolver.C +++ b/src/dynamicMesh/motionSolver/motionSolver.C @@ -58,8 +58,7 @@ Foam::motionSolver::motionSolver(const polyMesh& mesh) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::motionSolver::New(const polyMesh& mesh) +Foam::autoPtr Foam::motionSolver::New(const polyMesh& mesh) { IOdictionary solverDict ( diff --git a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C index f7b74a432e..4a34685eba 100644 --- a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C +++ b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr -Foam::polyMeshModifier::New +Foam::autoPtr Foam::polyMeshModifier::New ( const word& name, const dictionary& dict, diff --git a/src/edgeMesh/edgeMeshNew.C b/src/edgeMesh/edgeMeshNew.C index 4dce59a4c2..c212758c12 100644 --- a/src/edgeMesh/edgeMeshNew.C +++ b/src/edgeMesh/edgeMeshNew.C @@ -27,8 +27,11 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr< Foam::edgeMesh > -Foam::edgeMesh::New(const fileName& name, const word& ext) +Foam::autoPtr Foam::edgeMesh::New +( + const fileName& name, + const word& ext +) { fileExtensionConstructorTable::iterator cstrIter = fileExtensionConstructorTablePtr_->find(ext); @@ -49,8 +52,10 @@ Foam::edgeMesh::New(const fileName& name, const word& ext) } -Foam::autoPtr< Foam::edgeMesh > -Foam::edgeMesh::New(const fileName& name) +Foam::autoPtr Foam::edgeMesh::New +( + const fileName& name +) { word ext = name.ext(); if (ext == "gz") diff --git a/src/engine/engineMesh/engineMesh/engineMeshNew.C b/src/engine/engineMesh/engineMesh/engineMeshNew.C index d34011d279..b827036fd3 100644 --- a/src/engine/engineMesh/engineMesh/engineMeshNew.C +++ b/src/engine/engineMesh/engineMesh/engineMeshNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::engineMesh::New +Foam::autoPtr Foam::engineMesh::New ( const Foam::IOobject& io ) diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C index db5a422ad1..5c2eb2ea76 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::SRF::SRFModel::New +Foam::autoPtr Foam::SRF::SRFModel::New ( const volVectorField& Urel ) diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C index b371396989..7cac8a003d 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::fvPatch::New +Foam::autoPtr Foam::fvPatch::New ( const polyPatch& patch, const fvBoundaryMesh& bm diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C b/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C index 8a7b66ecc4..55eddc7bed 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C +++ b/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C @@ -29,16 +29,14 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::autoPtr > -Foam::interpolation::New +Foam::autoPtr > Foam::interpolation::New ( const word& interpolationType, const GeometricField& psi ) { typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_ - ->find(interpolationType); + dictionaryConstructorTablePtr_->find(interpolationType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -58,8 +56,7 @@ Foam::interpolation::New template -Foam::autoPtr > -Foam::interpolation::New +Foam::autoPtr > Foam::interpolation::New ( const dictionary& interpolationSchemes, const GeometricField& psi diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionFvMotionSolver.C index 4c950ab8c4..8ade7abb49 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionFvMotionSolver.C @@ -221,7 +221,7 @@ Foam::displacementLayeredMotionFvMotionSolver::faceZoneEvaluate tmp tfld(new vectorField(meshPoints.size())); vectorField& fld = tfld(); - const word& type = dict.lookup("type"); + const word type(dict.lookup("type")); if (type == "fixedValue") { diff --git a/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C index 3f3b570fff..ed4c2930ba 100644 --- a/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C @@ -44,8 +44,7 @@ Foam::motionDiffusivity::motionDiffusivity(const fvMotionSolver& mSolver) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::motionDiffusivity::New +Foam::autoPtr Foam::motionDiffusivity::New ( const fvMotionSolver& mSolver, Istream& mdData diff --git a/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C b/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C index 83c9207c4b..1efcba20d0 100644 --- a/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C +++ b/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C @@ -46,17 +46,13 @@ Foam::injectorType::injectorType // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::injectorType::New +Foam::autoPtr Foam::injectorType::New ( const Time& t, const dictionary& dict ) { - const word modelType - ( - dict.lookup("injectorType") - ); + const word modelType(dict.lookup("injectorType")); Info<< "Selecting injectorType " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C index 6dda97beae..c541bda2ec 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C @@ -31,17 +31,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::atomizationModel::New +Foam::autoPtr Foam::atomizationModel::New ( const dictionary& dict, spray& sm ) { - const word modelType - ( - dict.lookup("atomizationModel") - ); + const word modelType(dict.lookup("atomizationModel")); Info<< "Selecting atomizationModel " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C index a1e04ffe38..c388f64982 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C @@ -31,17 +31,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::breakupModel::New +Foam::autoPtr Foam::breakupModel::New ( const dictionary& dict, spray& sm ) { - const word modelType - ( - dict.lookup("breakupModel") - ); + const word modelType(dict.lookup("breakupModel")); Info<< "Selecting breakupModel " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C index e0d86aa903..e6b59d57d0 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C @@ -33,18 +33,14 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::collisionModel::New +Foam::autoPtr Foam::collisionModel::New ( const dictionary& dict, spray& sm, Random& rndGen ) { - const word modelType - ( - dict.lookup("collisionModel") - ); + const word modelType(dict.lookup("collisionModel")); Info<< "Selecting collisionModel " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C index f5fc96605a..c3491dcefb 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C @@ -30,17 +30,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::dispersionModel::New +Foam::autoPtr Foam::dispersionModel::New ( const dictionary& dict, spray& sm ) { - const word modelType - ( - dict.lookup("dispersionModel") - ); + const word modelType(dict.lookup("dispersionModel")); Info<< "Selecting dispersionModel " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C index 4bc7e5f898..a07000f845 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C @@ -30,13 +30,9 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::dragModel::New(const dictionary& dict) +Foam::autoPtr Foam::dragModel::New(const dictionary& dict) { - const word modelType - ( - dict.lookup("dragModel") - ); + const word modelType(dict.lookup("dragModel")); Info<< "Selecting dragModel " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C index 59e80075ff..1e2c34d736 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C @@ -31,13 +31,12 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::evaporationModel::New(const dictionary& dict) +Foam::autoPtr Foam::evaporationModel::New +( + const dictionary& dict +) { - const word modelType - ( - dict.lookup("evaporationModel") - ); + const word modelType(dict.lookup("evaporationModel")); Info<< "Selecting evaporationModel " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C index 3c691edfac..3b53958dec 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C @@ -31,16 +31,12 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::heatTransferModel::New +Foam::autoPtr Foam::heatTransferModel::New ( const dictionary& dict ) { - const word modelType - ( - dict.lookup("heatTransferModel") - ); + const word modelType(dict.lookup("heatTransferModel")); Info<< "Selecting heatTransferModel " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C index 616b0d243a..eca3049de8 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C @@ -31,17 +31,13 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::injectorModel::New +Foam::autoPtr Foam::injectorModel::New ( const dictionary& dict, spray& sm ) { - const word modelType - ( - dict.lookup("injectorModel") - ); + const word modelType(dict.lookup("injectorModel")); Info<< "Selecting injectorModel " << modelType << endl; diff --git a/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C index d281e6a58e..ad888a2739 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C @@ -29,18 +29,14 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::wallModel::New +Foam::autoPtr Foam::wallModel::New ( const dictionary& dict, const volVectorField& U, spray& sm ) { - const word modelType - ( - dict.lookup("wallModel") - ); + const word modelType(dict.lookup("wallModel")); Info<< "Selecting wallModel " << modelType << endl; diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C index 24196871fd..469824f33a 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C @@ -35,10 +35,7 @@ Foam::BinaryCollisionModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("BinaryCollisionModel") - ); + const word modelType(dict.lookup("BinaryCollisionModel")); Info<< "Selecting BinaryCollisionModel " << modelType << endl; diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C index 8a682da17e..7a49c0e828 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C @@ -35,10 +35,7 @@ Foam::InflowBoundaryModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("InflowBoundaryModel") - ); + const word modelType(dict.lookup("InflowBoundaryModel")); Info<< "Selecting InflowBoundaryModel " << modelType << endl; diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C index bd421e2d56..6fc1d3442f 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C @@ -35,10 +35,7 @@ Foam::WallInteractionModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("WallInteractionModel") - ); + const word modelType(dict.lookup("WallInteractionModel")); Info<< "Selecting WallInteractionModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C index e603593b6f..af68aa627b 100644 --- a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C +++ b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C @@ -36,15 +36,13 @@ Foam::IntegrationScheme::New const dictionary& dict ) { - word IntegrationSchemeTypeName; - - dict.lookup(phiName) >> IntegrationSchemeTypeName; + const word schemeName(dict.lookup(phiName)); Info<< "Selecting " << phiName << " IntegrationScheme " - << IntegrationSchemeTypeName << endl; + << schemeName << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(IntegrationSchemeTypeName); + dictionaryConstructorTablePtr_->find(schemeName); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,7 +50,7 @@ Foam::IntegrationScheme::New ( "IntegrationScheme::New(const dictionary&)" ) << "Unknown IntegrationScheme type " - << IntegrationSchemeTypeName << nl << nl + << schemeName << nl << nl << "Valid IntegrationScheme types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C index 7110b8b7be..7c3facfed7 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::autoPtr< Foam::DataEntry > -Foam::DataEntry::New +Foam::autoPtr > Foam::DataEntry::New ( const word& entryName, const dictionary& dict diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C index c503ba60f0..8c907403d1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C @@ -35,10 +35,7 @@ Foam::DispersionModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("DispersionModel") - ); + const word modelType(dict.lookup("DispersionModel")); Info<< "Selecting DispersionModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C index 429f60378c..7dab108c5b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C @@ -28,17 +28,13 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::autoPtr > -Foam::DragModel::New +Foam::autoPtr > Foam::DragModel::New ( const dictionary& dict, CloudType& owner ) { - const word modelType - ( - dict.lookup("DragModel") - ); + const word modelType(dict.lookup("DragModel")); Info<< "Selecting DragModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C index 552a0cc67c..5eb805d6bc 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C @@ -35,10 +35,7 @@ Foam::InjectionModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("InjectionModel") - ); + const word modelType(dict.lookup("InjectionModel")); Info<< "Selecting InjectionModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C index 07751da5e0..a3989151d1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C @@ -35,10 +35,7 @@ Foam::PatchInteractionModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("PatchInteractionModel") - ); + const word modelType(dict.lookup("PatchInteractionModel")); Info<< "Selecting PatchInteractionModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C index 04b54e0237..cd57acd282 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C @@ -46,7 +46,7 @@ Foam::StandardWallInteraction::StandardWallInteraction { case PatchInteractionModel::itOther: { - word interactionTypeName(this->coeffDict().lookup("type")); + const word interactionTypeName(this->coeffDict().lookup("type")); FatalErrorIn ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C index d4df99d7e8..7fff48227e 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C @@ -35,10 +35,7 @@ Foam::PostProcessingModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("PostProcessingModel") - ); + const word modelType(dict.lookup("PostProcessingModel")); Info<< "Selecting PostProcessingModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C index 001972fcad..4916a99e2d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C @@ -36,10 +36,7 @@ Foam::SurfaceFilmModel::New const dimensionedVector& g ) { - const word modelType - ( - dict.lookup("SurfaceFilmModel") - ); + const word modelType(dict.lookup("SurfaceFilmModel")); Info<< "Selecting SurfaceFilmModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C index 8e08d54321..b77c92cff0 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C @@ -35,10 +35,7 @@ Foam::CompositionModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("CompositionModel") - ); + const word modelType(dict.lookup("CompositionModel")); Info<< "Selecting CompositionModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C index 8b8987157d..297a43dd57 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C @@ -35,10 +35,7 @@ Foam::PhaseChangeModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("PhaseChangeModel") - ); + const word modelType(dict.lookup("PhaseChangeModel")); Info<< "Selecting PhaseChangeModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C index 0609c7b1b7..5eeec98177 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C @@ -35,10 +35,7 @@ Foam::DevolatilisationModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("DevolatilisationModel") - ); + const word modelType(dict.lookup("DevolatilisationModel")); Info<< "Selecting DevolatilisationModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C index caca8de814..e1b9990b2f 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C @@ -35,10 +35,7 @@ Foam::SurfaceReactionModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("SurfaceReactionModel") - ); + const word modelType(dict.lookup("SurfaceReactionModel")); Info<< "Selecting SurfaceReactionModel " << modelType << endl; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C index 55719729b1..f86d523b2c 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C @@ -35,10 +35,7 @@ Foam::HeatTransferModel::New CloudType& owner ) { - const word modelType - ( - dict.lookup("HeatTransferModel") - ); + const word modelType(dict.lookup("HeatTransferModel")); Info<< "Selecting HeatTransferModel " << modelType << endl; diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C index 66d8b4d636..825f5985c1 100644 --- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C +++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C @@ -28,18 +28,14 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::energyScalingFunction::New +Foam::autoPtr Foam::energyScalingFunction::New ( const word& name, - const dictionary& energyScalingFunctionProperties, + const dictionary& propDict, const pairPotential& pairPot ) { - const word scalingType - ( - energyScalingFunctionProperties.lookup("energyScalingFunction") - ); + const word scalingType(propDict.lookup("energyScalingFunction")); Info<< "Selecting energy scaling function " << scalingType << " for " @@ -60,8 +56,7 @@ Foam::energyScalingFunction::New << exit(FatalError); } - return autoPtr - (cstrIter()(name, energyScalingFunctionProperties, pairPot)); + return autoPtr(cstrIter()(name, propDict, pairPot)); } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C index acbec90e29..ab3069341c 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C @@ -28,17 +28,13 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::pairPotential::New +Foam::autoPtr Foam::pairPotential::New ( const word& name, - const dictionary& pairPotentialProperties + const dictionary& propDict ) { - const word potentialType - ( - pairPotentialProperties.lookup("pairPotential") - ); + const word potentialType(propDict.lookup("pairPotential")); Info<< nl << "Selecting intermolecular pair potential " << potentialType << " for " @@ -59,8 +55,7 @@ Foam::pairPotential::New << exit(FatalError); } - return autoPtr - (cstrIter()(name, pairPotentialProperties)); + return autoPtr(cstrIter()(name, propDict)); } diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C index 917d2ad209..c206949dde 100644 --- a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C +++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C @@ -27,21 +27,16 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::tetherPotential::New +Foam::autoPtr Foam::tetherPotential::New ( const word& name, - const dictionary& tetherPotentialProperties + const dictionary& propDict ) { - const word potentialType - ( - tetherPotentialProperties.lookup("tetherPotential") - ); + const word potentialType(propDict.lookup("tetherPotential")); - Info<< nl << "Selecting tether potential " - << potentialType << " for " - << name << endl; + Info<< nl << "Selecting tether potential " << potentialType + << " for " << name << endl; dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(potentialType); @@ -58,8 +53,7 @@ Foam::tetherPotential::New << exit(FatalError); } - return autoPtr - (cstrIter()(name, tetherPotentialProperties)); + return autoPtr(cstrIter()(name, propDict)); } diff --git a/src/mesh/blockMesh/curvedEdges/curvedEdge.C b/src/mesh/blockMesh/curvedEdges/curvedEdge.C index 84d2aa3460..091a741226 100644 --- a/src/mesh/blockMesh/curvedEdges/curvedEdge.C +++ b/src/mesh/blockMesh/curvedEdges/curvedEdge.C @@ -30,7 +30,6 @@ License namespace Foam { - defineTypeNameAndDebug(curvedEdge, 0); defineRunTimeSelectionTable(curvedEdge, Istream); } @@ -74,8 +73,7 @@ Foam::autoPtr Foam::curvedEdge::clone() const } -Foam::autoPtr -Foam::curvedEdge::New +Foam::autoPtr Foam::curvedEdge::New ( const pointField& points, Istream& is diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C index 54d8b2d895..43af02a76f 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C @@ -127,8 +127,7 @@ Foam::coordinateRotation::coordinateRotation // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::coordinateRotation::New +Foam::autoPtr Foam::coordinateRotation::New ( const dictionary& dict ) diff --git a/src/meshTools/coordinateSystems/coordinateSystemNew.C b/src/meshTools/coordinateSystems/coordinateSystemNew.C index 87af596881..d1f47de396 100644 --- a/src/meshTools/coordinateSystems/coordinateSystemNew.C +++ b/src/meshTools/coordinateSystems/coordinateSystemNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr -Foam::coordinateSystem::New +Foam::autoPtr Foam::coordinateSystem::New ( const word& name, const dictionary& dict @@ -75,8 +74,7 @@ Foam::coordinateSystem::New } -Foam::autoPtr -Foam::coordinateSystem::New +Foam::autoPtr Foam::coordinateSystem::New ( const word& coordType, const word& name, @@ -113,14 +111,13 @@ Foam::coordinateSystem::New } -Foam::autoPtr -Foam::coordinateSystem::New +Foam::autoPtr Foam::coordinateSystem::New ( Istream& is ) { - word name(is); - dictionary dict(is); + const word name(is); + const dictionary dict(is); return New(name, dict); } diff --git a/src/meshTools/searchableSurface/searchableSurface.C b/src/meshTools/searchableSurface/searchableSurface.C index 8c2deab0c3..6624c199d7 100644 --- a/src/meshTools/searchableSurface/searchableSurface.C +++ b/src/meshTools/searchableSurface/searchableSurface.C @@ -38,8 +38,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::searchableSurface::New +Foam::autoPtr Foam::searchableSurface::New ( const word& searchableSurfaceType, const IOobject& io, @@ -47,15 +46,14 @@ Foam::searchableSurface::New ) { dictConstructorTable::iterator cstrIter = - dictConstructorTablePtr_ - ->find(searchableSurfaceType); + dictConstructorTablePtr_->find(searchableSurfaceType); if (cstrIter == dictConstructorTablePtr_->end()) { FatalErrorIn ( - "searchableSurface::New(const word&, const word&" - ", const IOobject&, const dictionary&)" + "searchableSurface::New(const word&," + " const IOobject&, const dictionary&)" ) << "Unknown searchableSurface type " << searchableSurfaceType << endl << endl << "Valid searchableSurface types : " << endl diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C index 1830364750..f499b10f30 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.C +++ b/src/meshTools/sets/topoSetSource/topoSetSource.C @@ -66,8 +66,7 @@ const Foam::string Foam::topoSetSource::illegalSource_ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::topoSetSource::New +Foam::autoPtr Foam::topoSetSource::New ( const word& topoSetSourceType, const polyMesh& mesh, @@ -75,8 +74,7 @@ Foam::topoSetSource::New ) { wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_ - ->find(topoSetSourceType); + wordConstructorTablePtr_->find(topoSetSourceType); if (cstrIter == wordConstructorTablePtr_->end()) { @@ -95,8 +93,7 @@ Foam::topoSetSource::New } -Foam::autoPtr -Foam::topoSetSource::New +Foam::autoPtr Foam::topoSetSource::New ( const word& topoSetSourceType, const polyMesh& mesh, @@ -104,8 +101,7 @@ Foam::topoSetSource::New ) { istreamConstructorTable::iterator cstrIter = - istreamConstructorTablePtr_ - ->find(topoSetSourceType); + istreamConstructorTablePtr_->find(topoSetSourceType); if (cstrIter == istreamConstructorTablePtr_->end()) { diff --git a/src/meshTools/sets/topoSets/topoSet.C b/src/meshTools/sets/topoSets/topoSet.C index 6e4bc3e885..fb9e79164b 100644 --- a/src/meshTools/sets/topoSets/topoSet.C +++ b/src/meshTools/sets/topoSets/topoSet.C @@ -42,8 +42,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::topoSet::New +Foam::autoPtr Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -53,8 +52,7 @@ Foam::topoSet::New ) { wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_ - ->find(setType); + wordConstructorTablePtr_->find(setType); if (cstrIter == wordConstructorTablePtr_->end()) { @@ -73,8 +71,7 @@ Foam::topoSet::New } -Foam::autoPtr -Foam::topoSet::New +Foam::autoPtr Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -84,8 +81,7 @@ Foam::topoSet::New ) { sizeConstructorTable::iterator cstrIter = - sizeConstructorTablePtr_ - ->find(setType); + sizeConstructorTablePtr_->find(setType); if (cstrIter == sizeConstructorTablePtr_->end()) { @@ -104,8 +100,7 @@ Foam::topoSet::New } -Foam::autoPtr -Foam::topoSet::New +Foam::autoPtr Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -115,8 +110,7 @@ Foam::topoSet::New ) { setConstructorTable::iterator cstrIter = - setConstructorTablePtr_ - ->find(setType); + setConstructorTablePtr_->find(setType); if (cstrIter == setConstructorTablePtr_->end()) { diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index adc86641a8..2e240d6ea3 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -42,16 +42,12 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr -Foam::decompositionMethod::New +Foam::autoPtr Foam::decompositionMethod::New ( const dictionary& decompositionDict ) { - const word methodType - ( - decompositionDict.lookup("method") - ); + const word methodType(decompositionDict.lookup("method")); Info<< "Selecting decompositionMethod " << methodType << endl; @@ -75,17 +71,13 @@ Foam::decompositionMethod::New } -Foam::autoPtr -Foam::decompositionMethod::New +Foam::autoPtr Foam::decompositionMethod::New ( const dictionary& decompositionDict, const polyMesh& mesh ) { - const word methodType - ( - decompositionDict.lookup("method") - ); + const word methodType(decompositionDict.lookup("method")); Info<< "Selecting decompositionMethod " << methodType << endl; diff --git a/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C index ef2930b759..52bec69e4a 100644 --- a/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C +++ b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::calcType::New +Foam::autoPtr Foam::calcType::New ( const word& calcTypeName ) diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C index 05b575e946..3060f14d2d 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C @@ -39,7 +39,7 @@ Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict) // << restraintType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(restraintType); + dictionaryConstructorTablePtr_->find(restraintType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C index fa867d813f..780b38d6bf 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.C +++ b/src/sampling/sampledSet/sampledSet/sampledSet.C @@ -406,8 +406,7 @@ Foam::sampledSet::~sampledSet() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr -Foam::sampledSet::New +Foam::autoPtr Foam::sampledSet::New ( const word& name, const polyMesh& mesh, @@ -415,10 +414,7 @@ Foam::sampledSet::New const dictionary& dict ) { - const word sampleType - ( - dict.lookup("type") - ); + const word sampleType(dict.lookup("type")); wordConstructorTable::iterator cstrIter = wordConstructorTablePtr_->find(sampleType); diff --git a/src/sampling/sampledSet/writers/writer.C b/src/sampling/sampledSet/writers/writer.C index 5accc37a0d..2626abfbc4 100644 --- a/src/sampling/sampledSet/writers/writer.C +++ b/src/sampling/sampledSet/writers/writer.C @@ -31,15 +31,13 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // template -Foam::autoPtr< Foam::writer > -Foam::writer::New +Foam::autoPtr< Foam::writer > Foam::writer::New ( const word& writeType ) { typename wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_ - ->find(writeType); + wordConstructorTablePtr_->find(writeType); if (cstrIter == wordConstructorTablePtr_->end()) { diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index 8422825104..3a257eafd4 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -113,19 +113,15 @@ void Foam::sampledSurface::makeCf() const // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // - -Foam::autoPtr -Foam::sampledSurface::New +Foam::autoPtr Foam::sampledSurface::New ( const word& name, const polyMesh& mesh, const dictionary& dict ) { - const word sampleType - ( - dict.lookup("type") - ); + const word sampleType(dict.lookup("type")); + if (debug) { Info<< "Selecting sampledType " << sampleType << endl; @@ -150,6 +146,7 @@ Foam::sampledSurface::New return autoPtr(cstrIter()(name, mesh, dict)); } + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::sampledSurface::sampledSurface @@ -168,7 +165,6 @@ Foam::sampledSurface::sampledSurface {} -// Construct from dictionary Foam::sampledSurface::sampledSurface ( const word& name, diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C index ff382bb6c3..07bfb64cdf 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C @@ -34,10 +34,7 @@ Foam::surfaceFilmModels::injectionModel::New const dictionary& dict ) { - const word modelType - ( - dict.lookup("injectionModel") - ); + const word modelType(dict.lookup("injectionModel")); Info<< " Selecting injectionModel " << modelType << endl; diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C index 4ac8687971..1ad7bd0b71 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C @@ -34,10 +34,7 @@ Foam::surfaceFilmModels::phaseChangeModel::New const dictionary& dict ) { - const word modelType - ( - dict.lookup("phaseChangeModel") - ); + const word modelType(dict.lookup("phaseChangeModel")); Info<< " Selecting phaseChangeModel " << modelType << endl; diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C index 81013626c8..e6f2d195f0 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C +++ b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::basicPsiThermo::New +Foam::autoPtr Foam::basicPsiThermo::New ( const fvMesh& mesh ) diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C index 19ec52d434..b5f8c88073 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::basicRhoThermo::New +Foam::autoPtr Foam::basicRhoThermo::New ( const fvMesh& mesh ) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C index 8ba8a2b7e3..38d88071f1 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::psiChemistryModel::New +Foam::autoPtr Foam::psiChemistryModel::New ( const fvMesh& mesh ) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C index 049549a2e3..95a6100de5 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::rhoChemistryModel::New +Foam::autoPtr Foam::rhoChemistryModel::New ( const fvMesh& mesh ) diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C index 625c5b3b69..ccae8f10de 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C @@ -36,10 +36,7 @@ Foam::chemistrySolver::New const word& thermoTypeName ) { - const word modelName - ( - model.lookup("chemistrySolver") - ); + const word modelName(model.lookup("chemistrySolver")); const word chemistrySolverType = modelName + '<' + compTypeName + ',' + thermoTypeName + '>'; diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C index 990f84d591..f3e7e6ccc1 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::laminarFlameSpeed::New +Foam::autoPtr Foam::laminarFlameSpeed::New ( const hhuCombustionThermo& ct ) @@ -47,16 +46,12 @@ Foam::laminarFlameSpeed::New ) ); - const word laminarFlameSpeedType - ( - propDict.lookup("laminarFlameSpeedCorrelation") - ); + const word corrType(propDict.lookup("laminarFlameSpeedCorrelation")); - Info<< "Selecting laminar flame speed correlation " - << laminarFlameSpeedType << endl; + Info<< "Selecting laminar flame speed correlation " << corrType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(laminarFlameSpeedType); + dictionaryConstructorTablePtr_->find(corrType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -65,7 +60,7 @@ Foam::laminarFlameSpeed::New "laminarFlameSpeed::New(const hhuCombustionThermo&)", propDict ) << "Unknown laminarFlameSpeed type " - << laminarFlameSpeedType << nl << nl + << corrType << nl << nl << "Valid laminarFlameSpeed types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C b/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C index c3d7ded785..19b88994d6 100644 --- a/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C +++ b/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C @@ -73,8 +73,7 @@ Foam::liquidMixture::liquidMixture // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::liquidMixture::New +Foam::autoPtr Foam::liquidMixture::New ( const dictionary& thermophysicalProperties ) diff --git a/src/thermophysicalModels/liquids/liquid/liquid.C b/src/thermophysicalModels/liquids/liquid/liquid.C index 2d9b234859..3da16191f2 100644 --- a/src/thermophysicalModels/liquids/liquid/liquid.C +++ b/src/thermophysicalModels/liquids/liquid/liquid.C @@ -39,14 +39,11 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::liquid::New(Istream& is) +Foam::autoPtr Foam::liquid::New(Istream& is) { if (debug) { - Info<< "liquid::New(Istream&) : " - << "constructing liquid" - << endl; + Info<< "liquid::New(Istream&) : " << "constructing liquid" << endl; } const word liquidType(is); diff --git a/src/thermophysicalModels/pdfs/pdf/pdfNew.C b/src/thermophysicalModels/pdfs/pdf/pdfNew.C index ca7b5c3e63..c4144ee563 100644 --- a/src/thermophysicalModels/pdfs/pdf/pdfNew.C +++ b/src/thermophysicalModels/pdfs/pdf/pdfNew.C @@ -27,17 +27,13 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::pdfs::pdf::New +Foam::autoPtr Foam::pdfs::pdf::New ( const dictionary& dict, Random& rndGen ) { - const word modelType - ( - dict.lookup("pdfType") - ); + const word modelType(dict.lookup("pdfType")); Info<< "Selecting pdfType " << modelType << endl; diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C index 827c9f2a62..a18cee8129 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C @@ -35,10 +35,7 @@ Foam::radiation::absorptionEmissionModel::New const fvMesh& mesh ) { - const word modelType - ( - dict.lookup("absorptionEmissionModel") - ); + const word modelType(dict.lookup("absorptionEmissionModel")); Info<< "Selecting absorptionEmissionModel " << modelType << endl; diff --git a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C index 83ddcb58c2..4234e8e9b7 100644 --- a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C @@ -28,17 +28,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::radiation::scatterModel::New +Foam::autoPtr Foam::radiation::scatterModel::New ( const dictionary& dict, const fvMesh& mesh ) { - const word modelType - ( - dict.lookup("scatterModel") - ); + const word modelType(dict.lookup("scatterModel")); Info<< "Selecting scatterModel " << modelType << endl; diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C index 309d4d2702..7065df6d07 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::hCombustionThermo::New +Foam::autoPtr Foam::hCombustionThermo::New ( const fvMesh& mesh ) @@ -71,8 +70,7 @@ Foam::hCombustionThermo::New } -Foam::autoPtr -Foam::hCombustionThermo::NewType +Foam::autoPtr Foam::hCombustionThermo::NewType ( const fvMesh& mesh, const word& thermoType diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C index 805f44449a..5fb31430e7 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C @@ -28,8 +28,10 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::hhuCombustionThermo::New(const fvMesh& mesh) +Foam::autoPtr Foam::hhuCombustionThermo::New +( + const fvMesh& mesh +) { // get model name, but do not register the dictionary // otherwise it is registered in the database twice diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C index c7b94d1ace..4e4aecb6c7 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::hsCombustionThermo::New +Foam::autoPtr Foam::hsCombustionThermo::New ( const fvMesh& mesh ) @@ -71,8 +70,7 @@ Foam::hsCombustionThermo::New } -Foam::autoPtr -Foam::hsCombustionThermo::NewType +Foam::autoPtr Foam::hsCombustionThermo::NewType ( const fvMesh& mesh, const word& thermoType diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C index 6afa8d33e6..3a186ec5ee 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::hReactionThermo::New +Foam::autoPtr Foam::hReactionThermo::New ( const fvMesh& mesh ) @@ -71,8 +70,7 @@ Foam::hReactionThermo::New } -Foam::autoPtr -Foam::hReactionThermo::NewType +Foam::autoPtr Foam::hReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C index f8518cd45f..3607d3458b 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C @@ -28,8 +28,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::hsReactionThermo::New +Foam::autoPtr Foam::hsReactionThermo::New ( const fvMesh& mesh ) @@ -71,8 +70,7 @@ Foam::hsReactionThermo::New } -Foam::autoPtr -Foam::hsReactionThermo::NewType +Foam::autoPtr Foam::hsReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType diff --git a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C index a69ddb4bf3..0b23ab7827 100644 --- a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C +++ b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C @@ -49,8 +49,7 @@ Foam::solidMixture::solidMixture // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::solidMixture::New +Foam::autoPtr Foam::solidMixture::New ( const dictionary& thermophysicalProperties ) diff --git a/src/thermophysicalModels/solids/solid/solidNew.C b/src/thermophysicalModels/solids/solid/solidNew.C index c3695cec9e..860e1e5d5a 100644 --- a/src/thermophysicalModels/solids/solid/solidNew.C +++ b/src/thermophysicalModels/solids/solid/solidNew.C @@ -27,8 +27,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::solid::New(Istream& is) +Foam::autoPtr Foam::solid::New(Istream& is) { if (debug) { diff --git a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C index 6497b05131..dd45456458 100644 --- a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C +++ b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C @@ -39,8 +39,10 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::thermophysicalFunction::New(Istream& is) +Foam::autoPtr Foam::thermophysicalFunction::New +( + Istream& is +) { if (debug) { diff --git a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C index d2424513c7..0872496cf2 100644 --- a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C +++ b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C @@ -29,8 +29,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::viscosityModel::New +Foam::autoPtr Foam::viscosityModel::New ( const word& name, const dictionary& viscosityProperties, @@ -38,10 +37,7 @@ Foam::viscosityModel::New const surfaceScalarField& phi ) { - const word modelType - ( - viscosityProperties.lookup("transportModel") - ); + const word modelType(viscosityProperties.lookup("transportModel")); Info<< "Selecting incompressible transport model " << modelType << endl; diff --git a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C index 39efc1ee49..53dc4ac961 100644 --- a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C +++ b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C @@ -58,8 +58,7 @@ Foam::LESdelta::LESdelta(const word& name, const fvMesh& mesh) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::LESdelta::New +Foam::autoPtr Foam::LESdelta::New ( const word& name, const fvMesh& mesh, diff --git a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C index 56a503f8cd..98ef370e46 100644 --- a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C +++ b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C @@ -37,8 +37,7 @@ namespace Foam // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr -Foam::LESfilter::New +Foam::autoPtr Foam::LESfilter::New ( const fvMesh& mesh, const dictionary& dict