Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fieldIO_Binary_Parallel.h
Go to the documentation of this file.
1 
14 #ifndef FIELDIO_BINARY_PARALLEL_INCLUDED
15 #define FIELDIO_BINARY_PARALLEL_INCLUDED
16 
17 #include <string>
18 using std::string;
19 
20 #ifdef USE_MPI
21 #include <mpi.h>
23 #endif
24 
25 #include "fieldIO.h"
26 
27 #include "bridgeIO.h"
28 using Bridge::vout;
29 
31 
50 #ifdef USE_MPI
51 class FieldIO_Binary_Parallel : public FieldIO
52 {
53  public:
54  static const std::string class_name;
55 
56  public:
59 
60  void read_file(Field *v, const std::string filename);
61  void write_file(Field *v, const std::string filename);
62 
63  private:
64 
65  bool m_is_initialized;
66 
67  int m_nvol;
68  int m_nin_file;
69  int m_nex_file;
70 
71  MPI_Datatype m_type_vector;
72  MPI_Datatype m_type_tiled;
73 
74  int initialize(const Field *v);
75  int finalize();
76  int clear_layout();
77 };
78 
79 #else
80 
81 // for Single version, just an alias of FieldIO_Binary.
82 
84 {
85  public:
87 };
88 #endif
89 #endif
void read_file(Field *v, const std::string filename)
read data from file.
BridgeIO vout
Definition: bridgeIO.cpp:503
Container of Field-type object.
Definition: field.h:45
void write_file(Field *v, const std::string filename)
write data to file.
FieldIO_Binary_Parallel(const IO_Format::Format *format)
FieldIO_Binary_Parallel class for file I/O of Field data in binary format using MPI parallel I/O...
FieldIO_Binary class for file I/O of Field data in binary format.
static const std::string class_name
FieldIO class for file I/O of space-time distributed data.
Definition: fieldIO.h:53