Peano 4
Loading...
Searching...
No Matches
tarch::plotter::PVDTimeSeriesWriter Class Reference

Writes time series in vtk/vtu format. More...

#include <PVDTimeSeriesWriter.h>

Public Types

enum class  IndexFileMode { CreateNew , AppendNewData , NoIndexFile }
 

Static Public Member Functions

static void createEmptyIndexFile (const std::string &dataFile)
 
static void appendNewData (const std::string &snapshotFileName, const std::string &dataFile, double timeStamp)
 
static double getLatestTimeStepInIndexFile (std::string dataFile)
 

Static Private Member Functions

static std::tuple< double, int, std::vector< std::string > > parseFile (const std::string &filename, bool createBackup=true)
 
static void writeFile (const std::string &filename, const std::vector< std::string > &lines)
 
static void addFileTail (std::vector< std::string > &lines)
 
static void removeFileTail (std::vector< std::string > &lines)
 
static std::string createFileEntry (const std::string &snapshotFileName, double timestamp, int partCounter)
 

Detailed Description

Writes time series in vtk/vtu format.

According to the VTK spec, time series are solely written serially, i.e. you may use this class on any rank, but it only writes out data on Peano's global master.

Please note that this file format does not work with VTK files. It only works with the XML variants of the writer.

Definition at line 25 of file PVDTimeSeriesWriter.h.

Member Enumeration Documentation

◆ IndexFileMode

Enumerator
CreateNew 

Create new meta file.

If a meta data file exists already, we overwrite it.

AppendNewData 

Add new data.

This usually adds a new file to the current snapshot (time step).

NoIndexFile 

Don't use a meta data file.

Definition at line 44 of file PVDTimeSeriesWriter.h.

Member Function Documentation

◆ addFileTail()

void tarch::plotter::PVDTimeSeriesWriter::addFileTail ( std::vector< std::string > & lines)
staticprivate

Definition at line 41 of file PVDTimeSeriesWriter.cpp.

◆ appendNewData()

void tarch::plotter::PVDTimeSeriesWriter::appendNewData ( const std::string & snapshotFileName,
const std::string & dataFile,
double timeStamp )
static

◆ createEmptyIndexFile()

void tarch::plotter::PVDTimeSeriesWriter::createEmptyIndexFile ( const std::string & dataFile)
static
Parameters
dataFileFirst file entry to insert. Pass an empty string if you don't want Peano to add a file into the original index file.
See also
IndexFileMode

Definition at line 27 of file PVDTimeSeriesWriter.cpp.

Referenced by tarch::plotter::griddata::unstructured::vtk::VTKBinaryFileWriter::VTKBinaryFileWriter(), tarch::plotter::griddata::unstructured::vtk::VTKTextFileWriter::VTKTextFileWriter(), and tarch::plotter::griddata::unstructured::vtk::VTUTextFileWriter::VTUTextFileWriter().

Here is the caller graph for this function:

◆ createFileEntry()

std::string tarch::plotter::PVDTimeSeriesWriter::createFileEntry ( const std::string & snapshotFileName,
double timestamp,
int partCounter )
staticprivate

Definition at line 110 of file PVDTimeSeriesWriter.cpp.

References logDebug.

◆ getLatestTimeStepInIndexFile()

double tarch::plotter::PVDTimeSeriesWriter::getLatestTimeStepInIndexFile ( std::string dataFile)
static

◆ parseFile()

std::tuple< double, int, std::vector< std::string > > tarch::plotter::PVDTimeSeriesWriter::parseFile ( const std::string & filename,
bool createBackup = true )
staticprivate
Returns
double Latest timestamp
int Counter of partitions in last snapshot
lines Set of lines

Definition at line 57 of file PVDTimeSeriesWriter.cpp.

References tarch::la::equals(), and tarch::la::smaller().

Referenced by getLatestTimeStepInIndexFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeFileTail()

void tarch::plotter::PVDTimeSeriesWriter::removeFileTail ( std::vector< std::string > & lines)
staticprivate

Definition at line 46 of file PVDTimeSeriesWriter.cpp.

◆ writeFile()

void tarch::plotter::PVDTimeSeriesWriter::writeFile ( const std::string & filename,
const std::vector< std::string > & lines )
staticprivate
Parameters
linescontent without the tail of the format, i.e. the closing brackets

Definition at line 98 of file PVDTimeSeriesWriter.cpp.

References logError.


The documentation for this class was generated from the following files: