Bridge++  Ver. 2.0.2
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 
21 
22 #include "fieldIO.h"
23 
24 #include "bridgeIO.h"
25 using Bridge::vout;
26 
28 
47 #ifdef USE_MPI
48 class FieldIO_Binary_Parallel : public FieldIO
49 {
50  public:
51  static const std::string class_name;
52 
53  public:
56 
57  void read_file(Field& v, const std::string& filename);
58  void write_file(Field& v, const std::string& filename);
59 
60  private:
61 
62  bool m_is_initialized;
63 
64  int m_nvol;
65  int m_nin_file;
66  int m_nex_file;
67 
68  MPI_Datatype m_type_vector;
69  MPI_Datatype m_type_tiled;
70 
71  int initialize(const Field& v);
72  int finalize();
73  int clear_layout();
74 };
75 
76 #else
77 
78 // for Single version, just an alias of FieldIO_Binary.
79 
81 {
82  public:
84 };
85 #endif
86 #endif
bridgeIO.h
FieldIO_Binary_Parallel::FieldIO_Binary_Parallel
FieldIO_Binary_Parallel(const IO_Format::Format *format)
Definition: fieldIO_Binary_Parallel.h:83
communicator_impl.h
IO_Format::Format
Definition: io_format.h:36
FieldIO_Binary::read_file
void read_file(Field &v, const std::string &filename)
read data from file. (‘const’ is added [18 Mar 2021])
Definition: fieldIO_Binary.cpp:29
fieldIO.h
FieldIO_Binary::class_name
static const std::string class_name
Definition: fieldIO_Binary.h:50
FieldIO_Binary
FieldIO_Binary class for file I/O of Field data in binary format.
Definition: fieldIO_Binary.h:47
FieldIO
FieldIO class for file I/O of space-time distributed data.
Definition: fieldIO.h:53
Field
Container of Field-type object.
Definition: field.h:46
FieldIO_Binary::write_file
void write_file(Field &v, const std::string &filename)
write data to file. (‘const’ is added [18 Mar 2021])
Definition: fieldIO_Binary.cpp:105
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
FieldIO_Binary_Parallel
FieldIO_Binary_Parallel class for file I/O of Field data in binary format using MPI parallel I/O.
Definition: fieldIO_Binary_Parallel.h:80