probes: write probe data in user-time rather than s

This commit is contained in:
Henry 2013-06-12 12:51:56 +01:00
parent 39969ed881
commit e9932a0be7
2 changed files with 13 additions and 9 deletions

View File

@ -43,7 +43,9 @@ void Foam::patchProbes::sampleAndWrite
unsigned int w = IOstream::defaultPrecision() + 7; unsigned int w = IOstream::defaultPrecision() + 7;
OFstream& probeStream = *probeFilePtrs_[vField.name()]; OFstream& probeStream = *probeFilePtrs_[vField.name()];
probeStream << setw(w) << vField.time().value(); probeStream
<< setw(w)
<< vField.time().timeToUserTime(vField.time().value());
forAll(values, probeI) forAll(values, probeI)
{ {
@ -67,7 +69,9 @@ void Foam::patchProbes::sampleAndWrite
unsigned int w = IOstream::defaultPrecision() + 7; unsigned int w = IOstream::defaultPrecision() + 7;
OFstream& probeStream = *probeFilePtrs_[sField.name()]; OFstream& probeStream = *probeFilePtrs_[sField.name()];
probeStream << setw(w) << sField.time().value(); probeStream
<< setw(w)
<< sField.time().timeToUserTime(sField.time().value());
forAll(values, probeI) forAll(values, probeI)
{ {

View File

@ -76,7 +76,7 @@ void Foam::probes::sampleAndWrite
unsigned int w = IOstream::defaultPrecision() + 7; unsigned int w = IOstream::defaultPrecision() + 7;
OFstream& os = *probeFilePtrs_[vField.name()]; OFstream& os = *probeFilePtrs_[vField.name()];
os << setw(w) << vField.time().value(); os << setw(w) << vField.time().timeToUserTime(vField.time().value());
forAll(values, probeI) forAll(values, probeI)
{ {
@ -90,17 +90,17 @@ void Foam::probes::sampleAndWrite
template<class Type> template<class Type>
void Foam::probes::sampleAndWrite void Foam::probes::sampleAndWrite
( (
const GeometricField<Type, fvsPatchField, surfaceMesh>& vField const GeometricField<Type, fvsPatchField, surfaceMesh>& sField
) )
{ {
Field<Type> values(sample(vField)); Field<Type> values(sample(sField));
if (Pstream::master()) if (Pstream::master())
{ {
unsigned int w = IOstream::defaultPrecision() + 7; unsigned int w = IOstream::defaultPrecision() + 7;
OFstream& os = *probeFilePtrs_[vField.name()]; OFstream& os = *probeFilePtrs_[sField.name()];
os << setw(w) << vField.time().value(); os << setw(w) << sField.time().timeToUserTime(sField.time().value());
forAll(values, probeI) forAll(values, probeI)
{ {
@ -259,7 +259,7 @@ template<class Type>
Foam::tmp<Foam::Field<Type> > Foam::tmp<Foam::Field<Type> >
Foam::probes::sample Foam::probes::sample
( (
const GeometricField<Type, fvsPatchField, surfaceMesh>& vField const GeometricField<Type, fvsPatchField, surfaceMesh>& sField
) const ) const
{ {
const Type unsetVal(-VGREAT*pTraits<Type>::one); const Type unsetVal(-VGREAT*pTraits<Type>::one);
@ -275,7 +275,7 @@ Foam::probes::sample
{ {
if (faceList_[probeI] >= 0) if (faceList_[probeI] >= 0)
{ {
values[probeI] = vField[faceList_[probeI]]; values[probeI] = sField[faceList_[probeI]];
} }
} }