diff --git a/BuildIssues.txt b/BuildIssues.txt index 011b5dc048..fbb6b6dcb5 100644 --- a/BuildIssues.txt +++ b/BuildIssues.txt @@ -3,6 +3,21 @@ OpenFOAM-1706 Known Build Issues ================== +--------------------- +Intel MPI (Gcc/Clang) +--------------------- + + Either I_MPI_ROOT or MPI_ROOT can be used to specify the Intel-MPI + installation directory path. + + The ThirdParty build of ptscotch uses `mpiicc` for Intel-MPI + instead of the usual `mpicc`. + When gcc or clang are used, it is highly likely that the + I_MPI_CC environment variable also needs to be set accordingly. + + See `mpiicc -help` for more information about environment variables. + + -------------- Intel Compiler -------------- diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 6a6581182b..25a4a2098e 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C @@ -40,15 +40,14 @@ Foam::autoPtr Foam::PDRDragModel::New Info<< "Selecting flame-wrinkling model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown PDRDragModel type " << modelType << nl << nl - << "Valid PDRDragModels are : " << endl + << "Valid PDRDragModel types :" << 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 932080e717..251d429c8f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -39,15 +39,14 @@ Foam::autoPtr Foam::XiEqModel::New Info<< "Selecting flame-wrinkling model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown XiEqModel type " << modelType << nl << nl - << "Valid XiEqModels are : " << endl + << "Valid XiEqModel types :" << 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 27fe3f5e17..b46192ea38 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -39,15 +39,14 @@ Foam::autoPtr Foam::XiGModel::New Info<< "Selecting flame-wrinkling model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown XiGModel type " << modelType << nl << nl - << "Valid XiGModels are : " << endl + << "Valid XiGModel types :" << 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 ed9dfb2fb3..c2dccb0180 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -42,15 +42,14 @@ Foam::autoPtr Foam::XiModel::New Info<< "Selecting flame-wrinkling model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown XiModel type " << modelType << nl << nl - << "Valid XiModels are : " << endl + << "Valid XiModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 627dd41b6f..9b064b14c6 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -34,6 +34,7 @@ License #include "fvcFlux.H" #include "fvcMeshPhi.H" #include "surfaceInterpolate.H" +#include "unitConversion.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -43,10 +44,6 @@ namespace Foam } -const Foam::scalar Foam::multiphaseMixtureThermo::convertToRad = - Foam::constant::mathematical::pi/180.0; - - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::multiphaseMixtureThermo::calcAlphas() @@ -855,7 +852,7 @@ void Foam::multiphaseMixtureThermo::correctContactAngle bool matched = (tp.key().first() == alpha1.name()); - scalar theta0 = convertToRad*tp().theta0(matched); + const scalar theta0 = degToRad(tp().theta0(matched)); scalarField theta(boundary[patchi].size(), theta0); scalar uTheta = tp().uTheta(); @@ -863,8 +860,8 @@ void Foam::multiphaseMixtureThermo::correctContactAngle // Calculate the dynamic contact angle if required if (uTheta > SMALL) { - scalar thetaA = convertToRad*tp().thetaA(matched); - scalar thetaR = convertToRad*tp().thetaR(matched); + const scalar thetaA = degToRad(tp().thetaA(matched)); + const scalar thetaR = degToRad(tp().thetaR(matched)); // Calculated the component of the velocity parallel to the wall vectorField Uwall diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H index 7c8c5b6f03..1fd4e40639 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H @@ -144,9 +144,6 @@ private: //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - //- Conversion factor for degrees into radians - static const scalar convertToRad; - // Private member functions diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C index 99c33123e8..b21c4b7b51 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C @@ -41,15 +41,14 @@ Foam::autoPtr Foam::mixtureViscosityModel::New Info<< "Selecting incompressible transport model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown mixtureViscosityModel type " << modelType << nl << nl - << "Valid mixtureViscosityModels are : " << endl + << "Valid mixtureViscosityModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C index cf8abd2e6e..f497b3c988 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C @@ -104,19 +104,18 @@ Foam::autoPtr Foam::relativeVelocityModel::New const incompressibleTwoPhaseInteractingMixture& mixture ) { - word modelType(dict.lookup(typeName)); + const word modelType(dict.lookup(typeName)); Info<< "Selecting relative velocity model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown time scale model type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid time scale model types are:" << nl + << "Unknown time scale model type " + << modelType << nl << nl + << "Valid time scale model types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -141,13 +140,13 @@ Foam::relativeVelocityModel::~relativeVelocityModel() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -tmp Foam::relativeVelocityModel::rho() const +Foam::tmp Foam::relativeVelocityModel::rho() const { return alphac_*rhoc_ + alphad_*rhod_; } -tmp Foam::relativeVelocityModel::tauDm() const +Foam::tmp Foam::relativeVelocityModel::tauDm() const { volScalarField betac(alphac_*rhoc_); volScalarField betad(alphad_*rhod_); diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C index e4d71d2397..137710d217 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C @@ -48,7 +48,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New ) ); - word temperaturePhaseChangeTwoPhaseMixtureTypeName + const word modelType ( phaseChangePropertiesDict.lookup ( @@ -56,19 +56,16 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New ) ); - Info<< "Selecting phaseChange model " - << temperaturePhaseChangeTwoPhaseMixtureTypeName << endl; + Info<< "Selecting phaseChange model " << modelType << endl; - componentsConstructorTable::iterator cstrIter = - componentsConstructorTablePtr_ - ->find(temperaturePhaseChangeTwoPhaseMixtureTypeName); + auto cstrIter = componentsConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown temperaturePhaseChangeTwoPhaseMixture type " - << temperaturePhaseChangeTwoPhaseMixtureTypeName << endl << endl - << "Valid temperaturePhaseChangeTwoPhaseMixtures are : " << endl + << modelType << nl << nl + << "Valid temperaturePhaseChangeTwoPhaseMixture types :" << endl << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C index 644c3b25a0..b5495dd6ae 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C @@ -30,12 +30,7 @@ License #include "fvcDiv.H" #include "fvcGrad.H" #include "fvcSnGrad.H" - -// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // - -const Foam::scalar Foam::threePhaseInterfaceProperties::convertToRad = - Foam::constant::mathematical::pi/180.0; - +#include "unitConversion.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -83,7 +78,7 @@ void Foam::threePhaseInterfaceProperties::correctContactAngle scalarField theta ( - convertToRad + degToRad() * ( twoPhaseAlpha2*(180 - a2cap.theta(U[patchi], nHatp)) + twoPhaseAlpha3*(180 - a3cap.theta(U[patchi], nHatp)) diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H index 826d6658d9..482a8a1a8e 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H @@ -91,10 +91,6 @@ class threePhaseInterfaceProperties public: - //- Conversion factor for degrees into radians - static const scalar convertToRad; - - // Constructors //- Construct from volume fraction field alpha and IOdictionary diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C index c14fa08d59..534c1383e2 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C @@ -48,24 +48,21 @@ Foam::phaseChangeTwoPhaseMixture::New ) ); - word phaseChangeTwoPhaseMixtureTypeName + const word modelType ( transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture") ); - Info<< "Selecting phaseChange model " - << phaseChangeTwoPhaseMixtureTypeName << endl; + Info<< "Selecting phaseChange model " << modelType << endl; - componentsConstructorTable::iterator cstrIter = - componentsConstructorTablePtr_ - ->find(phaseChangeTwoPhaseMixtureTypeName); + auto cstrIter = componentsConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown phaseChangeTwoPhaseMixture type " - << phaseChangeTwoPhaseMixtureTypeName << endl << endl - << "Valid phaseChangeTwoPhaseMixtures are : " << endl + << modelType << nl << nl + << "Valid phaseChangeTwoPhaseMixture types :" << endl << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index b880c4a6d3..36765ebc3c 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -34,22 +34,21 @@ Foam::autoPtr Foam::dragModel::New const phaseModel& phase2 ) { - word dragModelType(interfaceDict.lookup("type")); + const word modelType(interfaceDict.lookup("type")); Info << "Selecting dragModel for phase " << phase1.name() << ": " - << dragModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown dragModelType type " - << dragModelType << endl << endl - << "Valid dragModel types are : " << endl + << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index b43d46f8a3..db5d68f829 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -35,7 +35,7 @@ Foam::autoPtr Foam::heatTransferModel::New const phaseModel& phase2 ) { - word heatTransferModelType + const word modelType ( interfaceDict.lookup("heatTransferModel" + phase1.name()) ); @@ -43,17 +43,16 @@ Foam::autoPtr Foam::heatTransferModel::New Info<< "Selecting heatTransferModel for phase " << phase1.name() << ": " - << heatTransferModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(heatTransferModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown heatTransferModelType type " - << heatTransferModelType << endl << endl - << "Valid heatTransferModel types are : " << endl + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C index 963ad160f7..fc4000975d 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C @@ -33,32 +33,28 @@ Foam::autoPtr Foam::diameterModel::New const phaseModel& phase ) { - word diameterModelType - ( - dict.lookup("diameterModel") - ); + const word modelType(dict.lookup("diameterModel")); Info << "Selecting diameterModel for phase " << phase.name() << ": " - << diameterModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(diameterModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown diameterModelType type " - << diameterModelType << endl << endl - << "Valid diameterModel types are : " << endl + << "Unknown diameterModel type " + << modelType << nl << nl + << "Valid diameterModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } return cstrIter() ( - dict.optionalSubDict(diameterModelType + "Coeffs"), + dict.optionalSubDict(modelType + "Coeffs"), phase ); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index de3084f69f..425be38063 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -35,12 +35,7 @@ License #include "fvcDiv.H" #include "fvcFlux.H" #include "fvcAverage.H" - -// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // - -const Foam::scalar Foam::multiphaseSystem::convertToRad = - Foam::constant::mathematical::pi/180.0; - +#include "unitConversion.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -290,7 +285,7 @@ void Foam::multiphaseSystem::correctContactAngle bool matched = (tp.key().first() == phase1.name()); - scalar theta0 = convertToRad*tp().theta0(matched); + const scalar theta0 = degToRad(tp().theta0(matched)); scalarField theta(boundary[patchi].size(), theta0); scalar uTheta = tp().uTheta(); @@ -298,8 +293,8 @@ void Foam::multiphaseSystem::correctContactAngle // Calculate the dynamic contact angle if required if (uTheta > SMALL) { - scalar thetaA = convertToRad*tp().thetaA(matched); - scalar thetaR = convertToRad*tp().thetaR(matched); + const scalar thetaA = degToRad(tp().thetaA(matched)); + const scalar thetaR = degToRad(tp().thetaR(matched)); // Calculated the component of the velocity parallel to the wall vectorField Uwall diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H index 02b56684da..0094c2c164 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H @@ -187,9 +187,6 @@ private: //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - //- Conversion factor for degrees into radians - static const scalar convertToRad; - // Private member functions diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index b6144051a4..63a2776db4 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -33,12 +33,7 @@ License #include "fvcSnGrad.H" #include "fvcDiv.H" #include "fvcFlux.H" - -// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // - -const Foam::scalar Foam::multiphaseMixture::convertToRad = - Foam::constant::mathematical::pi/180.0; - +#include "unitConversion.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -456,7 +451,7 @@ void Foam::multiphaseMixture::correctContactAngle bool matched = (tp.key().first() == alpha1.name()); - scalar theta0 = convertToRad*tp().theta0(matched); + const scalar theta0 = degToRad(tp().theta0(matched)); scalarField theta(boundary[patchi].size(), theta0); scalar uTheta = tp().uTheta(); @@ -464,8 +459,8 @@ void Foam::multiphaseMixture::correctContactAngle // Calculate the dynamic contact angle if required if (uTheta > SMALL) { - scalar thetaA = convertToRad*tp().thetaA(matched); - scalar thetaR = convertToRad*tp().thetaR(matched); + const scalar thetaA = degToRad(tp().thetaA(matched)); + const scalar thetaR = degToRad(tp().thetaR(matched)); // Calculated the component of the velocity parallel to the wall vectorField Uwall diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H index 44150c9d2b..0183652ffc 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H @@ -154,9 +154,6 @@ private: //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - //- Conversion factor for degrees into radians - static const scalar convertToRad; - // Private member functions diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C index fee1253108..9b55bb0358 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C @@ -36,7 +36,7 @@ Foam::interfaceCompositionModel::New const phasePair& pair ) { - word interfaceCompositionModelType + const word modelType ( word(dict.lookup("type")) + "<" @@ -47,17 +47,16 @@ Foam::interfaceCompositionModel::New ); Info<< "Selecting interfaceCompositionModel for " - << pair << ": " << interfaceCompositionModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(interfaceCompositionModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown interfaceCompositionModelType type " - << interfaceCompositionModelType << endl << endl - << "Valid interfaceCompositionModel types are : " << endl + << "Unknown interfaceCompositionModel type " + << modelType << nl << nl + << "Valid interfaceCompositionModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C index 3b349be693..8ae0f6f552 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::massTransferModel::New const phasePair& pair ) { - word massTransferModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting massTransferModel for " - << pair << ": " << massTransferModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(massTransferModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown massTransferModelType type " - << massTransferModelType << endl << endl - << "Valid massTransferModel types are : " << endl + << "Unknown massTransferModel type " + << modelType << nl << nl + << "Valid massTransferModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C index 17fc43cac4..fb59ed2574 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C @@ -32,20 +32,18 @@ Foam::autoPtr Foam::saturationModel::New const dictionary& dict ) { - word saturationModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting saturationModel: " - << saturationModelType << endl; + Info<< "Selecting saturationModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(saturationModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown saturationModelType type " - << saturationModelType << endl << endl - << "Valid saturationModel types are : " << endl + << "Unknown saturationModel type " + << modelType << nl << nl + << "Valid saturationModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C index f2c28eeb5d..57be04722d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C @@ -35,20 +35,19 @@ Foam::surfaceTensionModel::New const phasePair& pair ) { - word surfaceTensionModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting surfaceTensionModel for " - << pair << ": " << surfaceTensionModelType << endl; + << pair << ": " << modelType << endl; - multiphaseConstructorTable::iterator cstrIter = - multiphaseConstructorTablePtr_->find(surfaceTensionModelType); + auto cstrIter = multiphaseConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown surfaceTensionModelType type " - << surfaceTensionModelType << endl << endl - << "Valid surfaceTensionModel types are : " << endl + << "Unknown surfaceTensionModel type " + << modelType << nl << nl + << "Valid surfaceTensionModel types :" << endl << multiphaseConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C index 2946810cf5..5b44995b4e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C @@ -35,20 +35,19 @@ Foam::aspectRatioModel::New const phasePair& pair ) { - word aspectRatioModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting aspectRatioModel for " - << pair << ": " << aspectRatioModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(aspectRatioModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown aspectRatioModelType type " - << aspectRatioModelType << endl << endl - << "Valid aspectRatioModel types are : " << endl + << "Unknown aspectRatioModel type " + << modelType << nl << nl + << "Valid aspectRatioModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index c2a5f4074e..de8bc17cda 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::dragModel::New const phasePair& pair ) { - word dragModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting dragModel for " - << pair << ": " << dragModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown dragModelType type " - << dragModelType << endl << endl - << "Valid dragModel types are : " << endl + << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index 46e43f6b11..71654baea6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::heatTransferModel::New const phasePair& pair ) { - word heatTransferModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting heatTransferModel for " - << pair << ": " << heatTransferModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(heatTransferModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown heatTransferModelType type " - << heatTransferModelType << endl << endl - << "Valid heatTransferModel types are : " << endl + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C index 8dbdd5479c..a0fd721dfb 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::liftModel::New const phasePair& pair ) { - word liftModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting liftModel for " - << pair << ": " << liftModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(liftModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown liftModelType type " - << liftModelType << endl << endl - << "Valid liftModel types are : " << endl + << "Unknown liftModel type " + << modelType << nl << nl + << "Valid liftModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C index fb16d05418..a3f312de8f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C @@ -35,20 +35,19 @@ Foam::swarmCorrection::New const phasePair& pair ) { - word swarmCorrectionType(dict.lookup("type")); + const word correctionType(dict.lookup("type")); Info<< "Selecting swarmCorrection for " - << pair << ": " << swarmCorrectionType << endl; + << pair << ": " << correctionType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(swarmCorrectionType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(correctionType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown swarmCorrectionType type " - << swarmCorrectionType << endl << endl - << "Valid swarmCorrection types are : " << endl + << "Unknown swarmCorrection type " + << correctionType << nl << nl + << "Valid swarmCorrection types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C index 53266ae6b2..123bad7691 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C @@ -35,20 +35,19 @@ Foam::turbulentDispersionModel::New const phasePair& pair ) { - word turbulentDispersionModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting turbulentDispersionModel for " - << pair << ": " << turbulentDispersionModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(turbulentDispersionModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown turbulentDispersionModelType type " - << turbulentDispersionModelType << endl << endl - << "Valid turbulentDispersionModel types are : " << endl + << "Unknown turbulentDispersionModel type " + << modelType << nl << nl + << "Valid turbulentDispersionModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C index 1b092c197e..6884a6b3be 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::virtualMassModel::New const phasePair& pair ) { - word virtualMassModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting virtualMassModel for " - << pair << ": " << virtualMassModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(virtualMassModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown virtualMassModelType type " - << virtualMassModelType << endl << endl - << "Valid virtualMassModel types are : " << endl + << "Unknown virtualMassModel type " + << modelType << nl << nl + << "Valid virtualMassModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C index 83ad7b42e5..bb59931dc1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::wallDampingModel::New const phasePair& pair ) { - word wallDampingModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting wallDampingModel for " - << pair << ": " << wallDampingModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(wallDampingModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown wallDampingModelType type " - << wallDampingModelType << endl << endl - << "Valid wallDampingModel types are : " << endl + << "Unknown wallDampingModel type " + << modelType << nl << nl + << "Valid wallDampingModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C index 806a1dd3b3..2cfddbd92c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::wallLubricationModel::New const phasePair& pair ) { - word wallLubricationModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting wallLubricationModel for " - << pair << ": " << wallLubricationModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(wallLubricationModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown wallLubricationModelType type " - << wallLubricationModelType << endl << endl - << "Valid wallLubricationModel types are : " << endl + << "Unknown wallLubricationModel type " + << modelType << nl << nl + << "Valid wallLubricationModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C index cbb33a5fbd..8324dc52bc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C @@ -33,20 +33,19 @@ Foam::autoPtr Foam::blendingMethod::New const wordList& phaseNames ) { - word blendingMethodType(dict.lookup("type")); + const word methodType(dict.lookup("type")); Info<< "Selecting " << dict.dictName() << " blending method: " - << blendingMethodType << endl; + << methodType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(blendingMethodType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown blendingMethodType type " - << blendingMethodType << endl << endl - << "Valid blendingMethod types are : " << endl + << "Unknown blendingMethod type " + << methodType << nl << nl + << "Valid blendingMethod types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C index 963ad160f7..fc4000975d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C @@ -33,32 +33,28 @@ Foam::autoPtr Foam::diameterModel::New const phaseModel& phase ) { - word diameterModelType - ( - dict.lookup("diameterModel") - ); + const word modelType(dict.lookup("diameterModel")); Info << "Selecting diameterModel for phase " << phase.name() << ": " - << diameterModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(diameterModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown diameterModelType type " - << diameterModelType << endl << endl - << "Valid diameterModel types are : " << endl + << "Unknown diameterModel type " + << modelType << nl << nl + << "Valid diameterModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } return cstrIter() ( - dict.optionalSubDict(diameterModelType + "Coeffs"), + dict.optionalSubDict(modelType + "Coeffs"), phase ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C index c42b86070d..d78fdbba5a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C @@ -35,20 +35,19 @@ Foam::autoPtr Foam::phaseModel::New const label index ) { - word phaseModelType(fluid.subDict(phaseName).lookup("type")); + const word modelType(fluid.subDict(phaseName).lookup("type")); Info<< "Selecting phaseModel for " - << phaseName << ": " << phaseModelType << endl; + << phaseName << ": " << modelType << endl; - phaseSystemConstructorTable::iterator cstrIter = - phaseSystemConstructorTablePtr_->find(phaseModelType); + auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown phaseModelType type " - << phaseModelType << endl << endl - << "Valid phaseModel types are : " << endl + << "Unknown phaseModel type " + << modelType << nl << nl + << "Valid phaseModel types :" << endl << phaseSystemConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 627af1db87..1f8f83599b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -40,6 +40,8 @@ License #include "fvmLaplacian.H" #include "fvmSup.H" +#include "unitConversion.H" + // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // namespace Foam @@ -48,9 +50,6 @@ namespace Foam defineRunTimeSelectionTable(multiphaseSystem, dictionary); } -const Foam::scalar Foam::multiphaseSystem::convertToRad = - Foam::constant::mathematical::pi/180.0; - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -399,7 +398,7 @@ void Foam::multiphaseSystem::correctContactAngle bool matched = (tp.key().first() == phase1.name()); - scalar theta0 = convertToRad*tp().theta0(matched); + const scalar theta0 = degToRad(tp().theta0(matched)); scalarField theta(boundary[patchi].size(), theta0); scalar uTheta = tp().uTheta(); @@ -407,8 +406,8 @@ void Foam::multiphaseSystem::correctContactAngle // Calculate the dynamic contact angle if required if (uTheta > SMALL) { - scalar thetaA = convertToRad*tp().thetaA(matched); - scalar thetaR = convertToRad*tp().thetaR(matched); + const scalar thetaA = degToRad(tp().thetaA(matched)); + const scalar thetaR = degToRad(tp().thetaR(matched)); // Calculated the component of the velocity parallel to the wall vectorField Uwall diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H index dca55bf873..0c43f6dd8f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H @@ -65,9 +65,6 @@ class multiphaseSystem //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - //- Conversion factor for degrees into radians - static const scalar convertToRad; - // Private member functions @@ -207,10 +204,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "multiphaseSystemI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C index 0f116c7040..ae09589634 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C @@ -32,7 +32,7 @@ Foam::autoPtr Foam::multiphaseSystem::New const fvMesh& mesh ) { - const word multiphaseSystemType + const word systemType ( IOdictionary ( @@ -48,18 +48,16 @@ Foam::autoPtr Foam::multiphaseSystem::New ).lookup("type") ); - Info<< "Selecting multiphaseSystem " - << multiphaseSystemType << endl; + Info<< "Selecting multiphaseSystem " << systemType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(multiphaseSystemType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown multiphaseSystemType type " - << multiphaseSystemType << endl << endl - << "Valid multiphaseSystem types are : " << endl + << "Unknown multiphaseSystem type " + << systemType << nl << nl + << "Valid multiphaseSystem types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C index 034da57349..a1ac6c46f6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -43,26 +43,17 @@ using namespace Foam::constant::mathematical; // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum +const Foam::Enum < Foam::compressible:: - alphatWallBoilingWallFunctionFvPatchScalarField::phaseType, - 2 ->::names[] = -{ - "vapor", - "liquid" -}; - -const Foam::NamedEnum -< - Foam::compressible:: - alphatWallBoilingWallFunctionFvPatchScalarField::phaseType, - 2 + alphatWallBoilingWallFunctionFvPatchScalarField::phaseType > Foam::compressible:: -alphatWallBoilingWallFunctionFvPatchScalarField::phaseTypeNames_; +alphatWallBoilingWallFunctionFvPatchScalarField::phaseTypeNames_ +{ + { phaseType::vaporPhase, "vapor" }, + { phaseType::liquidPhase, "liquid" }, +}; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -111,7 +102,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField ) : alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict), - phaseType_(phaseTypeNames_.read(dict.lookup("phaseType"))), + phaseType_(phaseTypeNames_.lookup("phaseType", dict)), relax_(dict.lookupOrDefault("relax", 0.5)), AbyV_(p.size(), 0), alphatConv_(p.size(), 0), diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H index 665d41197e..33ca2fe31e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H @@ -164,7 +164,7 @@ private: // Private data //- Heat source type names - static const NamedEnum phaseTypeNames_; + static const Enum phaseTypeNames_; //- Heat source type phaseType phaseType_; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C index dcc0cc0d0f..94bbba3212 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C @@ -33,20 +33,18 @@ Foam::wallBoilingModels::departureDiameterModel::New const dictionary& dict ) { - word departureDiameterModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting departureDiameterModel: " - << departureDiameterModelType << endl; + Info<< "Selecting departureDiameterModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(departureDiameterModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown departureDiameterModelType type " - << departureDiameterModelType << endl << endl - << "Valid departureDiameterModel types are : " << endl + << "Unknown departureDiameterModel type " + << modelType << nl << nl + << "Valid departureDiameterModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C index 13987ff4b0..136224813a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C @@ -33,20 +33,18 @@ Foam::wallBoilingModels::departureFrequencyModel::New const dictionary& dict ) { - word departureFrequencyModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting departureFrequencyModel: " - << departureFrequencyModelType << endl; + Info<< "Selecting departureFrequencyModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(departureFrequencyModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown departureFrequencyModelType type " - << departureFrequencyModelType << endl << endl - << "Valid departureFrequencyModel types are : " << endl + << "Unknown departureFrequencyModel type " + << modelType << nl << nl + << "Valid departureFrequencyModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C index 32f2d5a520..6338ab6669 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C @@ -33,20 +33,18 @@ Foam::wallBoilingModels::nucleationSiteModel::New const dictionary& dict ) { - word nucleationSiteModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting nucleationSiteModel: " - << nucleationSiteModelType << endl; + Info<< "Selecting nucleationSiteModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(nucleationSiteModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown nucleationSiteModelType type " - << nucleationSiteModelType << endl << endl - << "Valid nucleationSiteModel types are : " << endl + << "Unknown nucleationSiteModel type " + << modelType << nl << nl + << "Valid nucleationSiteModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C index 6cf6d1d64c..ddc57a3e65 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C @@ -33,20 +33,18 @@ Foam::wallBoilingModels::partitioningModel::New const dictionary& dict ) { - word partitioningModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting partitioningModel: " - << partitioningModelType << endl; + Info<< "Selecting partitioningModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(partitioningModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown partitioningModelType type " - << partitioningModelType << endl << endl - << "Valid partitioningModel types are : " << endl + << "Unknown partitioningModel type " + << modelType << nl << nl + << "Valid partitioningModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C index bfadfc6399..e4a3a64634 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C @@ -33,23 +33,20 @@ Foam::kineticTheoryModels::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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown conductivityModel type " + << modelType << nl << nl + << "Valid conductivityModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C index b68c03470f..608cd1178d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown frictionalStressModel type " + << modelType << nl << nl + << "Valid frictionalStressModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C index a1ce25337f..1810e248bf 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown granularPressureModel type " + << modelType << nl << nl + << "Valid granularPressureModel types : " << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C index 583ce1c3ad..0ac0a36afe 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown radialModel type " + << modelType << nl << nl + << "Valid radialModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C index 361850b414..0120b2a1b4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C @@ -33,23 +33,20 @@ 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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown viscosityModel type " + << modelType << nl << nl + << "Valid viscosityModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C index dfbd95e6b2..18a941099a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C @@ -50,15 +50,14 @@ Foam::diameterModels::IATEsource::New const dictionary& dict ) { - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(type); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown IATE source type " << type << nl << nl - << "Valid IATE source types : " << endl + << "Valid IATE source types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C index c2ca635873..50a2f015a7 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C @@ -32,7 +32,7 @@ Foam::autoPtr Foam::twoPhaseSystem::New const fvMesh& mesh ) { - const word twoPhaseSystemType + const word systemType ( IOdictionary ( @@ -48,18 +48,16 @@ Foam::autoPtr Foam::twoPhaseSystem::New ).lookup("type") ); - Info<< "Selecting twoPhaseSystem " - << twoPhaseSystemType << endl; + Info<< "Selecting twoPhaseSystem " << systemType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(twoPhaseSystemType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown twoPhaseSystemType type " - << twoPhaseSystemType << endl << endl - << "Valid twoPhaseSystem types are : " << endl + << "Unknown twoPhaseSystem type " + << systemType << nl << nl + << "Valid twoPhaseSystem types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C index 2946810cf5..5b44995b4e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C @@ -35,20 +35,19 @@ Foam::aspectRatioModel::New const phasePair& pair ) { - word aspectRatioModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting aspectRatioModel for " - << pair << ": " << aspectRatioModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(aspectRatioModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown aspectRatioModelType type " - << aspectRatioModelType << endl << endl - << "Valid aspectRatioModel types are : " << endl + << "Unknown aspectRatioModel type " + << modelType << nl << nl + << "Valid aspectRatioModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index c2a5f4074e..de8bc17cda 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::dragModel::New const phasePair& pair ) { - word dragModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting dragModel for " - << pair << ": " << dragModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown dragModelType type " - << dragModelType << endl << endl - << "Valid dragModel types are : " << endl + << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index 46e43f6b11..71654baea6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::heatTransferModel::New const phasePair& pair ) { - word heatTransferModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting heatTransferModel for " - << pair << ": " << heatTransferModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(heatTransferModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown heatTransferModelType type " - << heatTransferModelType << endl << endl - << "Valid heatTransferModel types are : " << endl + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C index 8dbdd5479c..a0fd721dfb 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::liftModel::New const phasePair& pair ) { - word liftModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting liftModel for " - << pair << ": " << liftModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(liftModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown liftModelType type " - << liftModelType << endl << endl - << "Valid liftModel types are : " << endl + << "Unknown liftModel type " + << modelType << nl << nl + << "Valid liftModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C index fb16d05418..5462b768a2 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C @@ -35,20 +35,19 @@ Foam::swarmCorrection::New const phasePair& pair ) { - word swarmCorrectionType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting swarmCorrection for " - << pair << ": " << swarmCorrectionType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(swarmCorrectionType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown swarmCorrectionType type " - << swarmCorrectionType << endl << endl - << "Valid swarmCorrection types are : " << endl + << "Unknown swarmCorrection type " + << modelType << nl << nl + << "Valid swarmCorrection types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C index 53266ae6b2..123bad7691 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C @@ -35,20 +35,19 @@ Foam::turbulentDispersionModel::New const phasePair& pair ) { - word turbulentDispersionModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting turbulentDispersionModel for " - << pair << ": " << turbulentDispersionModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(turbulentDispersionModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown turbulentDispersionModelType type " - << turbulentDispersionModelType << endl << endl - << "Valid turbulentDispersionModel types are : " << endl + << "Unknown turbulentDispersionModel type " + << modelType << nl << nl + << "Valid turbulentDispersionModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C index 1b092c197e..6884a6b3be 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::virtualMassModel::New const phasePair& pair ) { - word virtualMassModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting virtualMassModel for " - << pair << ": " << virtualMassModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(virtualMassModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown virtualMassModelType type " - << virtualMassModelType << endl << endl - << "Valid virtualMassModel types are : " << endl + << "Unknown virtualMassModel type " + << modelType << nl << nl + << "Valid virtualMassModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C index 806a1dd3b3..2cfddbd92c 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C @@ -34,20 +34,19 @@ Foam::autoPtr Foam::wallLubricationModel::New const phasePair& pair ) { - word wallLubricationModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting wallLubricationModel for " - << pair << ": " << wallLubricationModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(wallLubricationModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown wallLubricationModelType type " - << wallLubricationModelType << endl << endl - << "Valid wallLubricationModel types are : " << endl + << "Unknown wallLubricationModel type " + << modelType << nl << nl + << "Valid wallLubricationModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C index bfadfc6399..e4a3a64634 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C @@ -33,23 +33,20 @@ Foam::kineticTheoryModels::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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown conductivityModel type " + << modelType << nl << nl + << "Valid conductivityModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C index b68c03470f..255b15593a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown frictionalStressModel type " + << modelType << nl << nl + << "Valid frictionalStressModelType types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C index a1ce25337f..7898a94cca 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown granularPressureModel type " + << modelType << nl << nl + << "Valid granularPressureModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C index 583ce1c3ad..0ac0a36afe 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::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); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown radialModel type " + << modelType << nl << nl + << "Valid radialModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C index 361850b414..83067ea6ee 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C @@ -33,23 +33,20 @@ Foam::kineticTheoryModels::viscosityModel::New const dictionary& dict ) { - word viscosityModelType(dict.lookup("viscosityModel")); + const word modelName(dict.lookup("viscosityModel")); - Info<< "Selecting viscosityModel " - << viscosityModelType << endl; + Info<< "Selecting viscosityModel " << modelName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(viscosityModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelName); if (!cstrIter.found()) { - 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); + FatalErrorInFunction + << "Unknown viscosityModel type " + << modelName << nl << nl + << "Valid viscosityModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C index cbb33a5fbd..f4419b735e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C @@ -33,20 +33,19 @@ Foam::autoPtr Foam::blendingMethod::New const wordList& phaseNames ) { - word blendingMethodType(dict.lookup("type")); + const word methodName(dict.lookup("type")); Info<< "Selecting " << dict.dictName() << " blending method: " - << blendingMethodType << endl; + << methodName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(blendingMethodType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown blendingMethodType type " - << blendingMethodType << endl << endl - << "Valid blendingMethod types are : " << endl + << "Unknown blendingMethod type " + << methodName << nl << nl + << "Valid blendingMethod types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C index fc011ece0c..c77c7e7e99 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C @@ -51,15 +51,14 @@ Foam::diameterModels::IATEsource::New const dictionary& dict ) { - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(type); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown IATE source type " << type << nl << nl - << "Valid IATE source types : " << endl + << "Valid IATE source types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C index 963ad160f7..fc4000975d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C @@ -33,32 +33,28 @@ Foam::autoPtr Foam::diameterModel::New const phaseModel& phase ) { - word diameterModelType - ( - dict.lookup("diameterModel") - ); + const word modelType(dict.lookup("diameterModel")); Info << "Selecting diameterModel for phase " << phase.name() << ": " - << diameterModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(diameterModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown diameterModelType type " - << diameterModelType << endl << endl - << "Valid diameterModel types are : " << endl + << "Unknown diameterModel type " + << modelType << nl << nl + << "Valid diameterModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } return cstrIter() ( - dict.optionalSubDict(diameterModelType + "Coeffs"), + dict.optionalSubDict(modelType + "Coeffs"), phase ); } diff --git a/applications/test/CompactListList/Test-CompactListList.C b/applications/test/CompactListList/Test-CompactListList.C index 9baf498faf..265bb7646f 100644 --- a/applications/test/CompactListList/Test-CompactListList.C +++ b/applications/test/CompactListList/Test-CompactListList.C @@ -31,8 +31,7 @@ Description #include "CompactListList.H" #include "IOstreams.H" -#include "OStringStream.H" -#include "IStringStream.H" +#include "StringStream.H" #include "faceList.H" using namespace Foam; diff --git a/applications/test/HashTable/Test-hashTable.C b/applications/test/HashTable/Test-hashTable.C index 5dd3ca0fa4..1071b0a473 100644 --- a/applications/test/HashTable/Test-hashTable.C +++ b/applications/test/HashTable/Test-hashTable.C @@ -29,8 +29,7 @@ License #include "DynamicList.H" #include "FlatOutput.H" #include "IOstreams.H" -#include "IStringStream.H" -#include "OStringStream.H" +#include "StringStream.H" using namespace Foam; diff --git a/applications/test/IStringStream/Test-IStringStream.C b/applications/test/IStringStream/Test-IStringStream.C index 8c35bbaa33..cd8ba0e2a6 100644 --- a/applications/test/IStringStream/Test-IStringStream.C +++ b/applications/test/IStringStream/Test-IStringStream.C @@ -25,7 +25,7 @@ Description \*---------------------------------------------------------------------------*/ -#include "IStringStream.H" +#include "StringStream.H" #include "wordList.H" #include "IOstreams.H" diff --git a/applications/test/List/Test-List.C b/applications/test/List/Test-List.C index d68bc4d7ba..5d3f3ba4b4 100644 --- a/applications/test/List/Test-List.C +++ b/applications/test/List/Test-List.C @@ -37,7 +37,7 @@ See also #include "wordReList.H" #include "IOstreams.H" -#include "IStringStream.H" +#include "StringStream.H" #include "scalar.H" #include "vector.H" diff --git a/applications/test/OStringStream/Test-OStringStream.C b/applications/test/OStringStream/Test-OStringStream.C index 313f108149..28e3861e47 100644 --- a/applications/test/OStringStream/Test-OStringStream.C +++ b/applications/test/OStringStream/Test-OStringStream.C @@ -25,8 +25,8 @@ Description \*---------------------------------------------------------------------------*/ -#include "OStringStream.H" #include "IOstreams.H" +#include "StringStream.H" using namespace Foam; @@ -35,15 +35,28 @@ using namespace Foam; int main(int argc, char *argv[]) { - Info<< "khkj" << endl; + Info<< "Begin test OStringStream" << endl; - OStringStream testStream; - testStream << "hello " << 1 << endl; - Info<< testStream.str() << endl; - testStream.rewind(); - Info<< testStream.str() << endl; - testStream << "hello " << 2 << endl; - Info<< testStream.str() << endl; + OStringStream os; + os << "output with some values " << 1 << " entry" << endl; + + Info<< "contains:" << nl + << os.str() << endl; + os.rewind(); + + Info<< "after rewind:" << nl + << os.str() << endl; + + os << "####"; + + Info<< "overwrite with short string:" << nl + << os.str() << endl; + + os.reset(); + os << "%%%% reset"; + + Info<< "after reset:" << nl + << os.str() << endl; Info<< "End\n" << endl; diff --git a/applications/test/PackedList2/Test-PackedList2.C b/applications/test/PackedList2/Test-PackedList2.C index 26981b484f..ce9b15ed51 100644 --- a/applications/test/PackedList2/Test-PackedList2.C +++ b/applications/test/PackedList2/Test-PackedList2.C @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) std::vector stlVector(n, true); labelHashSet emptyHash; - labelHashSet fullHash(1000); + labelHashSet fullHash(1024); for (label i = 0; i < n; i++) { fullHash.insert(i); diff --git a/applications/test/PackedList4/Test-PackedList4.C b/applications/test/PackedList4/Test-PackedList4.C index 6d284a339b..ee85d62985 100644 --- a/applications/test/PackedList4/Test-PackedList4.C +++ b/applications/test/PackedList4/Test-PackedList4.C @@ -30,7 +30,7 @@ Description #include "uLabel.H" #include "IOstreams.H" #include "PackedBoolList.H" -#include "IStringStream.H" +#include "StringStream.H" using namespace Foam; diff --git a/applications/test/Polynomial/Test-Polynomial.C b/applications/test/Polynomial/Test-Polynomial.C index 6a6fb8bb45..996d519f6a 100644 --- a/applications/test/Polynomial/Test-Polynomial.C +++ b/applications/test/Polynomial/Test-Polynomial.C @@ -29,7 +29,7 @@ Description \*---------------------------------------------------------------------------*/ -#include "IStringStream.H" +#include "StringStream.H" #include "Polynomial.H" #include "polynomialFunction.H" #include "Random.H" diff --git a/applications/test/StaticHashTable/Test-staticHashTable.C b/applications/test/StaticHashTable/Test-staticHashTable.C index 7a0bf9b27e..c21e6597de 100644 --- a/applications/test/StaticHashTable/Test-staticHashTable.C +++ b/applications/test/StaticHashTable/Test-staticHashTable.C @@ -25,8 +25,7 @@ License #include "StaticHashTable.H" #include "IOstreams.H" -#include "IStringStream.H" -#include "OStringStream.H" +#include "StringStream.H" using namespace Foam; diff --git a/applications/test/dictionary/Test-dictionary.C b/applications/test/dictionary/Test-dictionary.C index dc55b9902f..3d7e445ab5 100644 --- a/applications/test/dictionary/Test-dictionary.C +++ b/applications/test/dictionary/Test-dictionary.C @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) dictionary dict; dict.add(word("aa" + getEnv("WM_MPLIB") + "cc"), 16); - string s("DDD${aa${WM_MPLIB}cc}EEE"); + string s("DDD_${aa${WM_MPLIB}cc}_EEE"); stringOps::inplaceExpand(s, dict, true, false); Info<< "variable expansion:" << s << endl; } diff --git a/applications/test/error/Test-error.C b/applications/test/error/Test-error.C index b9be1924a5..981e071b8f 100644 --- a/applications/test/error/Test-error.C +++ b/applications/test/error/Test-error.C @@ -47,8 +47,24 @@ int main(int argc, char *argv[]) IOWarningInFunction(dict) << "warning 3" << endl; - FatalErrorInFunction << "error 1" << endl; - FatalErrorInFunction << "error 2" << exit(FatalError); + FatalErrorInFunction + << "This is an error from 1" << nl + << "Explanation to follow:" << endl; + + FatalErrorInFunction + << "Error 2" + << exit(FatalError); + } + catch (Foam::error& fErr) + { + Serr<< "Caught Foam error " << fErr << nl << endl; + } + + try + { + FatalErrorInFunction + << "Error# 3" + << exit(FatalError); } catch (Foam::error& fErr) { diff --git a/applications/test/externalCoupler/Make/files b/applications/test/externalCoupler/Make/files deleted file mode 100644 index 0e55c301e2..0000000000 --- a/applications/test/externalCoupler/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -Test-externalCoupler.C - -EXE = $(FOAM_USER_APPBIN)/Test-externalCoupler diff --git a/applications/test/externalCoupler/Make/options b/applications/test/externalCoupler/Make/options deleted file mode 100644 index e2c645cc88..0000000000 --- a/applications/test/externalCoupler/Make/options +++ /dev/null @@ -1,7 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/lumpedPointMotion/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -llumpedPointMotion diff --git a/applications/test/externalFileCoupler/Make/files b/applications/test/externalFileCoupler/Make/files new file mode 100644 index 0000000000..1dc8723085 --- /dev/null +++ b/applications/test/externalFileCoupler/Make/files @@ -0,0 +1,3 @@ +Test-externalFileCoupler.C + +EXE = $(FOAM_USER_APPBIN)/Test-externalFileCoupler diff --git a/applications/test/externalFileCoupler/Make/options b/applications/test/externalFileCoupler/Make/options new file mode 100644 index 0000000000..fa15f12452 --- /dev/null +++ b/applications/test/externalFileCoupler/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lfiniteVolume diff --git a/applications/test/externalCoupler/Test-externalCoupler.C b/applications/test/externalFileCoupler/Test-externalFileCoupler.C similarity index 96% rename from applications/test/externalCoupler/Test-externalCoupler.C rename to applications/test/externalFileCoupler/Test-externalFileCoupler.C index 90cd38d07c..3d04076956 100644 --- a/applications/test/externalCoupler/Test-externalCoupler.C +++ b/applications/test/externalFileCoupler/Test-externalFileCoupler.C @@ -22,14 +22,14 @@ License along with OpenFOAM. If not, see . Application - Test-externalCoupler + Test-externalFileCoupler Description Test of master/slave communication etc. \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "externalCoupler.H" +#include "externalFileCoupler.H" using namespace Foam; @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) const label maxCount = args.optionLookupOrDefault