ENH: force/Coeffs - added writing of bin co-ordinates to output

This commit is contained in:
andy 2013-11-26 12:31:58 +00:00
parent 636215a0ea
commit 5f21e8ca88
2 changed files with 48 additions and 0 deletions

View File

@ -72,6 +72,30 @@ void Foam::forceCoeffs::writeFileHeader(const label i)
writeHeaderValue(file(i), "start", binMin_);
writeHeaderValue(file(i), "delta", binDx_);
writeHeaderValue(file(i), "direction", binDir_);
vectorField binPoints(nBin_);
writeCommented(file(i), "x co-ords :");
forAll(binPoints, pointI)
{
binPoints[pointI] = (binMin_ + (pointI + 1)*binDx_)*binDir_;
file(i) << tab << binPoints[pointI].x();
}
file(i) << nl;
writeCommented(file(i), "y co-ords :");
forAll(binPoints, pointI)
{
file(i) << tab << binPoints[pointI].y();
}
file(i) << nl;
writeCommented(file(i), "z co-ords :");
forAll(binPoints, pointI)
{
file(i) << tab << binPoints[pointI].z();
}
file(i) << nl;
writeCommented(file(i), "Time");
for (label j = 0; j < nBin_; j++)

View File

@ -98,6 +98,30 @@ void Foam::forces::writeFileHeader(const label i)
writeHeaderValue(file(i), "start", binMin_);
writeHeaderValue(file(i), "delta", binDx_);
writeHeaderValue(file(i), "direction", binDir_);
vectorField binPoints(nBin_);
writeCommented(file(i), "x co-ords :");
forAll(binPoints, pointI)
{
binPoints[pointI] = (binMin_ + (pointI + 1)*binDx_)*binDir_;
file(i) << tab << binPoints[pointI].x();
}
file(i) << nl;
writeCommented(file(i), "y co-ords :");
forAll(binPoints, pointI)
{
file(i) << tab << binPoints[pointI].y();
}
file(i) << nl;
writeCommented(file(i), "z co-ords :");
forAll(binPoints, pointI)
{
file(i) << tab << binPoints[pointI].z();
}
file(i) << nl;
writeCommented(file(i), "Time");
for (label j = 0; j < nBin_; j++)