STYLE: more consistent New methods, use unregistered IOobject where appropriate

This commit is contained in:
Mark Olesen
2010-04-20 17:13:35 +02:00
parent 9707e5c100
commit 5cfa97624e
166 changed files with 1498 additions and 1540 deletions

View File

@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New Foam::autoPtr<Foam::PDRDragModel>
Foam::PDRDragModel::New
( (
const dictionary& PDRProperties, const dictionary& PDRProperties,
const compressible::RASModel& turbulence, const compressible::RASModel& turbulence,
@ -36,12 +37,15 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
const surfaceScalarField& phi const surfaceScalarField& phi
) )
{ {
word PDRDragModelTypeName = PDRProperties.lookup("PDRDragModel"); const word modelType
(
PDRProperties.lookup("PDRDragModel")
);
Info<< "Selecting flame-wrinkling model " << PDRDragModelTypeName << endl; Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(PDRDragModelTypeName); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -49,7 +53,7 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
( (
"PDRDragModel::New" "PDRDragModel::New"
) << "Unknown PDRDragModel type " ) << "Unknown PDRDragModel type "
<< PDRDragModelTypeName << endl << endl << modelType << nl << nl
<< "Valid PDRDragModels are : " << endl << "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New Foam::autoPtr<Foam::XiEqModel>
Foam::XiEqModel::New
( (
const dictionary& XiEqProperties, const dictionary& XiEqProperties,
const hhuCombustionThermo& thermo, const hhuCombustionThermo& thermo,
@ -35,12 +36,15 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
const volScalarField& Su const volScalarField& Su
) )
{ {
word XiEqModelTypeName = XiEqProperties.lookup("XiEqModel"); const word modelType
(
XiEqProperties.lookup("XiEqModel")
);
Info<< "Selecting flame-wrinkling model " << XiEqModelTypeName << endl; Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(XiEqModelTypeName); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -53,7 +57,7 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
" const volScalarField& Su" " const volScalarField& Su"
")" ")"
) << "Unknown XiEqModel type " ) << "Unknown XiEqModel type "
<< XiEqModelTypeName << endl << endl << modelType << nl << nl
<< "Valid XiEqModels are : " << endl << "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New Foam::autoPtr<Foam::XiGModel>
Foam::XiGModel::New
( (
const dictionary& XiGProperties, const dictionary& XiGProperties,
const hhuCombustionThermo& thermo, const hhuCombustionThermo& thermo,
@ -35,12 +36,15 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
const volScalarField& Su const volScalarField& Su
) )
{ {
word XiGModelTypeName = XiGProperties.lookup("XiGModel"); const word modelType
(
XiGProperties.lookup("XiGModel")
);
Info<< "Selecting flame-wrinkling model " << XiGModelTypeName << endl; Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(XiGModelTypeName); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -53,7 +57,7 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
" const volScalarField& Su" " const volScalarField& Su"
")" ")"
) << "Unknown XiGModel type " ) << "Unknown XiGModel type "
<< XiGModelTypeName << endl << endl << modelType << nl << nl
<< "Valid XiGModels are : " << endl << "Valid XiGModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::XiModel> Foam::XiModel::New Foam::autoPtr<Foam::XiModel>
Foam::XiModel::New
( (
const dictionary& XiProperties, const dictionary& XiProperties,
const hhuCombustionThermo& thermo, const hhuCombustionThermo& thermo,
@ -38,12 +39,15 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
const surfaceScalarField& phi const surfaceScalarField& phi
) )
{ {
word XiModelTypeName = XiProperties.lookup("XiModel"); const word modelType
(
XiProperties.lookup("XiModel")
);
Info<< "Selecting flame-wrinkling model " << XiModelTypeName << endl; Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(XiModelTypeName); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -51,7 +55,7 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
( (
"XiModel::New" "XiModel::New"
) << "Unknown XiModel type " ) << "Unknown XiModel type "
<< XiModelTypeName << endl << endl << modelType << nl << nl
<< "Valid XiModels are : " << endl << "Valid XiModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New Foam::autoPtr<Foam::combustionModel>
Foam::combustionModel::New
( (
const dictionary& combustionProperties, const dictionary& combustionProperties,
const hsCombustionThermo& thermo, const hsCombustionThermo& thermo,
@ -36,15 +37,18 @@ Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
const volScalarField& rho const volScalarField& rho
) )
{ {
word combustionModelTypeName = combustionProperties.lookup const word modelType
(
combustionProperties.lookup
( (
"combustionModel" "combustionModel"
)
); );
Info<< "Selecting combustion model " << combustionModelTypeName << endl; Info<< "Selecting combustion model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(combustionModelTypeName); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -52,7 +56,7 @@ Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
( (
"combustionModel::New" "combustionModel::New"
) << "Unknown combustionModel type " ) << "Unknown combustionModel type "
<< combustionModelTypeName << endl << endl << modelType << nl << nl
<< "Valid combustionModels are : " << endl << "Valid combustionModels are : " << endl
<< dictionaryConstructorTablePtr_->toc() << dictionaryConstructorTablePtr_->toc()
<< exit(FatalError); << exit(FatalError);

View File

@ -11,7 +11,7 @@
basicMultiComponentMixture& composition = thermo.composition(); basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie")); const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie)) if (!composition.contains(inertSpecie))
{ {

View File

@ -11,7 +11,7 @@
basicMultiComponentMixture& composition = thermo.composition(); basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie")); const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie)) if (!composition.contains(inertSpecie))
{ {

View File

@ -11,7 +11,7 @@
basicMultiComponentMixture& composition = thermo.composition(); basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie")); const word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
volScalarField& hs = thermo.hs(); volScalarField& hs = thermo.hs();

View File

@ -11,7 +11,7 @@
basicMultiComponentMixture& composition = thermo.composition(); basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie")); const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie)) if (!composition.contains(inertSpecie))
{ {

View File

@ -36,7 +36,10 @@ Foam::phaseChangeTwoPhaseMixture::New
const word& alpha1Name const word& alpha1Name
) )
{ {
IOdictionary transportPropertiesDict // get model name, but do not register the dictionary
const word phaseChangeTwoPhaseMixtureTypeName
(
IOdictionary
( (
IOobject IOobject
( (
@ -47,11 +50,7 @@ Foam::phaseChangeTwoPhaseMixture::New
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )
); ).lookup("phaseChangeTwoPhaseMixture")
word phaseChangeTwoPhaseMixtureTypeName
(
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
); );
Info<< "Selecting phaseChange model " Info<< "Selecting phaseChange model "
@ -67,8 +66,8 @@ Foam::phaseChangeTwoPhaseMixture::New
( (
"phaseChangeTwoPhaseMixture::New" "phaseChangeTwoPhaseMixture::New"
) << "Unknown phaseChangeTwoPhaseMixture type " ) << "Unknown phaseChangeTwoPhaseMixture type "
<< phaseChangeTwoPhaseMixtureTypeName << endl << endl << phaseChangeTwoPhaseMixtureTypeName << nl << nl
<< "Valid phaseChangeTwoPhaseMixtures are : " << endl << "Valid phaseChangeTwoPhaseMixture types are : " << endl
<< componentsConstructorTablePtr_->sortedToc() << componentsConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -159,7 +159,7 @@
Info<< "Selecting Drift-Flux model " << endl; Info<< "Selecting Drift-Flux model " << endl;
word VdjModel(transportProperties.lookup("VdjModel")); const word VdjModel(transportProperties.lookup("VdjModel"));
Info<< tab << VdjModel << " selected\n" << endl; Info<< tab << VdjModel << " selected\n" << endl;

View File

@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::dragModel> Foam::dragModel::New Foam::autoPtr<Foam::dragModel>
Foam::dragModel::New
( (
const dictionary& interfaceDict, const dictionary& interfaceDict,
const volScalarField& alpha, const volScalarField& alpha,
@ -35,7 +36,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
const phaseModel& phaseb const phaseModel& phaseb
) )
{ {
word dragModelType const word modelType
( (
interfaceDict.lookup("dragModel" + phasea.name()) interfaceDict.lookup("dragModel" + phasea.name())
); );
@ -43,20 +44,21 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
Info<< "Selecting dragModel for phase " Info<< "Selecting dragModel for phase "
<< phasea.name() << phasea.name()
<< ": " << ": "
<< dragModelType << endl; << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(dragModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "dragModel::New : " << endl (
<< " unknown dragModelType type " "dragModel::New(...)"
<< dragModelType ) << "Unknown dragModel type "
<< ", constructor not in hash table" << endl << endl << modelType << nl << nl
<< " Valid dragModel types are : " << endl; << "Valid dragModel types are : " << endl
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
} }
return cstrIter()(interfaceDict, alpha, phasea, phaseb); return cstrIter()(interfaceDict, alpha, phasea, phaseb);

View File

@ -27,28 +27,32 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::conductivityModel> Foam::conductivityModel::New Foam::autoPtr<Foam::conductivityModel>
Foam::conductivityModel::New
( (
const dictionary& dict const dictionary& dict
) )
{ {
word conductivityModelType(dict.lookup("conductivityModel")); const word modelType
(
dict.lookup("conductivityModel")
);
Info<< "Selecting conductivityModel " Info<< "Selecting conductivityModel " << modelType << endl;
<< conductivityModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(conductivityModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "conductivityModel::New(const dictionary&) : " << endl (
<< " unknown conductivityModelType type " "conductivityModel::New(const dictionary&)"
<< conductivityModelType ) << "Unknown conductivityModel type "
<< ", constructor not in hash table" << endl << endl << modelType << nl << nl
<< " Valid conductivityModelType types are :" << endl; << "Valid conductivityModel types are :" << endl
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
} }
return autoPtr<conductivityModel>(cstrIter()(dict)); return autoPtr<conductivityModel>(cstrIter()(dict));

View File

@ -27,28 +27,33 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::frictionalStressModel> Foam::frictionalStressModel::New Foam::autoPtr<Foam::frictionalStressModel>
Foam::frictionalStressModel::New
( (
const dictionary& dict const dictionary& dict
) )
{ {
word frictionalStressModelType(dict.lookup("frictionalStressModel")); const word modelType
(
dict.lookup("frictionalStressModel")
);
Info<< "Selecting frictionalStressModel " Info<< "Selecting frictionalStressModel " << modelType << endl;
<< frictionalStressModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(frictionalStressModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "frictionalStressModel::New(const dictionary&) : " << endl (
<< " unknown frictionalStressModelType type " "frictionalStressModel::New(const dictionary&)"
<< frictionalStressModelType )
<< ", constructor not in hash table" << endl << endl << "Unknown frictionalStressModel type "
<< " Valid frictionalStressModelType types are :" << endl; << modelType << nl << nl
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << "Valid frictionalStressModel types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
} }
return autoPtr<frictionalStressModel>(cstrIter()(dict)); return autoPtr<frictionalStressModel>(cstrIter()(dict));

View File

@ -27,28 +27,32 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::granularPressureModel> Foam::granularPressureModel::New Foam::autoPtr<Foam::granularPressureModel>
Foam::granularPressureModel::New
( (
const dictionary& dict const dictionary& dict
) )
{ {
word granularPressureModelType(dict.lookup("granularPressureModel")); const word modelType
(
dict.lookup("granularPressureModel")
);
Info<< "Selecting granularPressureModel " Info<< "Selecting granularPressureModel " << modelType << endl;
<< granularPressureModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(granularPressureModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "granularPressureModel::New(const dictionary&) : " << endl (
<< " unknown granularPressureModelType type " "granularPressureModel::New(const dictionary&)"
<< granularPressureModelType ) << "Unknown granularPressureModel type "
<< ", constructor not in hash table" << endl << endl << modelType << nl << nl
<< " Valid granularPressureModelType types are :" << endl; << "Valid granularPressureModel types are :" << endl
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
} }
return autoPtr<granularPressureModel>(cstrIter()(dict)); return autoPtr<granularPressureModel>(cstrIter()(dict));

View File

@ -27,28 +27,33 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::radialModel> Foam::radialModel::New Foam::autoPtr<Foam::radialModel>
Foam::radialModel::New
( (
const dictionary& dict const dictionary& dict
) )
{ {
word radialModelType(dict.lookup("radialModel")); const word modelType
(
dict.lookup("radialModel")
);
Info<< "Selecting radialModel " Info<< "Selecting radialModel " << modelType << endl;
<< radialModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(radialModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "radialModel::New(const dictionary&) : " << endl (
<< " unknown radialModelType type " "radialModel::New(const dictionary&)"
<< radialModelType )
<< ", constructor not in hash table" << endl << endl << "Unknown radialModel type "
<< " Valid radialModelType types are :" << endl; << modelType << nl << nl
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << "Valid radialModel types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
} }
return autoPtr<radialModel>(cstrIter()(dict)); return autoPtr<radialModel>(cstrIter()(dict));

View File

@ -33,23 +33,26 @@ Foam::kineticTheoryModels::viscosityModel::New
const dictionary& dict const dictionary& dict
) )
{ {
word viscosityModelType(dict.lookup("viscosityModel")); const word modelType
(
dict.lookup("viscosityModel")
);
Info<< "Selecting viscosityModel " Info<< "Selecting viscosityModel " << modelType << endl;
<< viscosityModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(viscosityModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "viscosityModel::New(const dictionary&) : " << endl (
<< " unknown viscosityModelType type " "viscosityModel::New(const dictionary&)"
<< viscosityModelType ) << "Unknown viscosityModel type "
<< ", constructor not in hash table" << endl << endl << modelType << nl << nl
<< " Valid viscosityModelType types are :" << endl; << "Valid viscosityModel types are :" << endl
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
} }
return autoPtr<viscosityModel>(cstrIter()(dict)); return autoPtr<viscosityModel>(cstrIter()(dict));

View File

@ -134,7 +134,8 @@ Foam::phaseModel::phaseModel
} }
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New Foam::autoPtr<Foam::phaseModel>
Foam::phaseModel::New
( (
const fvMesh& mesh, const fvMesh& mesh,
const dictionary& transportProperties, const dictionary& transportProperties,

View File

@ -166,7 +166,9 @@ void starMesh::markBoundaryFaces()
} }
} }
FatalError << " $ bset,add,vset,all" << abort(FatalError); FatalError
<< " $ bset,add,vset,all"
<< abort(FatalError);
} }
} }
} }

View File

@ -27,25 +27,30 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New Foam::autoPtr<Foam::extrudeModel>
Foam::extrudeModel::New
( (
const dictionary& dict const dictionary& dict
) )
{ {
word extrudeModelType(dict.lookup("extrudeModel")); const word modelType
(
dict.lookup("extrudeModel")
);
Info<< "Selecting extrudeModel " << extrudeModelType << endl; Info<< "Selecting extrudeModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(extrudeModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("extrudeModel::New(const dictionary&)") FatalErrorIn
<< "Unknown extrudeModelType type " (
<< extrudeModelType "extrudeModel::New(const dictionary&)"
<< ", constructor not in hash table" << nl << nl ) << "Unknown extrudeModel type "
<< " Valid extrudeModel types are :" << nl << modelType << nl << nl
<< "Valid extrudeModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << nl << dictionaryConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError); << exit(FatalError);
} }
@ -55,4 +60,3 @@ Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New
// ************************************************************************* // // ************************************************************************* //

View File

@ -59,9 +59,8 @@ int main(int argc, char *argv[])
); );
word setName(cellSetDict.lookup("name")); const word setName(cellSetDict.lookup("name"));
const word actionName(cellSetDict.lookup("action"));
word actionName(cellSetDict.lookup("action"));
topoSetSource::setAction action = topoSetSource::toAction(actionName); topoSetSource::setAction action = topoSetSource::toAction(actionName);

View File

@ -59,9 +59,8 @@ int main(int argc, char *argv[])
); );
word setName(faceSetDict.lookup("name")); const word setName(faceSetDict.lookup("name"));
const word actionName(faceSetDict.lookup("action"));
word actionName(faceSetDict.lookup("action"));
topoSetSource::setAction action = topoSetSource::toAction(actionName); topoSetSource::setAction action = topoSetSource::toAction(actionName);

View File

@ -59,9 +59,8 @@ int main(int argc, char *argv[])
); );
word setName(pointSetDict.lookup("name")); const word setName(pointSetDict.lookup("name"));
const word actionName(pointSetDict.lookup("action"));
word actionName(pointSetDict.lookup("action"));
topoSetSource::setAction action = topoSetSource::toAction(actionName); topoSetSource::setAction action = topoSetSource::toAction(actionName);

View File

@ -331,7 +331,7 @@ int main(int argc, char *argv[])
) )
); );
word setName(refineDict.lookup("set")); const word setName(refineDict.lookup("set"));
cellSet cells(mesh, setName); cellSet cells(mesh, setName);

