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
)
{
word PDRDragModelTypeName = PDRProperties.lookup("PDRDragModel");
const word modelType(PDRProperties.lookup("PDRDragModel"));
Info<< "Selecting flame-wrinkling model " << PDRDragModelTypeName << endl;
Info<< "Selecting flame-wrinkling model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(PDRDragModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -49,7 +49,7 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
(
"PDRDragModel::New"
) << "Unknown PDRDragModel type "
<< PDRDragModelTypeName << endl << endl
<< modelType << nl << nl
<< "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

@ -29,18 +29,18 @@ License
Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
(
const dictionary& XiEqProperties,
const dictionary& propDict,
const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence,
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 =
dictionaryConstructorTablePtr_->find(XiEqModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -53,14 +53,13 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
" const volScalarField& Su"
")"
) << "Unknown XiEqModel type "
<< XiEqModelTypeName << endl << endl
<< "Valid XiEqModels are : " << endl
<< modelType << nl << nl
<< "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<XiEqModel>
(cstrIter()(XiEqProperties, thermo, turbulence, Su));
return autoPtr<XiEqModel>(cstrIter()(propDict, thermo, turbulence, Su));
}

View File

@ -29,18 +29,18 @@ License
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
(
const dictionary& XiGProperties,
const dictionary& propDict,
const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence,
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 =
dictionaryConstructorTablePtr_->find(XiGModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -53,14 +53,13 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
" const volScalarField& Su"
")"
) << "Unknown XiGModel type "
<< XiGModelTypeName << endl << endl
<< "Valid XiGModels are : " << endl
<< modelType << nl << nl
<< "Valid XiGModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<XiGModel>
(cstrIter()(XiGProperties, thermo, turbulence, Su));
return autoPtr<XiGModel>(cstrIter()(propDict, thermo, turbulence, Su));
}

View File

@ -29,7 +29,7 @@ License
Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
(
const dictionary& XiProperties,
const dictionary& propDict,
const hhuCombustionThermo& thermo,
const compressible::RASModel& turbulence,
const volScalarField& Su,
@ -38,12 +38,12 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
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 =
dictionaryConstructorTablePtr_->find(XiModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -51,14 +51,14 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
(
"XiModel::New"
) << "Unknown XiModel type "
<< XiModelTypeName << endl << endl
<< "Valid XiModels are : " << endl
<< modelType << nl << nl
<< "Valid XiModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
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
(
const dictionary& combustionProperties,
const dictionary& propDict,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
)
{
word combustionModelTypeName = combustionProperties.lookup
(
"combustionModel"
);
const word modelType(propDict.lookup("combustionModel"));
Info<< "Selecting combustion model " << combustionModelTypeName << endl;
Info<< "Selecting combustion model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(combustionModelTypeName);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -52,14 +49,14 @@ Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
(
"combustionModel::New"
) << "Unknown combustionModel type "
<< combustionModelTypeName << endl << endl
<< "Valid combustionModels are : " << endl
<< modelType << nl << nl
<< "Valid combustionModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< exit(FatalError);
}
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;
autoPtr<combustionModel::combustionModel> combustion
autoPtr<combustionModel> combustion
(
combustionModel::combustionModel::New
combustionModel::New
(
combustionProperties,
thermo,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -137,8 +137,7 @@ case OpenFOAM:
_foamAddPath $gccDir/bin
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
if ( "$WM_ARCH_OPTION" = 64 ) then
then
if ($WM_ARCH_OPTION == 64) then
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
else
_foamAddLib $gccDir/lib
@ -150,7 +149,6 @@ case OpenFOAM:
# add in mpc libraries (not need for older gcc)
if ( $?mpc_version ) then
then
_foamAddLib $mpcDir/lib
endif
@ -209,18 +207,14 @@ case OPENMPI:
breaksw
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 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/'`
set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using system installed MPI:"
echo " compile flags : $PINC"
echo " link flags : $PLIBS"
echo "Using system installed OpenMPI:"
echo " compile flags : `mpicc --showme:compile`"
echo " link flags : `mpicc --showme:link`"
echo " libmpi dir : $libDir"
endif

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -53,8 +53,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
"PointPatchField<Type>::New"
"(const word&, const word&, const pointPatch&, const Field<Type>&)"
) << "Unknown patchFieldType type "
<< patchFieldType
<< endl << endl
<< patchFieldType << nl << nl
<< "Valid patchField types are :" << endl
<< pointPatchConstructorTablePtr_->sortedToc()
<< exit(FatalError);
@ -143,7 +142,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
"New(const pointPatch&, const Field<Type>&, const dictionary&)",
dict
) << "Unknown patchField type " << patchFieldType
<< " for patch type " << p.type() << endl << endl
<< " for patch type " << p.type() << nl << nl
<< "Valid patchField types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
@ -219,12 +218,15 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
{
FatalErrorIn
(
"PointPatchField<Type>::"
"New(const pointPatchField<Type>&, "
"const pointPatch&, const Field<Type>&, "
"const pointPatchFieldMapper&)"
) << "unknown patchTypefield type "
<< ptf.type() << endl << endl
"PointPatchField<Type>::New"
"("
"const pointPatchField<Type>&, "
"const pointPatch&, "
"const DimensionedField<Type, pointMesh>&, "
"const pointPatchFieldMapper&"
")"
) << "Unknown patchField type "
<< ptf.type() << nl << nl
<< "Valid patchField types are :" << endl
<< patchMapperConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

@ -28,19 +28,18 @@ License
#include "IOmanip.H"
#include "Pair.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(graph::writer, 0);
defineRunTimeSelectionTable(graph::writer, word);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(graph::writer, 0);
defineRunTimeSelectionTable(graph::writer, word);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void graph::readCurves(Istream& is)
void Foam::graph::readCurves(Istream& is)
{
List<xy> xyData(is);
@ -59,7 +58,7 @@ void graph::readCurves(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
graph::graph
Foam::graph::graph
(
const string& title,
const string& xName,
@ -74,7 +73,7 @@ graph::graph
{}
graph::graph
Foam::graph::graph
(
const string& title,
const string& xName,
@ -92,7 +91,7 @@ graph::graph
}
graph::graph
Foam::graph::graph
(
const string& title,
const string& xName,
@ -108,7 +107,7 @@ graph::graph
}
graph::graph(Istream& is)
Foam::graph::graph(Istream& is)
:
title_(is),
xName_(is),
@ -118,7 +117,7 @@ graph::graph(Istream& is)
}
const scalarField& graph::y() const
const Foam::scalarField& Foam::graph::y() const
{
if (size() != 1)
{
@ -130,7 +129,8 @@ const scalarField& graph::y() const
return *begin()();
}
scalarField& graph::y()
Foam::scalarField& Foam::graph::y()
{
if (size() != 1)
{
@ -143,7 +143,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_)
{
@ -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& 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)
{
@ -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);
}
void graph::write(const fileName& fName, const word& format) const
void Foam::graph::write(const fileName& fName, const word& format) const
{
autoPtr<writer> graphWriter(writer::New(format));
@ -227,7 +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);
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"
"(const lduInterfaceField&, const scalarField&"
) << "unknown lduInterface type " << interface.interface().type()
) << "Unknown lduInterface type "
<< interface.interface().type()
<< exit(FatalError);
}
}

View File

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

View File

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

View File

@ -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& 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
(
@ -157,7 +157,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
)
)
{
word agglomeratorType(controlDict.lookup("agglomerator"));
const word agglomeratorType(controlDict.lookup("agglomerator"));
dlLibraryTable::open
(

View File

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

View File

@ -36,7 +36,7 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New
const labelField& neighbourRestrictAddressing
)
{
word coupleType(fineInterface.type());
const word coupleType(fineInterface.type());
lduInterfaceConstructorTable::iterator cstrIter =
lduInterfaceConstructorTablePtr_->find(coupleType);

View File

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

View File

@ -96,7 +96,7 @@ public:
// pointer
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();
@ -108,9 +108,7 @@ public:
//- Return const reference to the object data
inline const T& operator()() const;
// inline T& operator*();
// inline const T& operator*() const;
//- Const cast to the underlying type reference
inline operator const T&() const;
//- Return object pointer
@ -119,7 +117,7 @@ public:
//- Return const object pointer
inline const T* operator->() const;
//- Take over object pointer from parameter
//- Take over the object pointer from parameter
inline void operator=(const autoPtr<T>&);
};

View File

@ -80,7 +80,7 @@ inline void Foam::autoPtr<T>::set(T* p)
{
if (ptr_)
{
FatalErrorIn("void autoPtr<T>::set(T*)")
FatalErrorIn("void Foam::autoPtr<T>::set(T*)")
<< "object already allocated"
<< abort(FatalError);
}
@ -115,7 +115,7 @@ inline T& Foam::autoPtr<T>::operator()()
{
if (!ptr_)
{
FatalErrorIn("T& autoPtr<T>::operator()()")
FatalErrorIn("T& Foam::autoPtr<T>::operator()()")
<< "object is not allocated"
<< abort(FatalError);
}
@ -129,7 +129,7 @@ inline const T& Foam::autoPtr<T>::operator()() const
{
if (!ptr_)
{
FatalErrorIn("const T& autoPtr<T>::operator()() const")
FatalErrorIn("const T& Foam::autoPtr<T>::operator()() const")
<< "object is not allocated"
<< 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>
inline Foam::autoPtr<T>::operator const T&() const
{
@ -166,7 +150,7 @@ inline T* Foam::autoPtr<T>::operator->()
{
if (!ptr_)
{
FatalErrorIn("autoPtr<T>::operator->()")
FatalErrorIn("Foam::autoPtr<T>::operator->()")
<< "object is not allocated"
<< abort(FatalError);
}

View File

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

View File

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

View File

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

View File

@ -27,12 +27,7 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
autoPtr<facePointPatch> facePointPatch::New
Foam::autoPtr<Foam::facePointPatch> Foam::facePointPatch::New
(
const polyPatch& patch,
const pointBoundaryMesh& bm
@ -57,7 +52,7 @@ autoPtr<facePointPatch> facePointPatch::New
"const pointBoundaryMesh&) : "
) << "Unknown facePointPatch type "
<< patch.type()
<< endl << endl
<< nl << nl
<< "Valid facePointPatch types are :" << endl
<< polyPatchConstructorTablePtr_->sortedToc()
<< exit(FatalError);
@ -67,8 +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, "
"const label, const label, const polyBoundaryMesh&) "
) << "Unknown polyPatch type " << patchType << " for patch " << name
<< endl << endl
) << "Unknown polyPatch type "
<< patchType << " for patch " << name << nl << nl
<< "Valid polyPatch types are :" << endl
<< wordConstructorTablePtr_->sortedToc()
<< exit(FatalError);
@ -82,7 +82,6 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
}
word patchType(dict.lookup("type"));
dict.readIfPresent("geometricType", patchType);
dictionaryConstructorTable::iterator cstrIter =
@ -102,9 +101,8 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
"polyPatch::New(const word&, const dictionary&, "
"const label, const polyBoundaryMesh&)",
dict
) << "Unknown polyPatch type " << patchType
<< " for patch " << name
<< endl << endl
) << "Unknown polyPatch type "
<< patchType << " for patch " << name << nl << nl
<< "Valid polyPatch types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);

View File

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

View File

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

View File

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

View File

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

View File

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

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)

View File

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

View File

@ -31,10 +31,8 @@ License
Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
{
// Enclose the creation of the dynamicMesh to ensure it is
// deleted before the dynamicFvMesh is created otherwise the dictionary
// is entered in the database twice
IOdictionary dynamicMeshDict
// do not register the dictionary
IOdictionary dict
(
IOobject
(
@ -47,13 +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;
dlLibraryTable::open
(
dynamicMeshDict,
dict,
"dynamicFvMeshLibs",
IOobjectConstructorTablePtr_
);
@ -75,8 +73,8 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
FatalErrorIn
(
"dynamicFvMesh::New(const IOobject&)"
) << "Unknown dynamicFvMesh type " << dynamicFvMeshTypeName
<< endl << endl
) << "Unknown dynamicFvMesh type "
<< dynamicFvMeshTypeName << nl << nl
<< "Valid dynamicFvMesh types are :" << endl
<< IOobjectConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

@ -1078,9 +1078,9 @@ bool Foam::dynamicRefineFvMesh::update()
<< 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 =
readScalar(refineDict.lookup("lowerRefineLevel"));

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -187,7 +187,9 @@ $(interpolation)/interpolationCellPointWallModified/cellPointWeightWallModified/
$(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C
volPointInterpolation = interpolation/volPointInterpolation
/* $(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C */
/*
$(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C
*/
$(volPointInterpolation)/volPointInterpolation.C
surfaceInterpolation = interpolation/surfaceInterpolation
@ -305,8 +307,10 @@ $(snGradSchemes)/snGradScheme/snGradSchemes.C
$(snGradSchemes)/correctedSnGrad/correctedSnGrads.C
$(snGradSchemes)/limitedSnGrad/limitedSnGrads.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)/convectionScheme/convectionSchemes.C

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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