MOAB: Mesh Oriented datABase  (version 5.4.1)
ParallelData.hpp
Go to the documentation of this file.
00001 #ifndef MOAB_PARALLEL_DATA_HPP
00002 #define MOAB_PARALLEL_DATA_HPP
00003 
00004 #include "moab/Forward.hpp"
00005 #include "moab/Range.hpp"
00006 
00007 namespace moab
00008 {
00009 
00010 class ParallelComm;
00011 
00012 /**
00013  * \brief Parallel data in MOAB
00014  * \author Tim Tautges
00015  *
00016  *  This class implements methods to retrieve information about
00017  * the parallel mesh from MOAB.  Most of this data can be retrieved
00018  * directly from MOAB as sets and tags; this class provides convenience
00019  * methods implemented on top of other MOAB functions.
00020  *
00021  */
00022 class ParallelData
00023 {
00024   public:
00025     //! constructor; if non-null parallelcomm, that is used to
00026     //! determine rank, otherwise rank is taken from impl
00027     ParallelData( Interface* impl, ParallelComm* pcomm = NULL );
00028 
00029     //! return partition sets; if tag_name is input, gets sets with
00030     //! that tag name, otherwise uses PARALLEL_PARTITION tag
00031     ErrorCode get_partition_sets( Range& part_sets, const char* tag_name = NULL );
00032 
00033     //! get communication interface sets and the processors with which
00034     //! this processor communicates; sets are sorted by processor
00035     ErrorCode get_interface_sets( std::vector< EntityHandle >& iface_sets, std::vector< int >& iface_procs );
00036 
00037   private:
00038     //! interface instance to which this instance corresponds
00039     Interface* mbImpl;
00040 
00041     //! ParallelComm object to which this is bound
00042     ParallelComm* parallelComm;
00043 };
00044 
00045 inline ParallelData::ParallelData( Interface* impl, ParallelComm* pcomm ) : mbImpl( impl ), parallelComm( pcomm ) {}
00046 
00047 }  // namespace moab
00048 
00049 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines