dune-grid 2.9.0
agrid.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_ALBERTAGRID_IMP_HH
6#define DUNE_ALBERTAGRID_IMP_HH
7
13#if HAVE_ALBERTA || DOXYGEN
14
15#include <cassert>
16#include <cstddef>
17
18#include <algorithm>
19#include <iostream>
20#include <fstream>
21#include <memory>
22#include <vector>
23
24// Dune includes
25#include <dune/common/fvector.hh>
26#include <dune/common/fmatrix.hh>
27#include <dune/common/stdstreams.hh>
28#include <dune/common/parallel/communication.hh>
29
34
35//- Local includes
36// some cpp defines and include of alberta.h
37#include "albertaheader.hh"
38
42
50
51#include "indexsets.hh"
52#include "geometry.hh"
53#include "entity.hh"
54#include "hierarchiciterator.hh"
55#include "treeiterator.hh"
56#include "leveliterator.hh"
57#include "leafiterator.hh"
58
59namespace Dune
60{
61
62 // External Forward Declarations
63 // -----------------------------
64
65 template< class Grid >
66 struct DGFGridFactory;
67
68
69
70 // AlbertaGrid
71 // -----------
72
105 template< int dim, int dimworld = Alberta::dimWorld >
108 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
109 {
113 Base;
114
115 template< int, int, class > friend class AlbertaGridEntity;
116 template< class > friend class AlbertaLevelGridView;
117 template< class > friend class AlbertaLeafGridView;
118 template< int, class, bool > friend class AlbertaGridTreeIterator;
119 template< class > friend class AlbertaGridHierarchicIterator;
120
121 friend class GridFactory< This >;
122 friend struct DGFGridFactory< This >;
123
124 friend class AlbertaGridIntersectionBase< const This >;
125 friend class AlbertaGridLeafIntersection< const This >;
126
127 friend class AlbertaMarkerVector< dim, dimworld >;
128#if (__GNUC__ < 4) && !(defined __ICC)
129 // add additional friend decls for gcc 3.4
130 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<true>;
131 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<false>;
132#endif
133 friend class AlbertaGridIndexSet< dim, dimworld >;
134 friend class AlbertaGridHierarchicIndexSet< dim, dimworld >;
135
136 template< class, class >
138
139 public:
141 typedef AlbertaGridFamily< dim, dimworld > GridFamily;
142
143 typedef typename GridFamily::ctype ctype;
144
147
148 // the Traits
149 typedef typename AlbertaGridFamily< dim, dimworld >::Traits Traits;
150
155
158
163
166
170 [[deprecated("Use Communication instead!")]]
172
173 private:
175 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
176
178 typedef AlbertaGridIdSet<dim,dimworld> IdSetImp;
179
181 struct AdaptationState
182 {
183 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };
184
185 private:
186 Phase phase_;
187 int coarsenMarked_;
188 int refineMarked_;
189
190 public:
191 AdaptationState ()
192 : phase_( ComputationPhase ),
193 coarsenMarked_( 0 ),
194 refineMarked_( 0 )
195 {}
196
197 void mark ( int count )
198 {
199 if( count < 0 )
200 ++coarsenMarked_;
201 if( count > 0 )
202 refineMarked_ += (2 << count);
203 }
204
205 void unmark ( int count )
206 {
207 if( count < 0 )
208 --coarsenMarked_;
209 if( count > 0 )
210 refineMarked_ -= (2 << count);
211 }
212
213 bool coarsen () const
214 {
215 return (coarsenMarked_ > 0);
216 }
217
218 int refineMarked () const
219 {
220 return refineMarked_;
221 }
222
223 void preAdapt ()
224 {
225 if( phase_ != ComputationPhase )
226 error( "preAdapt may only be called in computation phase." );
227 phase_ = PreAdaptationPhase;
228 }
229
230 void adapt ()
231 {
232 if( phase_ != PreAdaptationPhase )
233 error( "adapt may only be called in preadapdation phase." );
234 phase_ = PostAdaptationPhase;
235 }
236
237 void postAdapt ()
238 {
239 if( phase_ != PostAdaptationPhase )
240 error( "postAdapt may only be called in postadaptation phase." );
241 phase_ = ComputationPhase;
242
243 coarsenMarked_ = 0;
244 refineMarked_ = 0;
245 }
246
247 private:
248 void error ( const std::string &message )
249 {
250 DUNE_THROW( InvalidStateException, message );
251 }
252 };
253
254 template< class DataHandler >
255 struct AdaptationCallback;
256
257 // max number of allowed levels is 64
258 static const int MAXL = 64;
259
260 typedef Alberta::ElementInfo< dimension > ElementInfo;
261 typedef Alberta::MeshPointer< dimension > MeshPointer;
263 typedef AlbertaGridLevelProvider< dimension > LevelProvider;
264
265 public:
266 AlbertaGrid ( const This & ) = delete;
267 This &operator= ( const This & ) = delete;
268
270 AlbertaGrid ();
271
278 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
279 = std::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
280
281 template< class Proj, class Impl >
283 const Alberta::ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
284
289 AlbertaGrid ( const std::string &macroGridFileName );
290
292 ~AlbertaGrid ();
293
296 int maxLevel () const;
297
299 template<int cd, PartitionIteratorType pitype>
300 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
301 lbegin (int level) const;
302
304 template<int cd, PartitionIteratorType pitype>
305 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
306 lend (int level) const;
307
309 template< int codim >
310 typename Traits::template Codim< codim >::LevelIterator
311 lbegin ( int level ) const;
312
314 template< int codim >
315 typename Traits::template Codim< codim >::LevelIterator
316 lend ( int level ) const;
317
319 template< int codim, PartitionIteratorType pitype >
320 typename Traits
321 ::template Codim< codim >::template Partition< pitype >::LeafIterator
322 leafbegin () const;
323
325 template< int codim, PartitionIteratorType pitype >
326 typename Traits
327 ::template Codim< codim >::template Partition< pitype >::LeafIterator
328 leafend () const;
329
331 template< int codim >
332 typename Traits::template Codim< codim >::LeafIterator
333 leafbegin () const;
334
336 template< int codim >
337 typename Traits::template Codim< codim >::LeafIterator
338 leafend () const;
339
344 int size (int level, int codim) const;
345
347 int size (int level, GeometryType type) const;
348
350 int size (int codim) const;
351
353 int size (GeometryType type) const;
354
356 std::size_t numBoundarySegments () const
357 {
358 return numBoundarySegments_;
359 }
360
362 typename Traits::LevelGridView levelGridView ( int level ) const
363 {
364 typedef typename Traits::LevelGridView View;
365 typedef typename View::GridViewImp ViewImp;
366 return View( ViewImp( *this, level ) );
367 }
368
371 {
372 typedef typename Traits::LeafGridView View;
373 typedef typename View::GridViewImp ViewImp;
374 return View( ViewImp( *this ) );
375 }
376
377 public:
378 //***************************************************************
379 // Interface for Adaptation
380 //***************************************************************
381 using Base::getMark;
382 using Base::mark;
383
385 int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const;
386
388 bool mark ( int refCount, const typename Traits::template Codim< 0 >::Entity &e );
389
391 void globalRefine ( int refCount );
392
393 template< class DataHandle >
394 void globalRefine ( int refCount, AdaptDataHandleInterface< This, DataHandle > &handle );
395
397 bool adapt ();
398
400 template< class DataHandle >
402
404 bool preAdapt ();
405
407 void postAdapt();
408
411 const Communication &comm () const
412 {
413 return comm_;
414 }
415
416 static std::string typeName ()
417 {
418 std::ostringstream s;
419 s << "AlbertaGrid< " << dim << ", " << dimworld << " >";
420 return s.str();
421 }
422
424 template< class EntitySeed >
425 typename Traits::template Codim< EntitySeed::codimension >::Entity
426 entity ( const EntitySeed &seed ) const
427 {
428 typedef typename Traits::template Codim< EntitySeed::codimension >::EntityImpl EntityImpl;
429 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ), seed.impl().subEntity() );
430 }
431
432 //**********************************************************
433 // End of Interface Methods
434 //**********************************************************
436 bool writeGrid( const std::string &filename, ctype time ) const;
437
439 bool readGrid( const std::string &filename, ctype &time );
440
441 // return hierarchic index set
442 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
443
445 const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
446
448 const typename Traits :: LeafIndexSet & leafIndexSet () const;
449
451 const GlobalIdSet &globalIdSet () const
452 {
453 return idSet_;
454 }
455
457 const LocalIdSet &localIdSet () const
458 {
459 return idSet_;
460 }
461
462 // access to mesh pointer, needed by some methods
463 ALBERTA MESH* getMesh () const
464 {
465 return mesh_;
466 };
467
468 const MeshPointer &meshPointer () const
469 {
470 return mesh_;
471 }
472
474 {
475 return dofNumbering_;
476 }
477
479 {
480 return levelProvider_;
481 }
482
483 int dune2alberta ( int codim, int i ) const
484 {
485 return numberingMap_.dune2alberta( codim, i );
486 }
487
488 int alberta2dune ( int codim, int i ) const
489 {
490 return numberingMap_.alberta2dune( codim, i );
491 }
492
493 int generic2alberta ( int codim, int i ) const
494 {
495 return genericNumberingMap_.dune2alberta( codim, i );
496 }
497
498 int alberta2generic ( int codim, int i ) const
499 {
500 return genericNumberingMap_.alberta2dune( codim, i );
501 }
502
503 private:
504 typedef std::vector<int> ArrayType;
505
506 void setup ();
507
508 // make the calculation of indexOnLevel and so on.
509 // extra method because of Reihenfolge
510 void calcExtras();
511
512 private:
513 // delete mesh and all vectors
514 void removeMesh();
515
516 //***********************************************************************
517 // MemoryManagement for Entitys and Geometrys
518 //**********************************************************************
521
522 public:
523 friend class AlbertaGridLeafIntersectionIterator< const This >;
524
525 template< int codim >
526 static int
527 getTwist ( const typename Traits::template Codim< codim >::Entity &entity )
528 {
529 return entity.impl().twist();
530 }
531
532 template< int codim >
533 static int
534 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int subEntity )
535 {
536 return entity.impl().template twist< codim >( subEntity );
537 }
538
539 static int
540 getTwistInInside ( const typename Traits::LeafIntersection &intersection )
541 {
542 return intersection.impl().twistInInside();
543 }
544
545 static int
546 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )
547 {
548 return intersection.impl().twistInOutside();
549 }
550
551 public:
552 // read global element number from elNumbers_
554 getCoord ( const ElementInfo &elementInfo, int vertex ) const;
555
556 private:
557 // pointer to an Albert Mesh, which contains the data
558 MeshPointer mesh_;
559
560 // communication
561 Communication comm_;
562
563 // maximum level of the mesh
564 int maxlevel_;
565
566 // number of boundary segments within the macro grid
567 size_t numBoundarySegments_;
568
569 // map between ALBERTA and DUNE numbering
572
573 DofNumbering dofNumbering_;
574
575 LevelProvider levelProvider_;
576
577 // hierarchical numbering of AlbertaGrid, unique per codim
578 HierarchicIndexSet hIndexSet_;
579
580 // the id set of this grid
581 IdSetImp idSet_;
582
583 // the level index set, is generated from the HierarchicIndexSet
584 // is generated, when accessed
585 mutable std::vector< typename GridFamily::LevelIndexSetImp * > levelIndexVec_;
586
587 // the leaf index set, is generated from the HierarchicIndexSet
588 // is generated, when accessed
589 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;
590
591 SizeCache< This > sizeCache_;
592
593 typedef AlbertaMarkerVector< dim, dimworld > MarkerVector;
594
595 // needed for VertexIterator, mark on which element a vertex is treated
596 mutable MarkerVector leafMarkerVector_;
597
598 // needed for VertexIterator, mark on which element a vertex is treated
599 mutable std::vector< MarkerVector > levelMarkerVector_;
600
601#if DUNE_ALBERTA_CACHE_COORDINATES
603#endif
604
605 // current state of adaptation
606 AdaptationState adaptationState_;
607 };
608
609} // namespace Dune
610
611#include "albertagrid.cc"
612
613// undef all dangerous defines
614#undef DIM
615#undef DIM_OF_WORLD
616
617#ifdef _ABS_NOT_DEFINED_
618#undef ABS
619#endif
620
621#ifdef _MIN_NOT_DEFINED_
622#undef MIN
623#endif
624
625#ifdef _MAX_NOT_DEFINED_
626#undef MAX
627#endif
628
629#ifdef obstack_chunk_alloc
630#undef obstack_chunk_alloc
631#endif
632#ifdef obstack_chunk_free
633#undef obstack_chunk_free
634#endif
636
637// We use MEM_ALLOC, so undefine it here.
638#undef MEM_ALLOC
639
640// We use MEM_REALLOC, so undefine it here.
641#undef MEM_REALLOC
642
643// We use MEM_CALLOC, so undefine it here.
644#undef MEM_CALLOC
645
646// We use MEM_FREE, so undefine it here.
647#undef MEM_FREE
648
649// Macro ERROR may be defined by alberta_util.h. If so, undefine it.
650#ifdef ERROR
651#undef ERROR
652#endif // #ifdef ERROR
653
654// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.
655#ifdef ERROR_EXIT
656#undef ERROR_EXIT
657#endif // #ifdef ERROR_EXIT
658
659// Macro WARNING may be defined by alberta_util.h. If so, undefine it.
660#ifdef WARNING
661#undef WARNING
662#endif // #ifdef WARNING
663
664// Macro TEST may be defined by alberta_util.h. If so, undefine it.
665#ifdef TEST
666#undef TEST
667#endif // #ifdef TEST
668
669// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
670#ifdef TEST_EXIT
671#undef TEST_EXIT
672#endif // #ifdef TEST_EXIT
673
674// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.
675#ifdef DEBUG_TEST
676#undef DEBUG_TEST
677#endif // #ifdef DEBUG_TEST
678
679// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
680#ifdef DEBUG_TEST_EXIT
681#undef DEBUG_TEST_EXIT
682#endif // #ifdef DEBUG_TEST_EXIT
683
684// Macro INFO may be defined by alberta_util.h. If so, undefine it.
685#ifdef INFO
686#undef INFO
687#endif // #ifdef INFO
688
689// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.
690#ifdef PRINT_INFO
691#undef PRINT_INFO
692#endif // #ifdef PRINT_INFO
693
694// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it.
695#ifdef PRINT_INT_VEC
696#undef PRINT_INT_VEC
697#endif // #ifdef PRINT_INT_VEC
698
699// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine it.
700#ifdef PRINT_REAL_VEC
701#undef PRINT_REAL_VEC
702#endif // #ifdef PRINT_REAL_VEC
703
704// Macro WAIT may be defined by alberta_util.h. If so, undefine it.
705#ifdef WAIT
706#undef WAIT
707#endif // #ifdef WAIT
708
709// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.
710#ifdef WAIT_REALLY
711#undef WAIT_REALLY
712#endif // #ifdef WAIT_REALLY
713
714// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
715#ifdef GET_WORKSPACE
716#undef GET_WORKSPACE
717#endif // #ifdef GET_WORKSPACE
718
719// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
720#ifdef FREE_WORKSPACE
721#undef FREE_WORKSPACE
722#endif // #ifdef FREE_WORKSPACE
723
724// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.
725#ifdef MAT_ALLOC
726#undef MAT_ALLOC
727#endif // #ifdef MAT_ALLOC
728
729// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.
730#ifdef MAT_FREE
731#undef MAT_FREE
732#endif // #ifdef MAT_FREE
733
734// Macro NAME may be defined by alberta_util.h. If so, undefine it.
735#ifdef NAME
736#undef NAME
737#endif // #ifdef NAME
738
739// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.
740#ifdef GET_STRUCT
741#undef GET_STRUCT
742#endif // #ifdef GET_STRUCT
743
744// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it.
745#ifdef ADD_PARAMETER
746#undef ADD_PARAMETER
747#endif // #ifdef ADD_PARAMETER
748
749// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it.
750#ifdef GET_PARAMETER
751#undef GET_PARAMETER
752#endif // #ifdef GET_PARAMETER
753
754#define _ALBERTA_H_
755
756#endif // HAVE_ALBERTA || DOXYGEN
757
758#endif
Provides size cache classes to implement the grids size method efficiently.
interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
Contains #undefs for all preprocessor macros defined by alberta.
#define ALBERTA
Definition: albertaheader.hh:29
Include standard header files.
Definition: agrid.hh:60
ALBERTA REAL Real
Definition: misc.hh:48
ALBERTA REAL_D GlobalVector
Definition: misc.hh:50
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
@ vertex
Definition: common.hh:133
Definition: dgfgridfactory.hh:38
[ provides Dune::Grid ]
Definition: agrid.hh:109
bool readGrid(const std::string &filename, ctype &time)
read Grid from file filename and store time of mesh in time
Definition: albertagrid.cc:585
const DofNumbering & dofNumbering() const
Definition: agrid.hh:473
int generic2alberta(int codim, int i) const
Definition: agrid.hh:493
static std::string typeName()
Definition: agrid.hh:416
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafbegin() const
return LeafIterator which points to first leaf entity
const HierarchicIndexSet & hierarchicIndexSet() const
Definition: agrid.hh:442
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend(int level) const
one past the end on this level
static const int dimension
Definition: agrid.hh:145
int dune2alberta(int codim, int i) const
Definition: agrid.hh:483
Traits::Communication Communication
type of communication
Definition: agrid.hh:165
int maxLevel() const
Definition: albertagrid.cc:483
AlbertaGrid()
create an empty grid
Definition: albertagrid.cc:42
Traits::template Codim< codim >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
const LevelProvider & levelProvider() const
Definition: agrid.hh:478
static int getTwistInOutside(const typename Traits::LeafIntersection &intersection)
Definition: agrid.hh:546
const Alberta::GlobalVector & getCoord(const ElementInfo &elementInfo, int vertex) const
Definition: albertagrid.cc:471
Traits::template Codim< codim >::LevelIterator lend(int level) const
one past the end on this level
Traits::LeafGridView leafGridView() const
View for the leaf grid for All_Partition.
Definition: agrid.hh:370
bool adapt()
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
Definition: albertagrid.cc:415
static const int dimensionworld
Definition: agrid.hh:146
static int getTwistInInside(const typename Traits::LeafIntersection &intersection)
Definition: agrid.hh:540
void postAdapt()
clean up some markers
Definition: albertagrid.cc:356
Traits::template Codim< codim >::LeafIterator leafbegin() const
return LeafIterator which points to first leaf entity
const LocalIdSet & localIdSet() const
return local IdSet
Definition: agrid.hh:457
std::size_t numBoundarySegments() const
number of boundary segments within the macro grid
Definition: agrid.hh:356
GridFamily::ctype ctype
Definition: agrid.hh:143
AlbertaGrid(const This &)=delete
Communication CollectiveCommunication
Definition: agrid.hh:171
Traits::template Codim< codim >::LeafIterator leafend() const
return LeafIterator which points behind last leaf entity
const Traits::LevelIndexSet & levelIndexSet(int level) const
return level index set for given level
Definition: albertagrid.cc:520
int alberta2generic(int codim, int i) const
Definition: agrid.hh:498
static int getTwist(const typename Traits::template Codim< codim >::Entity &entity)
Definition: agrid.hh:527
const Communication & comm() const
return reference to communication, if MPI found this is specialisation for MPI
Definition: agrid.hh:411
ALBERTA MESH * getMesh() const
Definition: agrid.hh:463
int size(int level, int codim) const
Number of grid entities per level and codim because lbegin and lend are none const,...
Definition: albertagrid.cc:490
Traits::HierarchicIndexSet HierarchicIndexSet
type of hierarchic index set
Definition: agrid.hh:157
const Traits::LeafIndexSet & leafIndexSet() const
return leaf index set
Definition: albertagrid.cc:535
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafend() const
return LeafIterator which points behind last leaf entity
bool writeGrid(const std::string &filename, ctype time) const
write Grid to file in Xdr
Definition: albertagrid.cc:575
Traits::LevelGridView levelGridView(int level) const
View for a grid level for All_Partition.
Definition: agrid.hh:362
int alberta2dune(int codim, int i) const
Definition: agrid.hh:488
This & operator=(const This &)=delete
AlbertaGridFamily< dim, dimworld >::Traits Traits
Definition: agrid.hh:149
static int getTwist(const typename Traits::template Codim< 0 >::Entity &entity, int subEntity)
Definition: agrid.hh:534
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
const GlobalIdSet & globalIdSet() const
return global IdSet
Definition: agrid.hh:451
void globalRefine(int refCount)
uses the interface, mark on entity and refineLocal
Definition: albertagrid.cc:304
int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
returns adaptation mark for given entity
Definition: albertagrid.cc:408
Traits::template Codim< EntitySeed::codimension >::Entity entity(const EntitySeed &seed) const
obtain Entity from EntitySeed.
Definition: agrid.hh:426
~AlbertaGrid()
desctructor
Definition: albertagrid.cc:196
bool preAdapt()
returns true, if a least one element is marked for coarsening
Definition: albertagrid.cc:348
bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition: albertagrid.cc:385
const MeshPointer & meshPointer() const
Definition: agrid.hh:468
Definition: coordcache.hh:25
Definition: albertagrid/datahandle.hh:27
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: common/intersection.hh:164
Implementation & impl()
access to the underlying implementation
Definition: common/intersection.hh:178
Definition: treeiterator.hh:189
Definition: hierarchiciterator.hh:29
Definition: albertagrid/intersection.hh:105
Definition: albertagrid/intersectioniterator.hh:27
Definition: albertagrid/entity.hh:46
Definition: albertagrid/indexsets.hh:42
hierarchic index set of AlbertaGrid
Definition: albertagrid/indexsets.hh:534
Definition: albertagrid/indexsets.hh:335
Definition: albertagrid/gridfamily.hh:83
static const int dimension
Definition: albertagrid/gridfamily.hh:88
static const int dimensionworld
Definition: albertagrid/gridfamily.hh:89
AlbertaGridIndexSet< dim, dimworld > LeafIndexSetImp
Definition: albertagrid/gridfamily.hh:92
Alberta::Real ctype
Definition: albertagrid/gridfamily.hh:86
Definition: albertagrid/gridfamily.hh:98
IndexSet< GridImp, LeafIndexSetImp, int, std::array< GeometryType, 1 > > LeafIndexSet
Definition: albertagrid/gridfamily.hh:143
IndexSet< GridImp, LevelIndexSetImp, int, std::array< GeometryType, 1 > > LevelIndexSet
Definition: albertagrid/gridfamily.hh:142
Dune::Communication< No_Comm > Communication
Definition: albertagrid/gridfamily.hh:148
Definition: albertagrid/gridview.hh:80
Definition: albertagrid/gridview.hh:299
Definition: albertagrid/intersection.hh:32
int alberta2dune(int codim, int i) const
Definition: misc.hh:397
int dune2alberta(int codim, int i) const
Definition: misc.hh:390
Definition: albertagrid/projection.hh:80
marker assigning subentities to one element containing them
Definition: treeiterator.hh:35
Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
Definition: adaptcallback.hh:33
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:33
Implementation & impl()
access to the underlying implementation
Definition: common/entity.hh:80
Store a reference to an entity with a minimal memory footprint.
Definition: common/entityseed.hh:26
Implementation & impl()
access to the underlying implementation
Definition: common/entityseed.hh:59
Definition: common/grid.hh:862
bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition: common/grid.hh:915
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: common/grid.hh:927
Index Set Interface base class.
Definition: indexidset.hh:78
Id Set Interface.
Definition: indexidset.hh:452
Definition: common/grid.hh:1107
Provide a generic factory class for unstructured grids.
Definition: common/gridfactory.hh:314
Grid view abstract base class.
Definition: common/gridview.hh:66
organizes the caching of sizes for one grid and one GeometryType
Definition: sizecache.hh:33
Provide a generic factory class for unstructured grids.
provides the GridFamily for AlbertaGrid
Implementation of the IntersectionIterator for AlbertaGrid.
Different resources needed by all grid implementations.