3 #ifndef DUNE_DGF_MACROGRID_HH
4 #define DUNE_DGF_MACROGRID_HH
9 #include <dune/common/parallel/mpihelper.hh>
17 class DuneGridFormatParser;
22 template<
class Gr
idType >
30 MacroGrid(
const char* filename, MPICommunicatorType MPICOMM = MPIHelper::getCommunicator())
33 , MPICOMM_(MPICOMM) {}
36 MacroGrid(MPICommunicatorType MPICOMM = MPIHelper::getCommunicator())
39 , MPICOMM_(MPICOMM) {}
42 template <
class Gr
idType>
45 return Impl<GridType>::generate(*
this,filename_,MPICOMM_);
48 static int rank( MPICommunicatorType MPICOMM )
52 MPI_Comm_rank( MPICOMM, &rank );
56 static int size( MPICommunicatorType MPICOMM )
60 MPI_Comm_size( MPICOMM, &size );
75 template<
class Gr
idType >
79 const char* filename, MPICommunicatorType MPICOMM = MPIHelper::getCommunicator() )
82 static_assert( GridType::dimension<0,
"DGF grid factory missing. Did you forget to add the corresponding dgf header or config.h?");
86 const char* filename_;
87 MPICommunicatorType MPICOMM_;
MacroGrid(const char *filename, MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
constructor given the name of a DGF file
Definition: macrogrid.hh:30
MPIHelper::MPICommunicator MPICommunicatorType
Definition: macrogrid.hh:26
Include standard header files.
Definition: agrid.hh:59
The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures us...
Definition: parser.hh:44
Definition: macrogrid.hh:19
MacroGrid(MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
constructor given the name of a DGF file
Definition: macrogrid.hh:36
GridType * createGrid()
returns pointer to a new instance of type GridType created from a DGF file
Definition: macrogrid.hh:43