View File

@ -154,9 +154,9 @@ int main(int argc, char *argv[])
} }
// get requested numberOfSubdomains // get requested numberOfSubdomains
label nDomains = 0; const label nDomains = readLabel
{ (
IOdictionary decompDict IOdictionary
( (
IOobject IOobject
( (
@ -168,11 +168,9 @@ int main(int argc, char *argv[])
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )
).lookup("numberOfSubdomains")
); );
decompDict.lookup("numberOfSubdomains") >> nDomains;
}
if (decomposeFieldsOnly) if (decomposeFieldsOnly)
{ {
// Sanity check on previously decomposed case // Sanity check on previously decomposed case

View File

@ -72,14 +72,17 @@ labelList calcFaceAddressing
<< " face labels:" << faces << endl << " face labels:" << faces << endl
<< " cellI:" << cellI << endl; << " cellI:" << cellI << endl;
FatalError << "Faces consist of vertices:" << endl; FatalError
<< "Faces consist of vertices:" << endl;
forAll(faces, faceI) forAll(faces, faceI)
{ {
FatalError FatalError
<< " face:" << faces[faceI] << " face:" << faces[faceI]
<< allFaces[faces[faceI]] << endl; << allFaces[faces[faceI]] << endl;
} }
FatalError << exit(FatalError); FatalError
<< exit(FatalError);
} }
} }
return shapeToMesh; return shapeToMesh;

View File

