3 #ifndef DUNE_ALU3DGRIDGRID_HH
4 #define DUNE_ALU3DGRIDGRID_HH
13 #include <dune/common/bigunsignedint.hh>
14 #include <dune/common/static_assert.hh>
16 #include <dune/geometry/referenceelements.hh>
39 #include <dune/common/parallel/mpihelper.hh>
41 #if ALU3DGRID_PARALLEL
42 #include <dune/common/parallel/mpicollectivecommunication.hh>
44 #include <dune/common/parallel/collectivecommunication.hh>
51 template<
int cd,
int dim,
class Gr
idImp>
52 class ALU3dGridEntity;
53 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
54 class ALU3dGridLevelIterator;
55 template<
int cd,
class Gr
idImp >
56 class ALU3dGridEntityPointerBase;
57 template<
int cd,
class Gr
idImp >
58 class ALU3dGridEntitySeed;
59 template<
int cd,
class Gr
idImp >
60 class ALU3dGridEntityPointer;
61 template<
int mydim,
int coorddim,
class Gr
idImp>
62 class ALU3dGridGeometry;
63 template<
class Gr
idImp>
64 class ALU3dGridHierarchicIterator;
65 template<
class Gr
idImp>
66 class ALU3dGridIntersectionIterator;
67 template<
class Gr
idImp>
69 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
71 template <
int mydim,
int coorddim,
class Gr
idImp>
73 template <
class Gr
idImp>
75 template< ALU3dGr
idElementType,
class >
77 template< ALU3dGr
idElementType,
class >
79 template< ALU3dGr
idElementType,
class >
81 template <
class EntityImp>
85 template <
class Gr
idImp,
class GeometryImp,
int nChild>
87 template< ALU3dGr
idElementType elType,
class Comm >
95 #if ALU3DGRID_PARALLEL
96 template< ALU3dGr
idElementType elType,
class Comm = MPI_Comm >
98 #else // #if ALU3DGRID_PARALLEL
99 template< ALU3dGr
idElementType elType,
class Comm = No_Comm >
101 #endif // #else // #if ALU3DGRID_PARALLEL
103 template <
class Comm >
109 template <
class Comm>
121 template <
class GitterImpl >
123 const bool conformingRefinement )
125 #ifdef ALUGRID_3D_CONFORMING_REFINEMENT
126 if( grid && conformingRefinement )
128 grid->enableConformingClosure();
129 grid->disableGhostCells();
136 template< ALU3dGr
idElementType elType,
class Comm >
139 template< ALU3dGr
idElementType elType >
156 const bool conformingRefinement )
161 checkForConformingRefinement( grid, conformingRefinement );
166 const bool conformingRefinement )
168 #ifdef ALUGRID_CONSTRUCTION_WITH_STREAMS
171 checkForConformingRefinement( grid, conformingRefinement );
180 static int getRank ( No_Comm comm ) {
return 0; }
184 ALU3DSPACE Gitter::Geometric::BuilderIF* builder =
185 dynamic_cast< ALU3DSPACE Gitter::Geometric::BuilderIF*
>( &grid.container() );
187 DUNE_THROW(InvalidStateException,
"dynamic_cast of ALUGrid builder failed");
196 #if ALU3DGRID_PARALLEL
197 template< ALU3dGr
idElementType elType >
205 typedef ALU3DSPACE GitterDunePll GitterImplType;
207 typedef Dune::CollectiveCommunication< MPI_Comm > CollectiveCommunication;
210 : ccobj_( comm ), mpAccess_( comm )
213 int nlinks ()
const {
return mpAccess_.nlinks(); }
215 GitterImplType *createALUGrid (
const std::string ¯oName,
ALU3DSPACE ProjectVertex *projection,
216 const bool conformingRefinement )
218 GitterImplType* grid =
new GitterImplType( macroName.c_str(), mpAccess_, projection );
220 checkForConformingRefinement( grid, conformingRefinement );
224 GitterImplType *createALUGrid ( std::istream& stream,
ALU3DSPACE ProjectVertex *projection,
225 const bool conformingRefinement )
227 #ifdef ALUGRID_CONSTRUCTION_WITH_STREAMS
228 GitterImplType* grid =
new GitterImplType ( stream, mpAccess_, projection );
230 checkForConformingRefinement( grid, conformingRefinement );
237 static MPI_Comm defaultComm () {
return MPI_COMM_WORLD; }
239 static int getRank ( MPI_Comm comm )
242 MPI_Comm_rank( comm, &rank );
246 static typename ALU3DSPACE Gitter::Geometric::BuilderIF &getBuilder ( GitterImplType &grid )
248 ALU3DSPACE Gitter::Geometric::BuilderIF* builder =
249 dynamic_cast< ALU3DSPACE Gitter::Geometric::BuilderIF*
>( &grid.containerPll() );
251 DUNE_THROW(InvalidStateException,
"dynamic_cast of ALUGrid builder failed");
255 static void duneNotifyMacroGridChanges ( GitterImplType &grid )
257 grid.duneNotifyMacroGridChanges();
260 CollectiveCommunication ccobj_;
263 #endif // #if ALU3DGRID_PARALLEL
270 template< ALU3dGr
idElementType elType,
class Comm >
331 template< PartitionIteratorType pitype >
342 template< PartitionIteratorType pitype >
400 template< ALU3dGr
idElementType elType,
class Comm >
403 ALU3dGridFamily< elType, Comm > >,
411 typedef ThisType MyType;
569 ALU3dGrid (
const std::string ¯oTriangFilename,
580 static inline std::string
name ();
588 template<
int cd, PartitionIteratorType pitype>
593 template<
int cd, PartitionIteratorType pitype>
595 lend (
int level)
const;
607 lend (
int level)
const;
611 template <
int codim, PartitionIteratorType pitype>
613 leafbegin(
int level)
const;
616 template <
int codim, PartitionIteratorType pitype>
618 leafend(
int level)
const;
623 leafbegin(
int level)
const;
628 leafend(
int level)
const;
644 template <
int codim, PartitionIteratorType pitype>
649 template <
int codim, PartitionIteratorType pitype>
665 template <
int codim, PartitionIteratorType pitype>
667 createLeafIteratorBegin (
int level)
const;
670 template <
int codim, PartitionIteratorType pitype>
672 createLeafIteratorEnd(
int level)
const;
676 int size (
int level,
int cd)
const;
679 int size (
int codim)
const;
745 template <
class DataHandle>
748 template<
class DataHandleImpl,
class Data >
752 LBHandle lbHandle( *
this, dataHandle );
757 int ghostSize (
int level,
int codim)
const;
769 template<
class DataHandleImp,
class DataTypeImp>
776 template<
class DataHandleImp,
class DataTypeImp>
800 template<
class Gr
idImp,
class DataHandle >
806 template<
class Gr
idImp,
class DataHandle >
814 template <GrapeIOFileFormatType ftype>
823 bool writeMacroGrid(
const std::string path,
const std::string filename )
const ;
827 template <GrapeIOFileFormatType ftype>
831 void backup( std::ostream& )
const ;
834 void restore( std::istream& ) ;
847 bool mark(
int refCount ,
const typename Traits::template Codim<0>::Entity & e);
850 int getMark(
const typename Traits::template Codim<0>::Entity & e)
const;
855 return Communications::defaultComm();
860 template<
class IntersectionType >
861 static const typename BaseType
862 :: template ReturnImplementationType< IntersectionType >
863 :: ImplementationType &
894 return Communications::getBuilder(
myGrid() );
900 Communications::duneNotifyMacroGridChanges(
myGrid() );
906 template <
class EntitySeed >
907 typename Traits :: template Codim< EntitySeed :: codimension >
:: EntityPointer
912 return ALUPointer(
factory(), seed ) ;
932 assert( level >= 0 );
941 assert( codim >= 1 );
942 assert( codim <= 3 );
948 assert( codim >= 1 );
949 assert( codim <= 3 );
951 assert( level >= 0 );
958 assert( level >= 0 );
968 const ThisType &
operator= (
const ThisType & );
996 assert( segmentIndex < (
int)
bndVec_->size() );
997 return (*
bndVec_)[ segmentIndex ];
1008 #ifdef USE_SMP_PARALLEL
1026 #ifdef ALUGRID_3D_CONFORMING_REFINEMENT
1027 return myGrid().ghostCellsEnabled();
1084 #ifdef USE_SMP_PARALLEL
1085 std::vector< GridObjectFactoryType > factoryVec_;
1111 const std::string filename );
1114 namespace Capabilities
1117 template< ALU3dGr
idElementType elType,
class Comm,
int cdim >
1120 static const bool v =
true;
1123 template< ALU3dGr
idElementType elType,
class Comm >
1126 static const bool v =
true;
1129 template< ALU3dGr
idElementType elType,
class Comm >
1132 static const bool v =
true;
1135 template< ALU3dGr
idElementType elType,
class Comm >
1138 static const bool v =
true;
1146 #if COMPILE_ALUGRID_INLINE
1147 #include "grid_imp.cc"
void globalRefine(int refCount)
uses the interface, mark on entity and refineLocal
ALU3dGridElementType
Definition: topology.hh:13
Definition: alugrid/3d/grid.hh:68
ALU3dGridLeafVertexList< Comm > LeafVertexListType
Definition: alugrid/3d/grid.hh:565
Dune::EntityIterator< cd, const Grid, ALU3dGridLevelIterator< cd, pitype, const Grid > > LevelIterator
Definition: alugrid/3d/grid.hh:334
DefaultIndexSet< GridImp, typename Codim< 0 >::LeafIterator > LeafIndexSetImp
Type of the leaf index set.
Definition: alugrid/3d/grid.hh:353
ALUGridVertexProjectionType * vertexProjection()
Definition: alugrid/3d/grid.hh:889
GitterImplType * createALUGrid(std::istream &stream, ALU3DSPACE ProjectVertex *projection, const bool conformingRefinement)
Definition: alugrid/3d/grid.hh:165
Dune::Entity< cd, dim, const Grid, ALU3dGridEntity > Entity
Definition: alugrid/3d/grid.hh:323
static MPICommunicatorType defaultCommunicator()
Definition: alugrid/3d/grid.hh:853
A Traits struct that collects all associated types of one implementation.
Definition: common/grid.hh:435
virtual ALU3DSPACE Gitter::Geometric::BuilderIF & getBuilder() const
Definition: alugrid/3d/grid.hh:892
bool adapt()
Refine all positive marked leaf entities, coarsen all negative marked entities if possible...
Partition< All_Partition >::LeafIterator LeafIterator
Definition: alugrid/3d/grid.hh:339
SizeCacheType * sizeCache_
Definition: alugrid/3d/grid.hh:1082
const HierarchicIndexSet & hierarchicIndexSet() const
Definition: alugrid/3d/grid.hh:837
int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
returns adaptation mark for given entity
Definition: grid_inline.hh:314
Definition: alugrid/3d/grid.hh:119
bool conformingRefinement() const
Definition: alugrid/3d/grid.hh:1018
ALU3DSPACE GitterDuneImpl GitterImplType
Definition: alugrid/3d/grid.hh:147
void backup(std::ostream &) const
backup to ostream
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend(int level) const
one past the end on this level
LeafIndexSetImp * leafIndexSet_
Definition: alugrid/3d/grid.hh:1066
static ReturnImplementationType< InterfaceType >::ImplementationType & getRealImplementation(InterfaceType &i)
return real implementation of interface class
Definition: common/grid.hh:1223
ALU3dGridFamily< elType, Comm > GridFamily
Definition: alugrid/3d/grid.hh:274
Definition: alugrid/3d/grid.hh:137
static const bool v
Definition: common/capabilities.hh:57
ALU3dGridItemListType & getGhostLeafList(int codim) const
Definition: alugrid/3d/grid.hh:939
Definition: alugrid/3d/indexsets.hh:171
Dune::GridView< DefaultLeafGridViewTraits< const Grid, pitype > > LeafGridView
Definition: alugrid/3d/grid.hh:346
bool ghostCellsEnabled() const
Definition: alugrid/3d/grid.hh:1024
ALU3dGridHierarchicIterator< const ThisType > HierarchicIteratorImp
Definition: alugrid/3d/grid.hh:534
Traits::CollectiveCommunication CollectiveCommunication
type of collective communication object
Definition: alugrid/3d/grid.hh:502
bool readGrid(const std::string filename, alu3d_ctype &time)
read Grid from file filename and store time of mesh in time
Definition: alugrid/3d/entity.hh:32
ALU3dGridEntitySeed< cd, const Grid > EntitySeed
Definition: alugrid/3d/grid.hh:326
GitterImplType * createALUGrid(const std::string ¯oName, ALU3DSPACE ProjectVertex *projection, const bool conformingRefinement)
Definition: alugrid/3d/grid.hh:155
VertexListType & getVertexList(int level) const
Definition: alugrid/3d/grid.hh:930
ALU3dGrid< tetra, Comm > BaseGrid
Definition: alugrid/3d/grid.hh:112
Wrapper class for entities.
Definition: common/entity.hh:56
Definition: common.hh:179
MakeableInterfaceObject< typename Traits::template Codim< 3 >::Entity > VertexObject
Definition: alugrid/3d/grid.hh:508
int global_size(int cd) const
number of grid entities on all levels for given codim
Definition: grid_inline.hh:82
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Dune::Intersection< const Grid, LeafIntersectionWrapper< const Grid > > LeafIntersection
Definition: alugrid/3d/grid.hh:301
ALU3dGrid< elType, Comm > GridImp
Definition: alugrid/3d/grid.hh:273
[ provides Dune::Grid ]
Definition: alugrid/3d/entity.hh:36
bool lockPostAdapt_
Definition: alugrid/3d/grid.hh:1091
Communications * communications_
Definition: alugrid/3d/grid.hh:1103
static const bool v
Definition: common/capabilities.hh:66
maximal number of levels is 32
Definition: alugrid/3d/grid.hh:541
Index Set Interface base class.
Definition: common/grid.hh:359
static const ALU3dGridElementType elementType
Definition: alugrid/3d/grid.hh:466
void checkMacroGrid()
check whether macro grid has the right element type
size_t numBoundarySegments() const
number of boundary segments
void communicate(CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const
Communicate information on distributed entities on a given level Template parameter is a model of Dun...
Definition: alugrid/3d/grid.hh:332
Definition: intersectioniteratorwrapper.hh:216
Definition: common/entityseed.hh:28
ALUGridBoundaryProjection< ThisType, alu3d_ctype > ALUGridBoundaryProjectionType
Definition: alugrid/3d/grid.hh:515
Definition: alugrid/2d/grid.hh:73
Provides size cache classes to implement the grids size method efficiently.
const LocalIdSet & localIdSet() const
get global id set of grid
Definition: alugrid/3d/grid.hh:705
ALU3dGridCommunications< elType, Comm >::GlobalId GlobalIdType
type of ALU3dGrids global id
Definition: alugrid/3d/grid.hh:286
int nlinks() const
Definition: alugrid/3d/grid.hh:916
Definition: alugrid/common/declaration.hh:18
Wrapper class for pointers to entities.
Definition: common/entitypointer.hh:91
static int threadNumber()
Definition: objectfactory.hh:196
LocalIdSetImp localIdSet_
Definition: alugrid/3d/grid.hh:1060
Definition: alu3dinclude.hh:329
void recalcGlobalSize()
make grid walkthrough and calc global size
bool loadBalance(CommDataHandleIF< DataHandleImpl, Data > &dataHandle)
Definition: alugrid/3d/grid.hh:749
Dune::CollectiveCommunication< No_Comm > CollectiveCommunication
Definition: alugrid/3d/grid.hh:149
const CollectiveCommunication & comm() const
return const reference to a collective communication object. The return type is a model of Dune::Coll...
Definition: alugrid/3d/grid.hh:785
void postAdapt()
clear all entity new markers
MakeableInterfaceObject< typename Traits::template Codim< 2 >::Entity > EdgeObject
Definition: alugrid/3d/grid.hh:507
ALU3dGridLeafIterator< 0, All_Partition, const ThisType > LeafIteratorImp
Definition: alugrid/3d/grid.hh:530
GridFamily::Traits::CollectiveCommunication CollectiveCommunication
A type that is a model of Dune::CollectiveCommunication. It provides a portable way for collective co...
Definition: common/grid.hh:543
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:18
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:164
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:16
void setupVxList(const GridType &grid, int level)
ALU3DSPACE GatherScatterType::ObjectStreamType ObjectStreamType
Definition: alugrid/3d/grid.hh:467
Definition: alugrid/3d/entity.hh:26
LeafVertexListType & getLeafVertexList() const
Definition: alugrid/3d/grid.hh:918
Wrapper class for geometries.
Definition: common/geometry.hh:101
int maxlevel_
Definition: alugrid/3d/grid.hh:1043
bool loadBalance()
Calculates load of each process and repartition the grid if neccessary. For parameters of the load ba...
Definition: grid_inline.hh:654
GridFamily::LocalIdSetImp LocalIdSetImp
Type of the local id set.
Definition: alugrid/3d/grid.hh:518
Traits::DuneBoundaryProjectionType DuneBoundaryProjectionType
boundary projection type
Definition: alugrid/3d/grid.hh:494
static ALU3DSPACE Gitter::Geometric::BuilderIF & getBuilder(GitterImplType &grid)
Definition: alugrid/3d/grid.hh:182
MakeableInterfaceObject< typename Traits::template Codim< 1 >::Entity > FaceObject
Definition: alugrid/3d/grid.hh:506
#define ALU3DSPACE
Definition: alu3dinclude.hh:26
const DuneBoundaryProjectionVector * bndVec_
Definition: alugrid/3d/grid.hh:1097
static void duneNotifyMacroGridChanges(GitterImplType &grid)
Definition: alugrid/3d/grid.hh:191
ALU3dGridCommunications(No_Comm comm)
Definition: alugrid/3d/grid.hh:151
virtual ~ALU3dGrid()
Desctructor.
MakeableInterfaceObject< typename Traits::template Codim< 0 >::Entity > EntityObject
Definition: alugrid/3d/grid.hh:505
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:312
Types for GridView.
Definition: common/grid.hh:418
Dune::EntityIterator< cd, const Grid, ALU3dGridLeafIterator< cd, pitype, const Grid > > LeafIterator
Definition: alugrid/3d/grid.hh:335
const DuneBoundaryProjectionType * boundaryProjection(const int segmentIndex) const
return boudanry projection for given segment Id
Definition: alugrid/3d/grid.hh:986
Specialize with 'true' if implementation guarantees conforming level grids. (default=false) ...
Definition: common/capabilities.hh:86
const Communications & communications() const
Definition: alugrid/3d/grid.hh:1001
ALU3dGridItemListType ghostLeafList_[dimension]
Definition: alugrid/3d/grid.hh:1073
Definition: adaptcallback.hh:27
ALUGridRefinementType
available refinement types for ALUGrid
Definition: alugrid/common/declaration.hh:20
const Traits::LeafIndexSet & leafIndexSet() const
get leaf index set of the grid
Definition: alugrid/3d/entityseed.hh:10
Definition: alugrid/3d/grid.hh:271
static std::string name()
for grid identification
Definition: grid_inline.hh:693
ALU3dGridGeometry< dim-cd, dim, const Grid > LocalGeometryImpl
Definition: alugrid/3d/grid.hh:319
The dimension of the world the grid lives in.
Definition: common/grid.hh:406
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_inline.hh:299
ALUGridBoundaryProjectionType * vertexProjection_
Definition: alugrid/3d/grid.hh:1100
Definition: objectfactory.hh:23
std::vector< std::vector< GeometryType > > geomTypes_
Definition: alugrid/3d/grid.hh:1051
GridFamily::LevelIndexSetImp LevelIndexSetImp
Type of the level index set, needed by data handle.
Definition: alugrid/3d/grid.hh:486
int getLevelOfLeafVertex(const typename ALU3dImplTraits< elType, Comm >::VertexType &vertex) const
Definition: alugrid/3d/grid.hh:924
ALU3dGridGeometry< dim-cd, dimworld, const Grid > GeometryImpl
Definition: alugrid/3d/grid.hh:318
ALU3dGridIntersectionIterator< const ThisType > IntersectionIteratorImp
Definition: alugrid/3d/grid.hh:449
int overlapSize(int level, int codim) const
overlapSize is zero for this grid
Definition: alugrid/3d/grid.hh:760
ReferenceElement< alu3d_ctype, dimension > ReferenceElementType
reference element type
Definition: alugrid/3d/grid.hh:491
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:238
GridObjectFactoryType factory_
Definition: alugrid/3d/grid.hh:1087
bool up2Date() const
Definition: alu3dinclude.hh:309
GridFamily::GridImp Grid
Definition: alugrid/3d/grid.hh:299
MakeableInterfaceObject< typename Traits::template Codim< 0 >::Geometry > GeometryObject
Definition: alugrid/3d/grid.hh:478
Definition: alu3dinclude.hh:201
Traits::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
boundary projection type
Definition: alugrid/3d/grid.hh:496
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition: alugrid/3d/grid.hh:870
double alu3d_ctype
Definition: alu3dinclude.hh:59
The dimension of the grid.
Definition: common/grid.hh:400
ALU3dGridItemListType levelEdgeList_[MAXL]
Definition: alugrid/3d/grid.hh:1076
interface class for an iterator over grid entitiesAn entity iterator is an iterator over a subset of ...
Definition: entityiterator.hh:35
const ThisType & operator=(const ThisType &)
assignment operator should not be used
const DuneBoundaryProjectionType * bndPrj_
Definition: alugrid/3d/grid.hh:1094
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition: datahandleif.hh:74
ALU3DSPACE ProjectVertex ALUGridVertexProjectionType
type of ALUGrid Vertex Projection Interface
Definition: alugrid/3d/grid.hh:499
const Traits::LevelIndexSet & levelIndexSet(int level) const
get level index set of the grid
Definition: alugrid/3d/entity.hh:30
int LocalIdType
type of ALU3dGrids local id
Definition: alugrid/3d/grid.hh:289
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
GitterImplType & myGrid() const
Definition: grid_inline.hh:108
static No_Comm defaultComm()
Definition: alugrid/3d/grid.hh:178
void checkMacroGridFile(const std::string filename)
check whether macro grid format is of our type
ALU3dGridLocalIdSet< elType, No_Comm > GlobalIdSet
Definition: alugrid/3d/grid.hh:144
Dune::EntityIterator< 0, const Grid, ALU3dGridHierarchicIterator< const Grid > > HierarchicIterator
Definition: alugrid/3d/grid.hh:309
void setupVxList(const GridType &grid)
Definition: alugrid/3d/grid.hh:76
SizeCache< MyType > SizeCacheType
Definition: alugrid/3d/grid.hh:1081
const GridObjectFactoryType & factory() const
Definition: alugrid/3d/grid.hh:1007
Definition: alugrid/common/declaration.hh:20
static int getRank(No_Comm comm)
Definition: alugrid/3d/grid.hh:180
Traits::GlobalIdSet GlobalIdSet
Type of the global id set.
Definition: alugrid/3d/grid.hh:524
Traits::LeafIndexSetImp LeafIndexSetImp
Type of the leaf index set implementation.
Definition: alugrid/3d/grid.hh:367
static const int dimension
Definition: alugrid/3d/grid.hh:474
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:333
Grid view abstract base classInterface class for a view on grids. Grids return two types of view...
Definition: common/gridview.hh:56
ALU3dGridItemListType ghostLevelList_[dimension][MAXL]
Definition: alugrid/3d/grid.hh:1074
Leaf iterator.
Definition: alugrid/3d/entity.hh:34
Definition: alugrid/3d/grid.hh:1050
ALU3dGrid< hexa, Comm > BaseGrid
Definition: alugrid/3d/grid.hh:106
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:23
IndexSet< Grid, LevelIndexSetImp > LevelIndexSet
Definition: alugrid/3d/grid.hh:355
virtual GitterImplType * createALUGrid(const std::string ¯oName)
Definition: alugrid/3d/grid.hh:877
organizes the caching of sizes for one grid and one GeometryType
Definition: sizecache.hh:29
Definition: alugrid/3d/grid.hh:84
void calcMaxLevel()
calculate maxlevel
Grid abstract base classThis class is the base class for all grid implementations. Although no virtual functions are used we call it abstract since its methods do not contain an implementation but forward to the methods of the derived class via the Barton-Nackman trick.
Definition: common/grid.hh:386
bool writeGrid(const std::string filename, alu3d_ctype time) const
write Grid to file in specified FileFormatType
Definition: alugrid/3d/grid.hh:72
int GlobalId
Definition: alugrid/3d/grid.hh:145
const ReferenceElementType & referenceElement() const
return reference to Dune reference element according to elType
Definition: alugrid/3d/grid.hh:904
bool up2Date() const
Definition: alu3dinclude.hh:343
const ReferenceElementType & referenceElement_
Definition: alugrid/3d/grid.hh:1069
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:358
int getLevel(const VertexType &vertex) const
Definition: alu3dinclude.hh:355
GridFamily::Traits::GlobalIdSet GlobalIdSet
A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entiti...
Definition: common/grid.hh:530
Definition: alugrid/3d/grid.hh:315
Traits::LevelIndexSetImp LevelIndexSetImp
Type of the level index set implementation.
Definition: alugrid/3d/grid.hh:364
int coarsenMarked_
Definition: alugrid/3d/grid.hh:1046
Definition: alugrid/common/declaration.hh:67
Provides proxy classes for IntersectionsIterators.
GridFamily::GlobalIdType GlobalIdType
type of ALU3dGrids global id
Definition: alugrid/3d/grid.hh:297
organize the memory management for entitys used by the NeighborIterator
Definition: alugrid/2d/grid.hh:69
if one element is refined then it causes apporximately not more than this number of new elements ...
Definition: alugrid/3d/grid.hh:555
ALUGridObjectFactory< ThisType > GridObjectFactoryType
Definition: alugrid/3d/grid.hh:510
Definition: alu3dinclude.hh:296
int hierSetSize(int cd) const
Definition: grid_inline.hh:92
ALU3dGrid(const std::string ¯oTriangFilename, const MPICommunicatorType mpiComm, const DuneBoundaryProjectionType *bndPrj, const DuneBoundaryProjectionVector *bndVec, const ALUGridRefinementType refinementType)
Definition: grid_inline.hh:21
GridFamily::GlobalIdSetImp GlobalIdSetImp
Definition: alugrid/3d/grid.hh:520
ALUGrid boundary projection implementation DuneBndProjection has to fulfil the DuneBoundaryProjection...
Definition: common/bndprojection.hh:11
std::vector< LevelIndexSetImp * > levelIndexVec_
Definition: alugrid/3d/grid.hh:1063
A set of traits classes to store static information about grid implementation.
HierarchicIndexSet hIndexSet_
Definition: alugrid/3d/grid.hh:1054
static const int dimworld
Definition: alugrid/3d/grid.hh:277
Specialize with 'true' if implementation supports parallelism. (default=false)
Definition: common/capabilities.hh:64
DuneBoundaryProjection< dimworld > DuneBoundaryProjectionType
Definition: alugrid/3d/grid.hh:311
Traits::template Codim< 0 >::LeafIterator LeafIterator
Definition: alugrid/3d/grid.hh:532
ALU3dGridCommunications< elType, Comm >::GlobalIdSet GlobalIdSetImp
Type of the global id set.
Definition: alugrid/3d/grid.hh:283
ALU3dGridCommunications< elType, Comm > Communications
Definition: alugrid/3d/grid.hh:561
int ghostSize(int level, int codim) const
ghostSize is one for codim 0 and zero otherwise for this grid
hierarchic index set of ALU3dGrid
Definition: alugrid/3d/grid.hh:80
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
static const bool v
Definition: common/capabilities.hh:88
GatherScatter GatherScatterType
Definition: alu3dinclude.hh:49
const GlobalIdSet & globalIdSet() const
get global id set of grid
Definition: alugrid/3d/grid.hh:697
ALU3dGridHierarchicIndexSet< elType, Comm > HierarchicIndexSet
Type of the hierarchic index set.
Definition: alugrid/3d/grid.hh:483
Definition: alugrid/3d/entity.hh:463
Definition: alugrid/3d/entity.hh:28
ALU3dGridLocalIdSet< elType, Comm > LocalIdSetImp
Type of the local id set.
Definition: alugrid/3d/grid.hh:280
Store a reference to an entity with a minimal memory footprint.
Definition: common/entityseed.hh:23
Traits::template Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid/3d/grid.hh:531
Dune::Geometry< dim-cd, dimworld, const Grid, ALU3dGridGeometry > Geometry
Definition: alugrid/3d/grid.hh:320
bool writeGrid_Xdr(const std::string filename, alu3d_ctype time) const
Specialize with 'true' for all codims that a grid implements entities for. (default=false) ...
Definition: common/capabilities.hh:55
CollectiveCommunication ccobj_
Definition: alugrid/3d/grid.hh:193
Traits::template Codim< EntitySeed::codimension >::EntityPointer entityPointer(const EntitySeed &seed) const
Definition: alugrid/3d/grid.hh:908
static const bool v
Definition: common/capabilities.hh:106
Definition: lbdatahandle.hh:14
Definition: alugrid/3d/grid.hh:343
normal default number of new elements for new adapt method
Definition: alugrid/3d/grid.hh:547
Partition< All_Partition >::LevelIterator LevelIterator
Definition: alugrid/3d/grid.hh:338
Different resources needed by all grid implementations.
virtual void duneNotifyMacroGridChanges()
Definition: alugrid/3d/grid.hh:898
GridFamily::LeafIndexSetImp LeafIndexSetImp
Type of the leaf index set, needed by data handle.
Definition: alugrid/3d/grid.hh:488
Dune::IntersectionIterator< const Grid, LeafIntersectionIteratorWrapper< const Grid >, LeafIntersectionWrapper< const Grid > > IntersectionIterator
Definition: alugrid/3d/grid.hh:304
bool checkMacroGrid(ALU3dGridElementType elType, const std::string filename)
Definition: alugrid/common/declaration.hh:18
bool writeGrid_Ascii(const std::string filename, alu3d_ctype time, bool scientific=false) const
write leaf grid in macro grid format to ascii file
GlobalIdSetImp * globalIdSet_
Definition: alugrid/3d/grid.hh:1057
ALU3dGridLevelIntersectionIterator< const ThisType > LevelIntersectionIteratorImp
Definition: alugrid/3d/grid.hh:453
bool preAdapt()
returns if a least one entity was marked for coarsening
Definition: common/geometry.hh:24
Dune::Geometry< dim-cd, dim, const Grid, ALU3dGridGeometry > LocalGeometry
Definition: alugrid/3d/grid.hh:321
int overlapSize(int codim) const
overlapSize is zero for this grid
Definition: alugrid/3d/grid.hh:766
std::vector< const DuneBoundaryProjectionType * > DuneBoundaryProjectionVector
Definition: alugrid/3d/grid.hh:312
Dune::IntersectionIterator< const Grid, LeafIntersectionIteratorWrapper< const Grid >, LeafIntersectionWrapper< const Grid > > LeafIntersectionIterator
Definition: alugrid/3d/grid.hh:306
int nlinks() const
Definition: alugrid/3d/grid.hh:153
Definition: alugrid/3d/grid.hh:78
Definition: alugrid/3d/grid.hh:88
ALU3dGridItemListType & getGhostLevelList(int codim, int level) const
Definition: alugrid/3d/grid.hh:946
DefaultIndexSet creates an index set by using the grids persistent container an a given pair of itera...
Definition: defaultindexsets.hh:66
Dune::GridView< DefaultLevelGridViewTraits< const Grid, pitype > > LevelGridView
Definition: alugrid/3d/grid.hh:345
Dune::EntityPointer< const Grid, EntityPointerImpl > EntityPointer
Definition: alugrid/3d/grid.hh:329
ALU3dGridItemListType & getEdgeList(int level) const
Definition: alugrid/3d/grid.hh:956
VertexListType vertexList_[MAXL]
Definition: alugrid/3d/grid.hh:1071
DefaultIndexSet< GridImp, typename Codim< 0 >::LevelIterator > LevelIndexSetImp
Type of the level index set.
Definition: alugrid/3d/grid.hh:350
GitterImplType * mygrid_
Definition: alugrid/3d/grid.hh:1040
Provides a Interfaces for detection of specific behavior.
int maxLevel() const
Return maximum level defined in this grid. Levels are numbered maxLevel with 0 the coarsest level...
Definition: grid_inline.hh:100
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:80
Provides default index set implementations for Level- and LeafIndexsets used by ALUGrid.
Definition: alugrid/3d/entity.hh:22
Enables iteration over all leaf entities of a codimension zero of a grid. See also the documentation ...
Definition: common/leafiterator.hh:28
Dune::IntersectionIterator< const Grid, LevelIntersectionIteratorWrapper< const Grid >, LevelIntersectionWrapper< const Grid > > LevelIntersectionIterator
Definition: alugrid/3d/grid.hh:307
IdSet< Grid, GlobalIdSetImp, GlobalIdType > GlobalIdSet
Definition: alugrid/3d/grid.hh:358
bool writeMacroGrid(const std::string path, const std::string filename) const
write macro grid in ALUGrid macro format to path/filename.rank
void setMaxLevel(int mxl)
LeafVertexListType leafVertexList_
Definition: alugrid/3d/grid.hh:1078
Definition: alugrid/3d/grid.hh:291
ALU3dImplTraits< elType, Comm >::GitterImplType GitterImplType
Definition: alugrid/3d/grid.hh:536
static const BaseType::template ReturnImplementationType< IntersectionType >::ImplementationType & getRealIntersection(const IntersectionType &intersection)
Definition: alugrid/3d/grid.hh:864
GridFamily::Traits Traits
Definition: alugrid/3d/grid.hh:472
void calcExtras()
reset size and global size, update Level- and LeafIndexSet, if they exist
ALU3dGridIntersectionIterator< const ThisType > LeafIntersectionIteratorImp
Definition: alugrid/3d/grid.hh:451
virtual GitterImplType * createALUGrid(std::istream &stream)
Definition: alugrid/3d/grid.hh:883
Definition: alugrid/3d/grid.hh:464
ObjectStreamType InStreamType
Definition: alugrid/3d/grid.hh:468
Specialize with 'true' if implementation provides backup and restore facilities. (default=false) ...
Definition: common/capabilities.hh:104
int refineMarked_
Definition: alugrid/3d/grid.hh:1047
Definition: alu3dinclude.hh:373
int size(int level, int cd) const
number of grid entities per level and codim
Dune::CollectiveCommunication< Comm > CollectiveCommunication
Definition: alugrid/3d/grid.hh:360
Traits::LocalIdSet LocalIdSet
Type of the local id set.
Definition: alugrid/3d/grid.hh:527
ALU3dGridVertexList< Comm > VertexListType
Definition: alugrid/3d/grid.hh:564
ALU3dGridEntityPointer< cd, const Grid > EntityPointerImpl
Definition: alugrid/3d/grid.hh:328
const ALUGridRefinementType refinementType_
Definition: alugrid/3d/grid.hh:1106
IdSet< Grid, LocalIdSetImp, LocalIdType > LocalIdSet
Definition: alugrid/3d/grid.hh:357
static const int dim
Definition: alugrid/3d/grid.hh:276
Id Set Interface.
Definition: common/grid.hh:360
Comm MPICommunicatorType
Definition: alugrid/3d/grid.hh:559
const char * elType2Name(ALU3dGridElementType elType)
void checkForConformingRefinement(GitterImpl *grid, const bool conformingRefinement)
Definition: alugrid/3d/grid.hh:122
Definition: alugrid/3d/grid.hh:74
ObjectStreamType OutStreamType
Definition: alugrid/3d/grid.hh:469
Enables iteration over all entities of a given codimension and level of a grid. See also the document...
Definition: common/leveliterator.hh:27
GridFamily::LocalIdType LocalIdType
type of ALU3dGrids local id
Definition: alugrid/3d/grid.hh:294
Describes the parallel communication interface class for MessageBuffers and DataHandles.
GridFamily::Traits::LocalIdSet LocalIdSet
A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entiti...
Definition: common/grid.hh:537
static const int dimensionworld
Definition: alugrid/3d/grid.hh:475
Dune::Intersection< const Grid, LevelIntersectionWrapper< const Grid > > LevelIntersection
Definition: alugrid/3d/grid.hh:302
IndexSet< Grid, LeafIndexSetImp > LeafIndexSet
Definition: alugrid/3d/grid.hh:356
ALU3dGridFamily< elType, Comm > GridFamily
Definition: alugrid/3d/grid.hh:471
void restore(std::istream &)
restore from istream
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:51