diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSVIO.C b/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSVIO.C index 1dd395cee0..778de9a92f 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSVIO.C +++ b/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSVIO.C @@ -50,10 +50,7 @@ Foam::Ostream& Foam::operator<< } // Check state of Ostream - os.check - ( - "Ostream& operator<<(Ostream&, const CSV&)" - ); + os.check("Ostream& operator<<(Ostream&, const CSV&)"); return os; } @@ -83,11 +80,15 @@ void Foam::CSV::writeData(Ostream& os) const os << componentColumns_; os.format(IOstream::BINARY); } + else + { + os << componentColumns_; + } os << token::END_STATEMENT << nl; os.writeKeyword("separator") << string(separator_) << token::END_STATEMENT << nl; - os.writeKeyword("mergeSeparators") << string(mergeSeparators_) + os.writeKeyword("mergeSeparators") << mergeSeparators_ << token::END_STATEMENT << nl; os.writeKeyword("fileName") << fName_ << token::END_STATEMENT << nl; os << decrIndent << indent << token::END_BLOCK << endl; diff --git a/tutorials/incompressible/icoFoam/cavity/0/U b/tutorials/incompressible/icoFoam/cavity/0/U index 711702f987..21b0d542ec 100644 --- a/tutorials/incompressible/icoFoam/cavity/0/U +++ b/tutorials/incompressible/icoFoam/cavity/0/U @@ -22,8 +22,17 @@ boundaryField { movingWall { - type fixedValue; - value uniform (1 0 0); + type uniformFixedValue; + uniformValue csvFile; + csvFileCoeffs + { + nHeaderLine 1; + refColumn 0; + componentColumns (1 2 3); + mergeSeparators no; + fileName "$FOAM_CASE/csvData"; + separator " "; + } } fixedWalls