DUNE-FEM (unstable)

output stream writing into a single file with the SIONlib (http://www2.fz-juelich.de/jsc/sionlib/) More...

#include <dune/fem/io/streams/sionlibstreams.hh>

Public Types

typedef StandardOutStreamTraits Traits
 type of the traits
 
typedef Traits::OutStreamType OutStreamType
 type of the implementation (Barton-Nackman)
 
typedef ThisType OutStreamInterfaceType
 type of the interface
 

Public Member Functions

 SIONlibOutStream (const std::string &filename, const int rank, MPICommunicatorType mpiComm, ParameterReader parameter=Parameter::container())
 constructor More...
 
 ~SIONlibOutStream ()
 destructor writing internal data buffer to the file via SIONlib
 
std::ostream & stream ()
 
void flush ()
 flush the stream More...
 
void writeDouble (const double value)
 write a double to the stream More...
 
void writeFloat (const float value)
 write a float to the stream More...
 
void writeInt (const int value)
 write an int to the stream More...
 
void writeSignedInt64 (int64_t value)
 write an int64_t to the stream More...
 
void writeChar (const char value)
 write a char to the stream More...
 
void writeBool (const bool value)
 write a bool to the stream More...
 
void writeString (const std::string &s)
 write a string to the stream More...
 
void writeUnsignedInt (unsigned int value)
 write an unsigned int to the stream More...
 
void writeUnsignedInt64 (uint64_t value)
 write an uint64_t to the stream More...
 

Protected Attributes

std::stringstream * data_
 standard file stream
 

Related Functions

(Note that these are not member functions.)

OutStreamInterface< StreamTraits > & operator<< (OutStreamInterface< StreamTraits > &out, const DiscreteFunctionInterface< Impl > &df)
 write a discrete function into an output stream More...
 

Detailed Description

output stream writing into a single file with the SIONlib (http://www2.fz-juelich.de/jsc/sionlib/)

Note
This stream directly stores the binary representation of the data. The binary representation of the stored data is always that of the current machine. On read the data is converted accordingly on machines with different endianess.
Newly added:

Constructor & Destructor Documentation

◆ SIONlibOutStream()

Dune::Fem::SIONlibOutStream::SIONlibOutStream ( const std::string &  filename,
const int  rank,
MPICommunicatorType  mpiComm,
ParameterReader  parameter = Parameter::container() 
)
inline

constructor

Parameters
[in]filenamename of a global file to write to
[in]rankprocess rank (defaults to MPIManager::rank())
[in]mpiCommMPI communicator (defaults to MPIHelper :: getCommunicator() )
Note
The filename must be the same on all ranks.

Member Function Documentation

◆ flush()

void Dune::Fem::StandardOutStream::flush ( )
inlineinherited

flush the stream

By calling the flush method, the user can ensure that the stream is actually transferred (e.g., written to disk)

◆ stream()

std::ostream & Dune::Fem::StandardOutStream::stream ( )
inlineinherited

return reference to internal ostream

Referenced by Dune::Fem::StandardOutStream::StandardOutStream().

◆ writeBool()

void Dune::Fem::StandardOutStream::writeBool ( const bool  value)
inlineinherited

write a bool to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeChar()

void Dune::Fem::StandardOutStream::writeChar ( const char  value)
inlineinherited

write a char to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeDouble()

void Dune::Fem::StandardOutStream::writeDouble ( const double  value)
inlineinherited

write a double to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeFloat()

void Dune::Fem::StandardOutStream::writeFloat ( const float  value)
inlineinherited

write a float to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeInt()

void Dune::Fem::StandardOutStream::writeInt ( const int  value)
inlineinherited

write an int to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeSignedInt64()

void Dune::Fem::StandardOutStream::writeSignedInt64 ( int64_t  value)
inlineinherited

write an int64_t to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeString()

void Dune::Fem::StandardOutStream::writeString ( const std::string &  s)
inlineinherited

write a string to the stream

Parameters
[in]sstring to write to the stream

◆ writeUnsignedInt()

void Dune::Fem::StandardOutStream::writeUnsignedInt ( unsigned int  value)
inlineinherited

write an unsigned int to the stream

Parameters
[in]valuevalue to write to the stream

◆ writeUnsignedInt64()

void Dune::Fem::StandardOutStream::writeUnsignedInt64 ( uint64_t  value)
inlineinherited

write an uint64_t to the stream

Parameters
[in]valuevalue to write to the stream

Friends And Related Function Documentation

◆ operator<<()

OutStreamInterface< StreamTraits > & operator<< ( OutStreamInterface< StreamTraits > &  out,
const DiscreteFunctionInterface< Impl > &  df 
)
related

write a discrete function into an output stream

Parameters
[in]outstream to write to
[in]dfdiscrete function to write
Returns
the output stream (for concatenation)

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)