FEI Version of the Day
fei_EqnComm.hpp
00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2007 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 _fei_EqnComm_hpp_
00010 #define _fei_EqnComm_hpp_
00011 
00012 #include <fei_macros.hpp>
00013 #include <fei_fwd.hpp>
00014 #include <fei_mpi.h>
00015 
00016 namespace fei {
00017 class EqnComm {
00018  public:
00020   EqnComm(MPI_Comm comm, int numLocalEqns);
00021   EqnComm(MPI_Comm comm, int numLocalEqns, const std::vector<int>& globalOffsets);
00022 
00024   virtual ~EqnComm();
00025 
00026   const std::vector<int>& getGlobalOffsets() const;
00027 
00028   int getOwnerProc(int eqn) const;
00029 
00030  private:
00031   MPI_Comm comm_;
00032   std::vector<int> globalOffsets_;
00033 };//class EqnComm
00034 }//namespace fei
00035 #endif
00036 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends