Provides a means of accumulating and generating VTK file series. More...
Public Member Functions | |
seriesWriter ()=default | |
seriesWriter (const seriesWriter &)=default | |
seriesWriter (seriesWriter &&)=default | |
seriesWriter & | operator= (const seriesWriter &)=default |
seriesWriter & | operator= (seriesWriter &&)=default |
~seriesWriter ()=default | |
bool | empty () const noexcept |
label | size () const noexcept |
void | clear () |
bool | append (const fileNameInstant &inst) |
bool | append (fileNameInstant &&inst) |
bool | append (scalar timeValue, const fileName &file) |
bool | append (scalar timeValue, fileName &&file) |
label | load (const fileName &seriesName, const bool checkFiles=false, const scalar restartTime=ROOTVGREAT) |
label | scan (const fileName &seriesName, const scalar restartTime=ROOTVGREAT) |
bool | removeNewer (const scalar timeValue) |
void | sort () |
void | print (Ostream &os) const |
void | write (const fileName &seriesName) const |
Static Public Member Functions | |
static fileName | base (const fileName &outputName, char sep='_') |
static word | suffix (const fileName &file, char sep='_') |
static Ostream & | print (Ostream &os, const fileName &seriesName, const UList< instant > &series, const char sep='_') |
static void | write (const fileName &base, const UList< instant > &series, const char sep='_') |
static Ostream & | print (Ostream &os, const UList< fileNameInstant > &series) |
static void | write (const fileName &seriesName, const UList< fileNameInstant > &series) |
Provides a means of accumulating and generating VTK file series.
The VTK file series format is a simple JSON format with the following type of content:
{ "file-series-version" : "1.0", "files": [ { "name" : "file1.vtk", "time" : 10 }, { "name" : "file2.vtk", "time" : 20 }, { "name" : "file3.vtk", "time" : 30 }, ] }
The append() operations include various sanity checks. Entries with an empty name are ignored. If an entry with an identical name already exists, its place will be overwritten with the new time value.
Definition at line 71 of file foamVtkSeriesWriter.H.
|
default |
|
default |
|
default |
|
default |
|
default |
|
default |
|
static |
Definition at line 84 of file foamVtkSeriesWriter.C.
References Foam::dot(), and outputName().
Referenced by vtkCloud::write(), and vtkWrite::write().
|
static |
Definition at line 114 of file foamVtkSeriesWriter.C.
References Foam::dot().
|
static |
Definition at line 144 of file foamVtkSeriesWriter.C.
References fileName::ext(), fileName::nameLessExt(), Foam::nl, os(), and UList::size().
Referenced by seriesWriter::print().
Definition at line 226 of file foamVtkSeriesWriter.C.
References fileName::hasExt(), Foam::mkDir(), Foam::New(), fileName::path(), and Foam::BitOps::print().
Referenced by seriesWriter::write(), vtkCloud::write(), and vtkWrite::write().
|
static |
Definition at line 191 of file foamVtkSeriesWriter.C.
References Foam::nl, os(), and UList::size().
|
static |
Definition at line 247 of file foamVtkSeriesWriter.C.
References fileName::hasExt(), Foam::mkDir(), Foam::New(), fileName::path(), and Foam::BitOps::print().
|
inlinenoexcept |
Definition at line 23 of file foamVtkSeriesWriterI.H.
Referenced by vtkCloud::write(), and vtkWrite::write().
|
inlinenoexcept |
Definition at line 29 of file foamVtkSeriesWriterI.H.
|
inline |
Definition at line 35 of file foamVtkSeriesWriterI.H.
|
inline |
Definition at line 42 of file foamVtkSeriesWriterI.H.
References Instant< T >::name(), and Instant< T >::value().
Referenced by vtkCloud::write(), and vtkWrite::write().
|
inline |
Definition at line 49 of file foamVtkSeriesWriterI.H.
Definition at line 59 of file foamVtkSeriesWriterI.H.
References fileName::name().
Definition at line 70 of file foamVtkSeriesWriterI.H.
References fileName::removePath().
Foam::label load | ( | const fileName & | seriesName, |
const bool | checkFiles = false , |
||
const scalar | restartTime = ROOTVGREAT |
||
) |
Definition at line 359 of file foamVtkSeriesWriter.C.
References token::BEGIN_BLOCK, token::BEGIN_SQR, clear(), token::COMMA, token::END_BLOCK, token::END_SQR, fileName::ext(), Foam::getToken(), Foam::getValueToken(), fileName::hasExt(), HashSet::insert(), Foam::isFile(), token::isNumber(), token::isPunctuation(), token::isString(), Foam::glTF::key(), Foam::lessThan(), Instant< T >::name(), token::number(), fileName::path(), token::pToken(), Foam::readDir(), token::stringToken(), and Instant< T >::value().
Referenced by vtkCloud::write(), and vtkWrite::write().
Foam::label scan | ( | const fileName & | seriesName, |
const scalar | restartTime = ROOTVGREAT |
||
) |
Definition at line 577 of file foamVtkSeriesWriter.C.
References append(), clear(), fileName::ext(), fileName::hasExt(), Foam::Info, Foam::isDir(), Foam::lessThan(), fileName::nameLessExt(), Foam::nl, path(), fileName::path(), Foam::readDir(), fileName::removeExt(), Foam::sort(), string::starts_with(), and Foam::subsetList().
bool removeNewer | ( | const scalar | timeValue | ) |
Definition at line 708 of file foamVtkSeriesWriter.C.
References Foam::lessThan(), Instant< T >::name(), Foam::name(), and Instant< T >::value().
void sort | ( | ) |
Definition at line 738 of file foamVtkSeriesWriter.C.
References Foam::sort().
|
inline |
Definition at line 82 of file foamVtkSeriesWriterI.H.
References os(), and seriesWriter::print().
|
inline |
Definition at line 88 of file foamVtkSeriesWriterI.H.
References seriesWriter::write().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.