mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
This commit is contained in:
@ -40,15 +40,14 @@ Foam::autoPtr<Foam::PDRDragModel> 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);
|
||||
}
|
||||
|
||||
@ -39,15 +39,14 @@ Foam::autoPtr<Foam::XiEqModel> 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);
|
||||
}
|
||||
|
||||
@ -39,15 +39,14 @@ Foam::autoPtr<Foam::XiGModel> 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);
|
||||
}
|
||||
|
||||
@ -42,15 +42,14 @@ Foam::autoPtr<Foam::XiModel> 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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -41,15 +41,14 @@ Foam::autoPtr<Foam::mixtureViscosityModel> 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);
|
||||
}
|
||||
|
||||
@ -104,19 +104,18 @@ Foam::autoPtr<Foam::relativeVelocityModel> 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<volScalarField> Foam::relativeVelocityModel::rho() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::relativeVelocityModel::rho() const
|
||||
{
|
||||
return alphac_*rhoc_ + alphad_*rhod_;
|
||||
}
|
||||
|
||||
|
||||
tmp<volSymmTensorField> Foam::relativeVelocityModel::tauDm() const
|
||||
Foam::tmp<Foam::volSymmTensorField> Foam::relativeVelocityModel::tauDm() const
|
||||
{
|
||||
volScalarField betac(alphac_*rhoc_);
|
||||
volScalarField betad(alphad_*rhod_);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -34,22 +34,21 @@ Foam::autoPtr<Foam::dragModel> 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);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
||||
const phaseModel& phase2
|
||||
)
|
||||
{
|
||||
word heatTransferModelType
|
||||
const word modelType
|
||||
(
|
||||
interfaceDict.lookup("heatTransferModel" + phase1.name())
|
||||
);
|
||||
@ -43,17 +43,16 @@ Foam::autoPtr<Foam::heatTransferModel> 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);
|
||||
}
|
||||
|
||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> 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
|
||||
);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::massTransferModel> 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);
|
||||
}
|
||||
|
||||
@ -32,20 +32,18 @@ Foam::autoPtr<Foam::saturationModel> 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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::dragModel> 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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::heatTransferModel> 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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::liftModel> 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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::virtualMassModel> 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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallDampingModel> 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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallLubricationModel> 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);
|
||||
}
|
||||
|
||||
@ -33,20 +33,19 @@ Foam::autoPtr<Foam::blendingMethod> 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);
|
||||
}
|
||||
|
||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> 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
|
||||
);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::autoPtr<Foam::phaseModel> 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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -32,7 +32,7 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
const word multiphaseSystemType
|
||||
const word systemType
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
@ -48,18 +48,16 @@ Foam::autoPtr<Foam::multiphaseSystem> 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);
|
||||
}
|
||||
|
||||
@ -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<scalar>("relax", 0.5)),
|
||||
AbyV_(p.size(), 0),
|
||||
alphatConv_(p.size(), 0),
|
||||
|
||||
@ -164,7 +164,7 @@ private:
|
||||
// Private data
|
||||
|
||||
//- Heat source type names
|
||||
static const NamedEnum<phaseType, 2> phaseTypeNames_;
|
||||
static const Enum<phaseType> phaseTypeNames_;
|
||||
|
||||
//- Heat source type
|
||||
phaseType phaseType_;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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<conductivityModel>(cstrIter()(dict));
|
||||
|
||||
@ -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<frictionalStressModel>(cstrIter()(dict));
|
||||
|
||||
@ -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<granularPressureModel>(cstrIter()(dict));
|
||||
|
||||
@ -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<radialModel>(cstrIter()(dict));
|
||||
|
||||
@ -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<viscosityModel>(cstrIter()(dict));
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ Foam::autoPtr<Foam::twoPhaseSystem> Foam::twoPhaseSystem::New
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
const word twoPhaseSystemType
|
||||
const word systemType
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
@ -48,18 +48,16 @@ Foam::autoPtr<Foam::twoPhaseSystem> 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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::dragModel> 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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::heatTransferModel> 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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::liftModel> 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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::virtualMassModel> 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);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallLubricationModel> 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);
|
||||
}
|
||||
|
||||
@ -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<conductivityModel>(cstrIter()(dict));
|
||||
|
||||
@ -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<frictionalStressModel>(cstrIter()(dict));
|
||||
|
||||
@ -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<granularPressureModel>(cstrIter()(dict));
|
||||
|
||||
@ -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<radialModel>(cstrIter()(dict));
|
||||
|
||||
@ -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<viscosityModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,20 +33,19 @@ Foam::autoPtr<Foam::blendingMethod> 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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> 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
|
||||
);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
||||
std::vector<bool> stlVector(n, true);
|
||||
|
||||
labelHashSet emptyHash;
|
||||
labelHashSet fullHash(1000);
|
||||
labelHashSet fullHash(1024);
|
||||
for (label i = 0; i < n; i++)
|
||||
{
|
||||
fullHash.insert(i);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ void testMapDistribute()
|
||||
List<Tuple2<label, List<scalar>>> complexData(100);
|
||||
forAll(complexData, i)
|
||||
{
|
||||
complexData[i].first() = rndGen.integer(0, Pstream::nProcs()-1);
|
||||
complexData[i].first() = rndGen.position(0, Pstream::nProcs()-1);
|
||||
complexData[i].second().setSize(3);
|
||||
complexData[i].second()[0] = 1;
|
||||
complexData[i].second()[1] = 2;
|
||||
|
||||
@ -122,7 +122,7 @@ int main(int argc, char *argv[])
|
||||
fileName pointsFile(runTime.constantPath()/"points.tmp");
|
||||
OFstream pFile(pointsFile);
|
||||
|
||||
scalar a(degToRad(0.1));
|
||||
const scalar a = 0.1_deg;
|
||||
tensor rotateZ =
|
||||
tensor
|
||||
(
|
||||
|
||||
@ -419,7 +419,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
|
||||
{
|
||||
// Distribute the points to be +/- 2.5deg from the x-z plane
|
||||
|
||||
scalar tanTheta = Foam::tan(degToRad(2.5));
|
||||
const scalar tanTheta = Foam::tan(2.5_deg);
|
||||
|
||||
SLList<face>::iterator iterf = pFaces[WEDGE][0].begin();
|
||||
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();
|
||||
|
||||
@ -69,18 +69,12 @@ enum ExtrudeMode
|
||||
SURFACE
|
||||
};
|
||||
|
||||
namespace Foam
|
||||
static const Enum<ExtrudeMode> ExtrudeModeNames
|
||||
{
|
||||
template<>
|
||||
const char* NamedEnum<ExtrudeMode, 3>::names[] =
|
||||
{
|
||||
"mesh",
|
||||
"patch",
|
||||
"surface"
|
||||
};
|
||||
}
|
||||
|
||||
static const NamedEnum<ExtrudeMode, 3> ExtrudeModeNames;
|
||||
{ ExtrudeMode::MESH, "mesh" },
|
||||
{ ExtrudeMode::PATCH, "patch" },
|
||||
{ ExtrudeMode::SURFACE, "surface" },
|
||||
};
|
||||
|
||||
|
||||
void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName)
|
||||
@ -305,9 +299,10 @@ int main(int argc, char *argv[])
|
||||
const Switch flipNormals(dict.lookup("flipNormals"));
|
||||
|
||||
// What to extrude
|
||||
const ExtrudeMode mode = ExtrudeModeNames.read
|
||||
const ExtrudeMode mode = ExtrudeModeNames.lookup
|
||||
(
|
||||
dict.lookup("constructFrom")
|
||||
"constructFrom",
|
||||
dict
|
||||
);
|
||||
|
||||
// Any merging of small edges
|
||||
|
||||
@ -60,17 +60,11 @@ enum ExtrudeMode
|
||||
MESHEDSURFACE
|
||||
};
|
||||
|
||||
namespace Foam
|
||||
static const Enum<ExtrudeMode> ExtrudeModeNames
|
||||
{
|
||||
template<>
|
||||
const char* NamedEnum<ExtrudeMode, 2>::names[] =
|
||||
{
|
||||
"polyMesh2D",
|
||||
"MeshedSurface"
|
||||
};
|
||||
}
|
||||
|
||||
static const NamedEnum<ExtrudeMode, 2> ExtrudeModeNames;
|
||||
{ ExtrudeMode::POLYMESH2D, "polyMesh2D" },
|
||||
{ ExtrudeMode::MESHEDSURFACE, "MeshedSurface" },
|
||||
};
|
||||
|
||||
|
||||
//pointField moveInitialPoints
|
||||
|
||||
@ -35,10 +35,6 @@ defineRunTimeSelectionTable(cellSizeAndAlignmentControl, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::cellSizeAndAlignmentControl::cellSizeAndAlignmentControl
|
||||
@ -57,7 +53,7 @@ Foam::cellSizeAndAlignmentControl::cellSizeAndAlignmentControl
|
||||
controlFunctionDict.lookupOrDefault<Switch>
|
||||
(
|
||||
"forceInitialPointInsertion",
|
||||
"off"
|
||||
Switch::OFF
|
||||
)
|
||||
),
|
||||
name_(name)
|
||||
@ -76,28 +72,20 @@ Foam::cellSizeAndAlignmentControl::New
|
||||
const scalar& defaultCellSize
|
||||
)
|
||||
{
|
||||
word cellSizeAndAlignmentControlTypeName
|
||||
(
|
||||
controlFunctionDict.lookup("type")
|
||||
);
|
||||
const word controlType(controlFunctionDict.lookup("type"));
|
||||
|
||||
Info<< indent << "Selecting cellSizeAndAlignmentControl "
|
||||
<< cellSizeAndAlignmentControlTypeName << endl;
|
||||
<< controlType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find
|
||||
(
|
||||
cellSizeAndAlignmentControlTypeName
|
||||
);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(controlType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown cellSizeAndAlignmentControl type "
|
||||
<< cellSizeAndAlignmentControlTypeName
|
||||
<< endl << endl
|
||||
<< "Valid cellSizeAndAlignmentControl types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< controlType << nl << nl
|
||||
<< "Valid cellSizeAndAlignmentControl types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -121,8 +109,4 @@ Foam::cellSizeAndAlignmentControl::~cellSizeAndAlignmentControl()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -32,10 +32,11 @@ namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(cellSizeFunction, 0);
|
||||
defineRunTimeSelectionTable(cellSizeFunction, dictionary);
|
||||
|
||||
scalar cellSizeFunction::snapToSurfaceTol_ = 1e-10;
|
||||
}
|
||||
|
||||
Foam::scalar Foam::cellSizeFunction::snapToSurfaceTol_ = 1e-10;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::cellSizeFunction::cellSizeFunction
|
||||
@ -122,25 +123,23 @@ Foam::autoPtr<Foam::cellSizeFunction> Foam::cellSizeFunction::New
|
||||
const labelList regionIndices
|
||||
)
|
||||
{
|
||||
word cellSizeFunctionTypeName
|
||||
const word functionName
|
||||
(
|
||||
cellSizeFunctionDict.lookup("cellSizeFunction")
|
||||
);
|
||||
|
||||
Info<< indent << "Selecting cellSizeFunction " << cellSizeFunctionTypeName
|
||||
<< endl;
|
||||
Info<< indent << "Selecting cellSizeFunction "
|
||||
<< functionName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(cellSizeFunctionTypeName);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown cellSizeFunction type "
|
||||
<< cellSizeFunctionTypeName
|
||||
<< endl << endl
|
||||
<< "Valid cellSizeFunction types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< functionName << nl << nl
|
||||
<< "Valid cellSizeFunction types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -60,25 +60,23 @@ Foam::autoPtr<Foam::cellSizeCalculationType> Foam::cellSizeCalculationType::New
|
||||
const scalar& defaultCellSize
|
||||
)
|
||||
{
|
||||
word cellSizeCalculationTypeTypeName
|
||||
const word calculationType
|
||||
(
|
||||
cellSizeCalculationTypeDict.lookup("cellSizeCalculationType")
|
||||
);
|
||||
|
||||
Info<< indent << "Selecting cellSizeCalculationType "
|
||||
<< cellSizeCalculationTypeTypeName << endl;
|
||||
<< calculationType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(cellSizeCalculationTypeTypeName);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(calculationType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown cellSizeCalculationType type "
|
||||
<< cellSizeCalculationTypeTypeName
|
||||
<< endl << endl
|
||||
<< "Valid cellSizeCalculationType types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< calculationType << nl << nl
|
||||
<< "Valid cellSizeCalculationType types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ namespace Foam
|
||||
defineRunTimeSelectionTable(surfaceCellSizeFunction, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::surfaceCellSizeFunction::surfaceCellSizeFunction
|
||||
@ -64,25 +65,23 @@ Foam::autoPtr<Foam::surfaceCellSizeFunction> Foam::surfaceCellSizeFunction::New
|
||||
const scalar& defaultCellSize
|
||||
)
|
||||
{
|
||||
word surfaceCellSizeFunctionTypeName
|
||||
const word functionName
|
||||
(
|
||||
surfaceCellSizeFunctionDict.lookup("surfaceCellSizeFunction")
|
||||
);
|
||||
|
||||
Info<< indent << "Selecting surfaceCellSizeFunction "
|
||||
<< surfaceCellSizeFunctionTypeName << endl;
|
||||
<< functionName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(surfaceCellSizeFunctionTypeName);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown surfaceCellSizeFunction type "
|
||||
<< surfaceCellSizeFunctionTypeName
|
||||
<< endl << endl
|
||||
<< "Valid surfaceCellSizeFunction types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< functionName << nl << nl
|
||||
<< "Valid surfaceCellSizeFunction types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -42,24 +42,20 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(conformalVoronoiMesh, 0);
|
||||
|
||||
template<>
|
||||
const char* NamedEnum
|
||||
<
|
||||
conformalVoronoiMesh::dualMeshPointType,
|
||||
5
|
||||
>::names[] =
|
||||
{
|
||||
"internal",
|
||||
"surface",
|
||||
"featureEdge",
|
||||
"featurePoint",
|
||||
"constrained"
|
||||
};
|
||||
}
|
||||
|
||||
const Foam::NamedEnum<Foam::conformalVoronoiMesh::dualMeshPointType, 5>
|
||||
Foam::conformalVoronoiMesh::dualMeshPointTypeNames_;
|
||||
const Foam::Enum
|
||||
<
|
||||
Foam::conformalVoronoiMesh::dualMeshPointType
|
||||
>
|
||||
Foam::conformalVoronoiMesh::dualMeshPointTypeNames_
|
||||
{
|
||||
{ dualMeshPointType::internal, "internal" },
|
||||
{ dualMeshPointType::surface, "surface" },
|
||||
{ dualMeshPointType::featureEdge, "featureEdge" },
|
||||
{ dualMeshPointType::featurePoint, "featurePoint" },
|
||||
{ dualMeshPointType::constrained, "constrained" },
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
constrained = 4
|
||||
};
|
||||
|
||||
static const NamedEnum<dualMeshPointType, 5> dualMeshPointTypeNames_;
|
||||
static const Enum<dualMeshPointType> dualMeshPointTypeNames_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -33,10 +33,10 @@ License
|
||||
using namespace Foam::vectorTools;
|
||||
|
||||
const Foam::scalar Foam::conformalVoronoiMesh::searchConeAngle
|
||||
= Foam::cos(degToRad(30));
|
||||
= Foam::cos(30.0_deg);
|
||||
|
||||
const Foam::scalar Foam::conformalVoronoiMesh::searchAngleOppositeSurface
|
||||
= Foam::cos(degToRad(150));
|
||||
= Foam::cos(150.0_deg);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
@ -27,20 +27,19 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
const char*
|
||||
Foam::NamedEnum<Foam::indexedCellEnum::cellTypes, 6>::names[] =
|
||||
const Foam::Enum
|
||||
<
|
||||
Foam::indexedCellEnum::cellTypes
|
||||
>
|
||||
Foam::indexedCellEnum::cellTypesNames_
|
||||
{
|
||||
"Unassigned",
|
||||
"Internal",
|
||||
"Surface",
|
||||
"FeatureEdge",
|
||||
"FeaturePoint",
|
||||
"Far"
|
||||
{ cellTypes::ctUnassigned, "Unassigned" },
|
||||
{ cellTypes::ctFar, "Far" },
|
||||
{ cellTypes::ctInternal, "Internal" },
|
||||
{ cellTypes::ctSurface, "Surface" },
|
||||
{ cellTypes::ctFeatureEdge, "FeatureEdge" },
|
||||
{ cellTypes::ctFeaturePoint,"FeaturePoint" },
|
||||
};
|
||||
|
||||
const Foam::NamedEnum<Foam::indexedCellEnum::cellTypes, 6>
|
||||
cellTypesNames_;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -34,7 +34,7 @@ SourceFiles
|
||||
#ifndef indexedCellEnum_H
|
||||
#define indexedCellEnum_H
|
||||
|
||||
#include "NamedEnum.H"
|
||||
#include "Enum.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -47,7 +47,6 @@ class indexedCellEnum
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
enum cellTypes
|
||||
{
|
||||
ctUnassigned = INT_MIN,
|
||||
@ -58,7 +57,7 @@ public:
|
||||
ctFeaturePoint = INT_MIN + 5
|
||||
};
|
||||
|
||||
static const Foam::NamedEnum<cellTypes, 6> cellTypesNames_;
|
||||
static const Enum<cellTypes> cellTypesNames_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -28,42 +28,42 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
const char*
|
||||
Foam::NamedEnum<Foam::indexedVertexEnum::vertexType, 15>::names[] =
|
||||
const Foam::Enum
|
||||
<
|
||||
Foam::indexedVertexEnum::vertexType
|
||||
>
|
||||
Foam::indexedVertexEnum::vertexTypeNames_
|
||||
{
|
||||
"Unassigned",
|
||||
"Internal",
|
||||
"InternalNearBoundary",
|
||||
"InternalSurface",
|
||||
"InternalSurfaceBaffle",
|
||||
"ExternalSurfaceBaffle",
|
||||
"InternalFeatureEdge",
|
||||
"InternalFeatureEdgeBaffle",
|
||||
"ExternalFeatureEdgeBaffle",
|
||||
"InternalFeaturePoint",
|
||||
"ExternalSurface",
|
||||
"ExternalFeatureEdge",
|
||||
"ExternalFeaturePoint",
|
||||
"Far",
|
||||
"Constrained"
|
||||
{ vertexType::vtUnassigned, "Unassigned" },
|
||||
{ vertexType::vtInternal, "Internal" },
|
||||
{ vertexType::vtInternalNearBoundary, "InternalNearBoundary" },
|
||||
{ vertexType::vtInternalSurface, "InternalSurface" },
|
||||
{ vertexType::vtInternalSurfaceBaffle, "InternalSurfaceBaffle" },
|
||||
{ vertexType::vtExternalSurfaceBaffle, "ExternalSurfaceBaffle" },
|
||||
{ vertexType::vtInternalFeatureEdge, "InternalFeatureEdge" },
|
||||
{ vertexType::vtInternalFeatureEdgeBaffle, "InternalFeatureEdgeBaffle" },
|
||||
{ vertexType::vtExternalFeatureEdgeBaffle, "ExternalFeatureEdgeBaffle" },
|
||||
{ vertexType::vtInternalFeaturePoint, "InternalFeaturePoint" },
|
||||
{ vertexType::vtExternalSurface, "ExternalSurface" },
|
||||
{ vertexType::vtExternalFeatureEdge, "ExternalFeatureEdge" },
|
||||
{ vertexType::vtExternalFeaturePoint, "ExternalFeaturePoint" },
|
||||
{ vertexType::vtFar, "Far" },
|
||||
{ vertexType::vtConstrained, "Constrained" },
|
||||
};
|
||||
|
||||
const Foam::NamedEnum<Foam::indexedVertexEnum::vertexType, 15>
|
||||
Foam::indexedVertexEnum::vertexTypeNames_;
|
||||
|
||||
|
||||
template<>
|
||||
const char*
|
||||
Foam::NamedEnum<Foam::indexedVertexEnum::vertexMotion, 2>::names[] =
|
||||
const Foam::Enum
|
||||
<
|
||||
Foam::indexedVertexEnum::vertexMotion
|
||||
>
|
||||
Foam::indexedVertexEnum::vertexMotionNames_
|
||||
{
|
||||
"fixed",
|
||||
"movable"
|
||||
{ vertexMotion::fixed, "fixed" },
|
||||
{ vertexMotion::movable, "movable" },
|
||||
};
|
||||
|
||||
const Foam::NamedEnum<Foam::indexedVertexEnum::vertexMotion, 2>
|
||||
vertexMotionNames_;
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
|
||||
@ -34,7 +34,7 @@ SourceFiles
|
||||
#ifndef indexedVertexEnum_H
|
||||
#define indexedVertexEnum_H
|
||||
|
||||
#include "NamedEnum.H"
|
||||
#include "Enum.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -72,9 +72,9 @@ public:
|
||||
movable = 1
|
||||
};
|
||||
|
||||
static const Foam::NamedEnum<vertexType, 15> vertexTypeNames_;
|
||||
static const Enum<vertexType> vertexTypeNames_;
|
||||
|
||||
static const Foam::NamedEnum<vertexMotion, 2> vertexMotionNames_;
|
||||
static const Enum<vertexMotion> vertexMotionNames_;
|
||||
|
||||
friend Ostream& operator<<(Foam::Ostream&, const vertexType&);
|
||||
|
||||
|
||||
@ -26,20 +26,17 @@ License
|
||||
#include "faceAreaWeightModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(faceAreaWeightModel, 0);
|
||||
defineRunTimeSelectionTable(faceAreaWeightModel, dictionary);
|
||||
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
faceAreaWeightModel::faceAreaWeightModel
|
||||
Foam::faceAreaWeightModel::faceAreaWeightModel
|
||||
(
|
||||
const word& type,
|
||||
const dictionary& relaxationDict
|
||||
@ -52,30 +49,24 @@ faceAreaWeightModel::faceAreaWeightModel
|
||||
|
||||
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<faceAreaWeightModel> faceAreaWeightModel::New
|
||||
Foam::autoPtr<Foam::faceAreaWeightModel> Foam::faceAreaWeightModel::New
|
||||
(
|
||||
const dictionary& relaxationDict
|
||||
)
|
||||
{
|
||||
word faceAreaWeightModelTypeName
|
||||
(
|
||||
relaxationDict.lookup("faceAreaWeightModel")
|
||||
);
|
||||
const word modelType(relaxationDict.lookup("faceAreaWeightModel"));
|
||||
|
||||
Info<< nl << "Selecting faceAreaWeightModel "
|
||||
<< faceAreaWeightModelTypeName << endl;
|
||||
Info<< nl << "Selecting faceAreaWeightModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(faceAreaWeightModelTypeName);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown faceAreaWeightModel type "
|
||||
<< faceAreaWeightModelTypeName
|
||||
<< endl << endl
|
||||
<< "Valid faceAreaWeightModel types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< modelType << nl << nl
|
||||
<< "Valid faceAreaWeightModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -85,12 +76,8 @@ autoPtr<faceAreaWeightModel> faceAreaWeightModel::New
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
faceAreaWeightModel::~faceAreaWeightModel()
|
||||
Foam::faceAreaWeightModel::~faceAreaWeightModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -26,20 +26,17 @@ License
|
||||
#include "initialPointsMethod.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(initialPointsMethod, 0);
|
||||
defineRunTimeSelectionTable(initialPointsMethod, dictionary);
|
||||
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
initialPointsMethod::initialPointsMethod
|
||||
Foam::initialPointsMethod::initialPointsMethod
|
||||
(
|
||||
const word& type,
|
||||
const dictionary& initialPointsDict,
|
||||
@ -73,7 +70,7 @@ initialPointsMethod::initialPointsMethod
|
||||
|
||||
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<initialPointsMethod> initialPointsMethod::New
|
||||
Foam::autoPtr<Foam::initialPointsMethod> Foam::initialPointsMethod::New
|
||||
(
|
||||
const dictionary& initialPointsDict,
|
||||
const Time& runTime,
|
||||
@ -83,25 +80,20 @@ autoPtr<initialPointsMethod> initialPointsMethod::New
|
||||
const autoPtr<backgroundMeshDecomposition>& decomposition
|
||||
)
|
||||
{
|
||||
word initialPointsMethodTypeName
|
||||
(
|
||||
initialPointsDict.lookup("initialPointsMethod")
|
||||
);
|
||||
const word methodName(initialPointsDict.lookup("initialPointsMethod"));
|
||||
|
||||
Info<< nl << "Selecting initialPointsMethod "
|
||||
<< initialPointsMethodTypeName << endl;
|
||||
<< methodName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(initialPointsMethodTypeName);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown initialPointsMethod type "
|
||||
<< initialPointsMethodTypeName
|
||||
<< endl << endl
|
||||
<< "Valid initialPointsMethod types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< methodName << nl << nl
|
||||
<< "Valid initialPointsMethod types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -123,12 +115,8 @@ autoPtr<initialPointsMethod> initialPointsMethod::New
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
initialPointsMethod::~initialPointsMethod()
|
||||
Foam::initialPointsMethod::~initialPointsMethod()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -26,20 +26,18 @@ License
|
||||
#include "relaxationModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(relaxationModel, 0);
|
||||
defineRunTimeSelectionTable(relaxationModel, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
relaxationModel::relaxationModel
|
||||
Foam::relaxationModel::relaxationModel
|
||||
(
|
||||
const word& type,
|
||||
const dictionary& relaxationDict,
|
||||
@ -54,31 +52,25 @@ relaxationModel::relaxationModel
|
||||
|
||||
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<relaxationModel> relaxationModel::New
|
||||
Foam::autoPtr<Foam::relaxationModel> Foam::relaxationModel::New
|
||||
(
|
||||
const dictionary& relaxationDict,
|
||||
const Time& runTime
|
||||
)
|
||||
{
|
||||
word relaxationModelTypeName
|
||||
(
|
||||
relaxationDict.lookup("relaxationModel")
|
||||
);
|
||||
const word modelType(relaxationDict.lookup("relaxationModel"));
|
||||
|
||||
Info<< nl << "Selecting relaxationModel "
|
||||
<< relaxationModelTypeName << endl;
|
||||
Info<< nl << "Selecting relaxationModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(relaxationModelTypeName);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown relaxationModel type "
|
||||
<< relaxationModelTypeName
|
||||
<< endl << endl
|
||||
<< "Valid relaxationModel types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< modelType << nl << nl
|
||||
<< "Valid relaxationModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -88,12 +80,8 @@ autoPtr<relaxationModel> relaxationModel::New
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
relaxationModel::~relaxationModel()
|
||||
Foam::relaxationModel::~relaxationModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -43,17 +43,16 @@ Foam::searchableSurfaceFeatures::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word searchableSurfaceFeaturesType = surface.type() + "Features";
|
||||
const word featuresType = surface.type() + "Features";
|
||||
|
||||
dictConstructorTable::iterator cstrIter =
|
||||
dictConstructorTablePtr_->find(searchableSurfaceFeaturesType);
|
||||
auto cstrIter = dictConstructorTablePtr_->cfind(featuresType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown searchableSurfaceFeatures type "
|
||||
<< searchableSurfaceFeaturesType << endl << endl
|
||||
<< "Valid searchableSurfaceFeatures types : " << endl
|
||||
<< featuresType << nl << nl
|
||||
<< "Valid searchableSurfaceFeatures types :" << endl
|
||||
<< dictConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -393,7 +393,7 @@ void extractSurface
|
||||
|
||||
// Collect sizes. Hash on names to handle local-only patches (e.g.
|
||||
// processor patches)
|
||||
HashTable<label> patchSize(1000);
|
||||
HashTable<label> patchSize(1024);
|
||||
label nFaces = 0;
|
||||
forAllConstIter(labelHashSet, includePatches, iter)
|
||||
{
|
||||
@ -405,7 +405,7 @@ void extractSurface
|
||||
|
||||
|
||||
// Allocate zone/patch for all patches
|
||||
HashTable<label> compactZoneID(1000);
|
||||
HashTable<label> compactZoneID(1024);
|
||||
forAllConstIter(HashTable<label>, patchSize, iter)
|
||||
{
|
||||
label sz = compactZoneID.size();
|
||||
@ -848,7 +848,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
meshRefinement::readFlags
|
||||
(
|
||||
meshRefinement::IOdebugTypeNames,
|
||||
meshRefinement::debugTypeNames,
|
||||
flags
|
||||
)
|
||||
);
|
||||
@ -873,7 +873,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
meshRefinement::readFlags
|
||||
(
|
||||
meshRefinement::IOwriteTypeNames,
|
||||
meshRefinement::writeTypeNames,
|
||||
flags
|
||||
)
|
||||
)
|
||||
@ -892,7 +892,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
meshRefinement::readFlags
|
||||
(
|
||||
meshRefinement::IOoutputTypeNames,
|
||||
meshRefinement::outputTypeNames,
|
||||
flags
|
||||
)
|
||||
)
|
||||
|
||||
@ -68,15 +68,14 @@ Foam::autoPtr<Foam::faceSelection> Foam::faceSelection::New
|
||||
{
|
||||
const word sampleType(dict.lookup("type"));
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(sampleType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(sampleType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown faceSelection type "
|
||||
<< sampleType << nl << nl
|
||||
<< "Valid faceSelection types : " << endl
|
||||
<< "Valid faceSelection types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,8 +34,7 @@ Foam::autoPtr<Foam::helpType> Foam::helpType::New
|
||||
{
|
||||
Info<< "Selecting helpType " << helpTypeName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(helpTypeName);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(helpTypeName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
|
||||
@ -59,6 +59,7 @@ Usage
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "sigFpe.H"
|
||||
#include "Time.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvMeshTools.H"
|
||||
@ -2277,7 +2278,7 @@ int main(int argc, char *argv[])
|
||||
bool newTimes = args.optionFound("newTimes");
|
||||
|
||||
|
||||
if (env("FOAM_SIGFPE"))
|
||||
if (Foam::sigFpe::requested())
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Detected floating point exception trapping (FOAM_SIGFPE)."
|
||||
@ -2287,7 +2288,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
|
||||
const HashSet<word> selectedFields(0);
|
||||
const HashSet<word> selectedLagrangianFields(0);
|
||||
|
||||
|
||||
@ -45,6 +45,7 @@ Description
|
||||
#include "fvMesh.H"
|
||||
#include "cellModeller.H"
|
||||
#include "globalFoam.H"
|
||||
#include "foamVersion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -33,23 +33,14 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
template<>
|
||||
const char* Foam::NamedEnum
|
||||
<
|
||||
Foam::vector::components,
|
||||
3
|
||||
>::names[] =
|
||||
{
|
||||
"x",
|
||||
"y",
|
||||
"z"
|
||||
};
|
||||
}
|
||||
|
||||
const Foam::NamedEnum<Foam::vector::components, 3>
|
||||
Foam::channelIndex::vectorComponentsNames_;
|
||||
const Foam::Enum
|
||||
<
|
||||
Foam::vector::components
|
||||
>
|
||||
Foam::channelIndex::vectorComponentsNames_
|
||||
(
|
||||
Foam::vector::components::X, { "x", "y", "z" }
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
@ -233,7 +224,7 @@ Foam::channelIndex::channelIndex
|
||||
)
|
||||
:
|
||||
symmetric_(readBool(dict.lookup("symmetric"))),
|
||||
dir_(vectorComponentsNames_.read(dict.lookup("component")))
|
||||
dir_(vectorComponentsNames_.lookup("component", dict))
|
||||
{
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ class channelIndex
|
||||
|
||||
// Private data
|
||||
|
||||
static const NamedEnum<vector::components, 3> vectorComponentsNames_;
|
||||
static const Enum<vector::components> vectorComponentsNames_;
|
||||
|
||||
//- Is mesh symmetric
|
||||
const bool symmetric_;
|
||||
|
||||
@ -29,24 +29,19 @@ License
|
||||
#include "polyMesh.H"
|
||||
#include "regionProperties.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
const Foam::Enum
|
||||
<
|
||||
Foam::solverTemplate::solverType
|
||||
>
|
||||
Foam::solverTemplate::solverTypeNames_
|
||||
{
|
||||
template<>
|
||||
const char* Foam::NamedEnum<Foam::solverTemplate::solverType, 4>::names[] =
|
||||
{
|
||||
"compressible",
|
||||
"incompressible",
|
||||
"buoyant",
|
||||
"unknown"
|
||||
};
|
||||
}
|
||||
|
||||
const Foam::NamedEnum<Foam::solverTemplate::solverType, 4>
|
||||
Foam::solverTemplate::solverTypeNames_;
|
||||
{ solverType::stCompressible, "compressible" },
|
||||
{ solverType::stIncompressible, "incompressible" },
|
||||
{ solverType::stBuoyant, "buoyant" },
|
||||
{ solverType::stUnknown, "unknown" },
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
@ -261,7 +256,7 @@ Foam::solverTemplate::solverTemplate
|
||||
|
||||
Info<< "Selecting " << solverName << ": ";
|
||||
|
||||
solverType_ = solverTypeNames_.read(solverDict.lookup("solverType"));
|
||||
solverType_ = solverTypeNames_.lookup("solverType", solverDict);
|
||||
Info<< solverTypeNames_[solverType_];
|
||||
|
||||
multiRegion_ = readBool(solverDict.lookup("multiRegion"));
|
||||
@ -366,7 +361,7 @@ bool Foam::solverTemplate::multiRegion() const
|
||||
}
|
||||
|
||||
|
||||
label Foam::solverTemplate::nRegion() const
|
||||
Foam::label Foam::solverTemplate::nRegion() const
|
||||
{
|
||||
return regionTypes_.size();
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ Description
|
||||
#include "wordList.H"
|
||||
#include "dimensionSet.H"
|
||||
#include "IOobject.H"
|
||||
#include "NamedEnum.H"
|
||||
#include "Enum.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -65,7 +65,7 @@ public:
|
||||
};
|
||||
|
||||
//- Solver type names
|
||||
static const NamedEnum<solverType, 4> solverTypeNames_;
|
||||
static const Enum<solverType> solverTypeNames_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
0
applications/utilities/preProcessing/setAlphaField/Make/files
Executable file → Normal file
0
applications/utilities/preProcessing/setAlphaField/Make/files
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user