Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __MEDSPLITTER_MeshSendReceive_HXX__
00025 #define __MEDSPLITTER_MeshSendReceive_HXX__
00026
00027 #include "MEDSPLITTER.hxx"
00028
00029 #ifdef HAVE_MPI2
00030 #include <mpi.h>
00031 #else
00032 typedef int MPI_Request;
00033 #endif
00034
00035 #include <vector>
00036
00037 namespace MEDMEM
00038 {
00039 class MESH;
00040 }
00041
00042 namespace MEDSPLITTER
00043 {
00052 class MEDSPLITTER_EXPORT MeshSendReceive
00053 {
00054 public:
00055
00056 MeshSendReceive();
00057 ~MeshSendReceive();
00058
00059
00060
00061 void send(int irank, int idomain, MEDMEM::MESH* mesh,
00062 const std::vector<int>& cell_glob_nums,
00063 const std::vector<int>& face_glob_nums,
00064 const std::vector<int>& node_glob_nums);
00065
00066
00067 MEDMEM::MESH* recv(int irank, int idomain,
00068 std::vector<int>& cell_glob_numbers,
00069 std::vector<int>& face_glob_numbers,
00070 std::vector<int>& node_glob_numbers);
00071
00073 MEDMEM::MESH* getMesh() { return _mesh; }
00074
00075
00076 bool isSent();
00077
00078
00079 void clear();
00080
00081 private:
00082
00083 std::vector< int > _int_buf;
00084 std::vector< int > _node_glob_numbers, _cell_glob_numbers, _face_glob_numbers;
00085 std::vector< char> _char_buf;
00086
00087 MEDMEM::MESH* _mesh;
00088
00089 MPI_Request _int_request, _coord_request, _char_request;
00090 MPI_Request _node_nums_request, _cell_nums_request, _face_nums_request;
00091 };
00092 }
00093
00094
00095 #endif