diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C index 329e52ccc0..8abbf768ea 100644 --- a/src/OSspecific/POSIX/fileMonitor.C +++ b/src/OSspecific/POSIX/fileMonitor.C @@ -55,7 +55,11 @@ const Foam::NamedEnum namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::fileMonitor::fileState, + 3 + >::names[] = { "unmodified", "modified", diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C index 51e2fadfe7..508db4869b 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C @@ -35,7 +35,11 @@ defineTypeNameAndDebug(Foam::UPstream, 0); namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::UPstream::commsTypes, + 3 + >::names[] = { "blocking", "scheduled", diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index f9a62d3b4d..eff2e29657 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -35,7 +35,11 @@ defineTypeNameAndDebug(Foam::Time, 0); namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::Time::stopAtControls, + 4 + >::names[] = { "endTime", "noWriteNow", @@ -44,7 +48,11 @@ namespace Foam }; template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::Time::writeControls, + 5 + >::names[] = { "timeStep", "runTime", diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C index f43cb4f44e..de93473038 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.C +++ b/src/OpenFOAM/db/regIOobject/regIOobject.C @@ -39,7 +39,11 @@ int Foam::regIOobject::fileModificationSkew namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::regIOobject::fileCheckTypes, + 4 + >::names[] = { "timeStamp", "timeStampMaster", diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C index 218debfa5b..4b75c071fe 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C @@ -44,19 +44,21 @@ namespace Foam addToRunTimeSelectionTable(polyPatch, oldCyclicPolyPatch, word); addToRunTimeSelectionTable(polyPatch, oldCyclicPolyPatch, dictionary); - -template<> -const char* NamedEnum::names[] = -{ - "unknown", - "rotational", - "translational" -}; - -const NamedEnum - oldCyclicPolyPatch::transformTypeNames; + template<> + const char* Foam::NamedEnum + < + Foam::oldCyclicPolyPatch::transformType, + 3 + >::names[] = + { + "unknown", + "rotational", + "translational" + }; } +const Foam::NamedEnum + Foam::oldCyclicPolyPatch::transformTypeNames; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C b/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C index 110754f77a..0c2e84bdf4 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C +++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C @@ -32,14 +32,22 @@ Foam::scalar Foam::intersection::planarTol_ = 0.2; namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::intersection::direction, + 2 + >::names[] = { "vector", "contactSphere" }; template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::intersection::algorithm, + 3 + >::names[] = { "fullRay", "halfRay", diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index 7024c2ffbc..7d601ec188 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -39,7 +39,11 @@ License namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::directions::directionType, + 3 + >::names[] = { "tan1", "tan2", @@ -269,7 +273,6 @@ Foam::vectorField Foam::directions::propagateDirection // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from dictionary Foam::directions::directions ( const polyMesh& mesh, @@ -353,7 +356,7 @@ Foam::directions::directions FatalErrorIn ( "directions::directions(const polyMesh&, const dictionary&," - "const twoDPointCorrector*" + "const twoDPointCorrector*)" ) << "Cannot find patch " << patchName << exit(FatalError); @@ -373,7 +376,7 @@ Foam::directions::directions WarningIn ( "directions::directions(const polyMesh&, const dictionary&," - "const twoDPointCorrector*" + "const twoDPointCorrector*)" ) << "Discarding user specified tan1 since 2D case." << endl << "Recalculated tan1 from face normal and planeNormal as " << tan1 << endl << endl; @@ -441,7 +444,7 @@ Foam::directions::directions FatalErrorIn ( "directions::directions(const polyMesh&, const dictionary&," - "const twoDPointCorrector*" + "const twoDPointCorrector*)" ) << "Unknown coordinate system " << coordSystem << endl << "Known types are global and patchLocal" diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index 4ad492b064..18c7e9a38c 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -30,7 +30,11 @@ License namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::phaseProperties::phaseType, + 4 + >::names[] = { "gas", "liquid", diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C index 9a91bcccb0..91c7a07fc5 100644 --- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C @@ -37,8 +37,11 @@ License namespace Foam { template<> - const char* - Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::refinementSurfaces::areaSelectionAlgo, + 4 + >::names[] = { "inside", "outside", diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C index 6418c8c8c5..35427e849f 100644 --- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C +++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C @@ -43,7 +43,11 @@ namespace Foam defineTypeNameAndDebug(directMappedPatchBase, 0); template<> - const char* NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::directMappedPatchBase::sampleMode, + 3 + >::names[] = { "nearestCell", "nearestPatchFace", @@ -55,7 +59,11 @@ namespace Foam template<> - const char* NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::directMappedPatchBase::offsetMode, + 3 + >::names[] = { "uniform", "nonuniform", @@ -74,7 +82,6 @@ namespace Foam class nearestEqOp { - public: void operator()(nearInfo& x, const nearInfo& y) const @@ -95,6 +102,13 @@ namespace Foam } +const Foam::NamedEnum + Foam::directMappedPatchBase::sampleModeNames_; + +const Foam::NamedEnum + Foam::directMappedPatchBase::offsetModeNames_; + + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::directMappedPatchBase::collectSamples diff --git a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C index 9589929aed..a04fef9f6d 100644 --- a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C +++ b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C @@ -38,7 +38,11 @@ namespace Foam addToRunTimeSelectionTable(topoSetSource, faceToCell, istream); template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::faceToCell::faceAction, + 4 + >::names[] = { "neighbour", "owner", diff --git a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C index 2d5bd7f4d5..26bf40ec32 100644 --- a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C +++ b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C @@ -37,7 +37,11 @@ namespace Foam addToRunTimeSelectionTable(topoSetSource, faceZoneToCell, istream); template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::faceZoneToCell::faceAction, + 2 + >::names[] = { "master", "slave" diff --git a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C index ebb3a010b9..aaa11f0e1d 100644 --- a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C +++ b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C @@ -38,7 +38,11 @@ namespace Foam addToRunTimeSelectionTable(topoSetSource, pointToCell, istream); template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::pointToCell::pointAction, + 1 + >::names[] = { "any" }; diff --git a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C index 2ff1769c8f..1f53ba2864 100644 --- a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C +++ b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C @@ -39,7 +39,11 @@ namespace Foam addToRunTimeSelectionTable(topoSetSource, cellToFace, istream); template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::cellToFace::cellAction, + 2 + >::names[] = { "all", "both" diff --git a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C index 8e272b86df..59066e87b7 100644 --- a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C +++ b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C @@ -38,7 +38,11 @@ namespace Foam addToRunTimeSelectionTable(topoSetSource, pointToFace, istream); template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::pointToFace::pointAction, + 2 + >::names[] = { "any", "all" diff --git a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C index 5026b51cfc..52d6ea7037 100644 --- a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C +++ b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C @@ -38,7 +38,11 @@ namespace Foam addToRunTimeSelectionTable(topoSetSource, cellToPoint, istream); template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::cellToPoint::cellAction, + 1 + >::names[] = { "all" }; diff --git a/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C b/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C index 4d0919f7c8..4a3d8d2028 100644 --- a/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C +++ b/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C @@ -38,7 +38,11 @@ namespace Foam addToRunTimeSelectionTable(topoSetSource, faceToPoint, istream); template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::faceToPoint::faceAction, + 1 + >::names[] = { "all" }; diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C index f82cf59a90..28bf1c33cd 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.C +++ b/src/meshTools/sets/topoSetSource/topoSetSource.C @@ -36,7 +36,11 @@ namespace Foam defineRunTimeSelectionTable(topoSetSource, istream); template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::topoSetSource::setAction, + 8 + >::names[] = { "clear", "new", diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C index ee3d6e4e8a..183de36c2c 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C @@ -30,7 +30,11 @@ License namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::fieldAverageItem::baseType, + 2 + >::names[] = { "iteration", "time" diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index c0f715e716..ac9eeab52d 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -36,7 +36,11 @@ defineTypeNameAndDebug(Foam::fieldMinMax, 0); namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::fieldMinMax::modeType, + 2 + >::names[] = { "magnitude", "component" diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C index e3755efbb8..896026c356 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C @@ -31,21 +31,42 @@ License defineTypeNameAndDebug(Foam::fieldValues::cellSource, 0); -template<> -const char* Foam::NamedEnum:: -names[] = {"cellZone", "all"}; +namespace Foam +{ + + template<> + const char* Foam::NamedEnum + < + Foam::fieldValues::cellSource::sourceType, + 2 + >::names[] = + { + "cellZone", + "all" + }; + + + template<> + const char* Foam::NamedEnum + < + Foam::fieldValues::cellSource::operationType, + 7 + >::names[] = + { + "none", + "sum", + "volAverage", + "volIntegrate", + "weightedAverage", + "min", + "max" + }; +} + const Foam::NamedEnum Foam::fieldValues::cellSource::sourceTypeNames_; -template<> -const char* Foam::NamedEnum:: -names[] = -{ - "none", "sum", "volAverage", - "volIntegrate", "weightedAverage", "min", "max" -}; - const Foam::NamedEnum Foam::fieldValues::cellSource::operationTypeNames_; diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C index 472f725dc4..838658d1a2 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C @@ -34,25 +34,43 @@ License defineTypeNameAndDebug(Foam::fieldValues::faceSource, 0); -template<> -const char* Foam::NamedEnum:: -names[] = +namespace Foam { - "faceZone", "patch", "sampledSurface" -}; + template<> + const char* Foam::NamedEnum + < + Foam::fieldValues::faceSource::sourceType, + 3 + >::names[] = + { + "faceZone", + "patch", + "sampledSurface" + }; + + + template<> + const char* Foam::NamedEnum + < + Foam::fieldValues::faceSource::operationType, + 7 + >::names[] = + { + "none", + "sum", + "areaAverage", + "areaIntegrate", + "weightedAverage", + "min", + "max" + }; + +} + const Foam::NamedEnum Foam::fieldValues::faceSource::sourceTypeNames_; - -template<> -const char* Foam::NamedEnum:: -names[] = -{ - "none", "sum", "areaAverage", - "areaIntegrate", "weightedAverage", "min", "max" -}; - const Foam::NamedEnum Foam::fieldValues::faceSource::operationTypeNames_; diff --git a/src/sampling/sampledSet/coordSet/coordSet.C b/src/sampling/sampledSet/coordSet/coordSet.C index 24d6b4174c..81e322d6a6 100644 --- a/src/sampling/sampledSet/coordSet/coordSet.C +++ b/src/sampling/sampledSet/coordSet/coordSet.C @@ -30,7 +30,11 @@ License namespace Foam { template<> - const char* Foam::NamedEnum::names[] = + const char* Foam::NamedEnum + < + Foam::coordSet::coordFormat, + 5 + >::names[] = { "xyz", "x", diff --git a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C index 9ac01432fb..65e97c62dc 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C +++ b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C @@ -37,19 +37,20 @@ namespace Foam defineTypeNameAndDebug(surfaceFilmModel, 0); defineRunTimeSelectionTable(surfaceFilmModel, mesh); } + + template<> + const char* Foam::NamedEnum + < + Foam::surfaceFilmModels::surfaceFilmModel::thermoModelType, + 2 + >::names[] = + { + "constant", + "singleComponent" + }; + } - -template<> -const char* -Foam::NamedEnum:: -names[] = -{ - "constant", - "singleComponent" -}; - - const Foam::NamedEnum Foam::surfaceFilmModels::surfaceFilmModel::thermoModelTypeNames_; diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index 3fe205f456..f6543597bf 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C @@ -31,18 +31,24 @@ License // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum:: -names[] = +namespace Foam { - "basicThermo", - "solidThermo", - "directionalSolidThermo", - "lookup" -}; + template<> + const char* Foam::NamedEnum + < + Foam::temperatureCoupledBase::KMethodType, + 4 + >::names[] = + { + "basicThermo", + "solidThermo", + "directionalSolidThermo", + "lookup" + }; +} -const Foam::NamedEnum +const Foam::NamedEnum Foam::temperatureCoupledBase::KMethodTypeNames_;