3#ifndef DUNE_DGF_MACROGRID_HH
4#define DUNE_DGF_MACROGRID_HH
10#include <dune/grid/io/file/dgfparser/parser.hh>
17 class DuneGridFormatParser;
20 :
protected DuneGridFormatParser
22 template<
class Gr
idType >
23 friend struct DGFGridFactory;
33 , MPICOMM_(MPICOMM) {}
39 , MPICOMM_(MPICOMM) {}
42 template <
class Gr
idType>
43 inline GridType * createGrid ()
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 >
78 static GridType* generate(MacroGrid& mg,
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_;
MPI_Comm MPICommunicator
The type of the mpi communicator.
Definition: mpihelper.hh:182
static MPICommunicator getCommunicator()
get the default communicator
Definition: mpihelper.hh:190
Helpers for dealing with MPI.
Dune namespace.
Definition: alignedallocator.hh:14