3 #ifndef DUNE_ALU2D_ALUGRID_HH 4 #define DUNE_ALU2D_ALUGRID_HH 7 #if HAVE_ALUGRID || DOXYGEN 35 template<
int dimw, ALUGr
idElementType elType, ALUGr
idRefinementType refinementType,
class Comm >
36 class ALUGrid< 2, dimw, elType, refinementType, Comm >
43 enum { dimworld = dimw };
61 const DuneBoundaryProjectionType* bndProject = 0,
62 const DuneBoundaryProjectionVector* bndVector = 0,
63 const bool verbose =
true )
64 : BaseType(macroName, hangingNodes(), bndProject, bndVector)
68 std::cout <<
"\nCreated serial " << name() << nameSuffix()
69 <<
" from macro grid file '" << macroName <<
"'." << std::endl << std::endl;
83 std::istream& macroFile,
84 const DuneBoundaryProjectionType* bndProject = 0,
85 const DuneBoundaryProjectionVector* bndVector = 0,
86 const bool verbose =
true )
87 : BaseType(
"", hangingNodes(), bndProject, bndVector, ¯oFile)
91 std::cout <<
"\nCreated serial " << name() << nameSuffix();
93 std::cout <<
" from macro grid file '" << macroName;
94 std::cout <<
"." << std::endl << std::endl;
98 static std::string
name () {
return std::string(
"ALUGrid"); }
103 std::cout <<
"\nCreated serial " << name() << nameSuffix() <<
"." << std::endl << std::endl;
106 enum {dimension=BaseType::dimension,dimensionworld=BaseType::dimensionworld};
107 enum { refineStepsForHalf = 1 };
108 typedef typename BaseType::ctype
ctype;
110 typedef typename GridFamily::Traits
Traits;
121 template< PartitionIteratorType pitype >
133 template< PartitionIteratorType pitype >
138 return LevelGridView( LevelGridViewImp( *
this, level ) );
141 template< PartitionIteratorType pitype >
146 return LeafGridView( LeafGridViewImp( *
this ) );
152 return LevelGridView( LevelGridViewImp( *
this, level ) );
158 return LeafGridView( LeafGridViewImp( *
this ) );
161 template< PartitionIteratorType pitype >
166 return LevelGridView( LevelGridViewImp( *
this, level ) );
169 template< PartitionIteratorType pitype >
174 return LeafGridView( LeafGridViewImp( *
this ) );
180 return LevelGridView( LevelGridViewImp( *
this, level ) );
186 return LeafGridView( LeafGridViewImp( *
this ) );
190 static std::string nameSuffix()
192 std::string elt ( elType ==
cube ?
"cube," :
"simplex," );
193 std::string ref ( refinementType ==
nonconforming ?
"nonconforming>" :
"conforming>" );
194 std::stringstream suffix;
195 suffix <<
"<"<<dim<<
","<<dimworld<<
"," << elt << ref;
200 int hangingNodes()
const 212 friend class ALU2dGridFactory;
218 This& operator = (
const ALUGrid& g);
224 #error "Trying to use <dune/grid/alugrid.hh> without ALUGRID_CPPFLAGS." 225 #endif // #if HAVE_ALUGRID || DOXYGEN BaseType::DuneBoundaryProjectionType DuneBoundaryProjectionType
type of boundary projection
Definition: alugrid/2d/alugrid.hh:47
LevelGridView levelView(int level) const
Definition: alugrid/2d/alugrid.hh:149
[ provides Dune::Grid ]
Definition: alugrid/common/declaration.hh:63
Partition< pitype >::LevelGridView levelView(int level) const
Definition: alugrid/2d/alugrid.hh:134
BaseType::ctype ctype
Definition: alugrid/2d/alugrid.hh:108
Definition: alugrid/common/declaration.hh:67
Definition: alugrid/common/declaration.hh:18
GridFamily::Traits Traits
Definition: alugrid/2d/alugrid.hh:110
Traits::LocalIdSet LocalIdSet
Definition: alugrid/2d/alugrid.hh:113
Partition< All_Partition >::LevelGridView LevelGridView
Definition: alugrid/2d/alugrid.hh:130
Dune::GridView< DefaultLevelGridViewTraits< const This, pitype > > LevelGridView
Definition: alugrid/2d/alugrid.hh:125
Traits::template Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid/2d/alugrid.hh:117
Definition: alugrid/common/declaration.hh:18
static std::string name()
Definition: alugrid/2d/alugrid.hh:98
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:16
Partition< pitype >::LevelGridView levelGridView(int level) const
Definition: alugrid/2d/alugrid.hh:162
BaseType::HierarchicIteratorImp HierarchicIteratorImp
Definition: alugrid/2d/alugrid.hh:119
Traits::GlobalIdSet GlobalIdSet
Definition: alugrid/2d/alugrid.hh:112
Definition: alugrid/common/declaration.hh:20
BaseType::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
type of boundary projection
Definition: alugrid/2d/alugrid.hh:50
Definition: alugrid/common/declaration.hh:20
ALUGrid(const std::string macroName, std::istream ¯oFile, const DuneBoundaryProjectionType *bndProject=0, const DuneBoundaryProjectionVector *bndVector=0, const bool verbose=true)
constructor for creating ALUGrid from given macro grid file
Definition: alugrid/2d/alugrid.hh:82
GridFamily::LevelIndexSetImp LevelIndexSetImp
Definition: alugrid/2d/alugrid.hh:114
LevelGridView levelGridView(int level) const
Definition: alugrid/2d/alugrid.hh:177
BaseType::LeafIteratorImp LeafIteratorImp
Definition: alugrid/2d/alugrid.hh:116
ALUGrid()
constructor creating empty grid
Definition: alugrid/2d/alugrid.hh:101
Traits::template Codim< 0 >::LeafIterator LeafIterator
Definition: alugrid/2d/alugrid.hh:118
Grid view abstract base class.
Definition: common/gridview.hh:58
ALUGrid(const std::string macroName, const DuneBoundaryProjectionType *bndProject=0, const DuneBoundaryProjectionVector *bndVector=0, const bool verbose=true)
constructor for creating ALUGrid from given macro grid file
Definition: alugrid/2d/alugrid.hh:60
Partition< pitype >::LeafGridView leafGridView() const
Definition: alugrid/2d/alugrid.hh:170
LeafGridView leafView() const
Definition: alugrid/2d/alugrid.hh:155
Include standard header files.
Definition: agrid.hh:59
Definition: alugrid/2d/alugrid.hh:36
Partition< pitype >::LeafGridView leafView() const
Definition: alugrid/2d/alugrid.hh:142
ViewTraits::GridViewImp GridViewImp
Definition: common/gridview.hh:71
GridFamily::LeafIndexSetImp LeafIndexSetImp
Definition: alugrid/2d/alugrid.hh:115
BaseType::LocalIdSetImp LocalIdSetImp
Definition: alugrid/2d/alugrid.hh:111
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:51
Dune::GridView< DefaultLeafGridViewTraits< const This, pitype > > LeafGridView
Definition: alugrid/2d/alugrid.hh:127
BaseType::GridFamily GridFamily
Definition: alugrid/2d/alugrid.hh:109
LeafGridView leafGridView() const
Definition: alugrid/2d/alugrid.hh:183
Partition< All_Partition >::LeafGridView LeafGridView
Definition: alugrid/2d/alugrid.hh:131