dune-fem  2.4.1-rc
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::SIONlibOutStream Class Reference

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

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/io/streams/sionlibstreams.hh>

Inheritance diagram for Dune::Fem::SIONlibOutStream:
Inheritance graph

Public Types

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

Public Member Functions

 SIONlibOutStream (const std::string &filename, const int rank, MPICommunicatorType mpiComm, ParameterReader parameter=Parameter::container())
 constructor More...
 
 SIONlibOutStream (const std::string &filename, ParameterReader parameter=Parameter::container())
 
 SIONlibOutStream (const std::string &filename, const int rank, ParameterReader parameter=Parameter::container())
 
 ~SIONlibOutStream ()
 destructor writing internal data buffer to the file via SIONlib More...
 
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 writeChar (const char value)
 write a char to the stream More...
 
void writeBool (const bool value)
 write a char 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 Member Functions

std::ostream & dataStream ()
 
void writeFile ()
 
bool valid () const
 
template<class T >
void writePrimitive (const T &value)
 
void writeError () const
 
const Implementation & asImp () const
 
Implementation & asImp ()
 

Static Protected Member Functions

static const Implementation & asImp (const ThisType &other)
 
static Implementation & asImp (ThisType &other)
 

Protected Attributes

std::stringstream * data_
 standard file stream More...
 
const std::string filename_
 
MPICommunicatorType mpiComm_
 
const int rank_
 
const int numFiles_
 
const int blockSize_
 
std::ostream & stream_
 

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:

Member Typedef Documentation

type of the interface

type of the implementation (Barton-Nackman)

type of the traits

Constructor & Destructor Documentation

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.
Dune::Fem::SIONlibOutStream::SIONlibOutStream ( const std::string &  filename,
ParameterReader  parameter = Parameter::container() 
)
inline
Dune::Fem::SIONlibOutStream::SIONlibOutStream ( const std::string &  filename,
const int  rank,
ParameterReader  parameter = Parameter::container() 
)
inline
Dune::Fem::SIONlibOutStream::~SIONlibOutStream ( )
inline

destructor writing internal data buffer to the file via SIONlib

References data_, and writeFile().

Member Function Documentation

template<class Interface, class Implementation>
static const Implementation& Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( const ThisType other)
inlinestaticprotectedinherited
template<class Interface, class Implementation>
static Implementation& Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ThisType other)
inlinestaticprotectedinherited
template<class Interface, class Implementation>
const Implementation& Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ) const
inlineprotectedinherited
template<class Interface, class Implementation>
Implementation& Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( )
inlineprotectedinherited
std::ostream& Dune::Fem::SIONlibOutStream::dataStream ( )
inlineprotected

References data_.

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)

Referenced by Dune::Fem::PersistenceManager::restoreValue().

std::ostream& Dune::Fem::StandardOutStream::stream ( )
inlineinherited
bool Dune::Fem::StandardOutStream::valid ( ) const
inlineprotectedinherited
void Dune::Fem::StandardOutStream::writeBool ( const bool  value)
inlineinherited

write a char to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::StandardOutStream::writeChar ( const char  value)
inlineinherited

write a char to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::StandardOutStream::writeDouble ( const double  value)
inlineinherited

write a double to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::OutStreamInterface< StandardOutStreamTraits >::writeError ( ) const
inlineprotectedinherited
void Dune::Fem::SIONlibOutStream::writeFile ( )
inlineprotected

References blockSize_, data_, filename_, mpiComm_, numFiles_, and rank_.

Referenced by ~SIONlibOutStream().

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

write a float to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::StandardOutStream::writeInt ( const int  value)
inlineinherited

write an int to the stream

Parameters
[in]valuevalue to write to the stream
template<class T >
void Dune::Fem::StandardOutStream::writePrimitive ( const T &  value)
inlineprotectedinherited
void Dune::Fem::StandardOutStream::writeString ( const std::string &  s)
inlineinherited

write a string to the stream

Parameters
[in]sstring to write to the stream
void Dune::Fem::StandardOutStream::writeUnsignedInt ( unsigned int  value)
inlineinherited

write an unsigned int to the stream

Parameters
[in]valuevalue to write to the stream
void Dune::Fem::StandardOutStream::writeUnsignedInt64 ( uint64_t  value)
inlineinherited

write an uint64_t to the stream

Parameters
[in]valuevalue to write to the stream

Member Data Documentation

const int Dune::Fem::SIONlibOutStream::blockSize_
protected

Referenced by writeFile().

std::stringstream* Dune::Fem::SIONlibOutStream::data_
protected
const std::string Dune::Fem::SIONlibOutStream::filename_
protected

Referenced by writeFile().

MPICommunicatorType Dune::Fem::SIONlibOutStream::mpiComm_
protected

Referenced by writeFile().

const int Dune::Fem::SIONlibOutStream::numFiles_
protected

Referenced by writeFile().

const int Dune::Fem::SIONlibOutStream::rank_
protected

Referenced by writeFile().

std::ostream& Dune::Fem::StandardOutStream::stream_
protectedinherited

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