Bridge++  Version 1.5.4
 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_Binary_Distributed FieldIO_Fortran FieldIO_LIME FieldIO_None FieldIO_Text FieldIO_Text_4x4x4x8 FieldIO_Binary_Parallel FieldIO_LIME_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...
 
virtual void read_file (std::vector< Field * > &vv, const std::string &filename)
 
virtual void write_file (std::vector< Field * > &vv, const std::string &filename)
 
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...
 

Static Public Member Functions

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

Static Public Attributes

static const std::string class_name = "FieldIO"
 

Protected Attributes

const IO_Format::Formatm_format
 
Bridge::VerboseLevel m_vl
 

Private Member Functions

 FieldIO (const FieldIO &)
 
FieldIOoperator= (const FieldIO &)
 

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 53 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 69 of file fieldIO.h.

virtual FieldIO::~FieldIO ( )
inlinevirtual

Definition at line 70 of file fieldIO.h.

FieldIO::FieldIO ( const FieldIO )
private

Member Function Documentation

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

< convert byte order. alternative interface.

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

Definition at line 91 of file fieldIO.h.

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

check if machine byte order is big-endian.

Definition at line 227 of file fieldIO.cpp.

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

distribute data on primary node over parallel nodes.

Definition at line 30 of file fieldIO.cpp.

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

gather data on parallel nodes to primary node.

Definition at line 119 of file fieldIO.cpp.

bool FieldIO::is_bigendian ( )
static

Definition at line 206 of file fieldIO.cpp.

FieldIO& FieldIO::operator= ( const FieldIO )
private
virtual void FieldIO::read_file ( Field v,
std::string   
)
pure virtual
void FieldIO::read_file ( std::vector< Field * > &  vv,
const std::string &  filename 
)
virtual

Reimplemented in FieldIO_Fortran.

Definition at line 310 of file fieldIO.cpp.

virtual void FieldIO::write_file ( Field v,
std::string   
)
pure virtual
void FieldIO::write_file ( std::vector< Field * > &  vv,
const std::string &  filename 
)
virtual

Reimplemented in FieldIO_Fortran.

Definition at line 321 of file fieldIO.cpp.

Member Data Documentation

const std::string FieldIO::class_name = "FieldIO"
static

Definition at line 56 of file fieldIO.h.

Index_lex FieldIO::idx
private

Definition at line 59 of file fieldIO.h.

const IO_Format::Format* FieldIO::m_format
protected

Definition at line 62 of file fieldIO.h.

Bridge::VerboseLevel FieldIO::m_vl
protected

Definition at line 64 of file fieldIO.h.


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