moab
|
00001 00016 #ifndef MOAB_PROC_CONFIG_HPP 00017 #define MOAB_PROC_CONFIG_HPP 00018 00019 #include "moab_mpi.h" 00020 00021 #include "moab/Types.hpp" 00022 #include "moab/Range.hpp" 00023 #include "moab/gs.hpp" 00024 00025 00026 00027 namespace moab { 00028 00029 class Interface; 00030 00032 class ProcConfig { 00033 public: 00034 00035 ProcConfig(MPI_Comm proc_comm); 00036 00037 ~ProcConfig(); 00038 00040 unsigned proc_rank() const 00041 { return procRank; } 00042 00044 unsigned proc_size() const 00045 { return procSize; } 00046 00048 gs_data::crystal_data *crystal_router(bool construct_if_missing = true); 00049 00051 MPI_Comm proc_comm() const {return procComm;} 00052 void proc_comm(MPI_Comm this_comm) {procComm = this_comm;} 00053 00055 void proc_rank(unsigned r) {procRank = r;} 00056 void proc_size(unsigned s) {procSize = s;} 00057 00058 private: 00059 00061 MPI_Comm procComm; 00062 00064 unsigned procRank; 00065 00067 unsigned procSize; 00068 00070 gs_data::crystal_data* crystalData; 00071 00072 }; 00073 00074 } // namespace moab 00075 00076 #endif