snl_fei_SubdMsgHandler.hpp

00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2005 Sandia Corporation.                              */
00003 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00004 /*    non-exclusive license for use of this work by or on behalf      */
00005 /*    of the U.S. Government.  Export of this program may require     */
00006 /*    a license from the United States Government.                    */
00007 /*--------------------------------------------------------------------*/
00008 
00009 #ifndef _snl_fei_SubdMsgHandler_hpp_
00010 #define _snl_fei_SubdMsgHandler_hpp_
00011 
00012 #include <fei_macros.hpp>
00013 #include <fei_CommUtils.hpp>
00014 #include <fei_fwd.hpp>
00015 
00016 #include <vector>
00017 
00018 namespace fei {
00019   class SharedIDs;
00020 }
00021 
00022 namespace snl_fei {
00024   class SubdMsgHandler : public fei::MessageHandler<int> {
00025   public:
00027     SubdMsgHandler(RecordCollection* recordCollection,
00028        fei::SharedIDs* sharedIDTable,
00029        fei::SharedIDs* subdomainIDTable);
00031     virtual ~SubdMsgHandler();
00032 
00034     std::vector<int>& getSendProcs();
00035 
00037     std::vector<int>& getRecvProcs();
00038 
00040     int getSendMessageLength(int destProc, int& messageLength);
00041 
00043     int getSendMessage(int destProc, std::vector<int>& message);
00044 
00046     int processRecvMessage(int srcProc, std::vector<int>& message);
00047 
00049     void setSendPattern(fei::comm_map* pattern)
00050       { sendPattern_ = pattern; }
00051 
00053     void setRecvPattern(fei::comm_map* pattern)
00054       { recvPattern_ = pattern; }
00055 
00056   private:
00057     fei::comm_map* sendPattern_;
00058     fei::comm_map* recvPattern_;
00059     RecordCollection* recordCollection_;
00060     fei::SharedIDs* sharedIDTable_;
00061     fei::SharedIDs* subdomainIDTable_;
00062 
00063     std::vector<int> sendProcs_;
00064     std::vector<int> recvProcs_;
00065   };//class SubdMsgHandler
00066 }//namespace snl_fei
00067 
00068 #endif // _snl_fei_SubdMsgHandler_hpp_
00069 

Generated on Wed May 12 21:30:42 2010 for FEI by  doxygen 1.4.7