1 #ifndef DUNE_ALU2DGRIDGRID_HH
2 #define DUNE_ALU2DGRIDGRID_HH
13 #include <dune/common/deprecated.hh>
14 #include <dune/common/static_assert.hh>
21 #include <dune/common/mpihelper.hh>
37 template<
int cd,
int dim,
class Gr
idImp>
38 class ALU2dGridEntity;
39 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
40 class ALU2dGridLevelIterator;
41 template<
int cd,
class Gr
idImp >
42 class ALU2dGridEntityPointer;
43 template<
int cd,
class Gr
idImp >
44 class ALU2dGridEntitySeed;
45 template<
int mydim,
int coorddim,
class Gr
idImp>
47 template<
int mydim,
int cdim,
class Gr
idImp>
49 template<
class Gr
idImp>
51 template<
class Gr
idImp>
53 template<
class Gr
idImp>
55 template<
class Gr
idImp>
57 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
59 template <
int mydim,
int coorddim,
class Gr
idImp>
61 template <
class Gr
idImp>
63 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
65 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
67 template <
class EntityImp>
69 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
71 template <
class Gr
idImp,
class GeometryImp,
int nChild>
74 class ALU2dObjectStream;
79 template <
int dimw,
class Comm >
85 template <
int dimw,
class Comm >
97 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
145 template <PartitionIteratorType pitype>
157 template <PartitionIteratorType pitype>
176 #if ALU2DGRID_PARALLEL
177 typedef Dune :: CollectiveCommunication< MPI_Comm >
180 typedef Dune :: CollectiveCommunication< GridImp >
207 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
216 dune_static_assert( dim == 2,
"ALU2dGrid only implemented for grid dim 2." );
217 dune_static_assert( dimworld == 2 || dimworld == 3,
"ALU2dGrid only implemented for world dim 2 or 3." );
330 #ifdef ALUGRID_VERTEX_PROJECTION
332 typedef ALUGridSpace :: VertexProjection< dimworld > ALUGridVertexProjectionType;
346 ALU2dGrid(
const std::string macroTriangFilename,
347 const int nrOfHangingNodes,
350 std::istream* macroFile = 0);
370 template<
int cd, PartitionIteratorType pitype>
375 template<
int cd, PartitionIteratorType pitype>
377 lend (
int level)
const;
389 lend (
int level)
const;
398 template <
int codim, PartitionIteratorType pitype>
403 template <
int codim, PartitionIteratorType pitype>
426 int size (
int level,
int cd)
const;
429 int size (
int codim)
const;
471 HmeshType &
myGrid()
const;
476 template<
class Gr
idImp,
class DataHandle >
490 template<
class Gr
idImp,
class DataHandle >
497 int getMark(
const typename Traits::template Codim<0>::Entity & e)
const;
500 bool mark(
int refCount ,
const typename Traits::template Codim<0>::Entity & e);
514 void hierarchicClear( HElementType *el );
550 #ifdef USE_SMP_PARALLEL
551 std::vector< GridObjectFactoryType > factoryVec_;
608 assert( segmentIndex < (
int)
bndVec_->size() );
609 return (*
bndVec_)[ segmentIndex ];
617 #ifdef ALUGRID_VERTEX_PROJECTION
618 return myGrid().numMacroBndSegments();
620 derr <<
"Method available in any version of ALUGrid > 1.14 \n";
634 template<
class IntersectionType >
635 const typename BaseType
636 :: template ReturnImplementationType< IntersectionType>
637 :: ImplementationType &
644 #ifdef USE_SMP_PARALLEL
668 template <
class EntitySeed >
672 enum { codim = EntitySeed :: codimension };
675 return ALUPointer(
factory(), seed ) ;
683 assert( level <=
MAXL);
696 template <GrapeIOFileFormatType ftype>
704 template <GrapeIOFileFormatType ftype>
715 #if ALU2DGRID_PARALLEL
716 typedef RankManager<ThisType> RankManagerType;
717 RankManagerType rankManager_;
719 const RankManagerType& rankManager()
const
727 template<
class DataHandleImp,
class DataTypeImp>
728 void communicate (CommDataHandleIF<DataHandleImp,DataTypeImp> & data,
734 template<
class DataHandleImp,
class DataTypeImp>
735 void communicate (CommDataHandleIF<DataHandleImp,DataTypeImp> & data,
745 #if ALU2DGRID_PARALLEL
756 template<
class DataHandle>
760 #if ALU2DGRID_PARALLEL
761 rankManager_.notifyMarking () ;
767 namespace Capabilities
769 template<
int dim,
int dimw, ALU2DSPACE ElementType eltype,
int cdim>
772 static const bool v =
true;
775 template<
int dim,
int dimw, ALU2DSPACE ElementType eltype>
778 static const bool v =
false;
790 #include "grid_imp.cc"