mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improvements for foamVtkOutput, foamVtkFormatter (issue #926)
- parallel list output for foamVtkOutput - simplified '.series' file output - beginDataArray() method instead of openDataArray() + closeTag() since this seems to be the most common use anyhow. With an optional argument for leaving the tag open, this works the same as openDataArray() which may be deprecated in the future. - begin/end methods for CellData, PointData, FieldData (commonly used) - templating parameters for file headers, content version, legacy fields. This improves coding robustness and convenience of use. - use formatter and higher-level methods for legacy output - attribute quoting character now part of the formatter itself instead of as an argument for xmlAttr(). Toggle with quoting() method. - pair-wise processing of xml attributes, which also allows them to be passed as optional entries when creating an xml tag. - xmlComment with multiple arguments
This commit is contained in:
@ -466,10 +466,12 @@ bool Foam::functionObjects::vtkCloud::write()
|
||||
// Each cloud separately
|
||||
for (const word& cloudName : cloudNames)
|
||||
{
|
||||
const word prefix(cloudName + "_");
|
||||
const word suffix(".vtp"); // No legacy supported
|
||||
// Legacy is not to be supported
|
||||
|
||||
const fileName outputName(vtkDir/prefix + timeDesc + suffix);
|
||||
const fileName outputName
|
||||
(
|
||||
vtkDir/cloudName + "_" + timeDesc + ".vtp"
|
||||
);
|
||||
|
||||
if (writeCloud(outputName, cloudName))
|
||||
{
|
||||
@ -483,9 +485,11 @@ bool Foam::functionObjects::vtkCloud::write()
|
||||
|
||||
series_(cloudName).append({time_.value(), timeDesc});
|
||||
|
||||
OFstream os(vtkDir/cloudName + ".vtp.series", IOstream::ASCII);
|
||||
|
||||
vtk::writeSeries(os, prefix, suffix, series_[cloudName]);
|
||||
vtk::seriesWrite
|
||||
(
|
||||
vtkDir/cloudName + ".vtp",
|
||||
series_[cloudName]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user