Bridge++  Ver. 2.0.2
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_NERSC FieldIO_None FieldIO_Text FieldIO_Text_4x4x4x8

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, const std::string &)=0
 read data from file. (‘const’ is added [18 Mar 2021]) More...
 
virtual void write_file (Field &v, const std::string &)=0
 write data to file. (‘const’ is added [18 Mar 2021]) 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...
 

Static Public Member Functions

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() [1/2]

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

< constructor. format specifies data layout on file.

Definition at line 69 of file fieldIO.h.

◆ ~FieldIO()

virtual FieldIO::~FieldIO ( )
inlinevirtual

Definition at line 70 of file fieldIO.h.

◆ FieldIO() [2/2]

FieldIO::FieldIO ( const FieldIO )
private

Member Function Documentation

◆ convert_endian()

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

check if machine byte order is big-endian.

Definition at line 231 of file fieldIO.cpp.

◆ deliver()

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

distribute data on primary node over parallel nodes.

Definition at line 30 of file fieldIO.cpp.

◆ gather()

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

gather data on parallel nodes to primary node.

Definition at line 121 of file fieldIO.cpp.

◆ is_bigendian()

bool FieldIO::is_bigendian ( )
static

Definition at line 210 of file fieldIO.cpp.

◆ operator=()

FieldIO& FieldIO::operator= ( const FieldIO )
private

◆ read_file()

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

read data from file. (‘const’ is added [18 Mar 2021])

Implemented in FieldIO_LIME, FieldIO_Fortran, FieldIO_Binary, FieldIO_NERSC, FieldIO_Binary_Distributed, FieldIO_Text, FieldIO_None, and FieldIO_Text_4x4x4x8.

◆ write_file()

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

write data to file. (‘const’ is added [18 Mar 2021])

Implemented in FieldIO_LIME, FieldIO_Fortran, FieldIO_Binary, FieldIO_NERSC, FieldIO_Binary_Distributed, FieldIO_Text, FieldIO_None, and FieldIO_Text_4x4x4x8.

Member Data Documentation

◆ class_name

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

Definition at line 56 of file fieldIO.h.

◆ idx

Index_lex FieldIO::idx
private

Definition at line 59 of file fieldIO.h.

◆ m_format

const IO_Format::Format* FieldIO::m_format
protected

Definition at line 62 of file fieldIO.h.

◆ m_vl

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: