3 #ifndef DUNE_ALU3DGRID_ALUGRID_HH
4 #define DUNE_ALU3DGRID_ALUGRID_HH
7 #if HAVE_ALUGRID || DOXYGEN
26 template<
int dim,
int dimworld >
29 template<
int dim,
int dimworld >
34 #if ALU3DGRID_PARALLEL
55 enum { dimworld = 3 };
79 const MPICommunicatorType mpiComm = BaseType::defaultCommunicator(),
82 const bool verb =
true ) :
85 const bool verbose = verb && this->comm().rank() == 0;
89 std::cout <<
"> from macro grid file '" << macroName <<
"'. \n\n";
107 const std::string macroName,
108 const bool verb =
true ) :
111 const bool verbose = verb && this->comm().rank() == 0;
115 std::cout <<
"> from macro grid file '" << macroName <<
"'. \n\n";
122 ALUCubeGrid(
const MPICommunicatorType mpiComm = BaseType::defaultCommunicator() ) :
128 if(this->comm().rank() == 0)
130 std::cout <<
"\nCreated empty ALUCubeGrid<"<<dim<<
","<<dimworld <<
">. \n\n";
134 enum {dimension=BaseType::dimension,dimensionworld=BaseType::dimensionworld};
151 template< PartitionIteratorType pitype >
163 template< PartitionIteratorType pitype >
168 return LevelGridView( LevelGridViewImp( *
this, level ) );
171 template< PartitionIteratorType pitype >
176 return LeafGridView( LeafGridViewImp( *
this ) );
191 template< PartitionIteratorType pitype >
196 return LevelGridView( LevelGridViewImp( *
this, level ) );
199 template< PartitionIteratorType pitype >
204 return LeafGridView( LeafGridViewImp( *
this ) );
252 enum { dimworld = 3 };
276 const MPICommunicatorType mpiComm = BaseType::defaultCommunicator(),
279 const bool verb =
true ) :
282 const bool verbose = verb && this->comm().rank() == 0;
286 std::cout <<
"> from macro grid file '" << macroName <<
"'. \n\n";
304 const std::string macroName,
305 const bool verb =
true ) :
308 const bool verbose = verb && this->comm().rank() == 0;
312 std::cout <<
"> from macro grid file '" << macroName <<
"'. \n\n";
319 ALUSimplexGrid(
const MPICommunicatorType mpiComm = BaseType::defaultCommunicator()) :
325 if(this->comm().rank() == 0)
327 std::cout <<
"\nCreated empty ALUSimplexGrid<"<<dim<<
","<<dimworld <<
">. \n\n";
331 enum {dimension=BaseType::dimension,dimensionworld=BaseType::dimensionworld};
348 template< PartitionIteratorType pitype >
360 template< PartitionIteratorType pitype >
365 return LevelGridView( LevelGridViewImp( *
this, level ) );
368 template< PartitionIteratorType pitype >
373 return LeafGridView( LeafGridViewImp( *
this ) );
388 template< PartitionIteratorType pitype >
393 return LevelGridView( LevelGridViewImp( *
this, level ) );
396 template< PartitionIteratorType pitype >
401 return LeafGridView( LeafGridViewImp( *
this ) );
452 template< ALUGr
idElementType elType, ALUGr
idRefinementType refineType,
class Comm >
453 class ALUGrid< 3, 3, elType, refineType, Comm >
460 enum { dimworld = 3 };
462 typedef typename BaseType::MPICommunicatorType MPICommunicatorType;
482 const MPICommunicatorType mpiComm = BaseType::defaultCommunicator(),
485 const bool verb =
true ) :
486 BaseType(macroName, mpiComm, bndProject, bndVector, refineType )
488 const bool verbose = verb && this->comm().rank() == 0;
492 <<
" from macro grid file '" << macroName <<
"'. \n\n";
496 static std::string
name () {
return std::string(
"ALUGrid"); }
500 std::string elt ( elType ==
cube ?
"cube," :
"simplex," );
501 std::string ref ( refineType ==
nonconforming ?
"nonconforming>" :
"conforming>" );
502 std::stringstream suffix;
503 suffix <<
"<"<<dim<<
","<<dimworld<<
"," << elt << ref;
520 const std::string macroName,
521 const bool verb =
true ) :
522 BaseType(
"", mpiComm, bndProject, bndVector, refineType )
524 const bool verbose = verb && this->comm().rank() == 0;
528 <<
" from macro grid file '" << macroName <<
"'. \n\n";
533 ALUGrid(
const MPICommunicatorType mpiComm = BaseType::defaultCommunicator()) :
534 BaseType(
"", mpiComm,
539 if(this->comm().rank() == 0)
541 std::cout <<
"\nCreated empty " <<
ALUGridParallelSerial() <<
" " << name() << nameSuffix() <<
"." << std::endl << std::endl;
545 enum { dimension=BaseType::dimension, dimensionworld=BaseType::dimensionworld};
546 typedef typename BaseType::ctype
ctype;
548 typedef typename GridFamily::Traits
Traits;
556 typedef typename Traits:: template Codim<0>::LeafIterator
LeafIterator;
562 template< PartitionIteratorType pitype >
574 template< PartitionIteratorType pitype >
579 return LevelGridView( LevelGridViewImp( *
this, level ) );
582 template< PartitionIteratorType pitype >
587 return LeafGridView( LeafGridViewImp( *
this ) );
602 template< PartitionIteratorType pitype >
607 return LevelGridView( LevelGridViewImp( *
this, level ) );
610 template< PartitionIteratorType pitype >
615 return LeafGridView( LeafGridViewImp( *
this ) );
648 #endif // #if HAVE_ALUGRID || DOXYGEN
GridFamily::Traits Traits
Definition: alugrid/3d/alugrid.hh:548
BaseType::LeafIteratorImp LeafIteratorImp
Definition: alugrid/3d/alugrid.hh:143
Traits::Codim< 0 >::LeafIterator LeafIterator
Definition: alugrid/3d/alugrid.hh:145
Partition< pitype >::LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:200
BaseType::LeafIteratorImp LeafIteratorImp
Definition: alugrid/3d/alugrid.hh:554
static const char * ALUGridParallelSerial()
Definition: alugrid/3d/alugrid.hh:32
Partition< pitype >::LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:575
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:481
ALUCubeGrid(const MPICommunicatorType mpiComm, const DuneBoundaryProjectionType *bndProject, const DuneBoundaryProjectionVector *bndVector, const std::string macroName, const bool verb=true)
constructor called from ALUGridFactory for creating ALUCubeGrid from given macro grid file ...
Definition: alugrid/3d/alugrid.hh:104
Traits::Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid/3d/alugrid.hh:144
LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:404
BaseType::LeafIteratorImp LeafIteratorImp
Definition: alugrid/3d/alugrid.hh:340
Traits::GlobalIdSet GlobalIdSet
Definition: alugrid/3d/alugrid.hh:336
Partition< All_Partition >::LeafGridView LeafGridView
Definition: alugrid/3d/alugrid.hh:161
BaseType::HierarchicIteratorImp HierarchicIteratorImp
Definition: alugrid/3d/alugrid.hh:345
Partition< All_Partition >::LevelGridView LevelGridView
Definition: alugrid/3d/alugrid.hh:571
[ provides Dune::Grid ]
Definition: alugrid/3d/entity.hh:36
GridFamily::Traits Traits
Definition: alugrid/3d/alugrid.hh:334
LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:185
ALUCubeGrid(const std::string macroName, const MPICommunicatorType mpiComm=BaseType::defaultCommunicator(), const DuneBoundaryProjectionType *bndProject=0, const DuneBoundaryProjectionVector *bndVector=0, const bool verb=true)
constructor for creating ALUCubeGrid from given macro grid file
Definition: alugrid/3d/alugrid.hh:78
Traits::Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid/3d/alugrid.hh:341
GridFamily::LeafIndexSetImp LeafIndexSetImp
Definition: alugrid/3d/alugrid.hh:142
ALUCubeGrid(const MPICommunicatorType mpiComm=BaseType::defaultCommunicator())
constructor creating empty grid
Definition: alugrid/3d/alugrid.hh:122
Partition< All_Partition >::LeafGridView LeafGridView
Definition: alugrid/3d/alugrid.hh:572
GridFamily::Traits Traits
Definition: alugrid/3d/alugrid.hh:137
BaseType::ObjectStreamType ObjectStreamType
Definition: alugrid/3d/alugrid.hh:149
Definition: alugrid/common/declaration.hh:18
LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:382
Partition< pitype >::LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:583
Partition< pitype >::LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:192
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:16
ALU3DSPACE GatherScatterType::ObjectStreamType ObjectStreamType
Definition: alugrid/3d/grid.hh:467
[ provides Dune::Grid ]
Definition: alugrid.hh:85
ALUSimplexGrid(const std::string macroName, const MPICommunicatorType mpiComm=BaseType::defaultCommunicator(), const DuneBoundaryProjectionType *bndProject=0, const DuneBoundaryProjectionVector *bndVector=0, const bool verb=true)
constructor for creating ALUSimplexGrid from given macro grid file
Definition: alugrid/3d/alugrid.hh:275
LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:207
BaseType::LocalIdSetImp LocalIdSetImp
Definition: alugrid/3d/alugrid.hh:549
Dune::GridView< DefaultLevelGridViewTraits< const This, pitype > > LevelGridView
Definition: alugrid/3d/alugrid.hh:566
Types for GridView.
Definition: common/grid.hh:418
Partition< pitype >::LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:389
[ provides Dune::Grid ]
Definition: alugrid.hh:53
LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:590
LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:624
Definition: alugrid/3d/grid.hh:271
ALUSimplexGrid(const MPICommunicatorType mpiComm=BaseType::defaultCommunicator())
Definition: alugrid/3d/alugrid.hh:319
BaseType::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
type of boundary projection
Definition: alugrid/3d/alugrid.hh:64
Traits::template Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid/3d/alugrid.hh:555
BaseType::HierarchicIteratorImp HierarchicIteratorImp
Definition: alugrid/3d/alugrid.hh:148
Traits::Codim< 0 >::LeafIterator LeafIterator
Definition: alugrid/3d/alugrid.hh:342
BaseType::ctype ctype
Definition: alugrid/3d/alugrid.hh:332
Dune::GridView< DefaultLevelGridViewTraits< const This, pitype > > LevelGridView
Definition: alugrid/3d/alugrid.hh:155
Partition< All_Partition >::LevelGridView LevelGridView
Definition: alugrid/3d/alugrid.hh:160
Traits::GlobalIdSet GlobalIdSet
Definition: alugrid/3d/alugrid.hh:139
Dune::GridView< DefaultLeafGridViewTraits< const This, pitype > > LeafGridView
Definition: alugrid/3d/alugrid.hh:157
Traits::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
boundary projection type
Definition: alugrid/3d/grid.hh:496
Traits::LocalIdSet LocalIdSet
Definition: alugrid/3d/alugrid.hh:140
ALUGrid(const MPICommunicatorType mpiComm, const DuneBoundaryProjectionType *bndProject, const DuneBoundaryProjectionVector *bndVector, const std::string macroName, const bool verb=true)
constructor called from ALUGridFactory for creating ALUConformGrid from given macro grid file ...
Definition: alugrid/3d/alugrid.hh:517
BaseType::DuneBoundaryProjectionType DuneBoundaryProjectionType
type of boundary projection
Definition: alugrid/3d/alugrid.hh:61
Partition< pitype >::LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:361
ALUGrid(const MPICommunicatorType mpiComm=BaseType::defaultCommunicator())
constructor creating empty grid, empty string creates empty grid
Definition: alugrid/3d/alugrid.hh:533
Traits::template Codim< 0 >::LeafIterator LeafIterator
Definition: alugrid/3d/alugrid.hh:556
Definition: alugrid/3d/entity.hh:30
static std::string nameSuffix()
Definition: alugrid/3d/alugrid.hh:498
LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:376
LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:213
Dune::GridView< DefaultLevelGridViewTraits< const This, pitype > > LevelGridView
Definition: alugrid/3d/alugrid.hh:352
Partition< All_Partition >::LevelGridView LevelGridView
Definition: alugrid/3d/alugrid.hh:357
Definition: alugrid/common/declaration.hh:20
Grid view abstract base classInterface class for a view on grids. Grids return two types of view...
Definition: common/gridview.hh:56
[ provides Dune::Grid ]
Definition: alugrid/common/declaration.hh:63
Leaf iterator.
Definition: alugrid/3d/entity.hh:34
Partition< pitype >::LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:397
LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:179
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:23
Definition: alugrid/3d/grid.hh:84
Partition< pitype >::LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:164
Partition< pitype >::LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:369
Partition< pitype >::LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:611
Partition< pitype >::LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:603
Definition: alugrid/3d/grid.hh:315
Definition: alugrid/common/declaration.hh:67
BaseType::GridFamily GridFamily
Definition: alugrid/3d/alugrid.hh:136
Traits::GlobalIdSet GlobalIdSet
Definition: alugrid/3d/alugrid.hh:550
static std::string name()
Definition: alugrid/3d/alugrid.hh:496
Partition< pitype >::LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:172
BaseType::HierarchicIteratorImp HierarchicIteratorImp
Definition: alugrid/3d/alugrid.hh:559
ct ctype
Define type used for coordinates in grid module.
Definition: common/grid.hh:546
GridFamily::LeafIndexSetImp LeafIndexSetImp
Definition: alugrid/3d/alugrid.hh:553
constructor for creating ALUSimplexGrid from given macro grid file
Definition: alugrid/3d/alugrid.hh:245
Partition< All_Partition >::LeafGridView LeafGridView
Definition: alugrid/3d/alugrid.hh:358
Dune::GridView< DefaultLeafGridViewTraits< const This, pitype > > LeafGridView
Definition: alugrid/3d/alugrid.hh:354
Dune::GridView< DefaultLeafGridViewTraits< const This, pitype > > LeafGridView
Definition: alugrid/3d/alugrid.hh:568
constructor for creating ALUCubeGrid from given macro grid file
Definition: alugrid/3d/alugrid.hh:48
GridFamily::LeafIndexSetImp LeafIndexSetImp
Definition: alugrid/3d/alugrid.hh:339
BaseType::GridFamily GridFamily
Definition: alugrid/3d/alugrid.hh:333
BaseType::ctype ctype
Definition: alugrid/3d/alugrid.hh:135
Definition: alugrid/3d/grid.hh:78
ViewTraits::GridViewImp GridViewImp
Definition: common/gridview.hh:61
DefaultIndexSet creates an index set by using the grids persistent container an a given pair of itera...
Definition: defaultindexsets.hh:66
BaseType::ObjectStreamType ObjectStreamType
Definition: alugrid/3d/alugrid.hh:346
GridFamily::LevelIndexSetImp LevelIndexSetImp
Definition: alugrid/3d/alugrid.hh:552
Definition: alugrid/3d/grid.hh:291
LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:596
BaseType::DuneBoundaryProjectionType DuneBoundaryProjectionType
type of boundary projection
Definition: alugrid/3d/alugrid.hh:466
BaseType::LocalIdSetImp LocalIdSetImp
Definition: alugrid/3d/alugrid.hh:335
LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:410
ALUSimplexGrid(const MPICommunicatorType mpiComm, const DuneBoundaryProjectionType *bndProject, const DuneBoundaryProjectionVector *bndVector, const std::string macroName, const bool verb=true)
constructor called from ALUGridFactory for creating ALUSimplexGrid from given macro grid file ...
Definition: alugrid/3d/alugrid.hh:301
GridFamily::LevelIndexSetImp LevelIndexSetImp
Definition: alugrid/3d/alugrid.hh:338
LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:618
GridFamily::LevelIndexSetImp LevelIndexSetImp
Definition: alugrid/3d/alugrid.hh:141
BaseType::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
type of boundary projection
Definition: alugrid/3d/alugrid.hh:469
BaseType::GridFamily GridFamily
Definition: alugrid/3d/alugrid.hh:547
BaseType::DuneBoundaryProjectionType DuneBoundaryProjectionType
type of boundary projection
Definition: alugrid/3d/alugrid.hh:258
Id Set Interface.
Definition: common/grid.hh:360
Comm MPICommunicatorType
Definition: alugrid/3d/grid.hh:559
Traits::LocalIdSet LocalIdSet
Definition: alugrid/3d/alugrid.hh:337
Traits::LocalIdSet LocalIdSet
Definition: alugrid/3d/alugrid.hh:551
BaseType::LocalIdSetImp LocalIdSetImp
Definition: alugrid/3d/alugrid.hh:138
Definition: alugrid/3d/alugrid.hh:453
BaseType::ctype ctype
Definition: alugrid/3d/alugrid.hh:546
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:51
BaseType::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
type of boundary projection
Definition: alugrid/3d/alugrid.hh:261
BaseType::ObjectStreamType ObjectStreamType
Definition: alugrid/3d/alugrid.hh:560