14 #include <dune/common/fvector.hh>
15 #include <dune/common/typetraits.hh>
18 #include <dune/geometry/type.hh>
31 #include <dune/common/bartonnackmanifcheck.hh>
348 template<
int mydim,
int cdim,
class Gr
idImp,
template<
int,
int,
class>
class GeometryImp>
class Geometry;
349 template<
int mydim,
int cdim,
class Gr
idImp >
class GlobalGeometryReference;
350 template<
int mydim,
int cdim,
class Gr
idImp >
class LocalGeometryReference;
353 template<
int codim,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
class Entity;
354 template<
class Gr
idImp,
class EntityPo
interImp>
class EntityPointer;
355 template<
int codim,
class Gr
id,
class IteratorImp >
class EntityIterator;
356 template<
class Gr
idImp,
class EntitySeedImp>
class EntitySeed;
357 template<
class Gr
idImp,
class IntersectionImp >
class Intersection;
358 template<
class Gr
idImp,
class IntersectionIteratorImp,
class IntersectionImp >
class IntersectionIterator;
359 template<
class Gr
idImp,
class IndexSetImp,
class IndexTypeImp=
unsigned int>
class IndexSet;
360 template<
class Gr
idImp,
class IdSetImp,
class IdTypeImp>
class IdSet;
385 template<
int dim,
int dimworld,
class ct,
class Gr
idFamily>
387 typedef typename GridFamily::Traits::Grid GridImp;
417 template <PartitionIteratorType pitype>
453 template <PartitionIteratorType pitype>
562 return asImp().maxLevel();
566 int size (
int level,
int codim)
const
568 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
size(level,codim));
569 return asImp().size(level,codim);
575 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
size(codim));
576 return asImp().size(codim);
582 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
size(level,type));
583 return asImp().size(level,type);
589 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
size(type));
590 return asImp().size(type);
602 return asImp().numBoundarySegments();
612 template<PartitionIteratorType pitype>
613 typename Partition<pitype>::LevelGridView DUNE_DEPRECATED_MSG(
"The method levelView has been renamed to levelGridView.")
levelView(
int level)
const {
614 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template levelView<pitype>(level)));
615 return asImp().template levelView<pitype>(level);
619 template<PartitionIteratorType pitype>
620 typename Partition<pitype>::LeafGridView DUNE_DEPRECATED_MSG(
"The method levelView has been renamed to leafGridView.")
leafView()
const {
621 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafView<pitype>()));
622 return asImp().template leafView<pitype>();
626 LevelGridView levelView(
int level)
const DUNE_DEPRECATED_MSG(
"The method levelView has been renamed to levelGridView.") {
628 return asImp().levelView(level);
634 return asImp().leafView();
638 template<PartitionIteratorType pitype>
640 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template levelGridView<pitype>(level)));
641 return asImp().template levelGridView<pitype>(level);
645 template<PartitionIteratorType pitype>
647 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafGridView<pitype>()));
648 return asImp().template leafGridView<pitype>();
654 return asImp().levelGridView(level);
660 return asImp().leafGridView();
673 template<
int cd, PartitionIteratorType pitype>
674 typename Codim<cd>::template Partition<pitype>::LevelIterator
lbegin (
int level)
const
676 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template lbegin<cd,pitype>(level)));
677 return asImp().template lbegin<cd,pitype>(level);
681 template<
int cd, PartitionIteratorType pitype>
682 typename Codim<cd>::template Partition<pitype>::LevelIterator
lend (
int level)
const
684 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template lend<cd,pitype>(level)));
685 return asImp().template lend<cd,pitype>(level);
690 typename Codim<cd>::template Partition<All_Partition>::LevelIterator
lbegin (
int level)
const
692 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template lbegin<cd>(level)));
693 return asImp().template lbegin<cd>(level);
698 typename Codim<cd>::template Partition<All_Partition>::LevelIterator
lend (
int level)
const
700 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template lend<cd>(level)));
701 return asImp().template lend<cd>(level);
705 template<
int cd, PartitionIteratorType pitype>
706 typename Codim<cd>::template Partition<pitype>::LeafIterator
leafbegin ()
const
708 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafbegin<cd,pitype>()));
709 return asImp().template leafbegin<cd,pitype>();
713 template<
int cd, PartitionIteratorType pitype>
714 typename Codim<cd>::template Partition<pitype>::LeafIterator
leafend ()
const
716 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafend<cd,pitype>()));
717 return asImp().template leafend<cd,pitype>();
722 typename Codim<cd>::template Partition<All_Partition>::LeafIterator
leafbegin ()
const
724 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafbegin<cd,All_Partition>()));
725 return asImp().template leafbegin<cd,All_Partition>();
730 typename Codim<cd>::template Partition<All_Partition>::LeafIterator
leafend ()
const
732 CHECK_INTERFACE_IMPLEMENTATION((
asImp().
template leafend<cd,All_Partition>()));
733 return asImp().template leafend<cd,All_Partition>();
748 return asImp().globalIdSet();
755 return asImp().localIdSet();
762 return asImp().levelIndexSet(level);
769 return asImp().leafIndexSet();
798 bool mark(
int refCount,
const typename Codim<0>::Entity & e )
800 return asImp().mark(refCount,e);
809 int getMark(
const typename Codim<0>::Entity & e)
const
811 return asImp().getMark(e);
822 return asImp().preAdapt();
841 return asImp().adapt();
850 return asImp().postAdapt();
865 return asImp().overlapSize(level,codim);
872 return asImp().overlapSize(codim);
879 return asImp().ghostSize(level,codim);
886 return asImp().ghostSize(codim);
900 template<
class DataHandleImp,
class DataTypeImp>
903 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((
asImp().
template communicate<DataHandleImp,DataTypeImp>(data,iftype,dir,level)));
917 template<
class DataHandleImp,
class DataTypeImp>
920 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((
asImp().
template communicate<DataHandleImp,DataTypeImp>(data,iftype,dir)));
927 CHECK_INTERFACE_IMPLEMENTATION(
asImp().
comm());
928 return asImp().comm();
938 return asImp().loadBalance();
948 template<
class DataHandle>
952 return asImp().loadBalance(data);
956 template <
class EntitySeed >
961 return asImp().entityPointer( seed );
965 GridImp&
asImp () {
return static_cast<GridImp &
> (*this);}
967 const GridImp&
asImp ()
const {
return static_cast<const GridImp &
>(*this);}
970 #undef CHECK_INTERFACE_IMPLEMENTATION
971 #undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
1018 typedef typename GridFamily::Traits::Grid GridImp;
1029 template<PartitionIteratorType pitype>
1033 typedef typename View::GridViewImp ViewImp;
1034 return View(ViewImp(
asImp(),level));
1038 template<PartitionIteratorType pitype>
1041 typedef typename View::GridViewImp ViewImp;
1042 return View(ViewImp(
asImp()));
1046 typename Traits::template Partition<All_Partition>::LevelGridView
1047 levelView(
int level)
const DUNE_DEPRECATED_MSG(
"The method levelView has been renamed to levelGridView.") {
1049 typedef typename View::GridViewImp ViewImp;
1050 return View(ViewImp(
asImp(),level));
1054 typename Traits::template Partition<All_Partition>::LeafGridView
1057 typedef typename View::GridViewImp ViewImp;
1058 return View(ViewImp(
asImp()));
1062 template<PartitionIteratorType pitype>
1063 typename Traits::template Partition<pitype>::LevelGridView
1066 typedef typename View::GridViewImp ViewImp;
1067 return View(ViewImp(
asImp(),level));
1071 template<PartitionIteratorType pitype>
1072 typename Traits::template Partition<pitype>::LeafGridView
1075 typedef typename View::GridViewImp ViewImp;
1076 return View(ViewImp(
asImp()));
1080 typename Traits::template Partition<All_Partition>::LevelGridView
1083 typedef typename View::GridViewImp ViewImp;
1084 return View(ViewImp(
asImp(),level));
1088 typename Traits::template Partition<All_Partition>::LeafGridView
1091 typedef typename View::GridViewImp ViewImp;
1092 return View(ViewImp(
asImp()));
1166 template<
class DataHandleImp,
class DataTypeImp>
1172 template<
class DataHandleImp,
class DataTypeImp>
1184 template<
class DataHandle>
1221 template <
class InterfaceType>
1222 static typename ReturnImplementationType<InterfaceType>::ImplementationType &
1242 template <
int dim,
int dimw,
class GridImp,
1243 template<
int,
int,
class>
class GeometryImp,
1244 template<
int,
int,
class>
class EntityImp,
1245 template<
int,
class>
class EntityPointerImp,
1246 template<
int,PartitionIteratorType,
class>
class LevelIteratorImp,
1247 template<
class>
class LeafIntersectionImp,
1248 template<
class>
class LevelIntersectionImp,
1249 template<
class>
class LeafIntersectionIteratorImp,
1250 template<
class>
class LevelIntersectionIteratorImp,
1251 template<
class>
class HierarchicIteratorImp,
1252 template<
int,PartitionIteratorType,
class>
class LeafIteratorImp,
1253 class LevelIndexSetImp,
class LeafIndexSetImp,
1254 class GlobalIdSetImp,
class GIDType,
class LocalIdSetImp,
class LIDType,
class CCType,
1255 template<
class,PartitionIteratorType>
class LevelGridViewTraits,
1256 template<
class,PartitionIteratorType>
class LeafGridViewTraits,
1257 template<
int,
class>
class EntitySeedImp,
1258 template<
int,
int,
class>
class LocalGeometryImp = GeometryImp
1306 template <PartitionIteratorType pitype>
1323 typedef EntityPointerImp<cd,const GridImp> EntityPointerImpl;
1330 template <PartitionIteratorType pitype>
1356 namespace Capabilities
1359 template<
int dim,
int dimworld,
typename ct,
class Gr
idFamily ,
int cdim >
1374 template <
class InterfaceType>
1385 #include "geometry.hh"
1386 #include "entity.hh"
1387 #include "entitypointer.hh"
1388 #include "intersection.hh"
1389 #include "intersectioniterator.hh"
1393 #endif // #ifndef DUNE_GRID_HH