mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: function objects - enabled 'fields' entry to use patterns for some objects
This commit is contained in:
@ -150,7 +150,8 @@ Foam::functionObjects::writeFile::writeFile
|
||||
fileName_("undefined"),
|
||||
filePtr_(),
|
||||
writePrecision_(IOstream::defaultPrecision()),
|
||||
writeToFile_(true)
|
||||
writeToFile_(true),
|
||||
writtenHeader_(false)
|
||||
{}
|
||||
|
||||
|
||||
@ -167,7 +168,8 @@ Foam::functionObjects::writeFile::writeFile
|
||||
fileName_(fileName),
|
||||
filePtr_(),
|
||||
writePrecision_(IOstream::defaultPrecision()),
|
||||
writeToFile_(true)
|
||||
writeToFile_(true),
|
||||
writtenHeader_(false)
|
||||
{
|
||||
read(dict);
|
||||
|
||||
@ -234,8 +236,13 @@ void Foam::functionObjects::writeFile::writeCommented
|
||||
const string& str
|
||||
) const
|
||||
{
|
||||
os << setw(1) << "#" << setw(1) << ' '
|
||||
<< setf(ios_base::left) << setw(charWidth() - 2) << str.c_str();
|
||||
os << setw(1) << "#";
|
||||
|
||||
if (str.size())
|
||||
{
|
||||
os << setw(1) << ' '
|
||||
<< setf(ios_base::left) << setw(charWidth() - 2) << str.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -255,8 +262,8 @@ void Foam::functionObjects::writeFile::writeHeader
|
||||
const string& str
|
||||
) const
|
||||
{
|
||||
os << setw(1) << "#" << setw(1) << ' '
|
||||
<< setf(ios_base::left) << setw(charWidth() - 2) << str.c_str() << nl;
|
||||
writeCommented(os, str);
|
||||
os << nl;
|
||||
}
|
||||
|
||||
|
||||
@ -267,4 +274,10 @@ void Foam::functionObjects::writeFile::writeTime(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::writeFile::writeBreak(Ostream& os) const
|
||||
{
|
||||
writeHeader(os, "===");
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user