mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Fixes mantis issue 0000012: sample utiltiy update
This commit is contained in:
@ -128,13 +128,32 @@ void Foam::sampledSets::writeSampleFile
|
||||
timeDir/formatter.getFileName(masterSampleSet, valueSetNames)
|
||||
);
|
||||
|
||||
formatter.write
|
||||
(
|
||||
masterSampleSet,
|
||||
valueSetNames,
|
||||
valueSets,
|
||||
OFstream(fName)()
|
||||
);
|
||||
OFstream ofs(fName);
|
||||
if (ofs.opened())
|
||||
{
|
||||
formatter.write
|
||||
(
|
||||
masterSampleSet,
|
||||
valueSetNames,
|
||||
valueSets,
|
||||
ofs
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void Foam::sampledSets::writeSampleFile"
|
||||
"("
|
||||
"const coordSet&, "
|
||||
"const PtrList<volFieldSampler<Type> >&, "
|
||||
"const label, "
|
||||
"const fileName&, "
|
||||
"const writer<Type>&"
|
||||
")"
|
||||
) << "File " << ofs.name() << " could not be opened. "
|
||||
<< "No data will be written" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user