12 #include <dune/common/fvector.hh>
13 #include <dune/common/typetraits.hh>
16 #include <dune/geometry/type.hh>
28 #include <dune/common/bartonnackmanifcheck.hh>
345 template<
int mydim,
int cdim,
class Gr
idImp,
template<
int,
int,
class>
class GeometryImp>
class Geometry;
346 template<
int mydim,
int cdim,
class Gr
idImp >
class GlobalGeometryReference;
347 template<
int mydim,
int cdim,
class Gr
idImp >
class LocalGeometryReference;
350 template<
int codim,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
class Entity;
351 template<
class Gr
idImp,
class EntityPo
interImp>
class EntityPointer;
352 template<
int codim,
class Gr
id,
class IteratorImp >
class EntityIterator;
353 template<
class Gr
idImp,
template<
class>
class IntersectionImp>
class Intersection;
354 template<
class Gr
idImp,
template<
class>
class IntersectionIteratorImp,
template<
class>
class IntersectionImp>
class IntersectionIterator;
355 template<
class Gr
idImp>
class GenericLeafIterator;
356 template<
class Gr
idImp,
class IndexSetImp,
class IndexTypeImp=
unsigned int>
class IndexSet;
357 template<
class Gr
idImp,
class IdSetImp,
class IdTypeImp>
class IdSet;
382 template<
int dim,
int dimworld,
class ct,
class Gr
idFamily>
384 typedef typename GridFamily::Traits::Grid GridImp;
414 template <PartitionIteratorType pitype>
450 template <PartitionIteratorType pitype>
559 return asImp().maxLevel();
563 int size (
int level,
int codim)
const
565 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
size(level,codim));
566 return asImp().size(level,codim);
572 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
size(codim));
573 return asImp().size(codim);
579 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
size(level,type));
580 return asImp().size(level,type);
586 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
size(type));
587 return asImp().size(type);
599 return asImp().numBoundarySegments();
609 template<PartitionIteratorType pitype>
610 typename Partition<pitype>::LevelGridView
levelView(
int level)
const {
611 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template levelView<pitype>(level)));
612 return asImp().template levelView<pitype>(level);
616 template<PartitionIteratorType pitype>
617 typename Partition<pitype>::LeafGridView
leafView()
const {
618 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafView<pitype>()));
619 return asImp().template leafView<pitype>();
625 return asImp().levelView(level);
631 return asImp().leafView();
644 template<
int cd, PartitionIteratorType pitype>
645 typename Codim<cd>::template Partition<pitype>::LevelIterator
lbegin (
int level)
const
647 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template lbegin<cd,pitype>(level)));
648 return asImp().template lbegin<cd,pitype>(level);
652 template<
int cd, PartitionIteratorType pitype>
653 typename Codim<cd>::template Partition<pitype>::LevelIterator
lend (
int level)
const
655 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template lend<cd,pitype>(level)));
656 return asImp().template lend<cd,pitype>(level);
661 typename Codim<cd>::template Partition<All_Partition>::LevelIterator
lbegin (
int level)
const
663 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template lbegin<cd>(level)));
664 return asImp().template lbegin<cd>(level);
669 typename Codim<cd>::template Partition<All_Partition>::LevelIterator
lend (
int level)
const
671 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template lend<cd>(level)));
672 return asImp().template lend<cd>(level);
676 template<
int cd, PartitionIteratorType pitype>
677 typename Codim<cd>::template Partition<pitype>::LeafIterator
leafbegin ()
const
679 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafbegin<cd,pitype>()));
680 return asImp().template leafbegin<cd,pitype>();
684 template<
int cd, PartitionIteratorType pitype>
685 typename Codim<cd>::template Partition<pitype>::LeafIterator
leafend ()
const
687 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafend<cd,pitype>()));
688 return asImp().template leafend<cd,pitype>();
693 typename Codim<cd>::template Partition<All_Partition>::LeafIterator
leafbegin ()
const
695 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafbegin<cd,All_Partition>()));
696 return asImp().template leafbegin<cd,All_Partition>();
701 typename Codim<cd>::template Partition<All_Partition>::LeafIterator
leafend ()
const
703 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafend<cd,All_Partition>()));
704 return asImp().template leafend<cd,All_Partition>();
719 return asImp().globalIdSet();
726 return asImp().localIdSet();
733 return asImp().levelIndexSet(level);
740 return asImp().leafIndexSet();
769 bool mark(
int refCount,
const typename Codim<0>::Entity & e )
771 return asImp().mark(refCount,e);
780 int getMark(
const typename Codim<0>::Entity & e)
const
782 return asImp().getMark(e);
793 return asImp().preAdapt();
812 return asImp().adapt();
821 return asImp().postAdapt();
836 return asImp().overlapSize(level,codim);
843 return asImp().overlapSize(codim);
850 return asImp().ghostSize(level,codim);
857 return asImp().ghostSize(codim);
863 template<
class DataHandleImp,
class DataTypeImp>
866 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((
asImp().
template communicate<DataHandleImp,DataTypeImp>(data,iftype,dir,level)));
873 template<
class DataHandleImp,
class DataTypeImp>
876 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((
asImp().
template communicate<DataHandleImp,DataTypeImp>(data,iftype,dir)));
883 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
comm());
884 return asImp().comm();
894 return asImp().loadBalance();
901 template<
class DataHandle>
905 return asImp().loadBalance(data);
909 template <
class EntitySeed >
914 return asImp().entityPointer( seed );
918 GridImp&
asImp () {
return static_cast<GridImp &
> (*this);}
920 const GridImp&
asImp ()
const {
return static_cast<const GridImp &
>(*this);}
923 #undef CHECK_INTERFACE_IMPLEMENTATION
924 #undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
971 typedef typename GridFamily::Traits::Grid GridImp;
979 typedef typename GridFamily::Traits
Traits;
982 template<PartitionIteratorType pitype>
986 typedef typename View::GridViewImp ViewImp;
987 return View(ViewImp(
asImp(),level));
991 template<PartitionIteratorType pitype>
994 typedef typename View::GridViewImp ViewImp;
995 return View(ViewImp(
asImp()));
999 typename Traits::template Partition<All_Partition>::LevelGridView
1002 typedef typename View::GridViewImp ViewImp;
1003 return View(ViewImp(
asImp(),level));
1007 typename Traits::template Partition<All_Partition>::LeafGridView
1010 typedef typename View::GridViewImp ViewImp;
1011 return View(ViewImp(
asImp()));
1085 template<
class DataHandleImp,
class DataTypeImp>
1092 template<
class DataHandleImp,
class DataTypeImp>
1105 template<
class DataHandle>
1142 template <
class InterfaceType>
1143 static typename ReturnImplementationType<InterfaceType>::ImplementationType &
1163 template <
int dim,
int dimw,
class GridImp,
1164 template<
int,
int,
class>
class GeometryImp,
1165 template<
int,
int,
class>
class EntityImp,
1166 template<
int,
class>
class EntityPointerImp,
1167 template<
int,PartitionIteratorType,
class>
class LevelIteratorImp,
1168 template<
class>
class LeafIntersectionImp,
1169 template<
class>
class LevelIntersectionImp,
1170 template<
class>
class LeafIntersectionIteratorImp,
1171 template<
class>
class LevelIntersectionIteratorImp,
1172 template<
class>
class HierarchicIteratorImp,
1173 template<
int,PartitionIteratorType,
class>
class LeafIteratorImp,
1174 class LevelIndexSetImp,
class LeafIndexSetImp,
1175 class GlobalIdSetImp,
class GIDType,
class LocalIdSetImp,
class LIDType,
class CCType,
1176 template<
class,PartitionIteratorType>
class LevelGridViewTraits = DefaultLevelGridViewTraits,
1177 template<
class,PartitionIteratorType>
class LeafGridViewTraits = DefaultLeafGridViewTraits,
1178 template<
int,
class>
class EntitySeedImp = EntityPointerImp,
1179 template<
int,
int,
class>
class LocalGeometryImp = GeometryImp
1207 template <
class Seed,
class EPImpl >
1214 template <
class EPImpl>
1242 template <PartitionIteratorType pitype>
1259 typedef EntityPointerImp<cd,const GridImp> EntityPointerImpl;
1266 template <PartitionIteratorType pitype>
1292 namespace Capabilities
1295 template<
int dim,
int dimworld,
typename ct,
class Gr
idFamily ,
int cdim >
1310 template <
class InterfaceType>
1321 #include "geometry.hh"
1322 #include "entity.hh"
1323 #include "entitypointer.hh"
1324 #include "intersection.hh"
1325 #include "intersectioniterator.hh"
1329 #endif // #ifndef DUNE_GRID_HH