mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: functionObjectFile - file pointer index was not being incremented
This commit is contained in:
@ -97,6 +97,8 @@ void Foam::functionObjectFile::createFiles()
|
|||||||
filePtrs_.set(i, new OFstream(outputDir/(fName + ".dat")));
|
filePtrs_.set(i, new OFstream(outputDir/(fName + ".dat")));
|
||||||
|
|
||||||
writeFileHeader(i);
|
writeFileHeader(i);
|
||||||
|
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -240,6 +242,13 @@ Foam::OFstream& Foam::functionObjectFile::file()
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!filePtrs_.set(0))
|
||||||
|
{
|
||||||
|
FatalErrorIn("Foam::OFstream& Foam::functionObjectFile::file()")
|
||||||
|
<< "File pointer at index " << 0 << " not allocated"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
return filePtrs_[0];
|
return filePtrs_[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,6 +278,13 @@ Foam::OFstream& Foam::functionObjectFile::file(const label i)
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!filePtrs_.set(i))
|
||||||
|
{
|
||||||
|
FatalErrorIn("Foam::OFstream& Foam::functionObjectFile::file()")
|
||||||
|
<< "File pointer at index " << i << " not allocated"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
return filePtrs_[i];
|
return filePtrs_[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user