![]() |
Gowdy solver
|
00001 /** 00002 * @file mpiDummyWorld.h 00003 * @brief A dummy message passing interface (MPI). 00004 * @author Mikica Kocic 00005 * @copyright GNU General Public License (GPLv3). 00006 */ 00007 00008 /** Implements a dummy message passing interface (MPI). 00009 * To enable a real MPI, use `mpic++` with `-D_USEMPI`. 00010 * 00011 * @warning The maximal slicing is not compliant with MPI since the boundary value 00012 * problem for the slicing differential equation requires access to the whole grid! 00013 */ 00014 class DummyMPIWorld 00015 { 00016 public: 00017 int size () const { return 1; } //!< The size of the MPI world 00018 int rank () const { return 0; } //!< Our rank in the MPI world 00019 00020 bool isFirstInRank () const { return true; } 00021 bool isLastInRank () const { return true; } 00022 00023 /** Exchange the boundary data with the neighboring ranks. 00024 */ 00025 void exchangeBoundaries 00026 ( 00027 void* left_ghost, //!< Where to put the right edge of the left neighbor 00028 void* left_edge, //!< Pointer to the left edge of our data 00029 void* right_edge, //!< Pointer to the right edge of our data 00030 void* right_ghost, //!< Where to put the left edge of the right neighbor 00031 int edge_size //!< The edge (or ghost) size 00032 ) 00033 {} 00034 00035 /** Wait the other ranks to have received our edges. 00036 */ 00037 void waitExchange () 00038 {} 00039 }; 00040 00041 typedef DummyMPIWorld MPIWorld;