Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FieldIO_Fortran Class Reference

FieldIO_Fortran class for file I/O of Field data in Fortran binary format. More...

#include <fieldIO_Fortran.h>

Inheritance diagram for FieldIO_Fortran:
FieldIO

Public Member Functions

 FieldIO_Fortran (const IO_Format::Format *format)
 
void read_file (Field *v, const std::string filename)
 read data from file. More...
 
void write_file (Field *v, const std::string filename)
 write data to file. More...
 
void read_file (std::vector< Field * > &vv, const std::string &filename)
 
void write_file (std::vector< Field * > &vv, const std::string &filename)
 
- Public Member Functions inherited from FieldIO
 FieldIO (const IO_Format::Format *format)
 < constructor. format specifies data layout on file. More...
 
virtual ~FieldIO ()
 
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 Attributes

static const std::string class_name = "FieldIO_Fortran"
 
- Static Public Attributes inherited from FieldIO
static const std::string class_name = "FieldIO"
 

Additional Inherited Members

- Static Public Member Functions inherited from FieldIO
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 ()
 
- Protected Attributes inherited from FieldIO
const IO_Format::Formatm_format
 
Bridge::VerboseLevel m_vl
 

Detailed Description

FieldIO_Fortran class for file I/O of Field data in Fortran binary format.

This class reads configuration from binary data file generated by Fortran code. Before opening file, endian of the file must be specified using set_fileEndian() function. Only input from file is available. [28 Dec 2011 H.Matsufuru]

In this class, we assumed the data alignment as followes,

double U[NDIMENSION][NT][NZ][NY][NX][NCOLOR][NCOLOR][2] 

(i.e. the rightmost index runs fastest) [11 June 2012 S.UEDA]

FieldIO_Fortran class provides file I/O of Field data in Fortran binary format. Fortran binary data record has heading and trailing bytes that represents length of the record. The size of heading and trailer is 4 (32bit) in this implementation.

File I/O is performed on the primary node (rank 0 usually), and the field data is gathered from/scattered to parallel nodes.

Data layout is specified by format specified at constructor. The above corresponds to JLQCD layout.

Definition at line 52 of file fieldIO_Fortran.h.

Constructor & Destructor Documentation

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

Definition at line 58 of file fieldIO_Fortran.h.

Member Function Documentation

void FieldIO_Fortran::read_file ( Field v,
const std::string   
)
virtual

read data from file.

Implements FieldIO.

Definition at line 24 of file fieldIO_Fortran.cpp.

void FieldIO_Fortran::read_file ( std::vector< Field * > &  vv,
const std::string &  filename 
)
virtual

Reimplemented from FieldIO.

Definition at line 229 of file fieldIO_Fortran.cpp.

void FieldIO_Fortran::write_file ( Field v,
const std::string   
)
virtual

write data to file.

Implements FieldIO.

Definition at line 143 of file fieldIO_Fortran.cpp.

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

Reimplemented from FieldIO.

Definition at line 356 of file fieldIO_Fortran.cpp.

Member Data Documentation

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

Definition at line 55 of file fieldIO_Fortran.h.


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