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