3 #ifndef DUNE_ALU2DGRIDGRID_HH
4 #define DUNE_ALU2DGRIDGRID_HH
15 #include <dune/common/static_assert.hh>
22 #include <dune/common/parallel/mpihelper.hh>
31 #include "indexsets.hh"
33 #include "datahandle.hh"
38 template<
int cd,
int dim,
class Gr
idImp>
39 class ALU2dGridEntity;
40 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
41 class ALU2dGridLevelIterator;
42 template<
int cd,
class Gr
idImp >
43 class ALU2dGridEntityPointer;
44 template<
int cd,
class Gr
idImp >
45 class ALU2dGridEntitySeed;
46 template<
int mydim,
int coorddim,
class Gr
idImp>
47 class ALU2dGridMakeableGeometry;
48 template<
int mydim,
int cdim,
class Gr
idImp>
49 class ALU2dGridGeometry;
50 template<
class Gr
idImp>
51 class ALU2dGridHierarchicIterator;
52 template<
class Gr
idImp>
53 class ALU2dGridIntersectionBase;
54 template<
class Gr
idImp>
55 class ALU2dGridLevelIntersectionIterator;
56 template<
class Gr
idImp>
57 class ALU2dGridLeafIntersectionIterator;
58 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
59 class ALU2dGridLeafIterator;
60 template <
int mydim,
int coorddim,
class Gr
idImp>
61 class ALU2dGridMakeableEntity;
62 template <
class Gr
idImp>
63 class ALU2dGridFaceGeometryInfo;
64 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
65 class ALU2dGridLocalIdSet;
66 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
67 class ALU2dGridHierarchicIndexSet;
68 template <
class EntityImp>
69 class ALUMemoryProvider;
70 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
72 template <
class Gr
idImp,
class GeometryImp,
int nChild>
73 class ALULocalGeometryStorage;
75 class ALU2dObjectStream;
80 template <
int dimw,
class Comm >
81 struct ALUGridBaseGrid< 2, dimw,
cube, Comm >
86 template <
int dimw,
class Comm >
87 struct ALUGridBaseGrid< 2, dimw,
simplex, Comm >
98 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
146 template <PartitionIteratorType pitype>
158 template <PartitionIteratorType pitype>
177 #if ALU2DGRID_PARALLEL
178 typedef Dune :: CollectiveCommunication< MPI_Comm >
181 typedef Dune :: CollectiveCommunication< GridImp >
208 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
217 dune_static_assert( dim == 2,
"ALU2dGrid only implemented for grid dim 2." );
218 dune_static_assert( dimworld == 2 || dimworld == 3,
"ALU2dGrid only implemented for world dim 2 or 3." );
334 #ifdef ALUGRID_VERTEX_PROJECTION
336 typedef ALUGridSpace :: VertexProjection< dimworld > ALUGridVertexProjectionType;
350 ALU2dGrid(
const std::string macroTriangFilename,
351 const int nrOfHangingNodes,
354 std::istream* macroFile = 0);
374 template<
int cd, PartitionIteratorType pitype>
379 template<
int cd, PartitionIteratorType pitype>
381 lend (
int level)
const;
393 lend (
int level)
const;
402 template <
int codim, PartitionIteratorType pitype>
407 template <
int codim, PartitionIteratorType pitype>
430 int size (
int level,
int cd)
const;
433 int size (
int codim)
const;
475 HmeshType &
myGrid()
const;
480 template<
class Gr
idImp,
class DataHandle >
494 template<
class Gr
idImp,
class DataHandle >
501 int getMark(
const typename Traits::template Codim<0>::Entity & e)
const;
504 bool mark(
int refCount ,
const typename Traits::template Codim<0>::Entity & e);
518 void hierarchicClear( HElementType *el );
554 #ifdef USE_SMP_PARALLEL
555 std::vector< GridObjectFactoryType > factoryVec_;
612 assert( segmentIndex < (
int)
bndVec_->size() );
613 return (*
bndVec_)[ segmentIndex ];
621 #ifdef ALUGRID_VERTEX_PROJECTION
622 return myGrid().numMacroBndSegments();
624 derr <<
"Method available in any version of ALUGrid > 1.14 \n";
638 template<
class IntersectionType >
639 const typename BaseType
640 :: template ReturnImplementationType< IntersectionType>
641 :: ImplementationType &
648 #ifdef USE_SMP_PARALLEL
672 template <
class EntitySeed >
678 return ALUPointer(
factory(), seed ) ;
686 assert( level <=
MAXL);
699 template <GrapeIOFileFormatType ftype>
707 template <GrapeIOFileFormatType ftype>
711 void backup( std::ostream& )
const ;
714 void restore( std::istream& ) ;
730 #if ALU2DGRID_PARALLEL
731 typedef RankManager<ThisType> RankManagerType;
732 RankManagerType rankManager_;
734 const RankManagerType& rankManager()
const
742 template<
class DataHandleImp,
class DataTypeImp>
743 void communicate (CommDataHandleIF<DataHandleImp,DataTypeImp> & data,
749 template<
class DataHandleImp,
class DataTypeImp>
750 void communicate (CommDataHandleIF<DataHandleImp,DataTypeImp> & data,
760 #if ALU2DGRID_PARALLEL
771 template<
class DataHandle>
775 #if ALU2DGRID_PARALLEL
776 rankManager_.notifyMarking () ;
782 namespace Capabilities
784 template<
int dim,
int dimw, ALU2DSPACE ElementType eltype,
int cdim>
787 static const bool v =
true;
790 template<
int dim,
int dimw, ALU2DSPACE ElementType eltype>
793 static const bool v =
false;
801 #include "geometry.hh"
805 #include "grid_imp.cc"