3 #ifndef DUNE_ALU3DGRID_ALUGRID_HH
4 #define DUNE_ALU3DGRID_ALUGRID_HH
7 #if HAVE_ALUGRID || DOXYGEN
27 #if ALU3DGRID_PARALLEL
53 template< ALUGr
idElementType elType, ALUGr
idRefinementType refineType,
class Comm >
54 class ALUGrid< 3, 3, elType, refineType, Comm >
61 enum { dimworld = 3 };
63 typedef typename BaseType::MPICommunicatorType MPICommunicatorType;
83 const MPICommunicatorType mpiComm = BaseType::defaultCommunicator(),
84 const DuneBoundaryProjectionType* bndProject = 0,
85 const DuneBoundaryProjectionVector* bndVector = 0,
86 const bool verb =
true ) :
87 BaseType(macroName, mpiComm, bndProject, bndVector, refineType )
89 const bool verbose = verb && this->comm().rank() == 0;
93 <<
" from macro grid file '" << macroName <<
"'. \n\n";
97 static std::string
name () {
return std::string(
"ALUGrid"); }
101 std::string elt ( elType ==
cube ?
"cube," :
"simplex," );
102 std::string ref ( refineType ==
nonconforming ?
"nonconforming>" :
"conforming>" );
103 std::stringstream suffix;
104 suffix <<
"<"<<dim<<
","<<dimworld<<
"," << elt << ref;
119 const DuneBoundaryProjectionType* bndProject ,
120 const DuneBoundaryProjectionVector* bndVector,
121 const std::string macroName,
122 const bool verb =
true ) :
123 BaseType(
"", mpiComm, bndProject, bndVector, refineType )
125 const bool verbose = verb && this->comm().rank() == 0;
129 <<
" from macro grid file '" << macroName <<
"'. \n\n";
134 ALUGrid(
const MPICommunicatorType mpiComm = BaseType::defaultCommunicator()) :
135 BaseType(
"", mpiComm,
136 (const DuneBoundaryProjectionType *) 0,
137 (const DuneBoundaryProjectionVector* ) 0,
140 if(this->comm().rank() == 0)
142 std::cout <<
"\nCreated empty " <<
ALUGridParallelSerial() <<
" " << name() << nameSuffix() <<
"." << std::endl << std::endl;
146 enum { dimension=BaseType::dimension, dimensionworld=BaseType::dimensionworld};
147 typedef typename BaseType::ctype
ctype;
149 typedef typename GridFamily::Traits
Traits;
157 typedef typename Traits:: template Codim<0>::LeafIterator
LeafIterator;
163 template< PartitionIteratorType pitype >
175 template< PartitionIteratorType pitype >
180 return LevelGridView( LevelGridViewImp( *
this, level ) );
183 template< PartitionIteratorType pitype >
188 return LeafGridView( LeafGridViewImp( *
this ) );
194 return LevelGridView( LevelGridViewImp( *
this, level ) );
200 return LeafGridView( LeafGridViewImp( *
this ) );
203 template< PartitionIteratorType pitype >
208 return LevelGridView( LevelGridViewImp( *
this, level ) );
211 template< PartitionIteratorType pitype >
216 return LeafGridView( LeafGridViewImp( *
this ) );
222 return LevelGridView( LevelGridViewImp( *
this, level ) );
228 return LeafGridView( LeafGridViewImp( *
this ) );
244 This& operator = (
const ALUGrid& g);
249 #endif // #if HAVE_ALUGRID || DOXYGEN
static std::string nameSuffix()
Definition: alugrid/3d/alugrid.hh:99
LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:191
Definition: alugrid/common/declaration.hh:67
Traits::template Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid/3d/alugrid.hh:156
Partition< pitype >::LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:212
Partition< pitype >::LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:204
ALUGrid(const MPICommunicatorType mpiComm, const DuneBoundaryProjectionType *bndProject, const DuneBoundaryProjectionVector *bndVector, const std::string macroName, const bool verb=true)
constructor called from ALUGridFactory for creating ALUGrid with conforming refinement from given mac...
Definition: alugrid/3d/alugrid.hh:118
GridFamily::Traits Traits
Definition: alugrid/3d/alugrid.hh:149
Include standard header files.
Definition: agrid.hh:59
Traits::GlobalIdSet GlobalIdSet
Definition: alugrid/3d/alugrid.hh:151
static std::string name()
Definition: alugrid/3d/alugrid.hh:97
Definition: alugrid/common/declaration.hh:18
Definition: alugrid/3d/alugrid.hh:54
[ provides Dune::Grid ]
Definition: alugrid/common/declaration.hh:63
Traits::LocalIdSet LocalIdSet
Definition: alugrid/3d/alugrid.hh:152
BaseType::ctype ctype
Definition: alugrid/3d/alugrid.hh:147
GridFamily::LevelIndexSetImp LevelIndexSetImp
Definition: alugrid/3d/alugrid.hh:153
Dune::GridView< DefaultLeafGridViewTraits< const This, pitype > > LeafGridView
Definition: alugrid/3d/alugrid.hh:169
Partition< All_Partition >::LeafGridView LeafGridView
Definition: alugrid/3d/alugrid.hh:173
LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:197
BaseType::DuneBoundaryProjectionType DuneBoundaryProjectionType
type of boundary projection
Definition: alugrid/3d/alugrid.hh:67
BaseType::LeafIteratorImp LeafIteratorImp
Definition: alugrid/3d/alugrid.hh:155
Partition< pitype >::LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:184
Partition< pitype >::LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:176
LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:219
BaseType::GridFamily GridFamily
Definition: alugrid/3d/alugrid.hh:148
BaseType::LocalIdSetImp LocalIdSetImp
Definition: alugrid/3d/alugrid.hh:150
Dune::GridView< DefaultLevelGridViewTraits< const This, pitype > > LevelGridView
Definition: alugrid/3d/alugrid.hh:167
LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:225
BaseType::ObjectStreamType ObjectStreamType
Definition: alugrid/3d/alugrid.hh:161
static const char * ALUGridParallelSerial()
Definition: alugrid/3d/alugrid.hh:25
BaseType::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
type of boundary projection
Definition: alugrid/3d/alugrid.hh:70
Grid view abstract base class.
Definition: common/gridview.hh:58
ALUGrid(const std::string macroName, const MPICommunicatorType mpiComm=BaseType::defaultCommunicator(), const DuneBoundaryProjectionType *bndProject=0, const DuneBoundaryProjectionVector *bndVector=0, const bool verb=true)
constructor for creating ALUGrid from given macro grid file
Definition: alugrid/3d/alugrid.hh:82
Definition: alugrid/common/declaration.hh:20
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:51
ViewTraits::GridViewImp GridViewImp
Definition: common/gridview.hh:71
ALUGrid(const MPICommunicatorType mpiComm=BaseType::defaultCommunicator())
constructor creating empty grid, empty string creates empty grid
Definition: alugrid/3d/alugrid.hh:134
Traits::template Codim< 0 >::LeafIterator LeafIterator
Definition: alugrid/3d/alugrid.hh:157
Partition< All_Partition >::LevelGridView LevelGridView
Definition: alugrid/3d/alugrid.hh:172
Definition: alugrid/3d/grid.hh:84
BaseType::HierarchicIteratorImp HierarchicIteratorImp
Definition: alugrid/3d/alugrid.hh:160
GridFamily::LeafIndexSetImp LeafIndexSetImp
Definition: alugrid/3d/alugrid.hh:154
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:16