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 GridFamily::LevelIndexSetImp LevelIndexSetImp
Definition: alugrid/3d/alugrid.hh:153
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
Partition< pitype >::LeafGridView leafView() const
Definition: alugrid/3d/alugrid.hh:184
Dune::GridView< DefaultLeafGridViewTraits< const This, pitype > > LeafGridView
Definition: alugrid/3d/alugrid.hh:169
LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:219
BaseType::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
type of boundary projection
Definition: alugrid/3d/alugrid.hh:70
BaseType::GridFamily GridFamily
Definition: alugrid/3d/alugrid.hh:148
[ provides Dune::Grid ]
Definition: alugrid/common/declaration.hh:63
BaseType::LocalIdSetImp LocalIdSetImp
Definition: alugrid/3d/alugrid.hh:150
LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:225
BaseType::ObjectStreamType ObjectStreamType
Definition: alugrid/3d/alugrid.hh:161
Definition: alugrid/common/declaration.hh:67
Definition: alugrid/common/declaration.hh:18
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
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
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:16
Definition: alugrid/common/declaration.hh:20
BaseType::HierarchicIteratorImp HierarchicIteratorImp
Definition: alugrid/3d/alugrid.hh:160
LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:191
GridFamily::LeafIndexSetImp LeafIndexSetImp
Definition: alugrid/3d/alugrid.hh:154
Definition: alugrid/3d/alugrid.hh:54
Traits::template Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid/3d/alugrid.hh:156
static const char * ALUGridParallelSerial()
Definition: alugrid/3d/alugrid.hh:25
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
Grid view abstract base class.
Definition: common/gridview.hh:58
static std::string nameSuffix()
Definition: alugrid/3d/alugrid.hh:99
Include standard header files.
Definition: agrid.hh:59
Definition: alugrid/3d/grid.hh:84
Traits::LocalIdSet LocalIdSet
Definition: alugrid/3d/alugrid.hh:152
Partition< pitype >::LeafGridView leafGridView() const
Definition: alugrid/3d/alugrid.hh:212
Partition< pitype >::LevelGridView levelGridView(int level) const
Definition: alugrid/3d/alugrid.hh:204
BaseType::ctype ctype
Definition: alugrid/3d/alugrid.hh:147
ViewTraits::GridViewImp GridViewImp
Definition: common/gridview.hh:71
GridFamily::Traits Traits
Definition: alugrid/3d/alugrid.hh:149
Traits::GlobalIdSet GlobalIdSet
Definition: alugrid/3d/alugrid.hh:151
BaseType::LeafIteratorImp LeafIteratorImp
Definition: alugrid/3d/alugrid.hh:155
static std::string name()
Definition: alugrid/3d/alugrid.hh:97
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:51
Partition< pitype >::LevelGridView levelView(int level) const
Definition: alugrid/3d/alugrid.hh:176
Dune::GridView< DefaultLevelGridViewTraits< const This, pitype > > LevelGridView
Definition: alugrid/3d/alugrid.hh:167