ENH: Updated behaviour of 'log' in forces function object

- values always written to file
- values only written to screen if log = true
This commit is contained in:
andy
2011-10-05 10:31:30 +01:00
parent 45ca32a7e0
commit 95b7a3be18

View File

@ -428,6 +428,7 @@ void Foam::forces::write()
Info<< "forces output:" << nl Info<< "forces output:" << nl
<< " forces(pressure, viscous)" << fm.first() << nl << " forces(pressure, viscous)" << fm.first() << nl
<< " moment(pressure, viscous)" << fm.second() << nl; << " moment(pressure, viscous)" << fm.second() << nl;
}
forcesFilePtr_() << obr_.time().value() << tab << fm; forcesFilePtr_() << obr_.time().value() << tab << fm;
@ -449,15 +450,21 @@ void Foam::forces::write()
forcesFilePtr_() << tab << fmLocal; forcesFilePtr_() << tab << fmLocal;
if (log_)
{
Info<< " local:" << nl Info<< " local:" << nl
<< " forces(pressure, viscous)" << fmLocal.first() << " forces(pressure, viscous)" << fmLocal.first()
<< nl << nl
<< " moment(pressure, viscous)" << fmLocal.second() << " moment(pressure, viscous)" << fmLocal.second()
<< nl; << nl;
} }
}
forcesFilePtr_() << endl; forcesFilePtr_() << endl;
if (log_)
{
Info<< endl; Info<< endl;
} }
} }