@ -28,7 +28,8 @@ word format
if ((format != "ascii") && (format != "ieeei4r8")) if ((format != "ascii") && (format != "ieeei4r8"))
{ {
FatalError << "format type: " << format << " unknown." FatalError
<< "format type: " << format << " unknown."
<< " Valid options are: ascii ieeei4r8" << " Valid options are: ascii ieeei4r8"
<< abort(FatalError); << abort(FatalError);
@ -44,6 +45,7 @@ if
(cells != "hex") (cells != "hex")
) )
{ {
FatalError << "cells type: " << cells << " unknown." FatalError
<< "cells type: " << cells << " unknown."
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -70,7 +70,7 @@ int main(int argc, char *argv[])
scalar T0(readScalar(control.lookup("T0"))); scalar T0(readScalar(control.lookup("T0")));
word fuelName(control.lookup("fuel")); const word fuelName(control.lookup("fuel"));
scalar n(readScalar(control.lookup("n"))); scalar n(readScalar(control.lookup("n")));
scalar m(readScalar(control.lookup("m"))); scalar m(readScalar(control.lookup("m")));

View File

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
scalar P(readScalar(control.lookup("P"))); scalar P(readScalar(control.lookup("P")));
word fuel(control.lookup("fuel")); const word fuelName(control.lookup("fuel"));
scalar n(readScalar(control.lookup("n"))); scalar n(readScalar(control.lookup("n")));
scalar m(readScalar(control.lookup("m"))); scalar m(readScalar(control.lookup("m")));
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
Info<< nl << "Reading Burcat data for relevant species" << nl << endl; Info<< nl << "Reading Burcat data for relevant species" << nl << endl;
// Reactants // Reactants
thermo FUEL(thermoData.lookup(fuel)); thermo FUEL(thermoData.lookup(fuelName));
thermo O2(thermoData.lookup("O2")); thermo O2(thermoData.lookup("O2"));
thermo N2(thermoData.lookup("N2")); thermo N2(thermoData.lookup("N2"));

View File

@ -64,7 +64,8 @@ Foam::CLASSNAME::CLASSNAME(const CLASSNAME&)
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::CLASSNAME> Foam::CLASSNAME::New() Foam::autoPtr<Foam::CLASSNAME>
Foam::CLASSNAME::New()
{ {
return autoPtr<CLASSNAME>(new CLASSNAME); return autoPtr<CLASSNAME>(new CLASSNAME);
} }

View File

@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New Foam::autoPtr<Foam::ODESolver>
Foam::ODESolver::New
( (
const Foam::word& ODESolverTypeName, const Foam::word& ODESolverTypeName,
const Foam::ODE& ode const Foam::ODE& ode
@ -44,7 +45,7 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
( (
"ODESolver::New(const word& ODESolverTypeName, const ODE& ode)" "ODESolver::New(const word& ODESolverTypeName, const ODE& ode)"
) << "Unknown ODESolver type " ) << "Unknown ODESolver type "
<< ODESolverTypeName << endl << endl << ODESolverTypeName << nl << nl
<< "Valid ODESolvers are : " << endl << "Valid ODESolvers are : " << endl
<< ODEConstructorTablePtr_->sortedToc() << ODEConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -72,7 +72,7 @@ bool Foam::IOobject::readHeader(Istream& is)
is.format(headerDict.lookup("format")); is.format(headerDict.lookup("format"));
headerClassName_ = word(headerDict.lookup("class")); headerClassName_ = word(headerDict.lookup("class"));
word headerObject(headerDict.lookup("object")); const word headerObject(headerDict.lookup("object"));
if (IOobject::debug && headerObject != name()) if (IOobject::debug && headerObject != name())
{ {
IOWarningIn("IOobject::readHeader(Istream&)", is) IOWarningIn("IOobject::readHeader(Istream&)", is)

View File

@ -52,7 +52,8 @@ Foam::token::compound::~compound()
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::token::compound> Foam::token::compound::New Foam::autoPtr<Foam::token::compound>
Foam::token::compound::New
( (
const word& compoundType, const word& compoundType,
Istream& is Istream& is

View File

@ -95,7 +95,7 @@ void Foam::Time::adjustDeltaT()
void Foam::Time::setControls() void Foam::Time::setControls()
{ {
// default is to resume calculation from "latestTime" // default is to resume calculation from "latestTime"
word startFrom = controlDict_.lookupOrDefault<word> const word startFrom = controlDict_.lookupOrDefault<word>
( (
"startFrom", "startFrom",
"latestTime" "latestTime"

View File

@ -94,7 +94,7 @@ void Foam::Time::readDict()
if (controlDict_.found("timeFormat")) if (controlDict_.found("timeFormat"))
{ {
word formatName(controlDict_.lookup("timeFormat")); const word formatName(controlDict_.lookup("timeFormat"));
if (formatName == "general") if (formatName == "general")
{ {

View File

@ -118,7 +118,8 @@ Foam::dictionary::dictionary(Istream& is)
} }
Foam::autoPtr<Foam::dictionary> Foam::dictionary::New(Istream& is) Foam::autoPtr<Foam::dictionary>
Foam::dictionary::New(Istream& is)
{ {
return autoPtr<dictionary>(new dictionary(is)); return autoPtr<dictionary>(new dictionary(is));
} }

View File

@ -191,7 +191,8 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is)
} }
Foam::autoPtr<Foam::entry> Foam::entry::New(Istream& is) Foam::autoPtr<Foam::entry>
Foam::entry::New(Istream& is)
{ {
is.fatalCheck("entry::New(Istream&)"); is.fatalCheck("entry::New(Istream&)");

View File

@ -82,7 +82,7 @@ bool Foam::functionEntry::execute
"(const word& functionName, dictionary& parentDict, Istream&)" "(const word& functionName, dictionary& parentDict, Istream&)"
) << "Unknown functionEntry '" << functionName ) << "Unknown functionEntry '" << functionName
<< "' in " << is.name() << " near line " << is.lineNumber() << "' in " << is.name() << " near line " << is.lineNumber()
<< endl << endl << nl << nl
<< "Valid functionEntries are :" << endl << "Valid functionEntries are :" << endl
<< executedictionaryIstreamMemberFunctionTablePtr_->toc() << executedictionaryIstreamMemberFunctionTablePtr_->toc()
<< exit(FatalError); << exit(FatalError);
@ -128,7 +128,7 @@ bool Foam::functionEntry::execute
"(const word&, const dictionary&, primitiveEntry&, Istream&)" "(const word&, const dictionary&, primitiveEntry&, Istream&)"
) << "Unknown functionEntry '" << functionName ) << "Unknown functionEntry '" << functionName
<< "' in " << is.name() << " near line " << is.lineNumber() << "' in " << is.name() << " near line " << is.lineNumber()
<< endl << endl << nl << nl
<< "Valid functionEntries are :" << endl << "Valid functionEntries are :" << endl
<< executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc() << executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc()
<< exit(FatalError); << exit(FatalError);

View File

@ -43,14 +43,15 @@ Foam::functionObject::functionObject(const word& name)
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::functionObject> Foam::functionObject::New Foam::autoPtr<Foam::functionObject>
Foam::functionObject::New
( (
const word& name, const word& name,
const Time& t, const Time& t,
const dictionary& functionDict const dictionary& functionDict
) )
{ {
word functionType(functionDict.lookup("type")); const word functionType(functionDict.lookup("type"));
if (debug) if (debug)
{ {

View File

@ -26,7 +26,8 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New Foam::autoPtr< Foam::pointPatchField<Type> >
Foam::pointPatchField<Type>::New
( (
const word& patchFieldType, const word& patchFieldType,
const word& actualPatchType, const word& actualPatchType,
@ -53,8 +54,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
"PointPatchField<Type>::New" "PointPatchField<Type>::New"
"(const word&, const word&, const pointPatch&, const Field<Type>&)" "(const word&, const word&, const pointPatch&, const Field<Type>&)"
) << "Unknown patchFieldType type " ) << "Unknown patchFieldType type "
<< patchFieldType << patchFieldType << nl << nl
<< endl << endl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< pointPatchConstructorTablePtr_->sortedToc() << pointPatchConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
@ -96,7 +96,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
template<class Type> template<class Type>
Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New Foam::autoPtr< Foam::pointPatchField<Type> >
Foam::pointPatchField<Type>::New
( (
const word& patchFieldType, const word& patchFieldType,
const pointPatch& p, const pointPatch& p,
@ -108,7 +109,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
template<class Type> template<class Type>
Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New Foam::autoPtr< Foam::pointPatchField<Type> >
Foam::pointPatchField<Type>::New
( (
const pointPatch& p, const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF, const DimensionedField<Type, pointMesh>& iF,
@ -143,7 +145,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
"New(const pointPatch&, const Field<Type>&, const dictionary&)", "New(const pointPatch&, const Field<Type>&, const dictionary&)",
dict dict
) << "Unknown patchField type " << patchFieldType ) << "Unknown patchField type " << patchFieldType
<< " for patch type " << p.type() << endl << endl << " for patch type " << p.type() << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -194,7 +196,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
// Return a pointer to a new patch created on freestore from // Return a pointer to a new patch created on freestore from
// a given pointPatchField<Type> mapped onto a new patch // a given pointPatchField<Type> mapped onto a new patch
template<class Type> template<class Type>
Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New Foam::autoPtr< Foam::pointPatchField<Type> >
Foam::pointPatchField<Type>::New
( (
const pointPatchField<Type>& ptf, const pointPatchField<Type>& ptf,
const pointPatch& p, const pointPatch& p,
@ -219,12 +222,15 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
{ {
FatalErrorIn FatalErrorIn
( (
"PointPatchField<Type>::" "PointPatchField<Type>::New"
"New(const pointPatchField<Type>&, " "("
"const pointPatch&, const Field<Type>&, " "const pointPatchField<Type>&, "
"const pointPatchFieldMapper&)" "const pointPatch&, "
) << "unknown patchTypefield type " "const DimensionedField<Type, pointMesh>&, "
<< ptf.type() << endl << endl "const pointPatchFieldMapper&"
")"
) << "Unknown patchField type "
<< ptf.type() << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< patchMapperConstructorTablePtr_->sortedToc() << patchMapperConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -28,19 +28,18 @@ License
#include "IOmanip.H" #include "IOmanip.H"
#include "Pair.H" #include "Pair.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(graph::writer, 0);
defineRunTimeSelectionTable(graph::writer, word);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(graph::writer, 0);
defineRunTimeSelectionTable(graph::writer, word);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void graph::readCurves(Istream& is) void Foam::graph::readCurves(Istream& is)
{ {
List<xy> xyData(is); List<xy> xyData(is);
@ -59,7 +58,7 @@ void graph::readCurves(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
graph::graph Foam::graph::graph
( (
const string& title, const string& title,
const string& xName, const string& xName,
@ -74,7 +73,7 @@ graph::graph
{} {}
graph::graph Foam::graph::graph
( (
const string& title, const string& title,
const string& xName, const string& xName,
@ -92,7 +91,7 @@ graph::graph
} }
graph::graph Foam::graph::graph
( (
const string& title, const string& title,
const string& xName, const string& xName,
@ -108,7 +107,7 @@ graph::graph
} }
graph::graph(Istream& is) Foam::graph::graph(Istream& is)
: :
title_(is), title_(is),
xName_(is), xName_(is),
@ -118,7 +117,7 @@ graph::graph(Istream& is)
} }
const scalarField& graph::y() const const Foam::scalarField& Foam::graph::y() const
{ {
if (size() != 1) if (size() != 1)
{ {
@ -130,7 +129,8 @@ const scalarField& graph::y() const
return *begin()(); return *begin()();
} }
scalarField& graph::y()
Foam::scalarField& Foam::graph::y()
{ {
if (size() != 1) if (size() != 1)
{ {
@ -143,7 +143,8 @@ scalarField& graph::y()
} }
autoPtr<graph::writer> graph::writer::New(const word& graphFormat) Foam::autoPtr<Foam::graph::writer>
Foam::graph::writer::New(const word& graphFormat)
{ {
if (!wordConstructorTablePtr_) if (!wordConstructorTablePtr_)
{ {
@ -173,7 +174,7 @@ autoPtr<graph::writer> graph::writer::New(const word& graphFormat)
} }
void graph::writer::writeXY void Foam::graph::writer::writeXY
( (
const scalarField& x, const scalarField& x,
const scalarField& y, const scalarField& y,
@ -187,7 +188,7 @@ void graph::writer::writeXY
} }
void graph::writeTable(Ostream& os) const void Foam::graph::writeTable(Ostream& os) const
{ {
forAll(x_, xi) forAll(x_, xi)
{ {
@ -202,13 +203,13 @@ void graph::writeTable(Ostream& os) const
} }
void graph::write(Ostream& os, const word& format) const void Foam::graph::write(Ostream& os, const word& format) const
{ {
writer::New(format)().write(*this, os); writer::New(format)().write(*this, os);
} }
void graph::write(const fileName& fName, const word& format) const void Foam::graph::write(const fileName& fName, const word& format) const
{ {
autoPtr<writer> graphWriter(writer::New(format)); autoPtr<writer> graphWriter(writer::New(format));
@ -227,7 +228,7 @@ void graph::write(const fileName& fName, const word& format) const
} }
Ostream& operator<<(Ostream& os, const graph& g) Foam::Ostream& Foam::operator<<(Ostream& os, const graph& g)
{ {
g.writeTable(os); g.writeTable(os);
os.check("Ostream& operator<<(Ostream&, const graph&)"); os.check("Ostream& operator<<(Ostream&, const graph&)");
@ -235,8 +236,4 @@ Ostream& operator<<(Ostream& os, const graph& g)
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -58,7 +58,8 @@ Foam::procLduInterface::procLduInterface
( (
"procLduInterface::procLduInterface" "procLduInterface::procLduInterface"
"(const lduInterfaceField&, const scalarField&" "(const lduInterfaceField&, const scalarField&"
) << "unknown lduInterface type " << interface.interface().type() ) << "Unknown lduInterface type "
<< interface.interface().type()
<< exit(FatalError); << exit(FatalError);
} }
} }

View File

@ -58,7 +58,8 @@ Foam::lduMatrix::smoother::getName
} }
Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New Foam::autoPtr<Foam::lduMatrix::smoother>
Foam::lduMatrix::smoother::New
( (
const word& fieldName, const word& fieldName,
const lduMatrix& matrix, const lduMatrix& matrix,

View File

@ -37,7 +37,8 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New Foam::autoPtr<Foam::lduMatrix::solver>
Foam::lduMatrix::solver::New
( (
const word& fieldName, const word& fieldName,
const lduMatrix& matrix, const lduMatrix& matrix,
@ -47,7 +48,7 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
const dictionary& solverControls const dictionary& solverControls
) )
{ {
word name(solverControls.lookup("solver")); const word name(solverControls.lookup("solver"));
if (matrix.diagonal()) if (matrix.diagonal())
{ {

View File

@ -102,7 +102,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
) )
) )
{ {
word agglomeratorType(controlDict.lookup("agglomerator")); const word agglomeratorType(controlDict.lookup("agglomerator"));
dlLibraryTable::open dlLibraryTable::open
( (
@ -157,7 +157,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
) )
) )
{ {
word agglomeratorType(controlDict.lookup("agglomerator")); const word agglomeratorType(controlDict.lookup("agglomerator"));
dlLibraryTable::open dlLibraryTable::open
( (

View File

@ -27,13 +27,14 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New Foam::autoPtr<Foam::GAMGInterfaceField>
Foam::GAMGInterfaceField::New
( (
const GAMGInterface& GAMGCp, const GAMGInterface& GAMGCp,
const lduInterfaceField& fineInterface const lduInterfaceField& fineInterface
) )
{ {
word coupleType(fineInterface.interfaceFieldType()); const word coupleType(fineInterface.interfaceFieldType());
lduInterfaceConstructorTable::iterator cstrIter = lduInterfaceConstructorTable::iterator cstrIter =
lduInterfaceConstructorTablePtr_->find(coupleType); lduInterfaceConstructorTablePtr_->find(coupleType);
@ -45,7 +46,8 @@ Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New
"GAMGInterfaceField::New" "GAMGInterfaceField::New"
"(const GAMGInterface& GAMGCp, " "(const GAMGInterface& GAMGCp, "
"const lduInterfaceField& fineInterface)" "const lduInterfaceField& fineInterface)"
) << "Unknown GAMGInterfaceField type " << coupleType << ".\n" ) << "Unknown GAMGInterfaceField type "
<< coupleType << nl
<< "Valid GAMGInterfaceField types are :" << "Valid GAMGInterfaceField types are :"
<< lduInterfaceConstructorTablePtr_->sortedToc() << lduInterfaceConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -29,14 +29,15 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New Foam::autoPtr<Foam::GAMGInterface>
Foam::GAMGInterface::New
( (
const lduInterface& fineInterface, const lduInterface& fineInterface,
const labelField& localRestrictAddressing, const labelField& localRestrictAddressing,
const labelField& neighbourRestrictAddressing const labelField& neighbourRestrictAddressing
) )
{ {
word coupleType(fineInterface.type()); const word coupleType(fineInterface.type());
lduInterfaceConstructorTable::iterator cstrIter = lduInterfaceConstructorTable::iterator cstrIter =
lduInterfaceConstructorTablePtr_->find(coupleType); lduInterfaceConstructorTablePtr_->find(coupleType);

View File

@ -62,7 +62,7 @@ bool tolerances::read()
{ {
if (regIOobject::read()) if (regIOobject::read())
{ {
word toleranceSetName(lookup("toleranceSet")); const word toleranceSetName(lookup("toleranceSet"));
const dictionary& toleranceSet(subDict(toleranceSetName)); const dictionary& toleranceSet(subDict(toleranceSetName));
if (toleranceSet.found("relaxationFactors")) if (toleranceSet.found("relaxationFactors"))

View File

@ -27,12 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam Foam::autoPtr<Foam::facePointPatch>
{ Foam::facePointPatch::New
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
autoPtr<facePointPatch> facePointPatch::New
( (
const polyPatch& patch, const polyPatch& patch,
const pointBoundaryMesh& bm const pointBoundaryMesh& bm
@ -57,7 +53,7 @@ autoPtr<facePointPatch> facePointPatch::New
"const pointBoundaryMesh&) : " "const pointBoundaryMesh&) : "
) << "Unknown facePointPatch type " ) << "Unknown facePointPatch type "
<< patch.type() << patch.type()
<< endl << endl << nl << nl
<< "Valid facePointPatch types are :" << endl << "Valid facePointPatch types are :" << endl
<< polyPatchConstructorTablePtr_->sortedToc() << polyPatchConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
@ -67,8 +63,4 @@ autoPtr<facePointPatch> facePointPatch::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -28,7 +28,8 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New Foam::autoPtr<Foam::polyPatch>
Foam::polyPatch::New
( (
const word& patchType, const word& patchType,
const word& name, const word& name,
@ -55,8 +56,8 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
( (
"polyPatch::New(const word&, const word&, const label, " "polyPatch::New(const word&, const word&, const label, "
"const label, const label, const polyBoundaryMesh&) " "const label, const label, const polyBoundaryMesh&) "
) << "Unknown polyPatch type " << patchType << " for patch " << name ) << "Unknown polyPatch type "
<< endl << endl << patchType << " for patch " << name << nl << nl
<< "Valid polyPatch types are :" << endl << "Valid polyPatch types are :" << endl
<< wordConstructorTablePtr_->sortedToc() << wordConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
@ -66,7 +67,8 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
} }
Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New Foam::autoPtr<Foam::polyPatch>
Foam::polyPatch::New
( (
const word& name, const word& name,
const dictionary& dict, const dictionary& dict,
@ -82,7 +84,6 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
} }
word patchType(dict.lookup("type")); word patchType(dict.lookup("type"));
dict.readIfPresent("geometricType", patchType); dict.readIfPresent("geometricType", patchType);
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
@ -102,9 +103,8 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
"polyPatch::New(const word&, const dictionary&, " "polyPatch::New(const word&, const dictionary&, "
"const label, const polyBoundaryMesh&)", "const label, const polyBoundaryMesh&)",
dict dict
) << "Unknown polyPatch type " << patchType ) << "Unknown polyPatch type "
<< " for patch " << name << patchType << " for patch " << name << nl << nl
<< endl << endl
<< "Valid polyPatch types are :" << endl << "Valid polyPatch types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -28,7 +28,8 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::cellZone> Foam::cellZone::New Foam::autoPtr<Foam::cellZone>
Foam::cellZone::New
( (
const word& name, const word& name,
const dictionary& dict, const dictionary& dict,
@ -43,7 +44,10 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
<< endl; << endl;
} }
word zoneType(dict.lookup("type")); const word zoneType
(
dict.lookup("type")
);
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(zoneType); dictionaryConstructorTablePtr_->find(zoneType);
@ -55,7 +59,8 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
"cellZone::New(const word&, const dictionary&, " "cellZone::New(const word&, const dictionary&, "
"const label, const cellZoneMesh&)", "const label, const cellZoneMesh&)",
dict dict
) << "Unknown cellZone type " << zoneType << endl << endl ) << "Unknown cellZone type "
<< zoneType << nl << nl
<< "Valid cellZone types are:" << nl << "Valid cellZone types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -28,7 +28,8 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::faceZone> Foam::faceZone::New Foam::autoPtr<Foam::faceZone>
Foam::faceZone::New
( (
const word& name, const word& name,
const dictionary& dict, const dictionary& dict,
@ -43,7 +44,10 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
<< endl; << endl;
} }
word zoneType(dict.lookup("type")); const word zoneType
(
dict.lookup("type")
);
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(zoneType); dictionaryConstructorTablePtr_->find(zoneType);
@ -55,7 +59,8 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
"faceZone::New(const word&, const dictionary&, " "faceZone::New(const word&, const dictionary&, "
"const label, const faceZoneMesh&)", "const label, const faceZoneMesh&)",
dict dict
) << "Unknown faceZone type " << zoneType << endl << endl ) << "Unknown faceZone type "
<< zoneType << nl << nl
<< "Valid faceZone types are:" << nl << "Valid faceZone types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -28,7 +28,8 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::pointZone> Foam::pointZone::New Foam::autoPtr<Foam::pointZone>
Foam::pointZone::New
( (
const word& name, const word& name,
const dictionary& dict, const dictionary& dict,
@ -43,7 +44,10 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
<< endl; << endl;
} }
word zoneType(dict.lookup("type")); const word zoneType
(
dict.lookup("type")
);
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(zoneType); dictionaryConstructorTablePtr_->find(zoneType);
@ -55,7 +59,8 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
"pointZone::New(const word&, const dictionary&, " "pointZone::New(const word&, const dictionary&, "
"const label, const pointZoneMesh&)", "const label, const pointZoneMesh&)",
dict dict
) << "Unknown pointZone type " << zoneType << endl << endl ) << "Unknown pointZone type "
<< zoneType << nl << nl
<< "Valid pointZone types are:" << nl << "Valid pointZone types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -189,7 +189,7 @@ Foam::plane::plane(const dictionary& dict)
unitVector_(vector::zero), unitVector_(vector::zero),
basePoint_(point::zero) basePoint_(point::zero)
{ {
word planeType(dict.lookup("planeType")); const word planeType(dict.lookup("planeType"));
if (planeType == "planeEquation") if (planeType == "planeEquation")
{ {

View File

@ -126,9 +126,10 @@ Foam::ensightPart::ensightPart(const ensightPart& part)
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::ensightPart> Foam::ensightPart::New(Istream& is) Foam::autoPtr<Foam::ensightPart>
Foam::ensightPart::New(Istream& is)
{ {
word partType(is); const word partType(is);
istreamConstructorTable::iterator cstrIter = istreamConstructorTable::iterator cstrIter =
istreamConstructorTablePtr_->find(partType); istreamConstructorTablePtr_->find(partType);
@ -139,7 +140,8 @@ Foam::autoPtr<Foam::ensightPart> Foam::ensightPart::New(Istream& is)
( (
"ensightPart::New(Istream&)", "ensightPart::New(Istream&)",
is is
) << "unknown ensightPart type " << partType << endl << endl ) << "unknown ensightPart type "
<< partType << nl << nl
<< "Valid ensightPart types are :" << endl << "Valid ensightPart types are :" << endl
<< istreamConstructorTablePtr_->sortedToc() << istreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -29,12 +29,11 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io) Foam::autoPtr<Foam::dynamicFvMesh>
Foam::dynamicFvMesh::New(const IOobject& io)
{ {
// Enclose the creation of the dynamicMesh to ensure it is // do not register the dictionary
// deleted before the dynamicFvMesh is created otherwise the dictionary IOdictionary dict
// is entered in the database twice
IOdictionary dynamicMeshDict
( (
IOobject IOobject
( (
@ -47,13 +46,13 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
) )
); );
word dynamicFvMeshTypeName(dynamicMeshDict.lookup("dynamicFvMesh")); const word dynamicFvMeshTypeName(dict.lookup("dynamicFvMesh"));
Info<< "Selecting dynamicFvMesh " << dynamicFvMeshTypeName << endl; Info<< "Selecting dynamicFvMesh " << dynamicFvMeshTypeName << endl;
dlLibraryTable::open dlLibraryTable::open
( (
dynamicMeshDict, dict,
"dynamicFvMeshLibs", "dynamicFvMeshLibs",
IOobjectConstructorTablePtr_ IOobjectConstructorTablePtr_
); );
@ -75,8 +74,8 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
FatalErrorIn FatalErrorIn
( (
"dynamicFvMesh::New(const IOobject&)" "dynamicFvMesh::New(const IOobject&)"
) << "Unknown dynamicFvMesh type " << dynamicFvMeshTypeName ) << "Unknown dynamicFvMesh type "
<< endl << endl << dynamicFvMeshTypeName << nl << nl
<< "Valid dynamicFvMesh types are :" << endl << "Valid dynamicFvMesh types are :" << endl
<< IOobjectConstructorTablePtr_->sortedToc() << IOobjectConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -27,20 +27,22 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New Foam::autoPtr<Foam::solidBodyMotionFunction>
Foam::solidBodyMotionFunction::New
( (
const dictionary& SBMFCoeffs, const dictionary& SBMFCoeffs,
const Time& runTime const Time& runTime
) )
{ {
word solidBodyMotionFunctionTypeName = const word motionType
SBMFCoeffs.lookup("solidBodyMotionFunction"); (
SBMFCoeffs.lookup("solidBodyMotionFunction")
);
Info<< "Selecting solid-body motion function " Info<< "Selecting solid-body motion function " << motionType << endl;
<< solidBodyMotionFunctionTypeName << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(solidBodyMotionFunctionTypeName); dictionaryConstructorTablePtr_->find(motionType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -52,7 +54,7 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
" const Time& runTime" " const Time& runTime"
")" ")"
) << "Unknown solidBodyMotionFunction type " ) << "Unknown solidBodyMotionFunction type "
<< solidBodyMotionFunctionTypeName << endl << endl << motionType << nl << nl
<< "Valid solidBodyMotionFunctions are : " << endl << "Valid solidBodyMotionFunctions are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -28,36 +28,34 @@ License
#include "ListOps.H" #include "ListOps.H"
#include "meshTools.H" #include "meshTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(cellLooper, 0);
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineRunTimeSelectionTable(cellLooper, word);
}
defineTypeNameAndDebug(cellLooper, 0);
defineRunTimeSelectionTable(cellLooper, word);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Construct named object from given arguments Foam::autoPtr<Foam::cellLooper>
autoPtr<cellLooper> cellLooper::New Foam::cellLooper::New
( (
const word& type, const word& type,
const polyMesh& mesh const polyMesh& mesh
) )
{ {
wordConstructorTable::iterator cstrIter = wordConstructorTable::iterator cstrIter =
wordConstructorTablePtr_ wordConstructorTablePtr_->find(type);
->find(type);
if (cstrIter == wordConstructorTablePtr_->end()) if (cstrIter == wordConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorIn
( (
"cellLooper::New(const word&, const polyMesh&)" "cellLooper::New(const word&, const polyMesh&)"
) << "Unknown set type " << type ) << "Unknown set type "
<< endl << endl << type << nl << nl
<< "Valid cellLooper types : " << endl << "Valid cellLooper types : " << endl
<< wordConstructorTablePtr_->sortedToc() << wordConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
@ -66,7 +64,6 @@ autoPtr<cellLooper> cellLooper::New
return autoPtr<cellLooper>(cstrIter()(mesh)); return autoPtr<cellLooper>(cstrIter()(mesh));
} }
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -207,7 +204,6 @@ Foam::label Foam::cellLooper::getMisAlignedEdge
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::cellLooper::cellLooper(const polyMesh& mesh) Foam::cellLooper::cellLooper(const polyMesh& mesh)
: :
edgeVertex(mesh) edgeVertex(mesh)

View File

@ -303,7 +303,7 @@ Foam::directions::directions
label nDirs = 0; label nDirs = 0;
word coordSystem(dict.lookup("coordinateSystem")); const word coordSystem(dict.lookup("coordinateSystem"));
if (coordSystem == "global") if (coordSystem == "global")
{ {
@ -341,7 +341,7 @@ Foam::directions::directions
{ {
const dictionary& patchDict = dict.subDict("patchLocalCoeffs"); const dictionary& patchDict = dict.subDict("patchLocalCoeffs");
word patchName(patchDict.lookup("patch")); const word patchName(patchDict.lookup("patch"));
label patchI = mesh.boundaryMesh().findPatchID(patchName); label patchI = mesh.boundaryMesh().findPatchID(patchName);
@ -352,7 +352,8 @@ Foam::directions::directions
"directions::directions(const polyMesh&, const dictionary&," "directions::directions(const polyMesh&, const dictionary&,"
"const twoDPointCorrector*" "const twoDPointCorrector*"
) << "Cannot find patch " ) << "Cannot find patch "
<< patchName << exit(FatalError); << patchName
<< exit(FatalError);
} }
// Take zeroth face on patch // Take zeroth face on patch
@ -440,7 +441,8 @@ Foam::directions::directions
"const twoDPointCorrector*" "const twoDPointCorrector*"
) << "Unknown coordinate system " ) << "Unknown coordinate system "
<< coordSystem << endl << coordSystem << endl
<< "Known types are global and patchLocal" << exit(FatalError); << "Known types are global and patchLocal"
<< exit(FatalError);
} }
} }

View File

@ -58,7 +58,8 @@ Foam::motionSolver::motionSolver(const polyMesh& mesh)
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New(const polyMesh& mesh) Foam::autoPtr<Foam::motionSolver>
Foam::motionSolver::New(const polyMesh& mesh)
{ {
IOdictionary solverDict IOdictionary solverDict
( (
@ -75,7 +76,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New(const polyMesh& mesh)
Istream& msData = solverDict.lookup("solver"); Istream& msData = solverDict.lookup("solver");
word solverTypeName(msData); const word solverTypeName(msData);
Info<< "Selecting motion solver: " << solverTypeName << endl; Info<< "Selecting motion solver: " << solverTypeName << endl;
@ -103,9 +104,9 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New(const polyMesh& mesh)
FatalErrorIn FatalErrorIn
( (
"motionSolver::New(const polyMesh& mesh)" "motionSolver::New(const polyMesh& mesh)"
) << "Unknown solver type " << solverTypeName ) << "Unknown solver type "
<< endl << endl << solverTypeName << nl << nl
<< "Valid solver types are: " << endl << "Valid solver types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -26,14 +26,10 @@ License
#include "polyMeshModifier.H" #include "polyMeshModifier.H"
#include "dictionary.H" #include "dictionary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
autoPtr<polyMeshModifier> polyMeshModifier::New Foam::autoPtr<Foam::polyMeshModifier>
Foam::polyMeshModifier::New
( (
const word& name, const word& name,
const dictionary& dict, const dictionary& dict,
@ -49,10 +45,10 @@ autoPtr<polyMeshModifier> polyMeshModifier::New
<< endl; << endl;
} }
word patchType(dict.lookup("type")); const word modifierType(dict.lookup("type"));
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(patchType); dictionaryConstructorTablePtr_->find(modifierType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -61,7 +57,8 @@ autoPtr<polyMeshModifier> polyMeshModifier::New
"polyMeshModifier::New(const word&, const dictionary&, " "polyMeshModifier::New(const word&, const dictionary&, "
"const label, const polyMesh&)", "const label, const polyMesh&)",
dict dict
) << "Unknown polyMeshModifier type " << patchType << endl << endl ) << "Unknown polyMeshModifier type "
<< modifierType << nl << nl
<< "Valid polyMeshModifier types are :" << endl << "Valid polyMeshModifier types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -71,8 +68,4 @@ autoPtr<polyMeshModifier> polyMeshModifier::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -28,18 +28,17 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New Foam::autoPtr<Foam::engineMesh>
Foam::engineMesh::New
( (
const Foam::IOobject& io const Foam::IOobject& io
) )
{ {
word engineMeshTypeName; // get model name, but do not register the dictionary
// otherwise it is registered in the database twice
// Enclose the creation of the engineGeometry to ensure it is const word modelType
// deleted before the engineMesh is created otherwise the dictionary (
// is entered in the database twice IOdictionary
{
IOdictionary engineGeometryDict
( (
IOobject IOobject
( (
@ -50,23 +49,21 @@ Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )
).lookup("engineMesh")
); );
engineGeometryDict.lookup("engineMesh") >> engineMeshTypeName; Info<< "Selecting engineMesh " << modelType << endl;
}
Info<< "Selecting engineMesh " << engineMeshTypeName << endl;
IOobjectConstructorTable::iterator cstrIter = IOobjectConstructorTable::iterator cstrIter =
IOobjectConstructorTablePtr_->find(engineMeshTypeName); IOobjectConstructorTablePtr_->find(modelType);
if (cstrIter == IOobjectConstructorTablePtr_->end()) if (cstrIter == IOobjectConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorIn
( (
"engineMesh::New(const IOobject&)" "engineMesh::New(const IOobject&)"
) << "Unknown engineMesh type " << engineMeshTypeName ) << "Unknown engineMesh type "
<< endl << endl << modelType << nl << nl
<< "Valid engineMesh types are :" << endl << "Valid engineMesh types are :" << endl
<< IOobjectConstructorTablePtr_->sortedToc() << IOobjectConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -25,27 +25,19 @@ License
#include "SRFModel.H" #include "SRFModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace SRF
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<SRFModel> SRFModel::New Foam::autoPtr<Foam::SRF::SRFModel>
Foam::SRF::SRFModel::New
( (
const volVectorField& Urel const volVectorField& Urel
) )
{ {
word SRFModelTypeName; // get model name, but do not register the dictionary
// otherwise it is registered in the database twice
// Enclose the creation of the SRFPropertiesDict to ensure it is const word modelType
// deleted before the SRFModel is created - otherwise the dictionary (
// is entered in the database twice IOdictionary
{
IOdictionary SRFPropertiesDict
( (
IOobject IOobject
( (
@ -53,25 +45,24 @@ autoPtr<SRFModel> SRFModel::New
Urel.time().constant(), Urel.time().constant(),
Urel.db(), Urel.db(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE,
false
) )
).lookup("SRFModel")
); );
SRFPropertiesDict.lookup("SRFModel") >> SRFModelTypeName; Info<< "Selecting SRFModel " << modelType << endl;
}
Info<< "Selecting SRFModel " << SRFModelTypeName << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(SRFModelTypeName); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorIn
( (
"SRFModel::New(const fvMesh&)" "SRFModel::New(const fvMesh&)"
) << "Unknown SRFModel type " << SRFModelTypeName ) << "Unknown SRFModel type "
<< nl << nl << modelType << nl << nl
<< "Valid SRFModel types are :" << nl << "Valid SRFModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
@ -81,9 +72,4 @@ autoPtr<SRFModel> SRFModel::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace SRF
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -52,8 +52,8 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
( (
"fvPatchField<Type>::New(const word&, const word&, const fvPatch&, " "fvPatchField<Type>::New(const word&, const word&, const fvPatch&, "
"const DimensionedField<Type, volMesh>&)" "const DimensionedField<Type, volMesh>&)"
) << "Unknown patchTypefield type " << patchFieldType ) << "Unknown patchField type "
<< endl << endl << patchFieldType << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< patchConstructorTablePtr_->sortedToc() << patchConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
@ -104,7 +104,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
const dictionary& dict const dictionary& dict
) )
{ {
word patchFieldType(dict.lookup("type")); const word patchFieldType(dict.lookup("type"));
if (debug) if (debug)
{ {
@ -133,7 +133,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
"const dictionary&)", "const dictionary&)",
dict dict
) << "Unknown patchField type " << patchFieldType ) << "Unknown patchField type " << patchFieldType
<< " for patch type " << p.type() << endl << endl << " for patch type " << p.type() << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -200,7 +200,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
"fvPatchField<Type>::New(const fvPatchField<Type>&, " "fvPatchField<Type>::New(const fvPatchField<Type>&, "
"const fvPatch&, const DimensionedField<Type, volMesh>&, " "const fvPatch&, const DimensionedField<Type, volMesh>&, "
"const fvPatchFieldMapper&)" "const fvPatchFieldMapper&)"
) << "unknown patchTypefield type " << ptf.type() << endl << endl ) << "Unknown patchField type " << ptf.type() << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< patchMapperConstructorTablePtr_->sortedToc() << patchMapperConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -56,8 +56,8 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
( (
"fvsPatchField<Type>::New(const word&, const word&, const fvPatch&" "fvsPatchField<Type>::New(const word&, const word&, const fvPatch&"
", const Field<Type>&)" ", const Field<Type>&)"
) << "Unknown patchTypefield type " << patchFieldType ) << "Unknown patchField type "
<< endl << endl << patchFieldType << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< patchConstructorTablePtr_->sortedToc() << patchConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
@ -116,7 +116,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
<< endl; << endl;
} }
word patchFieldType(dict.lookup("type")); const word patchFieldType(dict.lookup("type"));
typename dictionaryConstructorTable::iterator cstrIter typename dictionaryConstructorTable::iterator cstrIter
= dictionaryConstructorTablePtr_->find(patchFieldType); = dictionaryConstructorTablePtr_->find(patchFieldType);
@ -136,7 +136,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
"const dictionary&)", "const dictionary&)",
dict dict
) << "Unknown patchField type " << patchFieldType ) << "Unknown patchField type " << patchFieldType
<< " for patch type " << p.type() << endl << endl << " for patch type " << p.type() << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -204,7 +204,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
"fvsPatchField<Type>::New(const fvsPatchField<Type>&, " "fvsPatchField<Type>::New(const fvsPatchField<Type>&, "
"const fvPatch&, const Field<Type>&, " "const fvPatch&, const Field<Type>&, "
"const fvPatchFieldMapper&)" "const fvPatchFieldMapper&)"
) << "unknown patchTypefield type " << ptf.type() << endl << endl ) << "Unknown patchField type " << ptf.type() << nl << nl
<< "Valid patchField types are :" << endl << "Valid patchField types are :" << endl
<< patchMapperConstructorTablePtr_->sortedToc() << patchMapperConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -82,7 +82,7 @@ tmp<convectionScheme<Type> > convectionScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename IstreamConstructorTable::iterator cstrIter = typename IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(schemeName); IstreamConstructorTablePtr_->find(schemeName);
@ -94,7 +94,7 @@ tmp<convectionScheme<Type> > convectionScheme<Type>::New
"convectionScheme<Type>::New" "convectionScheme<Type>::New"
"(const fvMesh&, const surfaceScalarField&, Istream&)", "(const fvMesh&, const surfaceScalarField&, Istream&)",
schemeData schemeData
) << "unknown convection scheme " << schemeName << endl << endl ) << "Unknown convection scheme " << schemeName << nl << nl
<< "Valid convection schemes are :" << endl << "Valid convection schemes are :" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -139,7 +139,7 @@ tmp<convectionScheme<Type> > convectionScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename MultivariateConstructorTable::iterator cstrIter = typename MultivariateConstructorTable::iterator cstrIter =
MultivariateConstructorTablePtr_->find(schemeName); MultivariateConstructorTablePtr_->find(schemeName);
@ -153,7 +153,7 @@ tmp<convectionScheme<Type> > convectionScheme<Type>::New
"const typename multivariateSurfaceInterpolationScheme<Type>" "const typename multivariateSurfaceInterpolationScheme<Type>"
"::fieldTable&, const surfaceScalarField&, Istream&)", "::fieldTable&, const surfaceScalarField&, Istream&)",
schemeData schemeData
) << "unknown convection scheme " << schemeName << endl << endl ) << "Unknown convection scheme " << schemeName << nl << nl
<< "Valid convection schemes are :" << endl << "Valid convection schemes are :" << endl
<< MultivariateConstructorTablePtr_->sortedToc() << MultivariateConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -67,7 +67,7 @@ tmp<d2dt2Scheme<Type> > d2dt2Scheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename IstreamConstructorTable::iterator cstrIter = typename IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(schemeName); IstreamConstructorTablePtr_->find(schemeName);
@ -78,7 +78,7 @@ tmp<d2dt2Scheme<Type> > d2dt2Scheme<Type>::New
( (
"d2dt2Scheme<Type>::New(const fvMesh&, Istream&)", "d2dt2Scheme<Type>::New(const fvMesh&, Istream&)",
schemeData schemeData
) << "unknown d2dt2 scheme " << schemeName << endl << endl ) << "Unknown d2dt2 scheme " << schemeName << nl << nl
<< "Valid d2dt2 schemes are :" << endl << "Valid d2dt2 schemes are :" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -65,7 +65,7 @@ tmp<ddtScheme<Type> > ddtScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename IstreamConstructorTable::iterator cstrIter = typename IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(schemeName); IstreamConstructorTablePtr_->find(schemeName);
@ -76,7 +76,7 @@ tmp<ddtScheme<Type> > ddtScheme<Type>::New
( (
"ddtScheme<Type>::New(const fvMesh&, Istream&)", "ddtScheme<Type>::New(const fvMesh&, Istream&)",
schemeData schemeData
) << "unknown ddt scheme " << schemeName << endl << endl ) << "Unknown ddt scheme " << schemeName << nl << nl
<< "Valid ddt schemes are :" << endl << "Valid ddt schemes are :" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -68,7 +68,7 @@ tmp<divScheme<Type> > divScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename IstreamConstructorTable::iterator cstrIter = typename IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(schemeName); IstreamConstructorTablePtr_->find(schemeName);
@ -79,7 +79,8 @@ tmp<divScheme<Type> > divScheme<Type>::New
( (
"divScheme<Type>::New(const fvMesh&, Istream&)", "divScheme<Type>::New(const fvMesh&, Istream&)",
schemeData schemeData
) << "unknown div scheme " << schemeName << endl << endl ) << "unknown div scheme "
<< schemeName << nl << nl
<< "Valid div schemes are :" << endl << "Valid div schemes are :" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -57,7 +57,7 @@ Foam::tmp<Foam::fv::gradScheme<Type> > Foam::fv::gradScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename IstreamConstructorTable::iterator cstrIter = typename IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(schemeName); IstreamConstructorTablePtr_->find(schemeName);
@ -69,7 +69,7 @@ Foam::tmp<Foam::fv::gradScheme<Type> > Foam::fv::gradScheme<Type>::New
"gradScheme<Type>::New" "gradScheme<Type>::New"
"(const fvMesh& mesh, Istream& schemeData)", "(const fvMesh& mesh, Istream& schemeData)",
schemeData schemeData
) << "unknown grad scheme " << schemeName << endl << endl ) << "Unknown grad scheme " << schemeName << nl << nl
<< "Valid grad schemes are :" << endl << "Valid grad schemes are :" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -66,7 +66,7 @@ tmp<laplacianScheme<Type, GType> > laplacianScheme<Type, GType>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename IstreamConstructorTable::iterator cstrIter = typename IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(schemeName); IstreamConstructorTablePtr_->find(schemeName);
@ -77,7 +77,7 @@ tmp<laplacianScheme<Type, GType> > laplacianScheme<Type, GType>::New
( (
"laplacianScheme<Type, GType>::New(const fvMesh&, Istream&)", "laplacianScheme<Type, GType>::New(const fvMesh&, Istream&)",
schemeData schemeData
) << "unknown laplacian scheme " << schemeName << endl << endl ) << "Unknown laplacian scheme " << schemeName << nl << nl
<< "Valid laplacian schemes are :" << endl << "Valid laplacian schemes are :" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -68,7 +68,7 @@ tmp<snGradScheme<Type> > snGradScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename MeshConstructorTable::iterator constructorIter = typename MeshConstructorTable::iterator constructorIter =
MeshConstructorTablePtr_->find(schemeName); MeshConstructorTablePtr_->find(schemeName);
@ -79,8 +79,8 @@ tmp<snGradScheme<Type> > snGradScheme<Type>::New
( (
"snGradScheme<Type>::New(const fvMesh&, Istream&)", "snGradScheme<Type>::New(const fvMesh&, Istream&)",
schemeData schemeData
) << "Unknown discretisation scheme " << schemeName ) << "Unknown discretisation scheme "
<< endl << endl << schemeName << nl << nl
<< "Valid schemes are :" << endl << "Valid schemes are :" << endl
<< MeshConstructorTablePtr_->sortedToc() << MeshConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -28,7 +28,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::fvPatch> Foam::fvPatch::New Foam::autoPtr<Foam::fvPatch>
Foam::fvPatch::New
( (
const polyPatch& patch, const polyPatch& patch,
const fvBoundaryMesh& bm const fvBoundaryMesh& bm
@ -47,7 +48,7 @@ Foam::autoPtr<Foam::fvPatch> Foam::fvPatch::New
if (cstrIter == polyPatchConstructorTablePtr_->end()) if (cstrIter == polyPatchConstructorTablePtr_->end())
{ {
FatalErrorIn("fvPatch::New(const polyPatch&, const fvBoundaryMesh&)") FatalErrorIn("fvPatch::New(const polyPatch&, const fvBoundaryMesh&)")
<< "Unknown fvPatch type " << patch.type() << ".\n" << "Unknown fvPatch type " << patch.type() << nl
<< "Valid fvPatch types are :" << "Valid fvPatch types are :"
<< polyPatchConstructorTablePtr_->sortedToc() << polyPatchConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -65,7 +65,7 @@ limitedSurfaceInterpolationScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename MeshConstructorTable::iterator constructorIter = typename MeshConstructorTable::iterator constructorIter =
MeshConstructorTablePtr_->find(schemeName); MeshConstructorTablePtr_->find(schemeName);
@ -77,8 +77,8 @@ limitedSurfaceInterpolationScheme<Type>::New
"limitedSurfaceInterpolationScheme<Type>::" "limitedSurfaceInterpolationScheme<Type>::"
"New(const fvMesh&, Istream&)", "New(const fvMesh&, Istream&)",
schemeData schemeData
) << "Unknown discretisation scheme " << schemeName ) << "Unknown discretisation scheme "
<< endl << endl << schemeName << nl << nl
<< "Valid schemes are :" << endl << "Valid schemes are :" << endl
<< MeshConstructorTablePtr_->sortedToc() << MeshConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -120,7 +120,7 @@ limitedSurfaceInterpolationScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename MeshFluxConstructorTable::iterator constructorIter = typename MeshFluxConstructorTable::iterator constructorIter =
MeshFluxConstructorTablePtr_->find(schemeName); MeshFluxConstructorTablePtr_->find(schemeName);
@ -132,8 +132,8 @@ limitedSurfaceInterpolationScheme<Type>::New
"limitedSurfaceInterpolationScheme<Type>::New" "limitedSurfaceInterpolationScheme<Type>::New"
"(const fvMesh&, const surfaceScalarField&, Istream&)", "(const fvMesh&, const surfaceScalarField&, Istream&)",
schemeData schemeData
) << "Unknown discretisation scheme " << schemeName ) << "Unknown discretisation scheme "
<< endl << endl << schemeName << nl << nl
<< "Valid schemes are :" << endl << "Valid schemes are :" << endl
<< MeshFluxConstructorTablePtr_->sortedToc() << MeshFluxConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -76,7 +76,7 @@ multivariateSurfaceInterpolationScheme<Type>::New
<< endl; << endl;
} }
word schemeName(schemeData); const word schemeName(schemeData);
typename IstreamConstructorTable::iterator constructorIter = typename IstreamConstructorTable::iterator constructorIter =
IstreamConstructorTablePtr_->find(schemeName); IstreamConstructorTablePtr_->find(schemeName);
@ -89,7 +89,7 @@ multivariateSurfaceInterpolationScheme<Type>::New
"(const fvMesh& mesh, const fieldTable&, " "(const fvMesh& mesh, const fieldTable&, "
"const surfaceScalarField&, Istream&)", "const surfaceScalarField&, Istream&)",
schemeData schemeData
) << "unknown discretisation scheme " << schemeName << endl << endl ) << "Unknown discretisation scheme " << schemeName << nl << nl
<< "Valid schemes are :" << endl << "Valid schemes are :" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -59,7 +59,7 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug) if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug)
{ {
@ -79,8 +79,8 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
( (
"surfaceInterpolationScheme<Type>::New(const fvMesh&, Istream&)", "surfaceInterpolationScheme<Type>::New(const fvMesh&, Istream&)",
schemeData schemeData
) << "Unknown discretisation scheme " << schemeName ) << "Unknown discretisation scheme "
<< endl << endl << schemeName << nl << nl
<< "Valid schemes are :" << endl << "Valid schemes are :" << endl
<< MeshConstructorTablePtr_->sortedToc() << MeshConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
@ -113,7 +113,7 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
<< exit(FatalIOError); << exit(FatalIOError);
} }
word schemeName(schemeData); const word schemeName(schemeData);
if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug) if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug)
{ {
@ -134,8 +134,8 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
"surfaceInterpolationScheme<Type>::New" "surfaceInterpolationScheme<Type>::New"
"(const fvMesh&, const surfaceScalarField&, Istream&)", "(const fvMesh&, const surfaceScalarField&, Istream&)",
schemeData schemeData
) << "Unknown discretisation scheme " << schemeName ) << "Unknown discretisation scheme "
<< endl << endl << schemeName << nl << nl
<< "Valid schemes are :" << endl << "Valid schemes are :" << endl
<< MeshFluxConstructorTablePtr_->sortedToc() << MeshFluxConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);

View File

@ -30,7 +30,6 @@ License
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(motionDiffusivity, 0); defineTypeNameAndDebug(motionDiffusivity, 0);
defineRunTimeSelectionTable(motionDiffusivity, Istream); defineRunTimeSelectionTable(motionDiffusivity, Istream);
} }
@ -45,18 +44,19 @@ Foam::motionDiffusivity::motionDiffusivity(const fvMotionSolver& mSolver)
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::motionDiffusivity> Foam::motionDiffusivity::New Foam::autoPtr<Foam::motionDiffusivity>
Foam::motionDiffusivity::New
( (
const fvMotionSolver& mSolver, const fvMotionSolver& mSolver,
Istream& mdData Istream& mdData
) )
{ {
word diffTypeName(mdData); const word motionType(mdData);
Info<< "Selecting motion diffusion: " << diffTypeName << endl; Info<< "Selecting motion diffusion: " << motionType << endl;
IstreamConstructorTable::iterator cstrIter = IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(diffTypeName); IstreamConstructorTablePtr_->find(motionType);
if (cstrIter == IstreamConstructorTablePtr_->end()) if (cstrIter == IstreamConstructorTablePtr_->end())
{ {
@ -64,8 +64,8 @@ Foam::autoPtr<Foam::motionDiffusivity> Foam::motionDiffusivity::New
( (
"motionDiffusivity::New(const tetPolyMesh& tetMesh, " "motionDiffusivity::New(const tetPolyMesh& tetMesh, "
"const Istream& dict)" "const Istream& dict)"
) << "Unknown diffusion type " << diffTypeName ) << "Unknown diffusion type "
<< endl << endl << motionType << nl << nl
<< "Valid diffusion types are :" << endl << "Valid diffusion types are :" << endl
<< IstreamConstructorTablePtr_->sortedToc() << IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -39,7 +39,7 @@ Foam::word Foam::Cloud<ParticleType>::cloudPropertiesName("cloudProperties");
template<class ParticleType> template<class ParticleType>
void Foam::Cloud<ParticleType>::readCloudUniformProperties() void Foam::Cloud<ParticleType>::readCloudUniformProperties()
{ {
IOobject uniformPropsDictHeader IOobject dictObj
( (
cloudPropertiesName, cloudPropertiesName,
time().timeName(), time().timeName(),
@ -50,11 +50,11 @@ void Foam::Cloud<ParticleType>::readCloudUniformProperties()
false false
); );
if (uniformPropsDictHeader.headerOk()) if (dictObj.headerOk())
{ {
const IOdictionary uniformPropsDict(uniformPropsDictHeader); const IOdictionary uniformPropsDict(dictObj);
word procName("processor" + Foam::name(Pstream::myProcNo())); const word procName("processor" + Foam::name(Pstream::myProcNo()));
if (uniformPropsDict.found(procName)) if (uniformPropsDict.found(procName))
{ {
uniformPropsDict.subDict(procName).lookup("particleCount") uniformPropsDict.subDict(procName).lookup("particleCount")

View File

@ -46,26 +46,29 @@ Foam::injectorType::injectorType
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::injectorType> Foam::injectorType::New Foam::autoPtr<Foam::injectorType>
Foam::injectorType::New
( (
const Time& t, const Time& t,
const dictionary& dict const dictionary& dict
) )
{ {
word injectorTypeName(dict.lookup("injectorType")); const word modelType
(
dict.lookup("injectorType")
);
Info<< "Selecting injectorType " << injectorTypeName << endl; Info<< "Selecting injectorType " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(injectorTypeName); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("injectorType::New(const dictionary&)") FatalErrorIn("injectorType::New(const dictionary&)")
<< "Unknown injectorType type " << "Unknown injectorType type "
<< injectorTypeName << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid injectorTypes are:" << nl
<< " Valid injector types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -51,7 +51,6 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::spray::spray Foam::spray::spray
( (
const volVectorField& U, const volVectorField& U,
@ -340,8 +339,8 @@ Foam::spray::spray
Info<< specieName << endl; Info<< specieName << endl;
} }
FatalError<< FatalError
"The liquid component " << liquidName << "The liquid component " << liquidName
<< " does not exist in the species composition.Y() list.\n" << " does not exist in the species composition.Y() list.\n"
<< "(Probably not defined in <chem.inp>)" << "(Probably not defined in <chem.inp>)"
<< abort(FatalError); << abort(FatalError);

View File

@ -28,47 +28,40 @@ License
#include "LISA.H" #include "LISA.H"
#include "noAtomization.H" #include "noAtomization.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<atomizationModel> atomizationModel::New Foam::autoPtr<Foam::atomizationModel>
Foam::atomizationModel::New
( (
const dictionary& dict, const dictionary& dict,
spray& sm spray& sm
) )
{ {
word atomizationModelType const word modelType
( (
dict.lookup("atomizationModel") dict.lookup("atomizationModel")
); );
Info<< "Selecting atomizationModel " Info<< "Selecting atomizationModel " << modelType << endl;
<< atomizationModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(atomizationModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "atomizationModel::New(const dictionary&, const spray&) : " << endl (
<< " unknown atomizationModelType type " "atomizationModel::New(const dictionary&, const spray&)"
<< atomizationModelType ) << "Unknown atomizationModel type "
<< ", constructor not in hash table" << endl << endl << modelType << nl << nl
<< " Valid atomizationModel types are :" << endl; << "Valid atomizationModel types are :" << endl
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
} }
return autoPtr<atomizationModel>(cstrIter()(dict, sm)); return autoPtr<atomizationModel>(cstrIter()(dict, sm));
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -29,41 +29,37 @@ License
#include "reitzDiwakar.H" #include "reitzDiwakar.H"
#include "reitzKHRT.H" #include "reitzKHRT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<breakupModel> breakupModel::New Foam::autoPtr<Foam::breakupModel>
Foam::breakupModel::New
( (
const dictionary& dict, const dictionary& dict,
spray& sm spray& sm
) )
{ {
word breakupModelType(dict.lookup("breakupModel")); const word modelType
(
dict.lookup("breakupModel")
);
Info<< "Selecting breakupModel " << breakupModelType << endl; Info<< "Selecting breakupModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(breakupModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("breakupModel::New(const dictionary&, const spray&)") FatalErrorIn("breakupModel::New(const dictionary&, const spray&)")
<< " unknown breakupModelType type " << breakupModelType << "Unknown breakupModel type "
<< ", constructor not in hash table" << nl << nl << modelType << nl << nl
<< " Valid breakupModel types are :" << nl << "Valid breakupModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
} }
return autoPtr<breakupModel>(cstrIter()(dict, sm)); return autoPtr<breakupModel>(cstrIter()(dict, sm));
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -30,43 +30,36 @@ License
#include "ORourkeCollisionModel.H" #include "ORourkeCollisionModel.H"
#include "trajectoryModel.H" #include "trajectoryModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<collisionModel> collisionModel::New Foam::autoPtr<Foam::collisionModel>
Foam::collisionModel::New
( (
const dictionary& dict, const dictionary& dict,
spray& sm, spray& sm,
Random& rndGen Random& rndGen
) )
{ {
word collisionModelType const word modelType
( (
dict.lookup("collisionModel") dict.lookup("collisionModel")
); );
Info<< "Selecting collisionModel " Info<< "Selecting collisionModel " << modelType << endl;
<< collisionModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(collisionModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "collisionModel::New(const dictionary&, const spray&) : " (
<< endl "collisionModel::New(const dictionary&, const spray&)"
<< " unknown collisionModelType type " ) << "Unknown collisionModel type "
<< collisionModelType << modelType << nl << nl
<< ", constructor not in hash table" << endl << endl << "Valid collisionModel types are :" << nl
<< " Valid collisionModel types are :" << dictionaryConstructorTablePtr_->sortedToc()
<< endl;
Info<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError); << abort(FatalError);
} }
@ -74,8 +67,4 @@ autoPtr<collisionModel> collisionModel::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -28,48 +28,39 @@ License
#include "dispersionModel.H" #include "dispersionModel.H"
#include "noDispersion.H" #include "noDispersion.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<dispersionModel> dispersionModel::New Foam::autoPtr<Foam::dispersionModel>
Foam::dispersionModel::New
( (
const dictionary& dict, const dictionary& dict,
spray& sm spray& sm
) )
{ {
word dispersionModelType const word modelType
( (
dict.lookup("dispersionModel") dict.lookup("dispersionModel")
); );
Info<< "Selecting dispersionModel " Info<< "Selecting dispersionModel " << modelType << endl;
<< dispersionModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(dispersionModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalError FatalErrorIn
<< "dispersionModel::New(const dictionary&, const spray&) : " (
<< endl "dispersionModel::New(const dictionary&, const spray&)"
<< " unknown dispersionModelType type " ) << "Unknown dispersionModel type "
<< dispersionModelType << modelType << nl << nl
<< ", constructor not in hash table" << endl << endl << "Valid dispersionModel types are :" << endl
<< " Valid dispersionModel types are :" << endl; << dictionaryConstructorTablePtr_->sortedToc()
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); << abort(FatalError);
} }
return autoPtr<dispersionModel>(cstrIter()(dict, sm)); return autoPtr<dispersionModel>(cstrIter()(dict, sm));
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -30,27 +30,25 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam Foam::autoPtr<Foam::dragModel>
Foam::dragModel::New(const dictionary& dict)
{ {
const word modelType
(
dict.lookup("dragModel")
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "Selecting dragModel " << modelType << endl;
autoPtr<dragModel> dragModel::New(const dictionary& dict)
{
word dragModelType(dict.lookup("dragModel"));
Info<< "Selecting dragModel "
<< dragModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(dragModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("dragModel::New(const dictionary&)") FatalErrorIn("dragModel::New(const dictionary&)")
<< "Unknown dragModelType type " << dragModelType << "Unknown dragModel type "
<< ", constructor not in hash table" << nl << nl << modelType << nl << nl
<< " Valid dragModel types are:" << nl << "Valid dragModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError); << abort(FatalError);
} }
@ -59,8 +57,4 @@ autoPtr<dragModel> dragModel::New(const dictionary& dict)
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -34,7 +34,10 @@ License
Foam::autoPtr<Foam::evaporationModel> Foam::autoPtr<Foam::evaporationModel>
Foam::evaporationModel::New(const dictionary& dict) Foam::evaporationModel::New(const dictionary& dict)
{ {
word modelType(dict.lookup("evaporationModel")); const word modelType
(
dict.lookup("evaporationModel")
);
Info<< "Selecting evaporationModel " << modelType << endl; Info<< "Selecting evaporationModel " << modelType << endl;
@ -44,9 +47,8 @@ Foam::evaporationModel::New(const dictionary& dict)
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("evaporationModel::New(const dictionary&)") FatalErrorIn("evaporationModel::New(const dictionary&)")
<< "Unknown evaporationModelType type " << modelType << "Unknown evaporationModel type "
<< ", constructor not in hash table" << nl << nl << modelType << nl << nl
<< " Valid evaporationModel types are: " << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -28,32 +28,31 @@ License
#include "heatTransferModel.H" #include "heatTransferModel.H"
#include "noHeatTransfer.H" #include "noHeatTransfer.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
autoPtr<heatTransferModel> heatTransferModel::New Foam::autoPtr<Foam::heatTransferModel>
Foam::heatTransferModel::New
( (
const dictionary& dict const dictionary& dict
) )
{ {
word heatTransferModelType(dict.lookup("heatTransferModel")); const word modelType
(
dict.lookup("heatTransferModel")
);
Info<< "Selecting heatTransferModel " << heatTransferModelType << endl; Info<< "Selecting heatTransferModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(heatTransferModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("heatTransferModel::New(const dictionary&)") FatalErrorIn("heatTransferModel::New(const dictionary&)")
<< "Unknown heatTransferModelType type " << "Unknown heatTransferModel type "
<< heatTransferModelType << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid heatTransferModel types are:" << nl
<< " Valid heatTransferModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError); << abort(FatalError);
} }
@ -62,8 +61,4 @@ autoPtr<heatTransferModel> heatTransferModel::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -65,7 +65,8 @@ Foam::ChomiakInjector::ChomiakInjector
if (sm.injectors().size() != maxSprayAngle_.size()) if (sm.injectors().size() != maxSprayAngle_.size())
{ {
FatalError << "ChomiakInjector::ChomiakInjector" FatalError
<< "ChomiakInjector::ChomiakInjector"
<< "(const dictionary& dict, spray& sm)\n" << "(const dictionary& dict, spray& sm)\n"
<< "Wrong number of entries in maxSprayAngle" << "Wrong number of entries in maxSprayAngle"
<< abort(FatalError); << abort(FatalError);

View File

@ -68,7 +68,8 @@ Foam::blobsSwirlInjector::blobsSwirlInjector
if (sm.injectors().size() != coneAngle_.size()) if (sm.injectors().size() != coneAngle_.size())
{ {
FatalError << "blobsSwirlInjector::blobsSwirlInjector" FatalError
<< "blobsSwirlInjector::blobsSwirlInjector"
<< "(const dictionary& dict, spray& sm)\n" << "(const dictionary& dict, spray& sm)\n"
<< "Wrong number of entries in innerAngle" << "Wrong number of entries in innerAngle"
<< abort(FatalError); << abort(FatalError);

View File

@ -28,33 +28,32 @@ License
#include "injectorModel.H" #include "injectorModel.H"
#include "volFields.H" #include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
autoPtr<injectorModel> injectorModel::New Foam::autoPtr<Foam::injectorModel>
Foam::injectorModel::New
( (
const dictionary& dict, const dictionary& dict,
spray& sm spray& sm
) )
{ {
word injectorModelType(dict.lookup("injectorModel")); const word modelType
(
dict.lookup("injectorModel")
);
Info<< "Selecting injectorModel " Info<< "Selecting injectorModel " << modelType << endl;
<< injectorModelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(injectorModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("injectorModel::New(const dictionary&, spray&)") FatalErrorIn("injectorModel::New(const dictionary&, spray&)")
<< "Unknown injectorModelType type " << injectorModelType << "Unknown injectorModel type "
<< ", constructor not in hash table" << nl << nl << modelType << nl << nl
<< " Valid injectorModel types are:" << nl << "Valid injectorModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError); << abort(FatalError);
} }
@ -63,8 +62,4 @@ autoPtr<injectorModel> injectorModel::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -27,33 +27,32 @@ License
#include "wallModel.H" #include "wallModel.H"
#include "removeParcel.H" #include "removeParcel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<wallModel> wallModel::New Foam::autoPtr<Foam::wallModel>
Foam::wallModel::New
( (
const dictionary& dict, const dictionary& dict,
const volVectorField& U, const volVectorField& U,
spray& sm spray& sm
) )
{ {
word wallModelType(dict.lookup("wallModel")); const word modelType
(
dict.lookup("wallModel")
);
Info<< "Selecting wallModel " << wallModelType << endl; Info<< "Selecting wallModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(wallModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("wallModel::New(const dictionary&, const spray&)") FatalErrorIn("wallModel::New(const dictionary&, const spray&)")
<< "Unknown wallModelType type " << wallModelType << "Unknown wallModel type "
<< ", constructor not in hash table" << nl << nl << modelType << nl << nl
<< " Valid wallModel types are:" << nl << "Valid wallModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError); << abort(FatalError);
} }
@ -62,8 +61,4 @@ autoPtr<wallModel> wallModel::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -35,14 +35,15 @@ Foam::BinaryCollisionModel<CloudType>::New
CloudType& owner CloudType& owner
) )
{ {
word BinaryCollisionModelType(dict.lookup("BinaryCollisionModel")); const word modelType
(
dict.lookup("BinaryCollisionModel")
);
Info<< "Selecting BinaryCollisionModel " Info<< "Selecting BinaryCollisionModel " << modelType << endl;
<< BinaryCollisionModelType
<< endl;
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(BinaryCollisionModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -51,11 +52,11 @@ Foam::BinaryCollisionModel<CloudType>::New
"BinaryCollisionModel<CloudType>::New" "BinaryCollisionModel<CloudType>::New"
"(const dictionary&, CloudType&)" "(const dictionary&, CloudType&)"
) )
<< "Unknown BinaryCollisionModelType type " << "Unknown BinaryCollisionModel type "
<< BinaryCollisionModelType << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid BinaryCollisionModel types are:" << nl
<< " Valid BinaryCollisionModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc()
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); << exit(FatalError);
} }
return autoPtr<BinaryCollisionModel<CloudType> > return autoPtr<BinaryCollisionModel<CloudType> >

View File

@ -35,12 +35,15 @@ Foam::InflowBoundaryModel<CloudType>::New
CloudType& owner CloudType& owner
) )
{ {
word InflowBoundaryModelType(dict.lookup("InflowBoundaryModel")); const word modelType
(
dict.lookup("InflowBoundaryModel")
);
Info<< "Selecting InflowBoundaryModel " << InflowBoundaryModelType << endl; Info<< "Selecting InflowBoundaryModel " << modelType << endl;
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(InflowBoundaryModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -48,11 +51,11 @@ Foam::InflowBoundaryModel<CloudType>::New
( (
"InflowBoundaryModel<CloudType>::New" "InflowBoundaryModel<CloudType>::New"
"(const dictionary&, CloudType&)" "(const dictionary&, CloudType&)"
) << "Unknown InflowBoundaryModelType type " ) << "Unknown InflowBoundaryModel type "
<< InflowBoundaryModelType << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid InflowBoundaryModel types are:" << nl
<< " Valid InflowBoundaryModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc()
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); << exit(FatalError);
} }
return autoPtr<InflowBoundaryModel<CloudType> >(cstrIter()(dict, owner)); return autoPtr<InflowBoundaryModel<CloudType> >(cstrIter()(dict, owner));

View File

@ -35,13 +35,15 @@ Foam::WallInteractionModel<CloudType>::New
CloudType& owner CloudType& owner
) )
{ {
word WallInteractionModelType(dict.lookup("WallInteractionModel")); const word modelType
(
dict.lookup("WallInteractionModel")
);
Info<< "Selecting WallInteractionModel " << WallInteractionModelType Info<< "Selecting WallInteractionModel " << modelType << endl;
<< endl;
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(WallInteractionModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -50,11 +52,11 @@ Foam::WallInteractionModel<CloudType>::New
"WallInteractionModel<CloudType>::New" "WallInteractionModel<CloudType>::New"
"(const dictionary&, CloudType&)" "(const dictionary&, CloudType&)"
) )
<< "Unknown WallInteractionModelType type " << "Unknown WallInteractionModel type "
<< WallInteractionModelType << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid WallInteractionModel types are:" << nl
<< " Valid WallInteractionModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc()
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); << exit(FatalError);
} }
return autoPtr<WallInteractionModel<CloudType> >(cstrIter()(dict, owner)); return autoPtr<WallInteractionModel<CloudType> >(cstrIter()(dict, owner));

View File

@ -28,7 +28,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::autoPtr<Foam::DataEntry<Type> > Foam::DataEntry<Type>::New Foam::autoPtr< Foam::DataEntry<Type> >
Foam::DataEntry<Type>::New
( (
const word& entryName, const word& entryName,
const dictionary& dict const dictionary& dict
@ -43,10 +44,13 @@ Foam::autoPtr<Foam::DataEntry<Type> > Foam::DataEntry<Type>::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn("DataEntry<Type>::New(Istream&)") FatalErrorIn
<< "Unknown DataEntry type " << DataEntryType << " for DataEntry " (
<< entryName << ". Constructor not in hash table" << nl << nl "DataEntry<Type>::New(Istream&)"
<< " Valid DataEntry types are:" << nl ) << "Unknown DataEntry type "
<< DataEntryType << " for DataEntry "
<< entryName << nl << nl
<< "Valid DataEntry types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << nl << dictionaryConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -35,12 +35,15 @@ Foam::DispersionModel<CloudType>::New
CloudType& owner CloudType& owner
) )
{ {
word DispersionModelType(dict.lookup("DispersionModel")); const word modelType
(
dict.lookup("DispersionModel")
);
Info<< "Selecting DispersionModel " << DispersionModelType << endl; Info<< "Selecting DispersionModel " << modelType << endl;
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(DispersionModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -51,11 +54,11 @@ Foam::DispersionModel<CloudType>::New
"const dictionary&, " "const dictionary&, "
"CloudType&" "CloudType&"
")" ")"
) << "Unknown DispersionModelType type " ) << "Unknown DispersionModel type "
<< DispersionModelType << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid DispersionModel types are:" << nl
<< " Valid DispersionModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc()
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); << exit(FatalError);
} }
return autoPtr<DispersionModel<CloudType> >(cstrIter()(dict, owner)); return autoPtr<DispersionModel<CloudType> >(cstrIter()(dict, owner));

View File

@ -28,18 +28,22 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class CloudType> template<class CloudType>
Foam::autoPtr<Foam::DragModel<CloudType> > Foam::DragModel<CloudType>::New Foam::autoPtr<Foam::DragModel<CloudType> >
Foam::DragModel<CloudType>::New
( (
const dictionary& dict, const dictionary& dict,
CloudType& owner CloudType& owner
) )
{ {
word DragModelType(dict.lookup("DragModel")); const word modelType
(
dict.lookup("DragModel")
);
Info<< "Selecting DragModel " << DragModelType << endl; Info<< "Selecting DragModel " << modelType << endl;
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(DragModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -50,10 +54,9 @@ Foam::autoPtr<Foam::DragModel<CloudType> > Foam::DragModel<CloudType>::New
"const dictionary&," "const dictionary&,"
"CloudType&" "CloudType&"
")" ")"
) << "Unknown DragModelType type " ) << "Unknown DragModel type "
<< DragModelType << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid DragModel types are:" << nl
<< " Valid DragModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -319,7 +319,7 @@ Foam::InjectionModel<CloudType>::InjectionModel
Info<< " Constructing " << owner.mesh().nGeometricD() << "-D injection" Info<< " Constructing " << owner.mesh().nGeometricD() << "-D injection"
<< endl; << endl;
word parcelBasisType = coeffDict_.lookup("parcelBasisType"); const word parcelBasisType = coeffDict_.lookup("parcelBasisType");
if (parcelBasisType == "mass") if (parcelBasisType == "mass")
{ {
parcelBasis_ = pbMass; parcelBasis_ = pbMass;

View File

@ -35,12 +35,15 @@ Foam::InjectionModel<CloudType>::New
CloudType& owner CloudType& owner
) )
{ {
word InjectionModelType(dict.lookup("InjectionModel")); const word modelType
(
dict.lookup("InjectionModel")
);
Info<< "Selecting InjectionModel " << InjectionModelType << endl; Info<< "Selecting InjectionModel " << modelType << endl;
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(InjectionModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -51,10 +54,9 @@ Foam::InjectionModel<CloudType>::New
"const dictionary&, " "const dictionary&, "
"CloudType&" "CloudType&"
")" ")"
) << "Unknown InjectionModelType type " ) << "Unknown InjectionModel type "
<< InjectionModelType << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid InjectionModel types are:" << nl
<< " Valid InjectionModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
} }

View File

@ -35,13 +35,15 @@ Foam::PatchInteractionModel<CloudType>::New
CloudType& owner CloudType& owner
) )
{ {
word PatchInteractionModelType(dict.lookup("PatchInteractionModel")); const word modelType
(
dict.lookup("PatchInteractionModel")
);
Info<< "Selecting PatchInteractionModel " << PatchInteractionModelType Info<< "Selecting PatchInteractionModel " << modelType << endl;
<< endl;
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(PatchInteractionModelType); dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -52,11 +54,11 @@ Foam::PatchInteractionModel<CloudType>::New
"const dictionary&, " "const dictionary&, "
"CloudType&" "CloudType&"
")" ")"
) << "Unknown PatchInteractionModelType type " ) << "Unknown PatchInteractionModel type "
<< PatchInteractionModelType << modelType << nl << nl
<< ", constructor not in hash table" << nl << nl << "Valid PatchInteractionModel types are:" << nl
<< " Valid PatchInteractionModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc()
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); << exit(FatalError);
} }
return autoPtr<PatchInteractionModel<CloudType> >(cstrIter()(dict, owner)); return autoPtr<PatchInteractionModel<CloudType> >(cstrIter()(dict, owner));

Some files were not shown because too many files have changed in this diff Show More