preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
precice::io::ExportXML Class Referenceabstract

Common class to generate the VTK XML-based formats. More...

#include <ExportXML.hpp>

Inheritance diagram for precice::io::ExportXML:
[legend]
Collaboration diagram for precice::io::ExportXML:
[legend]

Public Member Functions

void doExport (const std::string &name, const std::string &location, const mesh::Mesh &mesh) override
 Does export. Has to be implemented in subclass.
 
- Public Member Functions inherited from precice::io::Export
virtual ~Export ()=default
 
 Export ()=default
 
 Export (const Export &)=delete
 
 Export (Export &&)=delete
 
Exportoperator= (const Export &)=delete
 
Exportoperator= (Export &&)=delete
 

Static Public Member Functions

static void writeVertex (const Eigen::VectorXd &position, std::ostream &outFile)
 
static void writeLine (const mesh::Edge &edge, std::ostream &outFile)
 
static void writeTriangle (const mesh::Triangle &triangle, std::ostream &outFile)
 
static void writeTetrahedron (const mesh::Tetrahedron &tetra, std::ostream &outFile)
 

Private Member Functions

virtual std::string getVTKFormat () const =0
 
virtual std::string getParallelExtension () const =0
 
virtual std::string getPieceExtension () const =0
 
virtual std::string getPieceAttributes (const mesh::Mesh &mesh) const =0
 
void processDataNamesAndDimensions (const mesh::Mesh &mesh)
 Stores scalar and vector data names in string vectors Needed for writing primary file and sub files.
 
void writeParallelFile (const std::string &name, const std::string &location, const mesh::Mesh &mesh) const
 Writes the primary file (called only by the primary rank)
 
virtual void writeParallelCells (std::ostream &out) const =0
 
void writeParallelData (std::ostream &out) const
 
void writeSubFile (const std::string &name, const std::string &location, const mesh::Mesh &mesh) const
 Writes the sub file for each rank.
 
void exportPoints (std::ostream &outFile, const mesh::Mesh &mesh) const
 
virtual void exportConnectivity (std::ostream &outFile, const mesh::Mesh &mesh) const =0
 
void exportData (std::ostream &outFile, const mesh::Mesh &mesh) const
 
void exportGradient (const mesh::PtrData data, const int dataDim, std::ostream &outFile) const
 

Private Attributes

logging::Logger _log {"io::ExportXML"}
 
std::vector< std::string_scalarDataNames
 List of names of all scalar data on mesh.
 
std::vector< std::string_vectorDataNames
 List of names of all vector data on mesh.
 

Detailed Description

Common class to generate the VTK XML-based formats.

Definition at line 24 of file ExportXML.hpp.

Member Function Documentation

◆ doExport()

void precice::io::ExportXML::doExport ( const std::string & name,
const std::string & location,
const mesh::Mesh & mesh )
overridevirtual

Does export. Has to be implemented in subclass.

Parameters
[in]nameFilename (without path).
[in]locationLocation (path without filename).
[in]meshMesh to be exported.

Implements precice::io::Export.

Definition at line 23 of file ExportXML.cpp.

Here is the call graph for this function:

◆ exportConnectivity()

virtual void precice::io::ExportXML::exportConnectivity ( std::ostream & outFile,
const mesh::Mesh & mesh ) const
privatepure virtual

◆ exportData()

void precice::io::ExportXML::exportData ( std::ostream & outFile,
const mesh::Mesh & mesh ) const
private

Definition at line 191 of file ExportXML.cpp.

Here is the call graph for this function:

◆ exportGradient()

void precice::io::ExportXML::exportGradient ( const mesh::PtrData data,
const int dataDim,
std::ostream & outFile ) const
private

Definition at line 157 of file ExportXML.cpp.

◆ exportPoints()

void precice::io::ExportXML::exportPoints ( std::ostream & outFile,
const mesh::Mesh & mesh ) const
private

Definition at line 293 of file ExportXML.cpp.

Here is the call graph for this function:

◆ getParallelExtension()

virtual std::string precice::io::ExportXML::getParallelExtension ( ) const
privatepure virtual

◆ getPieceAttributes()

virtual std::string precice::io::ExportXML::getPieceAttributes ( const mesh::Mesh & mesh) const
privatepure virtual

◆ getPieceExtension()

virtual std::string precice::io::ExportXML::getPieceExtension ( ) const
privatepure virtual

◆ getVTKFormat()

virtual std::string precice::io::ExportXML::getVTKFormat ( ) const
privatepure virtual

◆ processDataNamesAndDimensions()

void precice::io::ExportXML::processDataNamesAndDimensions ( const mesh::Mesh & mesh)
private

Stores scalar and vector data names in string vectors Needed for writing primary file and sub files.

Definition at line 40 of file ExportXML.cpp.

Here is the call graph for this function:

◆ writeLine()

void precice::io::ExportXML::writeLine ( const mesh::Edge & edge,
std::ostream & outFile )
static

Definition at line 285 of file ExportXML.cpp.

Here is the call graph for this function:

◆ writeParallelCells()

virtual void precice::io::ExportXML::writeParallelCells ( std::ostream & out) const
privatepure virtual

◆ writeParallelData()

void precice::io::ExportXML::writeParallelData ( std::ostream & out) const
private

Definition at line 306 of file ExportXML.cpp.

◆ writeParallelFile()

void precice::io::ExportXML::writeParallelFile ( const std::string & name,
const std::string & location,
const mesh::Mesh & mesh ) const
private

Writes the primary file (called only by the primary rank)

Definition at line 68 of file ExportXML.cpp.

Here is the call graph for this function:

◆ writeSubFile()

void precice::io::ExportXML::writeSubFile ( const std::string & name,
const std::string & location,
const mesh::Mesh & mesh ) const
private

Writes the sub file for each rank.

Definition at line 123 of file ExportXML.cpp.

Here is the call graph for this function:

◆ writeTetrahedron()

void precice::io::ExportXML::writeTetrahedron ( const mesh::Tetrahedron & tetra,
std::ostream & outFile )
static

Definition at line 275 of file ExportXML.cpp.

Here is the call graph for this function:

◆ writeTriangle()

void precice::io::ExportXML::writeTriangle ( const mesh::Triangle & triangle,
std::ostream & outFile )
static

Definition at line 266 of file ExportXML.cpp.

Here is the call graph for this function:

◆ writeVertex()

void precice::io::ExportXML::writeVertex ( const Eigen::VectorXd & position,
std::ostream & outFile )
static

Definition at line 252 of file ExportXML.cpp.

Member Data Documentation

◆ _log

logging::Logger precice::io::ExportXML::_log {"io::ExportXML"}
mutableprivate

Definition at line 48 of file ExportXML.hpp.

◆ _scalarDataNames

std::vector<std::string> precice::io::ExportXML::_scalarDataNames
private

List of names of all scalar data on mesh.

Definition at line 51 of file ExportXML.hpp.

◆ _vectorDataNames

std::vector<std::string> precice::io::ExportXML::_vectorDataNames
private

List of names of all vector data on mesh.

Definition at line 54 of file ExportXML.hpp.


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