functionObjects/utilities/scalarTransport: Set UName_ during construction for boundaryTypes()

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1972
This commit is contained in:
Henry Weller
2016-01-15 14:47:56 +00:00
parent 36fc8595db
commit fa191d3456
2 changed files with 102 additions and 119 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -149,10 +149,9 @@ Foam::scalarTransport::scalarTransport
:
name_(name),
mesh_(refCast<const fvMesh>(obr)),
active_(true),
phiName_("phi"),
UName_("U"),
rhoName_("rho"),
phiName_(dict.lookupOrDefault<word>("phiName", "phi")),
UName_(dict.lookupOrDefault<word>("UName", "U")),
rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")),
DT_(0.0),
userDT_(false),
resetOnStartUp_(false),
@ -192,8 +191,6 @@ Foam::scalarTransport::~scalarTransport()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::scalarTransport::read(const dictionary& dict)
{
if (active_)
{
Info<< type() << ":" << nl;
@ -215,12 +212,9 @@ void Foam::scalarTransport::read(const dictionary& dict)
fvOptions_.reset(dict.subDict("fvOptions"));
}
}
void Foam::scalarTransport::execute()
{
if (active_)
{
Info<< type() << " output:" << endl;
@ -302,28 +296,20 @@ void Foam::scalarTransport::execute()
Info<< endl;
}
}
void Foam::scalarTransport::end()
{
if (active_)
{
execute();
}
}
void Foam::scalarTransport::timeSet()
{
// Do nothing
}
{}
void Foam::scalarTransport::write()
{
// Do nothing
}
{}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,9 +78,6 @@ class scalarTransport
//- Reference to the mesh database
const fvMesh& mesh_;
//- On/off switch
bool active_;
//- Name of flux field (optional)
word phiName_;