Dune Core Modules (2.6.0)

grid.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_GRID_HH
4 #define DUNE_GRID_HH
5 
9 // system includes
10 #include <iostream>
11 #include <string>
12 #include <vector>
13 
14 // dune-common includes
15 #include <dune/common/fvector.hh>
18 
19 // dune-geometry includes
20 #include <dune/geometry/type.hh>
21 
22 // local includes
23 #include <dune/grid/common/gridenums.hh>
24 #include <dune/grid/common/exceptions.hh>
27 #include <dune/grid/common/gridview.hh>
28 #include <dune/grid/common/defaultgridview.hh>
30 
31 // include this file after all other, because other files might undef the
32 // macros that are defined in that file
34 
35 namespace Dune {
36 
333  // Forward Declarations
334  // --------------------
335 
336  template<int mydim, int cdim, class GridImp,template<int,int,class> class GeometryImp> class Geometry;
337  template< int mydim, int cdim, class GridImp > class GlobalGeometryReference;
338  template< int mydim, int cdim, class GridImp > class LocalGeometryReference;
339  // dim is necessary because Entity will be specialized for codim==0 _and_ codim==dim
340  // EntityImp gets GridImp as 3rd template parameter to distinguish between const and mutable grid
341  template<int codim, int dim, class GridImp,template<int,int,class> class EntityImp> class Entity;
342  template< int codim, class Grid, class IteratorImp > class EntityIterator;
343  template<class GridImp, class EntitySeedImp> class EntitySeed;
344  template< class GridImp, class IntersectionImp > class Intersection;
345  template< class GridImp, class IntersectionIteratorImp, class IntersectionImp > class IntersectionIterator;
346  template< class GridImp, class IndexSetImp, class IndexTypeImp = unsigned int, class TypesImp = std::vector< GeometryType > > class IndexSet;
347  template<class GridImp, class IdSetImp, class IdTypeImp> class IdSet;
348 
349 
350  //************************************************************************
351  // G R I D
352  //************************************************************************
353 
372  template< int dim, int dimworld, class ct, class GridFamily>
373  class Grid {
374  typedef typename GridFamily::Traits::Grid GridImp;
376  public:
377 
378  //===========================================================
382  //===========================================================
383 
385  enum {
387  dimension=dim
388  };
389 
391  enum {
393  dimensionworld=dimworld
394  };
396 
397  //===========================================================
401  //===========================================================
402 
404  typedef typename GridFamily::Traits::LeafGridView LeafGridView;
406  typedef typename GridFamily::Traits::LevelGridView LevelGridView;
407 
408 
413  template <int cd>
414  struct Codim
415  {
417  typedef typename GridFamily::Traits::template Codim<cd>::Geometry Geometry;
418 
420  typedef typename GridFamily::Traits::template Codim<cd>::LocalGeometry LocalGeometry;
421 
423  typedef typename GridFamily::Traits::template Codim<cd>::Entity Entity;
424 
426  typedef typename GridFamily::Traits::template Codim<cd>::EntitySeed EntitySeed;
427 
429  template <PartitionIteratorType pitype>
430  struct Partition
431  {
438  typedef typename GridFamily::Traits::template Codim<cd>::template Partition<pitype>::LevelIterator LevelIterator;
445  typedef typename GridFamily::Traits::template Codim<cd>::template Partition<pitype>::LeafIterator LeafIterator;
446  };
447 
450  typedef typename GridFamily::Traits::template Codim<cd>::LevelIterator LevelIterator;
451 
454  typedef typename GridFamily::Traits::template Codim<cd>::LeafIterator LeafIterator;
455  };
456 
460  typedef typename GridFamily::Traits::LeafIntersection LeafIntersection;
461 
465  typedef typename GridFamily::Traits::LevelIntersection LevelIntersection;
466 
472  typedef typename GridFamily::Traits::LeafIntersectionIterator LeafIntersectionIterator;
473 
479  typedef typename GridFamily::Traits::LevelIntersectionIterator LevelIntersectionIterator;
480 
486  typedef typename GridFamily::Traits::HierarchicIterator HierarchicIterator;
487 
492  typedef typename GridFamily::Traits::LevelIndexSet LevelIndexSet;
493 
498  typedef typename GridFamily::Traits::LeafIndexSet LeafIndexSet;
499 
506  typedef typename GridFamily::Traits::GlobalIdSet GlobalIdSet;
507 
513  typedef typename GridFamily::Traits::LocalIdSet LocalIdSet;
514 
519  typedef typename GridFamily::Traits::CollectiveCommunication CollectiveCommunication;
520 
522  typedef ct ctype;
524 
525 
526  //===========================================================
530  //===========================================================
531 
535  int maxLevel() const
536  {
537  CHECK_INTERFACE_IMPLEMENTATION(asImp().maxLevel());
538  return asImp().maxLevel();
539  }
540 
542  int size (int level, int codim) const
543  {
544  CHECK_INTERFACE_IMPLEMENTATION(asImp().size(level,codim));
545  return asImp().size(level,codim);
546  }
547 
549  int size (int codim) const
550  {
551  CHECK_INTERFACE_IMPLEMENTATION(asImp().size(codim));
552  return asImp().size(codim);
553  }
554 
556  int size (int level, GeometryType type) const
557  {
558  CHECK_INTERFACE_IMPLEMENTATION(asImp().size(level,type));
559  return asImp().size(level,type);
560  }
561 
563  int size (GeometryType type) const
564  {
565  CHECK_INTERFACE_IMPLEMENTATION(asImp().size(type));
566  return asImp().size(type);
567  }
569 
570 
575  size_t numBoundarySegments () const
576  {
577  CHECK_INTERFACE_IMPLEMENTATION( asImp().numBoundarySegments());
578  return asImp().numBoundarySegments();
579  }
580 
581  //===========================================================
585  //===========================================================
586 
588  LevelGridView levelGridView(int level) const {
589  CHECK_INTERFACE_IMPLEMENTATION((asImp().levelGridView(level)));
590  return asImp().levelGridView(level);
591  }
592 
595  CHECK_INTERFACE_IMPLEMENTATION((asImp().leafGridView()));
596  return asImp().leafGridView();
597  }
598 
600 
601 
602  //===========================================================
606  //===========================================================
607 
609  const GlobalIdSet &globalIdSet () const
610  {
611  CHECK_INTERFACE_IMPLEMENTATION(asImp().globalIdSet());
612  return asImp().globalIdSet();
613  }
614 
616  const LocalIdSet &localIdSet () const
617  {
618  CHECK_INTERFACE_IMPLEMENTATION(asImp().localIdSet());
619  return asImp().localIdSet();
620  }
621 
623  const LevelIndexSet &levelIndexSet ( int level ) const
624  {
625  CHECK_INTERFACE_IMPLEMENTATION(asImp().levelIndexSet(level));
626  return asImp().levelIndexSet(level);
627  }
628 
630  const LeafIndexSet &leafIndexSet () const
631  {
632  CHECK_INTERFACE_IMPLEMENTATION(asImp().leafIndexSet());
633  return asImp().leafIndexSet();
634  }
636 
637 
638  //===========================================================
642  //===========================================================
643 
649  void globalRefine (int refCount)
650  {
652  return;
653  }
654 
662  bool mark( int refCount, const typename Codim<0>::Entity & e )
663  {
664  return asImp().mark(refCount,e);
665  }
666 
673  int getMark(const typename Codim<0>::Entity & e) const
674  {
675  return asImp().getMark(e);
676  }
677 
684  bool preAdapt ()
685  {
686  return asImp().preAdapt();
687  }
688 
703  bool adapt ()
704  {
705  return asImp().adapt();
706  }
707 
712  void postAdapt()
713  {
714  return asImp().postAdapt();
715  }
717 
718 
719  //===========================================================
723  //===========================================================
724 
727  {
728  CHECK_INTERFACE_IMPLEMENTATION(asImp().comm());
729  return asImp().comm();
730  }
732 
736  bool loadBalance()
737  {
738  CHECK_INTERFACE_IMPLEMENTATION(asImp().loadBalance());
739  return asImp().loadBalance();
740  }
741 
749  template<class DataHandle>
750  bool loadBalance (DataHandle& data)
751  {
752  CHECK_INTERFACE_IMPLEMENTATION(asImp().loadBalance(data));
753  return asImp().loadBalance(data);
754  }
755 
757  template < class EntitySeed >
759  entity( const EntitySeed& seed ) const
760  {
761  //CHECK_INTERFACE_IMPLEMENTATION( asImp().entity( seed ) );
762  return asImp().entity( seed );
763  }
764  protected:
766  GridImp& asImp () {return static_cast<GridImp &> (*this);}
768  const GridImp& asImp () const {return static_cast<const GridImp &>(*this);}
769  };
770 
771 #undef CHECK_INTERFACE_IMPLEMENTATION
772 #undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
773 
790  template<int dim, int dimworld, class ct, class GridFamily>
793  {
794  return grid.levelGridView(level);
795  }
796 
807  template<int dim, int dimworld, class ct, class GridFamily>
810  {
811  return grid.leafGridView();
812  }
813 
850  template<int dim,
851  int dimworld,
852  class ct,
853  class GridFamily>
854  class GridDefaultImplementation : public Grid <dim,dimworld,ct,GridFamily>
855  {
856  typedef typename GridFamily::Traits::Grid GridImp;
857 
858  public:
864  typedef typename GridFamily::Traits Traits;
865 
867  typename Traits::LevelGridView levelGridView(int level) const
868  {
869  typedef typename Traits::LevelGridView View;
870  typedef typename View::GridViewImp ViewImp;
871  return View(ViewImp(asImp(),level));
872  }
873 
875  typename Traits::LeafGridView leafGridView() const
876  {
877  typedef typename Traits::LeafGridView View;
878  typedef typename View::GridViewImp ViewImp;
879  return View(ViewImp(asImp()));
880  }
881 
882  //***************************************************************
883  // Interface for Adaptation
884  //***************************************************************
885 
908  bool mark( int refCount, const typename Traits :: template Codim<0>::Entity & e )
909  {
910  return false;
911  }
912 
920  int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const
921  {
922  return 0;
923  }
924 
932  bool adapt () { return false; }
933 
935  bool preAdapt () { return false; }
936 
938  void postAdapt() {}
939 
941  bool loadBalance()
942  {
943  return false;
944  }
945 
947  template<class DataHandle>
948  bool loadBalance (DataHandle& data)
949  {
950  return false;
951  }
952 
953  protected:
960  template<class T>
962  : public T // implement friendship via subclassing
963  {
964  public:
966  typedef typename T::Implementation ImplementationType;
967  private:
968  // constructor in only need to compile
969  ReturnImplementationType(const T& t) : T(t) {}
970  };
971 
972  template<class T>
973  class ReturnImplementationType<const T>
974  : public T // implement friendship via subclassing
975  {
976  public:
977  typedef const typename T::Implementation ImplementationType;
978  private:
979  // constructor in only need to compile
980  ReturnImplementationType(const T& t) : T(t) {}
981  };
982 
984  // This rather involved return type computation does the following:
985  //
986  // 1) It detects whether the function was passed an lvalue or an
987  // rvalue by checking whether InterfaceType is a reference (in which
988  // case the argument is an lvalue). This relies on the special template
989  // matching rules for unqualified rvalue references.
990  // 2) If it is an lvalue, it
991  // - strips the reference from InterfaceType
992  // - uses the resulting type to extract the implementation type
993  // - re-adds an lvalue reference
994  // This procedure transfers a possible cv-qualification from the
995  // interface type to the implementation type
996  // 3) If it is an lvalue, it
997  // - strips the reference anyway. This is required to make this TMP
998  // compile if the other branch (lvalue) is taken because in that
999  // case, the compiler still evaluates the rvalue result and without
1000  // the reference stripping step, it would pass a reference into
1001  // ReturnImplementationType, which would in turn cause a compiler
1002  // error.
1003  // - looks up the implementation type with the stripped interface type
1004  // - removes a possible const from the result; the type is a temporary
1005  // anyway, so there is no reason to keep the const qualifier around.
1006  template <class InterfaceType>
1007  static typename std::conditional<
1008  std::is_reference<
1010  >::value,
1011  typename std::add_lvalue_reference<
1012  typename ReturnImplementationType<
1013  typename std::remove_reference<
1015  >::type
1016  >::ImplementationType
1017  >::type,
1018  typename std::remove_const<
1019  typename ReturnImplementationType<
1020  typename std::remove_reference<
1022  >::type
1023  >::ImplementationType
1024  >::type
1025  >::type
1026  getRealImplementation (InterfaceType &&i) { return i.impl(); }
1027 
1028 
1029  protected:
1031  };
1032 
1046  template <int dim, int dimw, class GridImp,
1047  template<int,int,class> class GeometryImp,
1048  template<int,int,class> class EntityImp,
1049  template<int,PartitionIteratorType,class> class LevelIteratorImp,
1050  template<class> class LeafIntersectionImp,
1051  template<class> class LevelIntersectionImp,
1052  template<class> class LeafIntersectionIteratorImp,
1053  template<class> class LevelIntersectionIteratorImp,
1054  template<class> class HierarchicIteratorImp,
1055  template<int,PartitionIteratorType,class> class LeafIteratorImp,
1056  class LevelIndexSetImp, class LeafIndexSetImp,
1057  class GlobalIdSetImp, class GIDType, class LocalIdSetImp, class LIDType, class CCType,
1058  template<class> class LevelGridViewTraits,
1059  template<class> class LeafGridViewTraits,
1060  template<int,class> class EntitySeedImp,
1061  template<int,int,class> class LocalGeometryImp = GeometryImp
1062  >
1063  struct GridTraits
1064  {
1066  typedef GridImp Grid;
1067 
1076 
1079 
1084  template <int cd>
1085  struct Codim
1086  {
1087  public:
1088  typedef GeometryImp<dim-cd, dimw, const GridImp> GeometryImpl;
1089  typedef LocalGeometryImp<dim-cd, dim, const GridImp> LocalGeometryImpl;
1091 
1092  typedef Dune::Geometry<dim-cd, dimw, const GridImp, GeometryImp> Geometry;
1094  typedef Dune::Geometry<dim-cd, dim, const GridImp, LocalGeometryImp> LocalGeometry;
1096  // we could - if needed - introduce another struct for dimglobal of Geometry
1098 
1101 
1106  template <PartitionIteratorType pitype>
1107  struct Partition
1108  {
1113  };
1114 
1117 
1120 
1121  private:
1122  friend class Dune::Entity<cd, dim, const GridImp, EntityImp>;
1123  };
1124 
1129 
1138 
1140  typedef CCType CollectiveCommunication;
1141  };
1142 
1143  // Definition of capabilities for the interface class
1144  namespace Capabilities
1145  {
1146 
1147  // capabilities for the interface class depend on the implementation
1148  template< int dim, int dimworld, typename ct, class GridFamily , int codim >
1149  struct hasEntity< Grid< dim, dimworld, ct, GridFamily >, codim >
1150  {
1151  static const bool v = hasEntity< typename GridFamily::Traits::Grid, codim >::v;
1152  };
1153 
1154  // capabilities for the interface class depend on the implementation
1155  template< int dim, int dimworld, typename ct, class GridFamily , int cdim >
1156  struct hasEntity< GridDefaultImplementation<dim,dimworld,ct,GridFamily>, cdim >
1157  {
1158  typedef GridDefaultImplementation<dim,dimworld,ct,GridFamily> GridType;
1159  typedef typename GridType::Traits::Grid GridImp;
1160  static const bool v = hasEntity<GridImp,cdim>::v;
1161  };
1162 
1163  } // end namespace Capabilities
1164 
1170  template <class InterfaceType>
1172  {
1173  typedef typename InterfaceType::Implementation ImplementationType;
1175  explicit MakeableInterfaceObject ( const ImplementationType &realImp )
1176  : InterfaceType( realImp )
1177  {}
1178  };
1179 }
1180 
1181 #include "geometry.hh"
1182 #include "entity.hh"
1183 #include "intersection.hh"
1184 #include "intersectioniterator.hh"
1185 #include "entityiterator.hh"
1186 #include "indexidset.hh"
1187 
1188 #endif // #ifndef DUNE_GRID_HH
Provides check for implementation of interface methods when using static polymorphism,...
#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__)
Definition: bartonnackmanifcheck.hh:59
interface class for an iterator over grid entities
Definition: entityiterator.hh:30
Store a reference to an entity with a minimal memory footprint.
Definition: entityseed.hh:24
Wrapper class for entities.
Definition: entity.hh:64
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:277
Wrapper class for geometries.
Definition: geometry.hh:67
Helper class to choose correct implementation return type for getRealImplementation.
Definition: grid.hh:963
T::Implementation ImplementationType
The correct type of the implementation to return.
Definition: grid.hh:966
Definition: grid.hh:855
bool adapt()
Refine all positive marked leaf entities coarsen all negative marked entities if possible.
Definition: grid.hh:932
bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition: grid.hh:908
static std::conditional< std::is_reference< InterfaceType >::value, typename std::add_lvalue_reference< typename ReturnImplementationType< typename std::remove_reference< InterfaceType >::type >::ImplementationType >::type, typename std::remove_const< typename ReturnImplementationType< typename std::remove_reference< InterfaceType >::type >::ImplementationType >::type >::type getRealImplementation(InterfaceType &&i)
return real implementation of interface class
Definition: grid.hh:1026
void postAdapt()
clean up some markers
Definition: grid.hh:938
int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
returns adaptation mark for given entity, i.e. here the default implementation returns 0.
Definition: grid.hh:920
bool preAdapt()
returns true, if at least one entity is marked for adaption
Definition: grid.hh:935
bool loadBalance(DataHandle &data)
default implementation of load balance does nothing and returns false
Definition: grid.hh:948
Traits::LeafGridView leafGridView() const
View for the leaf grid for All_Partition.
Definition: grid.hh:875
bool loadBalance()
default implementation of load balance does nothing and returns false
Definition: grid.hh:941
Traits::LevelGridView levelGridView(int level) const
View for a grid level for All_Partition.
Definition: grid.hh:867
GridFamily::Traits Traits
The traits of this class.
Definition: grid.hh:864
Grid view abstract base class.
Definition: gridview.hh:60
Grid abstract base class.
Definition: grid.hh:373
int size(int level, GeometryType type) const
Return number of entities per level and geometry type in this process.
Definition: grid.hh:556
GridFamily::Traits::LocalIdSet LocalIdSet
A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entiti...
Definition: grid.hh:513
GridFamily::Traits::LeafIntersectionIterator LeafIntersectionIterator
A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine,...
Definition: grid.hh:472
int size(int level, int codim) const
Return number of grid entities of a given codim on a given level in this process.
Definition: grid.hh:542
bool preAdapt()
To be called after entities have been marked and before adapt() is called.
Definition: grid.hh:684
GridFamily::Traits::LevelIndexSet LevelIndexSet
A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent,...
Definition: grid.hh:492
GridFamily::Traits::CollectiveCommunication CollectiveCommunication
A type that is a model of Dune::CollectiveCommunication. It provides a portable way for collective co...
Definition: grid.hh:519
@ dimensionworld
The dimension of the world the grid lives in.
Definition: grid.hh:393
const GridImp & asImp() const
Barton-Nackman trick.
Definition: grid.hh:768
GridFamily::Traits::HierarchicIterator HierarchicIterator
A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine,...
Definition: grid.hh:486
GridFamily::Traits::LevelGridView LevelGridView
type of view for level grid
Definition: grid.hh:406
GridFamily::Traits::LeafIntersection LeafIntersection
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
Definition: grid.hh:460
GridFamily::Traits::LevelIntersectionIterator LevelIntersectionIterator
A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine,...
Definition: grid.hh:479
LeafGridView leafGridView() const
View for the leaf grid for All_Partition.
Definition: grid.hh:594
GridFamily::Traits::GlobalIdSet GlobalIdSet
A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entiti...
Definition: grid.hh:506
const LeafIndexSet & leafIndexSet() const
return const reference to the grids leaf index set
Definition: grid.hh:630
void postAdapt()
To be called after grid has been adapted and information left over by the adaptation has been process...
Definition: grid.hh:712
const GlobalIdSet & globalIdSet() const
return const reference to the grids global id set
Definition: grid.hh:609
bool mark(int refCount, const typename Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition: grid.hh:662
const CollectiveCommunication & comm() const
return const reference to a collective communication object. The return type is a model of Dune::Coll...
Definition: grid.hh:726
GridFamily::Traits::LeafIndexSet LeafIndexSet
A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent,...
Definition: grid.hh:498
int maxLevel() const
Return maximum level defined in this grid. Levels are numbered 0 ... maxLevel with 0 the coarsest lev...
Definition: grid.hh:535
@ dimension
The dimension of the grid.
Definition: grid.hh:387
size_t numBoundarySegments() const
returns the number of boundary segments within the macro grid
Definition: grid.hh:575
int getMark(const typename Codim< 0 >::Entity &e) const
returns adaptation mark for given entity
Definition: grid.hh:673
Codim< EntitySeed ::codimension >::Entity entity(const EntitySeed &seed) const
obtain Entity from EntitySeed.
Definition: grid.hh:759
GridFamily::Traits::LevelIntersection LevelIntersection
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
Definition: grid.hh:465
LevelGridView levelGridView(int level) const
View for a grid level for All_Partition.
Definition: grid.hh:588
bool loadBalance(DataHandle &data)
Re-balances the load each process has to handle for a parallel grid and moves the data.
Definition: grid.hh:750
GridFamily::Traits::LeafGridView LeafGridView
type of view for leaf grid
Definition: grid.hh:404
bool loadBalance()
Re-balances the load each process has to handle for a parallel grid,.
Definition: grid.hh:736
bool adapt()
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
Definition: grid.hh:703
int size(int codim) const
Return number of leaf entities of a given codim in this process.
Definition: grid.hh:549
ct ctype
Define type used for coordinates in grid module.
Definition: grid.hh:522
const LevelIndexSet & levelIndexSet(int level) const
return const reference to the grids level index set for level level
Definition: grid.hh:623
GridImp & asImp()
Barton-Nackman trick.
Definition: grid.hh:766
const LocalIdSet & localIdSet() const
return const reference to the grids local id set
Definition: grid.hh:616
void globalRefine(int refCount)
Refine the grid refCount times using the default refinement rule.
Definition: grid.hh:649
int size(GeometryType type) const
Return number of leaf entities per geometry type in this process.
Definition: grid.hh:563
Id Set Interface.
Definition: indexidset.hh:441
Index Set Interface base class.
Definition: indexidset.hh:76
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: intersectioniterator.hh:81
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: intersection.hh:162
A set of traits classes to store static information about grid implementation.
Interface class EntitySeed.
Describes the parallel communication interface class for MessageBuffers and DataHandles.
Definition of the DUNE_DEPRECATED macro for the case that config.h is not available.
Implements a vector constructed from a given type representing a field and a compile-time given size.
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition: grid.hh:809
Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
level grid view for the given grid and level.
Definition: grid.hh:792
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
Provides base classes for index and id sets.
Dune namespace.
Definition: alignedallocator.hh:10
Static tag representing a codimension.
Definition: dimension.hh:22
Traits associated with a specific grid partition type.
Definition: grid.hh:1108
Dune::EntityIterator< cd, const GridImp, LevelIteratorImp< cd, pitype, const GridImp > > LevelIterator
The type of the iterator over the level entities of this codim on this partition.
Definition: grid.hh:1110
Dune::EntityIterator< cd, const GridImp, LeafIteratorImp< cd, pitype, const GridImp > > LeafIterator
The type of the iterator over the leaf entities of this codim on this partition.
Definition: grid.hh:1112
Traits associated with a specific codim.
Definition: grid.hh:1086
Dune::EntitySeed< const GridImp, EntitySeedImp< cd, const GridImp > > EntitySeed
The type of the entity seed of this codim.
Definition: grid.hh:1100
Partition< All_Partition >::LeafIterator LeafIterator
The type of the iterator over all leaf entities of this codim.
Definition: grid.hh:1116
Dune::Geometry< dim-cd, dim, const GridImp, LocalGeometryImp > LocalGeometry
The type of the local geometry associated with the entity.
Definition: grid.hh:1094
Dune::Geometry< dim-cd, dimw, const GridImp, GeometryImp > Geometry
IMPORTANT: Codim<codim>::Geometry == Geometry<dim-codim,dimw>
Definition: grid.hh:1092
Dune::Entity< cd, dim, const GridImp, EntityImp > Entity
The type of the entity.
Definition: grid.hh:1097
Partition< All_Partition >::LevelIterator LevelIterator
The type of the entity pointer for entities of this codim.
Definition: grid.hh:1119
A traits struct that collects all associated types of one grid model.
Definition: grid.hh:1064
Dune::IntersectionIterator< const GridImp, LeafIntersectionIteratorImp< const GridImp >, LeafIntersectionImp< const GridImp > > LeafIntersectionIterator
The type of the intersection iterator at the leafs of the grid.
Definition: grid.hh:1073
IdSet< const GridImp, LocalIdSetImp, LIDType > LocalIdSet
The type of the local id set.
Definition: grid.hh:1137
Dune::GridView< LeafGridViewTraits< const GridImp > > LeafGridView
type of view for leaf grid
Definition: grid.hh:1126
IdSet< const GridImp, GlobalIdSetImp, GIDType > GlobalIdSet
The type of the global id set.
Definition: grid.hh:1135
Dune::EntityIterator< 0, const GridImp, HierarchicIteratorImp< const GridImp > > HierarchicIterator
The type of the hierarchic iterator.
Definition: grid.hh:1078
IndexSet< const GridImp, LeafIndexSetImp > LeafIndexSet
The type of the leaf index set.
Definition: grid.hh:1133
Dune::Intersection< const GridImp, LeafIntersectionImp< const GridImp > > LeafIntersection
The type of the intersection at the leafs of the grid.
Definition: grid.hh:1069
IndexSet< const GridImp, LevelIndexSetImp > LevelIndexSet
The type of the level index set.
Definition: grid.hh:1131
Dune::GridView< LevelGridViewTraits< const GridImp > > LevelGridView
type of view for level grid
Definition: grid.hh:1128
Dune::IntersectionIterator< const GridImp, LevelIntersectionIteratorImp< const GridImp >, LevelIntersectionImp< const GridImp > > LevelIntersectionIterator
The type of the intersection iterator at the levels of the grid.
Definition: grid.hh:1075
Dune::Intersection< const GridImp, LevelIntersectionImp< const GridImp > > LevelIntersection
The type of the intersection at the levels of the grid.
Definition: grid.hh:1071
CCType CollectiveCommunication
The type of the collective communication.
Definition: grid.hh:1140
GridImp Grid
The type that implements the grid.
Definition: grid.hh:1066
A struct collecting all types depending on the partition iterator type.
Definition: grid.hh:431
GridFamily::Traits::template Codim< cd >::template Partition< pitype >::LevelIterator LevelIterator
A type that is a model of Dune::LevelIterator<cd,pitype,...> which is s type of iterator that may be ...
Definition: grid.hh:438
GridFamily::Traits::template Codim< cd >::template Partition< pitype >::LeafIterator LeafIterator
A type that is a model of Dune::LeafIterator<cd,pitype,...> which is a type of iterator that may be u...
Definition: grid.hh:445
A Traits struct that collects all associated types of one implementation.
Definition: grid.hh:415
GridFamily::Traits::template Codim< cd >::Entity Entity
A type that is a model of a Dune::Entity<cd,dim,...>.
Definition: grid.hh:423
GridFamily::Traits::template Codim< cd >::LocalGeometry LocalGeometry
A type that is a model of Dune::Geometry<dim-cd,dim>.
Definition: grid.hh:420
GridFamily::Traits::template Codim< cd >::LevelIterator LevelIterator
A type that is a model of Dune::LevelIterator with partition type All_Partition.
Definition: grid.hh:450
GridFamily::Traits::template Codim< cd >::Geometry Geometry
A type that is a model of Dune::Geometry<dim-cd,dimworld>.
Definition: grid.hh:417
GridFamily::Traits::template Codim< cd >::EntitySeed EntitySeed
A type that is a model (not yet) of Dune::EntitySeed<cd,dim,...>.
Definition: grid.hh:426
GridFamily::Traits::template Codim< cd >::LeafIterator LeafIterator
A type that is a model of Dune::LeafIterator with partition type All_Partition.
Definition: grid.hh:454
Definition: grid.hh:1172
MakeableInterfaceObject(const ImplementationType &realImp)
create interface object by calling the contructor of the base class
Definition: grid.hh:1175
A unique label for each type of element that can occur in a grid.
Traits for type conversions and type information.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 25, 22:37, 2024)