Merge branch 'olesenm'

This commit is contained in:
andy
2010-04-23 14:40:48 +01:00
308 changed files with 1508 additions and 1812 deletions

View File

@ -36,12 +36,12 @@ 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 +49,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

@ -29,18 +29,18 @@ License
Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
( (
const dictionary& XiEqProperties, const dictionary& propDict,
const hhuCombustionThermo& thermo, const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence, const compressible::RASModel& turbulence,
const volScalarField& Su const volScalarField& Su
) )
{ {
word XiEqModelTypeName = XiEqProperties.lookup("XiEqModel"); const word modelType(propDict.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,14 +53,13 @@ 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);
} }
return autoPtr<XiEqModel> return autoPtr<XiEqModel>(cstrIter()(propDict, thermo, turbulence, Su));
(cstrIter()(XiEqProperties, thermo, turbulence, Su));
} }

View File

@ -29,18 +29,18 @@ License
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
( (
const dictionary& XiGProperties, const dictionary& propDict,
const hhuCombustionThermo& thermo, const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence, const compressible::RASModel& turbulence,
const volScalarField& Su const volScalarField& Su
) )
{ {
word XiGModelTypeName = XiGProperties.lookup("XiGModel"); const word modelType(propDict.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,14 +53,13 @@ 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);
} }
return autoPtr<XiGModel> return autoPtr<XiGModel>(cstrIter()(propDict, thermo, turbulence, Su));
(cstrIter()(XiGProperties, thermo, turbulence, Su));
} }

View File

@ -29,7 +29,7 @@ License
Foam::autoPtr<Foam::XiModel> Foam::XiModel::New Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
( (
const dictionary& XiProperties, const dictionary& propDict,
const hhuCombustionThermo& thermo, const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence, const compressible::RASModel& turbulence,
const volScalarField& Su, const volScalarField& Su,
@ -38,12 +38,12 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
const surfaceScalarField& phi const surfaceScalarField& phi
) )
{ {
word XiModelTypeName = XiProperties.lookup("XiModel"); const word modelType(propDict.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,14 +51,14 @@ 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);
} }
return autoPtr<XiModel> return autoPtr<XiModel>
(cstrIter()(XiProperties, thermo, turbulence, Su, rho, b, phi)); (cstrIter()(propDict, thermo, turbulence, Su, rho, b, phi));
} }

View File

@ -29,22 +29,19 @@ License
Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
( (
const dictionary& combustionProperties, const dictionary& propDict,
const hsCombustionThermo& thermo, const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence, const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const volScalarField& rho const volScalarField& rho
) )
{ {
word combustionModelTypeName = combustionProperties.lookup const word modelType(propDict.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,14 +49,14 @@ 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);
} }
return autoPtr<combustionModel> return autoPtr<combustionModel>
(cstrIter()(combustionProperties, thermo, turbulence, phi, rho)); (cstrIter()(propDict, thermo, turbulence, phi, rho));
} }

View File

