Documentation 6b54b78464
Loading...
Searching...
No Matches
CParaviewVTMFileWriter Class Referencefinal

#include <CParaviewVTMFileWriter.hpp>

Inheritance diagram for CParaviewVTMFileWriter:
[legend]

Public Member Functions

 CParaviewVTMFileWriter (su2double valTime, unsigned short valiZone, unsigned short valnZone)
 Construct a file writer using field names, dimension.
 
 ~CParaviewVTMFileWriter () override
 Destructor.
 
void WriteData (string val_filename) override
 Write sorted data to file in paraview binary file format.
 
void WriteFolderData (const string &foldername, CConfig *config, string multiZoneHeaderString, CParallelDataSorter *volumeDataSorter, CParallelDataSorter *surfaceDataSorter, CGeometry *geometry)
 Write all data of the zones, boundaries into the folder.
 
void AddDataset (const string &foldername, string name, const string &file, CParallelDataSorter *dataSorter, bool doublePrecision)
 Add a new dataset by writing data from a datasorter to file and adding it to the vtm file.
 
void StartBlock (string name)
 Start a new block.
 
void EndBlock ()
 Close currently opened block.
 
void AddDataset (string name, string file)
 Add a new dataset by writing it to the vtm file.
 
string GetFolderName () const
 Get the name of the folder where the data will be stored.
 
- Public Member Functions inherited from CFileWriter
 CFileWriter (CParallelDataSorter *valDataSorter, string valFileExt)
 Construct a file writer using field names, the data sorter and the file extension.
 
 CFileWriter (string valFileExt)
 Construct a file writer using field names, file extension.
 
virtual ~CFileWriter ()
 Destructor.
 
su2double GetBandwidth () const
 Get the bandwith used for the last writing.
 
su2double GetFilesize () const
 Get the filesize of the last written file.
 
su2double GetUsedTime () const
 Get the used time of the last file writing.
 

Static Public Attributes

static const string fileExt = ".vtm"
 File extension.
 

Additional Inherited Members

- Protected Member Functions inherited from CFileWriter
unsigned long DetermineFilesize (std::string filename)
 Determine the file size.
 
bool WriteMPIBinaryDataAll (const void *data, unsigned long sizeInBytes, unsigned long totalSizeInBytes, unsigned long offset)
 Collectively write a binary data array distributed over all processors to file using MPI I/O.
 
bool WriteMPIBinaryData (const void *data, unsigned long sizeInBytes, unsigned short processor)
 Write a binary data array to a currently opened file using MPI I/O. Note: routine must be called collectively, although only one processor writes its data.
 
bool WriteMPIString (const std::string &str, unsigned short processor)
 Write a string to a currently opened file using MPI I/O. Note: routine must be called collectively, although only one processor writes the string.
 
std::pair< unsigned long, unsigned long > GetRankOffset (unsigned long localCount) const
 Get the position of the data of this rank in an array that holds the data of all ranks in rank order.
 
bool WriteMPIStringAll (const std::string &str)
 Write a string of each rank to the file, one after the other in rank order.
 
bool OpenMPIFile (string val_filename, bool append=false)
 Open a file to write using MPI I/O. Already existing file is deleted.
 
bool CloseMPIFile ()
 Close a file using MPI I/O.
 
- Protected Attributes inherited from CFileWriter
int rank
 The MPI rank.
 
int size
 The MPI size, aka the number of processors.
 
std::string fileExt
 The file extension to be attached to the filename.
 
su2double startTime
 Start time for time measurement

 
su2double stopTime
 Stop time for time measurement

 
su2double usedTime
 Used time for time measurement

 
su2double bandwidth
 Used bandwidth

 
su2double fileSize
 Size of the last written file

 
CParallelDataSorter * dataSorter
 The parallel data sorter.
 
FILE * fhw
 The file handle for writing.
 

Constructor & Destructor Documentation

◆ CParaviewVTMFileWriter()

CParaviewVTMFileWriter::CParaviewVTMFileWriter ( su2double  valTime,
unsigned short  valiZone,
unsigned short  valnZone 
)

Construct a file writer using field names, dimension.

Parameters
[in]valFolderName- The name of the output folder
[in]valTime- The current physical time
[in]valiZone- The index of the current zone
[in]valnZone- The total number of zones

◆ ~CParaviewVTMFileWriter()

CParaviewVTMFileWriter::~CParaviewVTMFileWriter ( )
overridedefault

Destructor.

Member Function Documentation

◆ AddDataset() [1/2]

void CParaviewVTMFileWriter::AddDataset ( const string &  foldername,
string  name,
const string &  file,
CParallelDataSorter *  dataSorter,
bool  doublePrecision 
)

Add a new dataset by writing data from a datasorter to file and adding it to the vtm file.

Parameters
[in]name- The name of the dataset
[in]file- The name of the vtu dataset file to write
[in]dataSorter- Datasorter object containing the actual data. Note, data must be sorted.

◆ AddDataset() [2/2]

void CParaviewVTMFileWriter::AddDataset ( string  name,
string  file 
)
inline

Add a new dataset by writing it to the vtm file.

Parameters
[in]name- Name of the dataset
[in]file- vtu file where the data is stored

◆ EndBlock()

void CParaviewVTMFileWriter::EndBlock ( )
inline

Close currently opened block.

◆ GetFolderName()

string CParaviewVTMFileWriter::GetFolderName ( ) const
inline

Get the name of the folder where the data will be stored.

Returns
The folder name

◆ StartBlock()

void CParaviewVTMFileWriter::StartBlock ( string  name)
inline

Start a new block.

Parameters
[in]name- The name of the block

◆ WriteData()

void CParaviewVTMFileWriter::WriteData ( string  val_filename)
overridevirtual

Write sorted data to file in paraview binary file format.

Parameters
[in]val_filename- The name of the file

Reimplemented from CFileWriter.

◆ WriteFolderData()

void CParaviewVTMFileWriter::WriteFolderData ( const string &  foldername,
CConfig *  config,
string  multiZoneHeaderString,
CParallelDataSorter *  volumeDataSorter,
CParallelDataSorter *  surfaceDataSorter,
CGeometry *  geometry 
)

Write all data of the zones, boundaries into the folder.

Parameters
[in]val_foldername- The name of the file folder
[in]config- The config options
[in]multiZoneHeaderString
[in]volumeDataSorter- sorted volume data
[in]surfaceDataSorter- sorted surface data
[in]geometry- the geometry of the problem

Member Data Documentation

◆ fileExt

const string CParaviewVTMFileWriter::fileExt = ".vtm"
static

File extension.


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