Go to the documentation of this file. 1 #ifndef DUNE_ALU3DGRID_ALUGRID_HH
2 #define DUNE_ALU3DGRID_ALUGRID_HH
25 return ( std::is_same< Comm, ALUGridNoComm >::value ) ?
"serial" :
"parallel";
28 template<
int dim,
int dimworld, ALUGr
idElementType elType, ALUGr
idRefinementType refineType,
class Comm >
33 static_assert( elType ==
cube ? refineType ==
nonconforming :
true,
"cube only works with nonconforming refinement");
38 typedef typename BaseType::MPICommunicatorType MPICommunicatorType;
48 typedef typename BaseType::ctype
ctype;
50 typedef typename GridFamily::Traits
Traits;
58 typedef typename Traits:: template Codim<0>::LeafIterator
LeafIterator;
71 const MPICommunicatorType mpiComm = BaseType::defaultCommunicator(),
74 const bool verb =
true ) :
75 BaseType(macroName, mpiComm, bndProject, bndVector, refineType )
77 const bool verbose = verb && this->comm().rank() == 0;
80 std::cout <<
"\nCreated " << ALUGridParallelSerial< Comm >() <<
" " <<
name() <<
nameSuffix()
81 <<
" from macro grid file '" << macroName <<
"'. \n\n";
85 static std::string
name () {
return std::string(
"ALUGrid"); }
89 std::string elt ( elType ==
cube ?
"cube," :
"simplex," );
90 std::string ref ( refineType ==
nonconforming ?
"nonconforming>" :
"conforming>" );
91 std::stringstream suffix;
109 const std::string macroName,
110 const bool verb =
true ) :
111 BaseType(
"", mpiComm, bndProject, bndVector, refineType )
113 const bool verbose = verb && this->comm().rank() == 0;
116 std::cout <<
"\nCreated " << ALUGridParallelSerial< Comm >() <<
" " <<
name() <<
nameSuffix();
117 if( macroName.empty() )
118 std::cout <<
" from input stream. \n";
120 std::cout <<
" from macro grid file '" << macroName <<
"'. \n";
121 std::cout << std::endl;
126 ALUGrid(
const MPICommunicatorType mpiComm = BaseType::defaultCommunicator()) :
127 BaseType(
"", mpiComm,
132 if(this->comm().rank() == 0)
134 std::cout <<
"\nCreated empty " << ALUGridParallelSerial< Comm >() <<
" " <<
name() <<
nameSuffix() <<
"." << std::endl << std::endl;
142 template< PartitionIteratorType pitype >
145 typedef Dune::GridView< ALU3dLevelGridViewTraits< const This, pitype > >
LevelGridView;
146 typedef Dune::GridView< ALU3dLeafGridViewTraits< const This, pitype > >
LeafGridView;
153 template< PartitionIteratorType pitype >
156 template< PartitionIteratorType pitype >
164 template< PartitionIteratorType pitype >
168 typedef typename LevelGridView::GridViewImp LevelGridViewImp;
172 template< PartitionIteratorType pitype >
176 typedef typename LeafGridView::GridViewImp LeafGridViewImp;
182 typedef typename LevelGridView::GridViewImp LevelGridViewImp;
188 typedef typename LeafGridView::GridViewImp LeafGridViewImp;
205 #endif // #ifndef DUNE_ALU3DGRID_ALUGRID_HH
BaseType::ctype ctype
Definition: alugrid.hh:48
Partition< All_Partition >::LevelGridView LevelGridView
Definition: alugrid.hh:149
Partition< All_Partition >::LeafGridView LeafGridView
Definition: alugrid.hh:150
Definition: alugrid.hh:143
BaseType::LeafIteratorImp LeafIteratorImp
Definition: alugrid.hh:56
static std::string name()
Definition: alugrid.hh:85
Traits ::LocalIdSet LocalIdSet
Definition: alugrid.hh:53
Traits::template Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid.hh:57
Capabilities for ALUGrid.
GridFamily ::LevelIndexSetImp LevelIndexSetImp
Definition: alugrid.hh:54
LeafGridView leafView() const
Definition: alugrid.hh:161
BaseType::HierarchicIteratorImp HierarchicIteratorImp
Definition: alugrid.hh:139
BaseType::GridFamily GridFamily
Definition: alugrid.hh:49
static const char * ALUGridParallelSerial()
Definition: alugrid.hh:23
use non-conforming (red) refinement
Definition: declaration.hh:26
Traits ::GlobalIdSet GlobalIdSet
Definition: alugrid.hh:52
Partition< pitype >::LeafGridView leafView() const
Definition: alugrid.hh:157
static std::string nameSuffix()
Definition: alugrid.hh:87
Partition< pitype >::LeafGridView leafGridView() const
Definition: alugrid.hh:173
Partition< pitype >::LevelGridView levelView(int level) const
Definition: alugrid.hh:154
Dune::GridView< ALU3dLevelGridViewTraits< const This, pitype > > LevelGridView
Definition: alugrid.hh:145
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.hh:106
Definition: alugrid.hh:47
Dune::GridView< ALU3dLeafGridViewTraits< const This, pitype > > LeafGridView
Definition: alugrid.hh:146
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.hh:70
GridFamily ::LeafIndexSetImp LeafIndexSetImp
Definition: alugrid.hh:55
use only cube elements (i.e., quadrilaterals or hexahedra)
Definition: declaration.hh:19
Partition< pitype >::LevelGridView levelGridView(int level) const
Definition: alugrid.hh:165
LevelGridView levelView(int level) const
Definition: alugrid.hh:159
ALUGrid(const MPICommunicatorType mpiComm=BaseType::defaultCommunicator())
constructor creating empty grid, empty string creates empty grid
Definition: alugrid.hh:126
Definition: alugrid.hh:47
Definition: declaration.hh:78
Factory class for ALUGrids.
Definition: 3d/grid.hh:84
GridFamily::Traits Traits
Definition: alugrid.hh:50
BaseType ::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
type of boundary projection
Definition: alugrid.hh:45
BaseType::ObjectStreamType ObjectStreamType
Definition: alugrid.hh:140
Definition: alu3dinclude.hh:49
BaseType::LocalIdSetImp LocalIdSetImp
Definition: alugrid.hh:51
unstructured parallel implementation of the DUNE grid interface
Definition: alugrid.hh:29
Traits::template Codim< 0 >::LeafIterator LeafIterator
Definition: alugrid.hh:58
LevelGridView levelGridView(int level) const
Definition: alugrid.hh:180
LeafGridView leafGridView() const
Definition: alugrid.hh:186
BaseType ::DuneBoundaryProjectionType DuneBoundaryProjectionType
type of boundary projection
Definition: alugrid.hh:42
Definition: alu3dinclude.hh:79