FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
snl_fei_BlkSizeMsgHandler.hpp
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef _snl_fei_BlkSizeMsgHandler_hpp_
10 #define _snl_fei_BlkSizeMsgHandler_hpp_
11 
12 #include <fei_macros.hpp>
13 #include <fei_SharedPtr.hpp>
14 #include <fei_VectorSpace.hpp>
15 #include <fei_Graph.hpp>
16 #include <fei_CommUtils.hpp>
17 
18 namespace snl_fei {
19 
22  public:
25  fei::Graph* graph,
26  MPI_Comm comm);
28  virtual ~BlkSizeMsgHandler();
29 
31  int do_the_exchange();
32 
34  std::vector<int>& getSendProcs();
36  std::vector<int>& getRecvProcs();
37 
39  int getSendMessageLength(int destProc, int& messageLength);
41  int getSendMessage(int destProc, std::vector<int>& message);
43  int processRecvMessage(int srcProc, std::vector<int>& message);
44 
45  private:
46  fei::comm_map* remote_colIndices_;
47  fei::comm_map* local_colIndices_;
48  fei::VectorSpace* vecSpace_;
49  snl_fei::PointBlockMap* ptBlkMap_;
50  fei::Graph* graph_;
51  MPI_Comm comm_;
52  std::vector<int> sendProcs_;
53  std::vector<int> recvProcs_;
54 
55  bool firstExchange_;
56 };
57 
58 } // namespace snl_fei
59 
60 #endif
61 
int getSendMessageLength(int destProc, int &messageLength)
int getSendMessage(int destProc, std::vector< int > &message)
int processRecvMessage(int srcProc, std::vector< int > &message)
BlkSizeMsgHandler(fei::VectorSpace *vspace, fei::Graph *graph, MPI_Comm comm)