diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 2fcd9688e6ab8eab3a68b1c1c418d064a2c1ca98..b47f52e1f0e12d6fb88306720b8e8933a8d0f08f 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -231,14 +231,22 @@ bool Foam::probes::checkFieldTypes() probeFilePtrs_.insert(fldName, sPtr); - *sPtr<< '#' << setw(IOstream::defaultPrecision() + 6) - << "Time"; + unsigned int w = IOstream::defaultPrecision() + 7; - forAll(probeLocations_, probeI) + for (direction cmpt=0; cmpt<vector::nComponents; cmpt++) { - *sPtr << token::SPACE << probeLocations_[probeI]; + *sPtr<< '#' << setw(IOstream::defaultPrecision() + 6) + << vector::componentNames[cmpt]; + + forAll(probeLocations_, probeI) + { + *sPtr<< setw(w) << probeLocations_[probeI][cmpt]; + } + *sPtr << endl; } - *sPtr << endl; + + *sPtr<< '#' << setw(IOstream::defaultPrecision() + 6) + << "Time" << endl; } }