Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FieldIO Class Referenceabstract

FieldIO class for file I/O of space-time distributed data. More...

#include <fieldIO.h>

Inheritance diagram for FieldIO:
FieldIO_Binary FieldIO_Fortran FieldIO_LIME FieldIO_Text FieldIO_Binary_Parallel

Public Member Functions

 FieldIO (const IO_Format::Format *format)
 < constructor. format specifies data layout on file. More...
 
virtual ~FieldIO ()
 
virtual void read_file (Field *v, std::string)=0
 read data from file. More...
 
virtual void write_file (Field *v, std::string)=0
 write data to file. More...
 
void deliver (Field *vlocal, Field *vglobal)
 distribute data on primary node over parallel nodes. More...
 
void gather (Field *vglobal, Field *vlocal)
 gather data on parallel nodes to primary node. More...
 

Protected Member Functions

void byte_swap (void *buf, size_t size, size_t nmemb)
 < convert byte order. alternative interface. More...
 
void convert_endian (void *buf, size_t size, size_t nmemb)
 check if machine byte order is big-endian. More...
 
bool is_bigendian () const
 

Protected Attributes

const IO_Format::Formatm_format
 
Bridge::VerboseLevel m_vl
 

Private Attributes

Index_lex idx
 

Detailed Description

FieldIO class for file I/O of space-time distributed data.

This class family is used to setup and output the gauge configuration. This is the base class, which implements common functions, and read/write methods are implemented in subclasses. At present, cutting off the gauge field for each node and deliver it to the node is implemented in this class. It may be better to separate that to other class for general usage for other field objects. [28 Dec 2011 H.Matsufuru]

FieldIO class provides file I/O of Field data. Reading and writing gauge configuration from/to file is now implemented on top of this construct.

For scalar data (independent of space-time index), DataIO class hierarchy is provided.

FieldIO class is an abstract base class; various data format (text, binary, etc) and I/O scheme (single node or parallel I/O) are realised in the respective subclasses. This class also provides common utilities for gathering/distributing data over parallel nodes (if any), and converting byte order.

Definition at line 48 of file fieldIO.h.

Constructor & Destructor Documentation

FieldIO::FieldIO ( const IO_Format::Format format)
inline

< constructor. format specifies data layout on file.

Definition at line 61 of file fieldIO.h.

virtual FieldIO::~FieldIO ( )
inlinevirtual

Definition at line 62 of file fieldIO.h.

Member Function Documentation

void FieldIO::byte_swap ( void *  buf,
size_t  size,
size_t  nmemb 
)
inlineprotected

< convert byte order. alternative interface.

convert byte order of data, each of whose element has size bytes.

Definition at line 73 of file fieldIO.h.

void FieldIO::convert_endian ( void *  buf,
size_t  size,
size_t  nmemb 
)
protected

check if machine byte order is big-endian.

Definition at line 222 of file fieldIO.cpp.

void FieldIO::deliver ( Field vlocal,
Field vglobal 
)

distribute data on primary node over parallel nodes.

Definition at line 27 of file fieldIO.cpp.

void FieldIO::gather ( Field vglobal,
Field vlocal 
)

gather data on parallel nodes to primary node.

Definition at line 113 of file fieldIO.cpp.

bool FieldIO::is_bigendian ( ) const
protected

Definition at line 200 of file fieldIO.cpp.

virtual void FieldIO::read_file ( Field v,
std::string   
)
pure virtual

read data from file.

Implemented in FieldIO_LIME, and FieldIO_Fortran.

virtual void FieldIO::write_file ( Field v,
std::string   
)
pure virtual

write data to file.

Implemented in FieldIO_LIME, and FieldIO_Fortran.

Member Data Documentation

Index_lex FieldIO::idx
private

Definition at line 51 of file fieldIO.h.

const IO_Format::Format* FieldIO::m_format
protected

Definition at line 54 of file fieldIO.h.

Bridge::VerboseLevel FieldIO::m_vl
protected

Definition at line 56 of file fieldIO.h.


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