@ -71,9 +71,9 @@ IOdictionary combustionProperties
); );
Info<< "Creating combustion model\n" << endl; Info<< "Creating combustion model\n" << endl;
autoPtr<combustionModel::combustionModel> combustion autoPtr<combustionModel> combustion
( (
combustionModel::combustionModel::New combustionModel::New
( (
combustionProperties, combustionProperties,
thermo, thermo,

View File

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
autoPtr<Foam::motionSolver> motionPtr = motionSolver::New(mesh); autoPtr<motionSolver> motionPtr = motionSolver::New(mesh);
while (runTime.loop()) while (runTime.loop())
{ {

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 mixtureType
(
IOdictionary
( (
IOobject IOobject
( (
@ -47,19 +50,13 @@ Foam::phaseChangeTwoPhaseMixture::New
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )
).lookup("phaseChangeTwoPhaseMixture")
); );
word phaseChangeTwoPhaseMixtureTypeName Info<< "Selecting phaseChange model " << mixtureType << endl;
(
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
);
Info<< "Selecting phaseChange model "
<< phaseChangeTwoPhaseMixtureTypeName << endl;
componentsConstructorTable::iterator cstrIter = componentsConstructorTable::iterator cstrIter =
componentsConstructorTablePtr_ componentsConstructorTablePtr_->find(mixtureType);
->find(phaseChangeTwoPhaseMixtureTypeName);
if (cstrIter == componentsConstructorTablePtr_->end()) if (cstrIter == componentsConstructorTablePtr_->end())
{ {
@ -67,8 +64,8 @@ Foam::phaseChangeTwoPhaseMixture::New
( (
"phaseChangeTwoPhaseMixture::New" "phaseChangeTwoPhaseMixture::New"
) << "Unknown phaseChangeTwoPhaseMixture type " ) << "Unknown phaseChangeTwoPhaseMixture type "
<< phaseChangeTwoPhaseMixtureTypeName << endl << endl << mixtureType << 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

@ -35,28 +35,24 @@ 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())
);
Info<< "Selecting dragModel for phase " Info<< "Selecting dragModel for phase " << phasea.name()
<< phasea.name() << ": " << modelType << endl;
<< ": "
<< dragModelType << 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

@ -32,23 +32,23 @@ 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

@ -32,23 +32,24 @@ 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

@ -32,23 +32,23 @@ 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

@ -32,23 +32,24 @@ 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,23 @@ 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

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

View File

@ -32,19 +32,20 @@ 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 "
<< modelType << nl << nl
<< "Valid extrudeModel types are :" << nl << "Valid extrudeModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << nl << dictionaryConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError); << exit(FatalError);
@ -55,4 +56,3 @@ Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New
// ************************************************************************* // // ************************************************************************* //

View File

@ -233,7 +233,7 @@ void Foam::patchPointEdgeCirculator::setCanonical()
//- Step to next edge. //- Step to next edge.
Foam::patchPointEdgeCirculator::patchPointEdgeCirculator& Foam::patchPointEdgeCirculator&
Foam::patchPointEdgeCirculator::operator++() Foam::patchPointEdgeCirculator::operator++()
{ {
if (index_ == -1) if (index_ == -1)

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

@ -43,7 +43,7 @@ int main(int argc, char *argv[])
# include "createTime.H" # include "createTime.H"
# include "createMesh.H" # include "createMesh.H"
autoPtr<Foam::motionSolver> motionPtr = motionSolver::New(mesh); autoPtr<motionSolver> motionPtr = motionSolver::New(mesh);
while (runTime.loop()) while (runTime.loop())
{ {

View File

@ -113,7 +113,7 @@ int main(int argc, char *argv[])
argList::validArgs.clear(); argList::validArgs.clear();
argList::validArgs.append("OBJ file"); argList::validArgs.append("OBJ file");
argList::validArgs.append("output VTK file"); argList::validArgs.append("output VTK file");
argList::argList args(argc, argv); argList args(argc, argv);
const fileName objName = args[1]; const fileName objName = args[1];
const fileName outName = args[2]; const fileName outName = args[2];

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

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
argList::validArgs.append("surface file"); argList::validArgs.append("surface file");
argList::validArgs.append("min length"); argList::validArgs.append("min length");
argList::validArgs.append("output surface file"); argList::validArgs.append("output surface file");
argList::argList args(argc, argv); argList args(argc, argv);
const fileName inFileName = args[1]; const fileName inFileName = args[1];
const scalar minLen = args.argRead<scalar>(2); const scalar minLen = args.argRead<scalar>(2);

View File

@ -50,7 +50,7 @@ int main(int argc, char *argv[])
argList::validArgs.clear(); argList::validArgs.clear();
argList::validArgs.append("surface file"); argList::validArgs.append("surface file");
argList::validArgs.append("output surface file"); argList::validArgs.append("output surface file");
argList::argList args(argc, argv); argList args(argc, argv);
const fileName surfFileName = args[1]; const fileName surfFileName = args[1];
const fileName outFileName = args[2]; const fileName outFileName = args[2];

View File

@ -39,7 +39,7 @@ int main(int argc, char *argv[])
argList::noParallel(); argList::noParallel();
argList::validArgs.clear(); argList::validArgs.clear();
argList::validArgs.append("input file"); argList::validArgs.append("input file");
argList::argList args(argc, argv); argList args(argc, argv);
const fileName surfName = args[1]; const fileName surfName = args[1];

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

@ -137,8 +137,7 @@ case OpenFOAM:
_foamAddPath $gccDir/bin _foamAddPath $gccDir/bin
# 64-bit needs lib64, but 32-bit needs lib (not lib32) # 64-bit needs lib64, but 32-bit needs lib (not lib32)
if ( "$WM_ARCH_OPTION" = 64 ) then if ($WM_ARCH_OPTION == 64) then
then
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH _foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
else else
_foamAddLib $gccDir/lib _foamAddLib $gccDir/lib
@ -150,7 +149,6 @@ case OpenFOAM:
# add in mpc libraries (not need for older gcc) # add in mpc libraries (not need for older gcc)
if ( $?mpc_version ) then if ( $?mpc_version ) then
then
_foamAddLib $mpcDir/lib _foamAddLib $mpcDir/lib
endif endif
@ -209,18 +207,14 @@ case OPENMPI:
breaksw breaksw
case SYSTEMOPENMPI: case SYSTEMOPENMPI:
# This uses the installed openmpi. It needs mpicc installed! # use the system installed openmpi, get library directory via mpicc
set mpi_version=openmpi-system set mpi_version=openmpi-system
set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
setenv PINC `mpicc --showme:compile`
setenv PLIBS `mpicc --showme:link`
set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
if ($?FOAM_VERBOSE && $?prompt) then if ($?FOAM_VERBOSE && $?prompt) then
echo "Using system installed MPI:" echo "Using system installed OpenMPI:"
echo " compile flags : $PINC" echo " compile flags : `mpicc --showme:compile`"
echo " link flags : $PLIBS" echo " link flags : `mpicc --showme:link`"
echo " libmpi dir : $libDir" echo " libmpi dir : $libDir"
endif endif

View File

@ -235,19 +235,15 @@ OPENMPI)
;; ;;
SYSTEMOPENMPI) SYSTEMOPENMPI)
# This uses the installed openmpi. It needs mpicc installed! # use the system installed openmpi, get library directory via mpicc
mpi_version=openmpi-system mpi_version=openmpi-system
libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
export PINC=`mpicc --showme:compile`
export PLIBS=`mpicc --showme:link`
libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
if [ "$FOAM_VERBOSE" -a "$PS1" ] if [ "$FOAM_VERBOSE" -a "$PS1" ]
then then
echo "Using system installed MPI:" echo "Using system installed OpenMPI:"
echo " compile flags : $PINC" echo " compile flags : `mpicc --showme:compile`"
echo " link flags : $PLIBS" echo " link flags : `mpicc --showme:link`"
echo " libmpi dir : $libDir" echo " libmpi dir : $libDir"
fi fi

View File

@ -44,7 +44,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

@ -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

@ -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

@ -50,7 +50,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
const dictionary& functionDict const dictionary& functionDict
) )
{ {
word functionType(functionDict.lookup("type")); const word functionType(functionDict.lookup("type"));
if (debug) if (debug)
{ {

View File

@ -53,8 +53,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);
@ -143,7 +142,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);
@ -219,12 +218,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
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(graph::writer, 0); defineTypeNameAndDebug(graph::writer, 0);
defineRunTimeSelectionTable(graph::writer, word); 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,10 @@ 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 +176,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 +190,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 +205,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 +230,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 +238,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

@ -36,8 +36,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::word Foam::word Foam::lduMatrix::preconditioner::getName
Foam::lduMatrix::preconditioner::getName
( (
const dictionary& solverControls const dictionary& solverControls
) )

View File

@ -47,7 +47,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

@ -118,7 +118,7 @@ void Foam::lduMatrix::solverPerformance::print() const
} }
Foam::lduMatrix::solverPerformance::solverPerformance Foam::max Foam::lduMatrix::solverPerformance Foam::max
( (
const lduMatrix::solverPerformance& sp1, const lduMatrix::solverPerformance& sp1,
const lduMatrix::solverPerformance& sp2 const lduMatrix::solverPerformance& sp2

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

@ -33,7 +33,7 @@ Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New
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 +45,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

@ -36,7 +36,7 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New
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

@ -96,7 +96,7 @@ public:
// pointer // pointer
inline void reset(T* = 0); inline void reset(T* = 0);
//- Delete object and set pointer to NULL, if the pointer is valid. //- Delete object (if the pointer is valid) and set pointer to NULL.
inline void clear(); inline void clear();
@ -108,9 +108,7 @@ public:
//- Return const reference to the object data //- Return const reference to the object data
inline const T& operator()() const; inline const T& operator()() const;
// inline T& operator*(); //- Const cast to the underlying type reference
// inline const T& operator*() const;
inline operator const T&() const; inline operator const T&() const;
//- Return object pointer //- Return object pointer
@ -119,7 +117,7 @@ public:
//- Return const object pointer //- Return const object pointer
inline const T* operator->() const; inline const T* operator->() const;
//- Take over object pointer from parameter //- Take over the object pointer from parameter
inline void operator=(const autoPtr<T>&); inline void operator=(const autoPtr<T>&);
}; };

View File

@ -80,7 +80,7 @@ inline void Foam::autoPtr<T>::set(T* p)
{ {
if (ptr_) if (ptr_)
{ {
FatalErrorIn("void autoPtr<T>::set(T*)") FatalErrorIn("void Foam::autoPtr<T>::set(T*)")
<< "object already allocated" << "object already allocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -115,7 +115,7 @@ inline T& Foam::autoPtr<T>::operator()()
{ {
if (!ptr_) if (!ptr_)
{ {
FatalErrorIn("T& autoPtr<T>::operator()()") FatalErrorIn("T& Foam::autoPtr<T>::operator()()")
<< "object is not allocated" << "object is not allocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -129,7 +129,7 @@ inline const T& Foam::autoPtr<T>::operator()() const
{ {
if (!ptr_) if (!ptr_)
{ {
FatalErrorIn("const T& autoPtr<T>::operator()() const") FatalErrorIn("const T& Foam::autoPtr<T>::operator()() const")
<< "object is not allocated" << "object is not allocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -138,22 +138,6 @@ inline const T& Foam::autoPtr<T>::operator()() const
} }
/*
template<class T>
inline T& Foam::autoPtr<T>::operator*()
{
return operator()();
}
template<class T>
inline const T& Foam::autoPtr<T>::operator*() const
{
return operator()();
}
*/
template<class T> template<class T>
inline Foam::autoPtr<T>::operator const T&() const inline Foam::autoPtr<T>::operator const T&() const
{ {
@ -166,7 +150,7 @@ inline T* Foam::autoPtr<T>::operator->()
{ {
if (!ptr_) if (!ptr_)
{ {
FatalErrorIn("autoPtr<T>::operator->()") FatalErrorIn("Foam::autoPtr<T>::operator->()")
<< "object is not allocated" << "object is not allocated"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -25,7 +25,7 @@ Class
Foam::refCount Foam::refCount
Description Description
Reference counter for tmp\<field\>. Reference counter for various OpenFOAM components.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -62,7 +62,7 @@ class tmp
//- Pointer to temporary object //- Pointer to temporary object
mutable T* ptr_; mutable T* ptr_;
// Const reference to constant object //- Const reference to constant object
const T& ref_; const T& ref_;

View File

@ -60,7 +60,7 @@ inline Foam::tmp<T>::tmp(const tmp<T>& t)
} }
else else
{ {
FatalErrorIn("tmp<T>::tmp(const tmp<T>&)") FatalErrorIn("Foam::tmp<T>::tmp(const tmp<T>&)")
<< "attempted copy of a deallocated temporary" << "attempted copy of a deallocated temporary"
<< abort(FatalError); << abort(FatalError);
} }
@ -116,7 +116,7 @@ inline T* Foam::tmp<T>::ptr() const
{ {
if (!ptr_) if (!ptr_)
{ {
FatalErrorIn("tmp<T>::ptr() const") FatalErrorIn("Foam::tmp<T>::ptr() const")
<< "temporary deallocated" << "temporary deallocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -155,7 +155,7 @@ inline T& Foam::tmp<T>::operator()()
{ {
if (!ptr_) if (!ptr_)
{ {
FatalErrorIn("T& tmp<T>::operator()()") FatalErrorIn("T& Foam::tmp<T>::operator()()")
<< "temporary deallocated" << "temporary deallocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -184,7 +184,7 @@ inline const T& Foam::tmp<T>::operator()() const
{ {
if (!ptr_) if (!ptr_)
{ {
FatalErrorIn("const T& tmp<T>::operator()() const") FatalErrorIn("const T& Foam::tmp<T>::operator()() const")
<< "temporary deallocated" << "temporary deallocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -212,7 +212,7 @@ inline T* Foam::tmp<T>::operator->()
{ {
if (!ptr_) if (!ptr_)
{ {
FatalErrorIn("tmp<T>::operator->()") FatalErrorIn("Foam::tmp<T>::operator->()")
<< "temporary deallocated" << "temporary deallocated"
<< abort(FatalError); << abort(FatalError);
} }
@ -260,14 +260,14 @@ inline void Foam::tmp<T>::operator=(const tmp<T>& t)
} }
else else
{ {
FatalErrorIn("tmp<T>::operator=(const tmp<T>& t)") FatalErrorIn("Foam::tmp<T>::operator=(const tmp<T>&)")
<< "attempted copy of a deallocated temporary" << "attempted copy of a deallocated temporary"
<< abort(FatalError); << abort(FatalError);
} }
} }
else else
{ {
FatalErrorIn("tmp<T>::operator=(const tmp<T>& t)") FatalErrorIn("Foam::tmp<T>::operator=(const tmp<T>&)")
<< "attempted to assign to a const reference to constant object" << "attempted to assign to a const reference to constant object"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -27,12 +27,7 @@ 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 +52,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 +62,4 @@ autoPtr<facePointPatch> facePointPatch::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -55,8 +55,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);
@ -82,7 +82,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 +101,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

@ -43,7 +43,7 @@ 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 +55,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

@ -43,7 +43,7 @@ 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 +55,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

@ -43,7 +43,7 @@ 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 +55,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

@ -1,4 +1,5 @@
include $(RULES)/mplib$(WM_MPLIB) sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
EXE_INC = $(PFLAGS) $(PINC) EXE_INC = $(PFLAGS) $(PINC)
LIB_LIBS = $(PLIBS) LIB_LIBS = $(PLIBS)

View File

@ -1,4 +1,5 @@
include $(RULES)/mplib$(WM_MPLIB) sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
EXE_INC = $(PFLAGS) $(PINC) EXE_INC = $(PFLAGS) $(PINC)
LIB_LIBS = $(PLIBS) LIB_LIBS = $(PLIBS)

View File

@ -128,7 +128,7 @@ Foam::ensightPart::ensightPart(const ensightPart& part)
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 +139,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

@ -31,10 +31,8 @@ License
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 +45,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 +73,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

@ -1078,9 +1078,9 @@ bool Foam::dynamicRefineFvMesh::update()
<< exit(FatalError); << exit(FatalError);
} }
word field(refineDict.lookup("field")); const word fieldName(refineDict.lookup("field"));
const volScalarField& vFld = lookupObject<volScalarField>(field); const volScalarField& vFld = lookupObject<volScalarField>(fieldName);
const scalar lowerRefineLevel = const scalar lowerRefineLevel =
readScalar(refineDict.lookup("lowerRefineLevel")); readScalar(refineDict.lookup("lowerRefineLevel"));

View File

@ -33,14 +33,12 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
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 +50,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,33 @@ License
#include "ListOps.H" #include "ListOps.H"
#include "meshTools.H" #include "meshTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(cellLooper, 0); defineTypeNameAndDebug(cellLooper, 0);
defineRunTimeSelectionTable(cellLooper, word); defineRunTimeSelectionTable(cellLooper, word);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Construct named object from given arguments Foam::autoPtr<Foam::cellLooper> Foam::cellLooper::New
autoPtr<cellLooper> 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 +63,6 @@ autoPtr<cellLooper> cellLooper::New
return autoPtr<cellLooper>(cstrIter()(mesh)); return autoPtr<cellLooper>(cstrIter()(mesh));
} }
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -207,7 +203,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

@ -75,7 +75,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,8 +103,8 @@ 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,9 @@ 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 +44,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 +56,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 +67,4 @@ autoPtr<polyMeshModifier> polyMeshModifier::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -27,8 +27,11 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr< Foam::edgeMesh > Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New
Foam::edgeMesh::New(const fileName& name, const word& ext) (
const fileName& name,
const word& ext
)
{ {
fileExtensionConstructorTable::iterator cstrIter = fileExtensionConstructorTable::iterator cstrIter =
fileExtensionConstructorTablePtr_->find(ext); fileExtensionConstructorTablePtr_->find(ext);
@ -49,8 +52,10 @@ Foam::edgeMesh::New(const fileName& name, const word& ext)
} }
Foam::autoPtr< Foam::edgeMesh > Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New
Foam::edgeMesh::New(const fileName& name) (
const fileName& name
)
{ {
word ext = name.ext(); word ext = name.ext();
if (ext == "gz") if (ext == "gz")

View File

@ -33,13 +33,11 @@ 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 +48,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

@ -187,7 +187,9 @@ $(interpolation)/interpolationCellPointWallModified/cellPointWeightWallModified/
$(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C $(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C
volPointInterpolation = interpolation/volPointInterpolation volPointInterpolation = interpolation/volPointInterpolation
/* $(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C */ /*
$(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C
*/
$(volPointInterpolation)/volPointInterpolation.C $(volPointInterpolation)/volPointInterpolation.C
surfaceInterpolation = interpolation/surfaceInterpolation surfaceInterpolation = interpolation/surfaceInterpolation
@ -305,8 +307,10 @@ $(snGradSchemes)/snGradScheme/snGradSchemes.C
$(snGradSchemes)/correctedSnGrad/correctedSnGrads.C $(snGradSchemes)/correctedSnGrad/correctedSnGrads.C
$(snGradSchemes)/limitedSnGrad/limitedSnGrads.C $(snGradSchemes)/limitedSnGrad/limitedSnGrads.C
$(snGradSchemes)/uncorrectedSnGrad/uncorrectedSnGrads.C $(snGradSchemes)/uncorrectedSnGrad/uncorrectedSnGrads.C
//$(snGradSchemes)/quadraticFitSnGrad/quadraticFitSnGradData.C /*
//$(snGradSchemes)/quadraticFitSnGrad/quadraticFitSnGrads.C $(snGradSchemes)/quadraticFitSnGrad/quadraticFitSnGradData.C
$(snGradSchemes)/quadraticFitSnGrad/quadraticFitSnGrads.C
*/
convectionSchemes = finiteVolume/convectionSchemes convectionSchemes = finiteVolume/convectionSchemes
$(convectionSchemes)/convectionScheme/convectionSchemes.C $(convectionSchemes)/convectionScheme/convectionSchemes.C

View File

@ -25,27 +25,18 @@ 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 +44,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 +71,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

@ -47,7 +47,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

@ -29,16 +29,14 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::autoPtr<Foam::interpolation<Type> > Foam::autoPtr<Foam::interpolation<Type> > Foam::interpolation<Type>::New
Foam::interpolation<Type>::New
( (
const word& interpolationType, const word& interpolationType,
const GeometricField<Type, fvPatchField, volMesh>& psi const GeometricField<Type, fvPatchField, volMesh>& psi
) )
{ {
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_ dictionaryConstructorTablePtr_->find(interpolationType);
->find(interpolationType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
@ -58,8 +56,7 @@ Foam::interpolation<Type>::New
template<class Type> template<class Type>
Foam::autoPtr<Foam::interpolation<Type> > Foam::autoPtr<Foam::interpolation<Type> > Foam::interpolation<Type>::New
Foam::interpolation<Type>::New
( (
const dictionary& interpolationSchemes, const dictionary& interpolationSchemes,
const GeometricField<Type, fvPatchField, volMesh>& psi const GeometricField<Type, fvPatchField, volMesh>& psi

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

@ -221,7 +221,7 @@ Foam::displacementLayeredMotionFvMotionSolver::faceZoneEvaluate
tmp<vectorField> tfld(new vectorField(meshPoints.size())); tmp<vectorField> tfld(new vectorField(meshPoints.size()));
vectorField& fld = tfld(); vectorField& fld = tfld();
const word& type = dict.lookup("type"); const word type(dict.lookup("type"));
if (type == "fixedValue") if (type == "fixedValue")
{ {

View File

@ -30,7 +30,6 @@ License
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(motionDiffusivity, 0); defineTypeNameAndDebug(motionDiffusivity, 0);
defineRunTimeSelectionTable(motionDiffusivity, Istream); defineRunTimeSelectionTable(motionDiffusivity, Istream);
} }
@ -51,12 +50,12 @@ Foam::autoPtr<Foam::motionDiffusivity> Foam::motionDiffusivity::New
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 +63,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

@ -52,20 +52,19 @@ Foam::autoPtr<Foam::injectorType> Foam::injectorType::New
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,36 @@ 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
// ************************************************************************* // // ************************************************************************* //

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