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 compressible::RASModel& turbulence,
@ -36,12 +37,15 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
const surfaceScalarField& phi
)
{
word PDRDragModelTypeName = PDRProperties.lookup("PDRDragModel");
const word modelType
(
PDRProperties.lookup("PDRDragModel")
);
Info<< "Selecting flame-wrinkling model " << PDRDragModelTypeName << endl;
Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(PDRDragModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -49,7 +53,7 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
(
"PDRDragModel::New"
) << "Unknown PDRDragModel type "
<< PDRDragModelTypeName << endl << endl
<< modelType << nl << nl
<< "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< 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 hhuCombustionThermo& thermo,
@ -35,12 +36,15 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
const volScalarField& Su
)
{
word XiEqModelTypeName = XiEqProperties.lookup("XiEqModel");
const word modelType
(
XiEqProperties.lookup("XiEqModel")
);
Info<< "Selecting flame-wrinkling model " << XiEqModelTypeName << endl;
Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(XiEqModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -53,8 +57,8 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
" const volScalarField& Su"
")"
) << "Unknown XiEqModel type "
<< XiEqModelTypeName << endl << endl
<< "Valid XiEqModels are : " << endl
<< modelType << nl << nl
<< "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}

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

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -64,7 +64,8 @@ Foam::CLASSNAME::CLASSNAME(const CLASSNAME&)
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::CLASSNAME> Foam::CLASSNAME::New()
Foam::autoPtr<Foam::CLASSNAME>
Foam::CLASSNAME::New()
{
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::ODE& ode
@ -44,8 +45,8 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
(
"ODESolver::New(const word& ODESolverTypeName, const ODE& ode)"
) << "Unknown ODESolver type "
<< ODESolverTypeName << endl << endl
<< "Valid ODESolvers are : " << endl
<< ODESolverTypeName << nl << nl
<< "Valid ODESolvers are : " << endl
<< ODEConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}

View File

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

View File

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

View File

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

View File

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

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));
}

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&)");

View File

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

View File

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

View File

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

View File

@ -28,19 +28,18 @@ License
#include "IOmanip.H"
#include "Pair.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(graph::writer, 0);
defineRunTimeSelectionTable(graph::writer, word);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(graph::writer, 0);
defineRunTimeSelectionTable(graph::writer, word);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void graph::readCurves(Istream& is)
void Foam::graph::readCurves(Istream& is)
{
List<xy> xyData(is);
@ -59,7 +58,7 @@ void graph::readCurves(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
graph::graph
Foam::graph::graph
(
const string& title,
const string& xName,
@ -74,7 +73,7 @@ graph::graph
{}
graph::graph
Foam::graph::graph
(
const string& title,
const string& xName,
@ -92,7 +91,7 @@ graph::graph
}
graph::graph
Foam::graph::graph
(
const string& title,
const string& xName,
@ -108,7 +107,7 @@ graph::graph
}
graph::graph(Istream& is)
Foam::graph::graph(Istream& is)
:
title_(is),
xName_(is),
@ -118,7 +117,7 @@ graph::graph(Istream& is)
}
const scalarField& graph::y() const
const Foam::scalarField& Foam::graph::y() const
{
if (size() != 1)
{
@ -130,7 +129,8 @@ const scalarField& graph::y() const
return *begin()();
}
scalarField& graph::y()
Foam::scalarField& Foam::graph::y()
{
if (size() != 1)
{
@ -143,7 +143,8 @@ scalarField& graph::y()
}
autoPtr<graph::writer> graph::writer::New(const word& graphFormat)
Foam::autoPtr<Foam::graph::writer>
Foam::graph::writer::New(const word& graphFormat)
{
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& y,
@ -187,7 +188,7 @@ void graph::writer::writeXY
}
void graph::writeTable(Ostream& os) const
void Foam::graph::writeTable(Ostream& os) const
{
forAll(x_, xi)
{
@ -202,13 +203,13 @@ void graph::writeTable(Ostream& os) const
}
void graph::write(Ostream& os, const word& format) const
void Foam::graph::write(Ostream& os, const word& format) const
{
writer::New(format)().write(*this, os);
}
void graph::write(const fileName& fName, const word& format) const
void Foam::graph::write(const fileName& fName, const word& format) const
{
autoPtr<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);
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"
"(const lduInterfaceField&, const scalarField&"
) << "unknown lduInterface type " << interface.interface().type()
) << "Unknown lduInterface type "
<< interface.interface().type()
<< 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 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 lduMatrix& matrix,
@ -47,7 +48,7 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
const dictionary& solverControls
)
{
word name(solverControls.lookup("solver"));
const word name(solverControls.lookup("solver"));
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
(
@ -157,7 +157,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
)
)
{
word agglomeratorType(controlDict.lookup("agglomerator"));
const word agglomeratorType(controlDict.lookup("agglomerator"));
dlLibraryTable::open
(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -25,27 +25,19 @@ License
#include "SRFModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace SRF
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<SRFModel> SRFModel::New
Foam::autoPtr<Foam::SRF::SRFModel>
Foam::SRF::SRFModel::New
(
const volVectorField& Urel
)
{
word SRFModelTypeName;
// Enclose the creation of the SRFPropertiesDict to ensure it is
// deleted before the SRFModel is created - otherwise the dictionary
// is entered in the database twice
{
IOdictionary SRFPropertiesDict
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
@ -53,25 +45,24 @@ autoPtr<SRFModel> SRFModel::New
Urel.time().constant(),
Urel.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE
IOobject::NO_WRITE,
false
)
);
).lookup("SRFModel")
);
SRFPropertiesDict.lookup("SRFModel") >> SRFModelTypeName;
}
Info<< "Selecting SRFModel " << SRFModelTypeName << endl;
Info<< "Selecting SRFModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(SRFModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"SRFModel::New(const fvMesh&)"
) << "Unknown SRFModel type " << SRFModelTypeName
<< nl << nl
) << "Unknown SRFModel type "
<< modelType << nl << nl
<< "Valid SRFModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
@ -81,9 +72,4 @@ autoPtr<SRFModel> 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&, "
"const DimensionedField<Type, volMesh>&)"
) << "Unknown patchTypefield type " << patchFieldType
<< endl << endl
) << "Unknown patchField type "
<< patchFieldType << nl << nl
<< "Valid patchField types are :" << endl
<< patchConstructorTablePtr_->sortedToc()
<< exit(FatalError);
@ -104,7 +104,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
const dictionary& dict
)
{
word patchFieldType(dict.lookup("type"));
const word patchFieldType(dict.lookup("type"));
if (debug)
{
@ -133,7 +133,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
"const dictionary&)",
dict
) << "Unknown patchField type " << patchFieldType
<< " for patch type " << p.type() << endl << endl
<< " for patch type " << p.type() << nl << nl
<< "Valid patchField types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
@ -200,7 +200,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
"fvPatchField<Type>::New(const fvPatchField<Type>&, "
"const fvPatch&, const DimensionedField<Type, volMesh>&, "
"const fvPatchFieldMapper&)"
) << "unknown patchTypefield type " << ptf.type() << endl << endl
) << "Unknown patchField type " << ptf.type() << nl << nl
<< "Valid patchField types are :" << endl
<< patchMapperConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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