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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -36,12 +36,15 @@ Foam::SurfaceFilmModel<CloudType>::New
const dimensionedVector& g
)
{
word SurfaceFilmModelType(dict.lookup("SurfaceFilmModel"));
const word modelType
(
dict.lookup("SurfaceFilmModel")
);
Info<< "Selecting SurfaceFilmModel " << SurfaceFilmModelType << endl;
Info<< "Selecting SurfaceFilmModel " << modelType << endl;
typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(SurfaceFilmModelType);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -53,10 +56,10 @@ Foam::SurfaceFilmModel<CloudType>::New
"CloudType&"
")"
) << "Unknown SurfaceFilmModel type "
<< SurfaceFilmModelType
<< ", constructor not in hash table" << nl << nl
<< " Valid SurfaceFilmModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
<< modelType << nl << nl
<< "Valid SurfaceFilmModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<SurfaceFilmModel<CloudType> >(cstrIter()(dict, owner, g));

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -64,9 +64,8 @@ void Foam::moleculeCloud::buildConstProps()
forAll(idList, i)
{
const word& id(idList[i]);
const dictionary& molDict(moleculePropertiesDict.subDict(id));
const word& id = idList[i];
const dictionary& molDict = moleculePropertiesDict.subDict(id);
List<word> siteIdNames = molDict.lookup("siteIds");
@ -1162,9 +1161,9 @@ void Foam::moleculeCloud::applyConstraintsAndThermostats
void Foam::moleculeCloud::writeXYZ(const fileName& fName) const
{
OFstream str(fName);
OFstream os(fName);
str << nSites() << nl << "moleculeCloud site positions in angstroms" << nl;
os << nSites() << nl << "moleculeCloud site positions in angstroms" << nl;
forAllConstIter(moleculeCloud, *this, mol)
{
@ -1174,7 +1173,7 @@ void Foam::moleculeCloud::writeXYZ(const fileName& fName) const
{
const point& sP = mol().sitePositions()[i];
str << pot_.siteIdList()[cP.siteIds()[i]]
os << pot_.siteIdList()[cP.siteIds()[i]]
<< ' ' << sP.x()*1e10
<< ' ' << sP.y()*1e10
<< ' ' << sP.z()*1e10

View File

@ -25,31 +25,28 @@ License
#include "energyScalingFunction.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
autoPtr<energyScalingFunction> energyScalingFunction::New
Foam::autoPtr<Foam::energyScalingFunction>
Foam::energyScalingFunction::New
(
const word& name,
const dictionary& energyScalingFunctionProperties,
const pairPotential& pairPot
)
{
word energyScalingFunctionTypeName
const word scalingType
(
energyScalingFunctionProperties.lookup("energyScalingFunction")
);
Info<< "Selecting energy scaling function "
<< energyScalingFunctionTypeName << " for "
<< scalingType << " for "
<< name << " potential energy." << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(energyScalingFunctionTypeName);
dictionaryConstructorTablePtr_->find(scalingType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -57,8 +54,8 @@ autoPtr<energyScalingFunction> energyScalingFunction::New
(
"energyScalingFunction::New()"
) << "Unknown energyScalingFunction type "
<< energyScalingFunctionTypeName << nl << nl
<< "Valid energyScalingFunctions are: " << nl
<< scalingType << nl << nl
<< "Valid energyScalingFunctions are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
@ -68,8 +65,4 @@ autoPtr<energyScalingFunction> energyScalingFunction::New
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -25,27 +25,27 @@ License
#include "pairPotential.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
autoPtr<pairPotential> pairPotential::New
Foam::autoPtr<Foam::pairPotential>
Foam::pairPotential::New
(
const word& name,
const dictionary& pairPotentialProperties
)
{
word pairPotentialTypeName(pairPotentialProperties.lookup("pairPotential"));
const word potentialType
(
pairPotentialProperties.lookup("pairPotential")
);
Info<< nl << "Selecting intermolecular pair potential "
<< pairPotentialTypeName << " for "
<< potentialType << " for "
<< name << " interaction." << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(pairPotentialTypeName);
dictionaryConstructorTablePtr_->find(potentialType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -53,8 +53,8 @@ autoPtr<pairPotential> pairPotential::New
(
"pairPotential::New()"
) << "Unknown pairPotential type "
<< pairPotentialTypeName << nl << nl
<< "Valid pairPotentials are: " << nl
<< potentialType << nl << nl
<< "Valid pairPotentials are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
@ -64,8 +64,4 @@ autoPtr<pairPotential> pairPotential::New
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -27,10 +27,9 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict)
void Foam::potential::setSiteIdList(const dictionary& moleculePropertiesDict)
{
DynamicList<word> siteIdList;
DynamicList<word> pairPotentialSiteIdList;
forAll(idList_, i)
@ -39,7 +38,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict)
if (!moleculePropertiesDict.found(id))
{
FatalErrorIn("potential::setSiteIdList(const IOdictionary&)")
FatalErrorIn("potential::setSiteIdList(const dictionary&)")
<< id << " molecule subDict not found"
<< nl << abort(FatalError);
}
@ -66,7 +65,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict)
if (findIndex(siteIdNames, siteId) == -1)
{
FatalErrorIn("potential::setSiteIdList(const IOdictionary&)")
FatalErrorIn("potential::setSiteIdList(const dictionary&)")
<< siteId << " in pairPotentialSiteIds is not in siteIds: "
<< siteIdNames << nl << abort(FatalError);
}
@ -112,21 +111,22 @@ void Foam::potential::potential::readPotentialDict()
idList_ = List<word>(idListDict.lookup("idList"));
IOdictionary moleculePropertiesDict
setSiteIdList
(
IOobject
IOdictionary
(
"moleculeProperties",
mesh_.time().constant(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
IOobject
(
"moleculeProperties",
mesh_.time().constant(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
)
);
setSiteIdList(moleculePropertiesDict);
List<word> pairPotentialSiteIdList
(
SubList<word>(siteIdList_, nPairPotIds_)

View File

@ -76,7 +76,7 @@ class potential
// Private Member Functions
void setSiteIdList(const IOdictionary& moleculePropertiesDict);
void setSiteIdList(const dictionary& moleculePropertiesDict);
void readPotentialDict();

View File

@ -27,29 +27,24 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
autoPtr<tetherPotential> tetherPotential::New
Foam::autoPtr<Foam::tetherPotential>
Foam::tetherPotential::New
(
const word& name,
const dictionary& tetherPotentialProperties
)
{
word
tetherPotentialTypeName
(
tetherPotentialProperties.lookup("tetherPotential")
);
const word potentialType
(
tetherPotentialProperties.lookup("tetherPotential")
);
Info<< nl << "Selecting tether potential "
<< tetherPotentialTypeName << " for "
<< potentialType << " for "
<< name << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(tetherPotentialTypeName);
dictionaryConstructorTablePtr_->find(potentialType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -57,8 +52,8 @@ autoPtr<tetherPotential> tetherPotential::New
(
"tetherPotential::New()"
) << "Unknown tetherPotential type "
<< tetherPotentialTypeName << nl << nl
<< "Valid tetherPotentials are: " << nl
<< potentialType << nl << nl
<< "Valid tetherPotentials are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
@ -68,8 +63,4 @@ autoPtr<tetherPotential> tetherPotential::New
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -74,7 +74,8 @@ Foam::autoPtr<Foam::curvedEdge> Foam::curvedEdge::clone() const
}
Foam::autoPtr<Foam::curvedEdge> Foam::curvedEdge::New
Foam::autoPtr<Foam::curvedEdge>
Foam::curvedEdge::New
(
const pointField& points,
Istream& is
@ -87,7 +88,7 @@ Foam::autoPtr<Foam::curvedEdge> Foam::curvedEdge::New
<< endl;
}
word edgeType(is);
const word edgeType(is);
IstreamConstructorTable::iterator cstrIter =
IstreamConstructorTablePtr_->find(edgeType);
@ -95,7 +96,8 @@ Foam::autoPtr<Foam::curvedEdge> Foam::curvedEdge::New
if (cstrIter == IstreamConstructorTablePtr_->end())
{
FatalErrorIn("curvedEdge::New(const pointField&, Istream&)")
<< "Unknown curvedEdge type " << edgeType << endl << endl
<< "Unknown curvedEdge type "
<< edgeType << nl << nl
<< "Valid curvedEdge types are" << endl
<< IstreamConstructorTablePtr_->sortedToc()
<< abort(FatalError);

View File

@ -127,7 +127,8 @@ Foam::coordinateRotation::coordinateRotation
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
Foam::autoPtr<Foam::coordinateRotation>
Foam::coordinateRotation::New
(
const dictionary& dict
)
@ -159,7 +160,8 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
(
"coordinateRotation::New(const dictionary&)",
dict
) << "Unknown coordinateRotation type " << rotType << nl << nl
) << "Unknown coordinateRotation type "
<< rotType << nl << nl
<< "Valid coordinateRotation types are :" << nl
<< "[default: axes " << typeName_() << "]"
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -28,7 +28,8 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
Foam::autoPtr<Foam::coordinateSystem>
Foam::coordinateSystem::New
(
const word& name,
const dictionary& dict
@ -62,7 +63,8 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
(
"coordinateSystem::New(const word&, const dictionary&)",
dict
) << "Unknown coordinateSystem type " << coordType << nl << nl
) << "Unknown coordinateSystem type "
<< coordType << nl << nl
<< "Valid coordinateSystem types are :" << nl
<< "[default: " << typeName_() << "]"
<< dictionaryConstructorTablePtr_->sortedToc()
@ -73,7 +75,8 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
}
Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
Foam::autoPtr<Foam::coordinateSystem>
Foam::coordinateSystem::New
(
const word& coordType,
const word& name,
@ -99,7 +102,8 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
"coordinateSystem::New(const word&, const word&, "
"const point&, const coordinateRotation&) : "
"constructing coordinateSystem"
) << "Unknown coordinateSystem type " << coordType << nl << nl
) << "Unknown coordinateSystem type "
<< coordType << nl << nl
<< "Valid coordinateSystem types are :" << nl
<< origRotationConstructorTablePtr_->sortedToc()
<< exit(FatalError);
@ -109,7 +113,8 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
}
Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
Foam::autoPtr<Foam::coordinateSystem>
Foam::coordinateSystem::New
(
Istream& is
)

View File

@ -30,13 +30,16 @@ License
namespace Foam
{
defineTypeNameAndDebug(searchableSurface, 0);
defineRunTimeSelectionTable(searchableSurface, dict);
defineTypeNameAndDebug(searchableSurface, 0);
defineRunTimeSelectionTable(searchableSurface, dict);
}
// Construct named object from dictionary
autoPtr<searchableSurface> searchableSurface::New
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::searchableSurface>
Foam::searchableSurface::New
(
const word& searchableSurfaceType,
const IOobject& io,
@ -78,7 +81,4 @@ Foam::searchableSurface::~searchableSurface()
{}
} // End namespace Foam
// ************************************************************************* //

View File

@ -31,13 +31,43 @@ License
namespace Foam
{
defineTypeNameAndDebug(topoSetSource, 0);
defineRunTimeSelectionTable(topoSetSource, word);
defineRunTimeSelectionTable(topoSetSource, istream);
}
defineTypeNameAndDebug(topoSetSource, 0);
defineRunTimeSelectionTable(topoSetSource, word);
defineRunTimeSelectionTable(topoSetSource, istream);
// Construct named object from dictionary
autoPtr<topoSetSource> topoSetSource::New
Foam::HashTable<Foam::string>* Foam::topoSetSource::usageTablePtr_ = NULL;
template<>
const char* Foam::NamedEnum<Foam::topoSetSource::setAction, 8>::names[] =
{
"clear",
"new",
"invert",
"add",
"delete",
"subset",
"list",
"remove"
};
const Foam::NamedEnum<Foam::topoSetSource::setAction, 8>
Foam::topoSetSource::actionNames_;
const Foam::string Foam::topoSetSource::illegalSource_
(
"Illegal topoSetSource name"
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::topoSetSource>
Foam::topoSetSource::New
(
const word& topoSetSourceType,
const polyMesh& mesh,
@ -65,8 +95,8 @@ autoPtr<topoSetSource> topoSetSource::New
}
// Construct named object from Istream
autoPtr<topoSetSource> topoSetSource::New
Foam::autoPtr<Foam::topoSetSource>
Foam::topoSetSource::New
(
const word& topoSetSourceType,
const polyMesh& mesh,
@ -94,35 +124,6 @@ autoPtr<topoSetSource> topoSetSource::New
}
} // End namespace Foam
Foam::HashTable<Foam::string>* Foam::topoSetSource::usageTablePtr_ = NULL;
template<>
const char* Foam::NamedEnum<Foam::topoSetSource::setAction, 8>::names[] =
{
"clear",
"new",
"invert",
"add",
"delete",
"subset",
"list",
"remove"
};
const Foam::NamedEnum<Foam::topoSetSource::setAction, 8>
Foam::topoSetSource::actionNames_;
const Foam::string Foam::topoSetSource::illegalSource_
(
"Illegal topoSetSource name"
);
Foam::Istream& Foam::topoSetSource::checkIs(Istream& is)
{
if (is.good() && !is.eof())
@ -161,7 +162,6 @@ void Foam::topoSetSource::addOrDelete
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::topoSetSource::topoSetSource(const polyMesh& mesh)
:
mesh_(mesh)

View File

@ -29,21 +29,21 @@ License
#include "boundBox.H"
#include "Time.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(topoSet, 0);
defineRunTimeSelectionTable(topoSet, word);
defineRunTimeSelectionTable(topoSet, size);
defineRunTimeSelectionTable(topoSet, set);
defineTypeNameAndDebug(topoSet, 0);
defineRunTimeSelectionTable(topoSet, word);
defineRunTimeSelectionTable(topoSet, size);
defineRunTimeSelectionTable(topoSet, set);
}
// Construct named object from existing set.
autoPtr<topoSet> topoSet::New
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::topoSet>
Foam::topoSet::New
(
const word& setType,
const polyMesh& mesh,
@ -73,8 +73,8 @@ autoPtr<topoSet> topoSet::New
}
// Construct named object from size (non-existing set).
autoPtr<topoSet> topoSet::New
Foam::autoPtr<Foam::topoSet>
Foam::topoSet::New
(
const word& setType,
const polyMesh& mesh,
@ -104,8 +104,8 @@ autoPtr<topoSet> topoSet::New
}
// Construct named object from existing set.
autoPtr<topoSet> topoSet::New
Foam::autoPtr<Foam::topoSet>
Foam::topoSet::New
(
const word& setType,
const polyMesh& mesh,
@ -135,7 +135,7 @@ autoPtr<topoSet> topoSet::New
}
Foam::fileName topoSet::topoSet::localPath
Foam::fileName Foam::topoSet::topoSet::localPath
(
const polyMesh& mesh,
const word& name
@ -149,7 +149,7 @@ Foam::fileName topoSet::topoSet::localPath
// Update stored cell numbers using map.
// Do in two passes to prevent allocation if nothing changed.
void topoSet::topoSet::updateLabels(const labelList& map)
void Foam::topoSet::topoSet::updateLabels(const labelList& map)
{
// Iterate over map to see if anything changed
bool changed = false;
@ -197,7 +197,7 @@ void topoSet::topoSet::updateLabels(const labelList& map)
}
void topoSet::topoSet::check(const label maxLabel)
void Foam::topoSet::topoSet::check(const label maxLabel)
{
forAllConstIter(topoSet, *this, iter)
{
@ -214,7 +214,7 @@ void topoSet::topoSet::check(const label maxLabel)
// Write maxElem elements, starting at iter. Updates iter and elemI.
void topoSet::writeDebug
void Foam::topoSet::writeDebug
(
Ostream& os,
const label maxElem,
@ -239,7 +239,7 @@ void topoSet::writeDebug
// Write maxElem elements, starting at iter. Updates iter and elemI.
void topoSet::writeDebug
void Foam::topoSet::writeDebug
(
Ostream& os,
const pointField& coords,
@ -264,7 +264,7 @@ void topoSet::writeDebug
}
void topoSet::writeDebug
void Foam::topoSet::writeDebug
(
Ostream& os,
const pointField& coords,
@ -308,7 +308,7 @@ void topoSet::writeDebug
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
topoSet::topoSet(const IOobject& obj, const word& wantedType)
Foam::topoSet::topoSet(const IOobject& obj, const word& wantedType)
:
regIOobject(obj)
{
@ -331,7 +331,7 @@ topoSet::topoSet(const IOobject& obj, const word& wantedType)
}
topoSet::topoSet
Foam::topoSet::topoSet
(
const polyMesh& mesh,
const word& wantedType,
@ -378,7 +378,7 @@ topoSet::topoSet
}
topoSet::topoSet
Foam::topoSet::topoSet
(
const polyMesh& mesh,
const word& name,
@ -408,7 +408,7 @@ topoSet::topoSet
{}
topoSet::topoSet
Foam::topoSet::topoSet
(
const polyMesh& mesh,
const word& name,
@ -438,14 +438,14 @@ topoSet::topoSet
{}
topoSet::topoSet(const IOobject& obj, const label size)
Foam::topoSet::topoSet(const IOobject& obj, const label size)
:
regIOobject(obj),
labelHashSet(size)
{}
topoSet::topoSet(const IOobject& obj, const labelHashSet& set)
Foam::topoSet::topoSet(const IOobject& obj, const labelHashSet& set)
:
regIOobject(obj),
labelHashSet(set)
@ -455,13 +455,13 @@ topoSet::topoSet(const IOobject& obj, const labelHashSet& set)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
topoSet::~topoSet()
Foam::topoSet::~topoSet()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void topoSet::invert(const label maxLen)
void Foam::topoSet::invert(const label maxLen)
{
// Keep copy of current set.
labelHashSet currentSet(*this);
@ -480,7 +480,7 @@ void topoSet::invert(const label maxLen)
}
void topoSet::subset(const topoSet& set)
void Foam::topoSet::subset(const topoSet& set)
{
// Keep copy of current set.
labelHashSet currentSet(*this);
@ -499,7 +499,7 @@ void topoSet::subset(const topoSet& set)
}
void topoSet::addSet(const topoSet& set)
void Foam::topoSet::addSet(const topoSet& set)
{
forAllConstIter(topoSet, set, iter)
{
@ -508,7 +508,7 @@ void topoSet::addSet(const topoSet& set)
}
void topoSet::deleteSet(const topoSet& set)
void Foam::topoSet::deleteSet(const topoSet& set)
{
forAllConstIter(topoSet, set, iter)
{
@ -517,13 +517,13 @@ void topoSet::deleteSet(const topoSet& set)
}
void topoSet::sync(const polyMesh&)
void Foam::topoSet::sync(const polyMesh&)
{
notImplemented("topoSet::sync(const polyMesh&)");
}
void topoSet::writeDebug(Ostream& os, const label maxLen) const
void Foam::topoSet::writeDebug(Ostream& os, const label maxLen) const
{
label n = 0;
@ -554,7 +554,7 @@ void topoSet::writeDebug(Ostream& os, const label maxLen) const
}
//void topoSet::writeDebug
//void Foam::topoSet::writeDebug
//(
// Ostream&,
// const primitiveMesh&,
@ -568,13 +568,13 @@ void topoSet::writeDebug(Ostream& os, const label maxLen) const
//}
bool topoSet::writeData(Ostream& os) const
bool Foam::topoSet::writeData(Ostream& os) const
{
return (os << *this).good();
}
void topoSet::updateMesh(const mapPolyMesh&)
void Foam::topoSet::updateMesh(const mapPolyMesh&)
{
notImplemented("topoSet::updateMesh(const mapPolyMesh&)");
}
@ -590,14 +590,10 @@ void topoSet::updateMesh(const mapPolyMesh&)
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
void topoSet::operator=(const topoSet& rhs)
void Foam::topoSet::operator=(const topoSet& rhs)
{
labelHashSet::operator=(rhs);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -42,18 +42,21 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
Foam::autoPtr<Foam::decompositionMethod>
Foam::decompositionMethod::New
(
const dictionary& decompositionDict
)
{
word decompositionMethodTypeName(decompositionDict.lookup("method"));
const word methodType
(
decompositionDict.lookup("method")
);
Info<< "Selecting decompositionMethod "
<< decompositionMethodTypeName << endl;
Info<< "Selecting decompositionMethod " << methodType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(decompositionMethodTypeName);
dictionaryConstructorTablePtr_->find(methodType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -62,7 +65,7 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
"decompositionMethod::New"
"(const dictionary& decompositionDict)"
) << "Unknown decompositionMethod "
<< decompositionMethodTypeName << endl << endl
<< methodType << nl << nl
<< "Valid decompositionMethods are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
@ -72,19 +75,22 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
}
Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
Foam::autoPtr<Foam::decompositionMethod>
Foam::decompositionMethod::New
(
const dictionary& decompositionDict,
const polyMesh& mesh
)
{
word decompositionMethodTypeName(decompositionDict.lookup("method"));
const word methodType
(
decompositionDict.lookup("method")
);
Info<< "Selecting decompositionMethod "
<< decompositionMethodTypeName << endl;
Info<< "Selecting decompositionMethod " << methodType << endl;
dictionaryMeshConstructorTable::iterator cstrIter =
dictionaryMeshConstructorTablePtr_->find(decompositionMethodTypeName);
dictionaryMeshConstructorTablePtr_->find(methodType);
if (cstrIter == dictionaryMeshConstructorTablePtr_->end())
{
@ -94,7 +100,7 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
"(const dictionary& decompositionDict, "
"const polyMesh& mesh)"
) << "Unknown decompositionMethod "
<< decompositionMethodTypeName << endl << endl
<< methodType << nl << nl
<< "Valid decompositionMethods are : " << endl
<< dictionaryMeshConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

@ -53,7 +53,7 @@ namespace Foam
void Foam::hierarchGeomDecomp::setDecompOrder()
{
word order(geomDecomDict_.lookup("order"));
const word order(geomDecomDict_.lookup("order"));
if (order.size() != 3)
{

View File

@ -27,7 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::calcType> Foam::calcType::New
Foam::autoPtr<Foam::calcType>
Foam::calcType::New
(
const word& calcTypeName
)
@ -40,9 +41,8 @@ Foam::autoPtr<Foam::calcType> Foam::calcType::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn("calcType::New()")
<< " unknown calcType type " << calcTypeName
<< ", constructor not in hash table" << nl << nl
<< " Valid calcType selections are: " << nl
<< "Unknown calcType type " << calcTypeName
<< "Valid calcType selections are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << nl
<< abort(FatalError);
}

View File

@ -30,17 +30,16 @@ License
Foam::autoPtr<Foam::sixDoFRigidBodyMotionConstraint>
Foam::sixDoFRigidBodyMotionConstraint::New(const dictionary& sDoFRBMCDict)
{
word sixDoFRigidBodyMotionConstraintTypeName =
sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint");
const word constraintType
(
sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint")
);
// Info<< "Selecting sixDoFRigidBodyMotionConstraint function "
// << sixDoFRigidBodyMotionConstraintTypeName << endl;
// << constraintType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find
(
sixDoFRigidBodyMotionConstraintTypeName
);
dictionaryConstructorTablePtr_->find(constraintType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -51,8 +50,8 @@ Foam::sixDoFRigidBodyMotionConstraint::New(const dictionary& sDoFRBMCDict)
"const dictionary& sDoFRBMCDict"
")"
) << "Unknown sixDoFRigidBodyMotionConstraint type "
<< sixDoFRigidBodyMotionConstraintTypeName << endl << endl
<< "Valid sixDoFRigidBodyMotionConstraints are : " << endl
<< constraintType << nl << nl
<< "Valid sixDoFRigidBodyMotionConstraints are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}

View File

@ -30,17 +30,16 @@ License
Foam::autoPtr<Foam::sixDoFRigidBodyMotionRestraint>
Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict)
{
word sixDoFRigidBodyMotionRestraintTypeName =
sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint");
const word restraintType
(
sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint")
);
// Info<< "Selecting sixDoFRigidBodyMotionRestraint function "
// << sixDoFRigidBodyMotionRestraintTypeName << endl;
// << restraintType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find
(
sixDoFRigidBodyMotionRestraintTypeName
);
dictionaryConstructorTablePtr_->find(restraintType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
@ -51,8 +50,8 @@ Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict)
"const dictionary& sDoFRBMRDict"
")"
) << "Unknown sixDoFRigidBodyMotionRestraint type "
<< sixDoFRigidBodyMotionRestraintTypeName << endl << endl
<< "Valid sixDoFRigidBodyMotionRestraints are : " << endl
<< restraintType << nl << nl
<< "Valid sixDoFRigidBodyMotionRestraint types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}

View File

@ -193,7 +193,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read
moment_ = interpolationTable<scalar>(sDoFRBMRCoeffs_);
word angleFormat = sDoFRBMRCoeffs_.lookup("angleFormat");
const word angleFormat = sDoFRBMRCoeffs_.lookup("angleFormat");
if (angleFormat == "degrees" || angleFormat == "degree")
{
@ -210,7 +210,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read
"Foam::sixDoFRigidBodyMotionRestraints::"
"tabulatedAxialAngularSpring::read"
"("
"const dictionary& sDoFRBMCDict"
"const dictionary&"
")"
)
<< "angleFormat must be degree, degrees, radian or radians"

View File

@ -406,7 +406,8 @@ Foam::sampledSet::~sampledSet()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::sampledSet> Foam::sampledSet::New
Foam::autoPtr<Foam::sampledSet>
Foam::sampledSet::New
(
const word& name,
const polyMesh& mesh,
@ -414,7 +415,10 @@ Foam::autoPtr<Foam::sampledSet> Foam::sampledSet::New
const dictionary& dict
)
{
word sampleType(dict.lookup("type"));
const word sampleType
(
dict.lookup("type")
);
wordConstructorTable::iterator cstrIter =
wordConstructorTablePtr_->find(sampleType);
@ -423,10 +427,10 @@ Foam::autoPtr<Foam::sampledSet> Foam::sampledSet::New
{
FatalErrorIn
(
"sampledSet::New(const word&, "
"const polyMesh&, meshSearch&, const dictionary&)"
) << "Unknown sample type " << sampleType
<< endl << endl
"sampledSet::New"
"(const word&, const polyMesh&, meshSearch&, const dictionary&)"
) << "Unknown sample type "
<< sampleType << nl << nl
<< "Valid sample types : " << endl
<< wordConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

@ -31,7 +31,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<class Type>
Foam::autoPtr<Foam::writer<Type> > Foam::writer<Type>::New
Foam::autoPtr< Foam::writer<Type> >
Foam::writer<Type>::New
(
const word& writeType
)
@ -45,8 +46,8 @@ Foam::autoPtr<Foam::writer<Type> > Foam::writer<Type>::New
FatalErrorIn
(
"writer::New(const word&)"
) << "Unknown write type " << writeType
<< endl << endl
) << "Unknown write type "
<< writeType << nl << nl
<< "Valid write types : " << endl
<< wordConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

@ -122,7 +122,10 @@ Foam::sampledSurface::New
const dictionary& dict
)
{
word sampleType(dict.lookup("type"));
const word sampleType
(
dict.lookup("type")
);
if (debug)
{
Info<< "Selecting sampledType " << sampleType << endl;
@ -137,8 +140,8 @@ Foam::sampledSurface::New
(
"sampledSurface::New"
"(const word&, const polyMesh&, const dictionary&)"
) << "Unknown sample type " << sampleType
<< endl << endl
) << "Unknown sample type "
<< sampleType << nl << nl
<< "Valid sample types : " << endl
<< wordConstructorTablePtr_->sortedToc()
<< exit(FatalError);

View File

@ -34,7 +34,10 @@ Foam::surfaceFilmModels::injectionModel::New
const dictionary& dict
)
{
word modelType(dict.lookup("injectionModel"));
const word modelType
(
dict.lookup("injectionModel")
);
Info<< " Selecting injectionModel " << modelType << endl;

View File

@ -34,7 +34,10 @@ Foam::surfaceFilmModels::phaseChangeModel::New
const dictionary& dict
)
{
word modelType(dict.lookup("phaseChangeModel"));
const word modelType
(
dict.lookup("phaseChangeModel")
);
Info<< " Selecting phaseChangeModel " << modelType << endl;

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