Commit 98cc307a authored by andy's avatar andy
Browse files

ENH: Function objects - notify when writing results

parent 00800bbc
......@@ -78,6 +78,10 @@ void Foam::removeRegisteredObject::execute()
if (obj.ownedByRegistry())
{
Info<< type() << " " << name_ << " output:" << nl
<< " removing object " << obj.name() << nl
<< endl;
const_cast<regIOobject&>(obj).release();
delete &obj;
}
......
......@@ -63,7 +63,7 @@ bool Foam::writeDictionary::tryFolder
{
if (firstDict)
{
Info<< type() << " output:" << nl << endl;
Info<< type() << " " << name_ << " output:" << nl << endl;
IOobject::writeDivider(Info);
Info<< endl;
......
......@@ -98,6 +98,11 @@ void Foam::writeRegisteredObject::write()
);
// Switch off automatic writing to prevent double write
obj.writeOpt() = IOobject::NO_WRITE;
Info<< type() << " " << name_ << " output:" << nl
<< " writing object " << obj.name() << nl
<< endl;
obj.write();
}
else
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -52,8 +52,8 @@ void Foam::calcFvcDiv::calcDiv
field = fvc::div(vf);
Info<< type() << " output:" << nl
<< " writing " << field.name() << " field" << nl << endl;
Info<< type() << " " << name_ << " output:" << nl
<< " writing field " << field.name() << nl << endl;
field.write();
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -120,8 +120,8 @@ void Foam::calcFvcGrad::calcGrad
field = fvc::grad(sf);
Info<< type() << " output:" << nl
<< " writing " << field.name() << " field" << nl << endl;
Info<< type() << " " << name_ << " output:" << nl
<< " writing field " << field.name() << nl << endl;
field.write();
......
......@@ -198,10 +198,11 @@ void Foam::CourantNo::write()
CourantNo.correctBoundaryConditions();
CourantNo.write();
Info<< type() << " " << name_ << " output:" << nl
<< " writing field " << CourantNo.name() << nl
<< endl;
Info<< type() << " output:" << nl
<< " writing " << CourantNo.name() << " field" << nl << endl;
CourantNo.write();
}
}
......
......@@ -136,7 +136,7 @@ void Foam::DESModelRegions::write()
if (log_)
{
Info<< type() << " output:" << nl;
Info<< type() << " " << name_ << " output:" << nl;
}
tmp<volScalarField> tresult;
......@@ -186,6 +186,7 @@ void Foam::DESModelRegions::write()
{
Info<< " LES = " << prc << " % (volume)" << nl
<< " RAS = " << 100.0 - prc << " % (volume)" << nl
<< " writing field " << result.name() << nl
<< endl;
}
......
......@@ -157,10 +157,11 @@ void Foam::Lambda2::write()
Lambda2 = -eigenValues(SSplusWW)().component(vector::Y);
Lambda2.write();
Info<< type() << " " << name_ << " output:" << nl
<< " writing field " << Lambda2.name() << nl
<< endl;
Info<< type() << " output:" << nl
<< " writing " << Lambda2.name() << " field" << nl << endl;
Lambda2.write();
}
}
......
......@@ -209,10 +209,11 @@ void Foam::Peclet::write()
*fvc::interpolate(nuEff)
);
Peclet.write();
Info<< type() << " " << name_ << " output:" << nl
<< " writing field " << Peclet.name() << nl
<< endl;
Info<< type() << " output:" << nl
<< " writing " << Peclet.name() << " field" << nl << endl;
Peclet.write();
}
}
......
......@@ -150,10 +150,11 @@ void Foam::Q::write()
Q = 0.5*(sqr(tr(gradU)) - tr(((gradU) & (gradU))));
Q.write();
Info<< type() << " " << name_ << " output:" << nl
<< " writing field " << Q.name() << nl
<< endl;
Info<< type() << " output:" << nl
<< " writing " << Q.name() << " field" << nl << endl;
Q.write();
}
}
......
......@@ -322,6 +322,10 @@ void Foam::pressureTools::write()
pResult == convertToCoeff(rhoScale(p)*p + pDyn(p) + pRef());
Info<< type() << " " << name_ << " output:" << nl
<< " writing field " << pResult.name() << nl
<< endl;
pResult.write();
}
}
......
......@@ -234,7 +234,7 @@ void Foam::wallShearStress::write()
if (log_)
{
Info<< type() << " output:" << nl;
Info<< type() << " " << name_ << " output:" << nl;
}
......@@ -265,7 +265,8 @@ void Foam::wallShearStress::write()
if (log_)
{
Info<< endl;
Info<< " writing field " << wallShearStress.name() << nl
<< endl;
}
wallShearStress.write();
......
......@@ -282,7 +282,7 @@ void Foam::yPlusLES::write()
if (log_)
{
Info<< type() << " output:" << nl;
Info<< type() << " " << name_ << " output:" << nl;
}
if (phi.dimensions() == dimMass/dimTime)
......@@ -296,7 +296,8 @@ void Foam::yPlusLES::write()
if (log_)
{
Info<< endl;
Info<< " writing field " << yPlusLES.name() << nl
<< endl;
}
yPlusLES.write();
......
......@@ -267,7 +267,7 @@ void Foam::yPlusRAS::write()
if (log_)
{
Info<< type() << " output:" << nl;
Info<< type() << " " << name_ << " output:" << nl;
}
if (phi.dimensions() == dimMass/dimTime)
......@@ -281,7 +281,8 @@ void Foam::yPlusRAS::write()
if (log_)
{
Info<< endl;
Info<< " writing field " << yPlusRAS.name() << nl
<< endl;
}
yPlusRAS.write();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment