Dune Core Modules (2.7.1)

agrid.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_ALBERTAGRID_IMP_HH
4#define DUNE_ALBERTAGRID_IMP_HH
5
11#if HAVE_ALBERTA || DOXYGEN
12
13#include <cassert>
14#include <cstddef>
15
16#include <algorithm>
17#include <iostream>
18#include <fstream>
19#include <memory>
20#include <vector>
21
22// Dune includes
28
33
34//- Local includes
35// some cpp defines and include of alberta.h
36#include "albertaheader.hh"
37
38#include <dune/grid/albertagrid/misc.hh>
39#include <dune/grid/albertagrid/capabilities.hh>
40#include <dune/grid/albertagrid/backuprestore.hh>
41
42#include <dune/grid/albertagrid/coordcache.hh>
44#include <dune/grid/albertagrid/level.hh>
45#include <dune/grid/albertagrid/intersection.hh>
47#include <dune/grid/albertagrid/datahandle.hh>
48#include <dune/grid/albertagrid/entityseed.hh>
49
50#include "indexsets.hh"
51#include "geometry.hh"
52#include "entity.hh"
53#include "hierarchiciterator.hh"
54#include "treeiterator.hh"
55#include "leveliterator.hh"
56#include "leafiterator.hh"
57
58namespace Dune
59{
60
61 // External Forward Declarations
62 // -----------------------------
63
64 template< class Grid >
65 struct DGFGridFactory;
66
67
68
69 // AlbertaGrid
70 // -----------
71
135 template< int dim, int dimworld = Alberta::dimWorld >
138 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
139 {
142 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
143 Base;
144
145 template< int, int, class > friend class AlbertaGridEntity;
146 template< class > friend class AlbertaLevelGridView;
147 template< class > friend class AlbertaLeafGridView;
148 template< int, class, bool > friend class AlbertaGridTreeIterator;
149 template< class > friend class AlbertaGridHierarchicIterator;
150
151 friend class GridFactory< This >;
152 friend struct DGFGridFactory< This >;
153
154 friend class AlbertaGridIntersectionBase< const This >;
155 friend class AlbertaGridLeafIntersection< const This >;
156
157 friend class AlbertaMarkerVector< dim, dimworld >;
158#if (__GNUC__ < 4) && !(defined __ICC)
159 // add additional friend decls for gcc 3.4
160 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<true>;
161 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<false>;
162#endif
163 friend class AlbertaGridIndexSet< dim, dimworld >;
164 friend class AlbertaGridHierarchicIndexSet< dim, dimworld >;
165
166 template< class, class >
167 friend class Alberta::AdaptRestrictProlongHandler;
168
169 public:
171 typedef AlbertaGridFamily< dim, dimworld > GridFamily;
172
173 typedef typename GridFamily::ctype ctype;
174
175 static const int dimension = GridFamily::dimension;
176 static const int dimensionworld = GridFamily::dimensionworld;
177
178 // the Traits
179 typedef typename AlbertaGridFamily< dim, dimworld >::Traits Traits;
180
185
187 typedef typename Traits::HierarchicIndexSet HierarchicIndexSet;
188
193
196
197 private:
199 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
200
202 typedef AlbertaGridIdSet<dim,dimworld> IdSetImp;
203
205 struct AdaptationState
206 {
207 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };
208
209 private:
210 Phase phase_;
211 int coarsenMarked_;
212 int refineMarked_;
213
214 public:
215 AdaptationState ()
216 : phase_( ComputationPhase ),
217 coarsenMarked_( 0 ),
218 refineMarked_( 0 )
219 {}
220
221 void mark ( int count )
222 {
223 if( count < 0 )
224 ++coarsenMarked_;
225 if( count > 0 )
226 refineMarked_ += (2 << count);
227 }
228
229 void unmark ( int count )
230 {
231 if( count < 0 )
232 --coarsenMarked_;
233 if( count > 0 )
234 refineMarked_ -= (2 << count);
235 }
236
237 bool coarsen () const
238 {
239 return (coarsenMarked_ > 0);
240 }
241
242 int refineMarked () const
243 {
244 return refineMarked_;
245 }
246
247 void preAdapt ()
248 {
249 if( phase_ != ComputationPhase )
250 error( "preAdapt may only be called in computation phase." );
251 phase_ = PreAdaptationPhase;
252 }
253
254 void adapt ()
255 {
256 if( phase_ != PreAdaptationPhase )
257 error( "adapt may only be called in preadapdation phase." );
258 phase_ = PostAdaptationPhase;
259 }
260
261 void postAdapt ()
262 {
263 if( phase_ != PostAdaptationPhase )
264 error( "postAdapt may only be called in postadaptation phase." );
265 phase_ = ComputationPhase;
266
267 coarsenMarked_ = 0;
268 refineMarked_ = 0;
269 }
270
271 private:
272 void error ( const std::string &message )
273 {
275 }
276 };
277
278 template< class DataHandler >
279 struct AdaptationCallback;
280
281 // max number of allowed levels is 64
282 static const int MAXL = 64;
283
284 typedef Alberta::ElementInfo< dimension > ElementInfo;
285 typedef Alberta::MeshPointer< dimension > MeshPointer;
286 typedef Alberta::HierarchyDofNumbering< dimension > DofNumbering;
287 typedef AlbertaGridLevelProvider< dimension > LevelProvider;
288
289 public:
290 AlbertaGrid ( const This & ) = delete;
291 This &operator= ( const This & ) = delete;
292
294 AlbertaGrid ();
295
301 AlbertaGrid ( const Alberta::MacroData< dimension > &macroData,
302 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
303 = std::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
304
305 template< class Proj, class Impl >
306 AlbertaGrid ( const Alberta::MacroData< dimension > &macroData,
307 const Alberta::ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
308
313 AlbertaGrid ( const std::string &macroGridFileName );
314
316 ~AlbertaGrid ();
317
320 int maxLevel () const;
321
323 template<int cd, PartitionIteratorType pitype>
324 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
325 lbegin (int level) const;
326
328 template<int cd, PartitionIteratorType pitype>
329 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
330 lend (int level) const;
331
333 template< int codim >
334 typename Traits::template Codim< codim >::LevelIterator
335 lbegin ( int level ) const;
336
338 template< int codim >
339 typename Traits::template Codim< codim >::LevelIterator
340 lend ( int level ) const;
341
343 template< int codim, PartitionIteratorType pitype >
344 typename Traits
345 ::template Codim< codim >::template Partition< pitype >::LeafIterator
346 leafbegin () const;
347
349 template< int codim, PartitionIteratorType pitype >
350 typename Traits
351 ::template Codim< codim >::template Partition< pitype >::LeafIterator
352 leafend () const;
353
355 template< int codim >
356 typename Traits::template Codim< codim >::LeafIterator
357 leafbegin () const;
358
360 template< int codim >
361 typename Traits::template Codim< codim >::LeafIterator
362 leafend () const;
363
368 int size (int level, int codim) const;
369
371 int size (int level, GeometryType type) const;
372
374 int size (int codim) const;
375
377 int size (GeometryType type) const;
378
380 std::size_t numBoundarySegments () const
381 {
382 return numBoundarySegments_;
383 }
384
386 typename Traits::LevelGridView levelGridView ( int level ) const
387 {
388 typedef typename Traits::LevelGridView View;
389 typedef typename View::GridViewImp ViewImp;
390 return View( ViewImp( *this, level ) );
391 }
392
395 {
396 typedef typename Traits::LeafGridView View;
397 typedef typename View::GridViewImp ViewImp;
398 return View( ViewImp( *this ) );
399 }
400
401 public:
402 //***************************************************************
403 // Interface for Adaptation
404 //***************************************************************
405 using Base::getMark;
406 using Base::mark;
407
409 int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const;
410
412 bool mark ( int refCount, const typename Traits::template Codim< 0 >::Entity &e );
413
415 void globalRefine ( int refCount );
416
417 template< class DataHandle >
418 void globalRefine ( int refCount, AdaptDataHandleInterface< This, DataHandle > &handle );
419
421 bool adapt ();
422
424 template< class DataHandle >
426
428 bool preAdapt ();
429
431 void postAdapt();
432
436 {
437 return comm_;
438 }
439
440 static std::string typeName ()
441 {
442 std::ostringstream s;
443 s << "AlbertaGrid< " << dim << ", " << dimworld << " >";
444 return s.str();
445 }
446
448 template< class EntitySeed >
449 typename Traits::template Codim< EntitySeed::codimension >::Entity
450 entity ( const EntitySeed &seed ) const
451 {
452 typedef typename Traits::template Codim< EntitySeed::codimension >::EntityImpl EntityImpl;
453 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ), seed.impl().subEntity() );
454 }
455
456 //**********************************************************
457 // End of Interface Methods
458 //**********************************************************
460 bool writeGrid( const std::string &filename, ctype time ) const;
461
463 bool readGrid( const std::string &filename, ctype &time );
464
465 // return hierarchic index set
466 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
467
469 const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
470
472 const typename Traits :: LeafIndexSet & leafIndexSet () const;
473
475 const GlobalIdSet &globalIdSet () const
476 {
477 return idSet_;
478 }
479
481 const LocalIdSet &localIdSet () const
482 {
483 return idSet_;
484 }
485
486 // access to mesh pointer, needed by some methods
487 ALBERTA MESH* getMesh () const
488 {
489 return mesh_;
490 };
491
492 const MeshPointer &meshPointer () const
493 {
494 return mesh_;
495 }
496
497 const DofNumbering &dofNumbering () const
498 {
499 return dofNumbering_;
500 }
501
502 const LevelProvider &levelProvider () const
503 {
504 return levelProvider_;
505 }
506
507 int dune2alberta ( int codim, int i ) const
508 {
509 return numberingMap_.dune2alberta( codim, i );
510 }
511
512 int alberta2dune ( int codim, int i ) const
513 {
514 return numberingMap_.alberta2dune( codim, i );
515 }
516
517 int generic2alberta ( int codim, int i ) const
518 {
519 return genericNumberingMap_.dune2alberta( codim, i );
520 }
521
522 int alberta2generic ( int codim, int i ) const
523 {
524 return genericNumberingMap_.alberta2dune( codim, i );
525 }
526
527 // write ALBERTA mesh file
528 bool
529 DUNE_DEPRECATED_MSG("Deprecated in Dune 3.0, use writeGrid instead.")
530 writeGridXdr ( const std::string &filename, ctype time ) const;
531
533 bool
534 DUNE_DEPRECATED_MSG("Deprecated in Dune 3.0, use readGrid instead.")
535 readGridXdr ( const std::string &filename, ctype &time );
536
537 private:
538 using Base::getRealImplementation;
539
540 typedef std::vector<int> ArrayType;
541
542 void setup ();
543
544 // make the calculation of indexOnLevel and so on.
545 // extra method because of Reihenfolge
546 void calcExtras();
547
548 private:
549 // delete mesh and all vectors
550 void removeMesh();
551
552 //***********************************************************************
553 // MemoryManagement for Entitys and Geometrys
554 //**********************************************************************
555 typedef MakeableInterfaceObject< typename Traits::template Codim< 0 >::Entity >
556 EntityObject;
557
558 public:
559 friend class AlbertaGridLeafIntersectionIterator< const This >;
560
561 template< int codim >
562 static int
563 getTwist ( const typename Traits::template Codim< codim >::Entity &entity )
564 {
565 return entity.impl().twist();
566 }
567
568 template< int codim >
569 static int
570 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int subEntity )
571 {
572 return entity.impl().template twist< codim >( subEntity );
573 }
574
575 static int
576 getTwistInInside ( const typename Traits::LeafIntersection &intersection )
577 {
578 return intersection.impl().twistInInside();
579 }
580
581 static int
582 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )
583 {
584 return intersection.impl().twistInOutside();
585 }
586
587 DUNE_DEPRECATED_MSG("use intersection.impl() instead")
588 const AlbertaGridLeafIntersection< const This > &
589 getRealIntersection ( const typename Traits::LeafIntersection &intersection ) const
590 {
591 return intersection.impl();
592 }
593
594 public:
595 // read global element number from elNumbers_
596 const Alberta::GlobalVector &
597 getCoord ( const ElementInfo &elementInfo, int vertex ) const;
598
599 private:
600 // pointer to an Albert Mesh, which contains the data
601 MeshPointer mesh_;
602
603 // collective communication
605
606 // maximum level of the mesh
607 int maxlevel_;
608
609 // number of boundary segments within the macro grid
610 size_t numBoundarySegments_;
611
612 // map between ALBERTA and DUNE numbering
613 Alberta::NumberingMap< dimension, Alberta::Dune2AlbertaNumbering > numberingMap_;
614 Alberta::NumberingMap< dimension, Alberta::Generic2AlbertaNumbering > genericNumberingMap_;
615
616 DofNumbering dofNumbering_;
617
618 LevelProvider levelProvider_;
619
620 // hierarchical numbering of AlbertaGrid, unique per codim
621 HierarchicIndexSet hIndexSet_;
622
623 // the id set of this grid
624 IdSetImp idSet_;
625
626 // the level index set, is generated from the HierarchicIndexSet
627 // is generated, when accessed
628 mutable std::vector< typename GridFamily::LevelIndexSetImp * > levelIndexVec_;
629
630 // the leaf index set, is generated from the HierarchicIndexSet
631 // is generated, when accessed
632 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;
633
634 SizeCache< This > sizeCache_;
635
636 typedef AlbertaMarkerVector< dim, dimworld > MarkerVector;
637
638 // needed for VertexIterator, mark on which element a vertex is treated
639 mutable MarkerVector leafMarkerVector_;
640
641 // needed for VertexIterator, mark on which element a vertex is treated
642 mutable std::vector< MarkerVector > levelMarkerVector_;
643
644#if DUNE_ALBERTA_CACHE_COORDINATES
645 Alberta::CoordCache< dimension > coordCache_;
646#endif
647
648 // current state of adaptation
649 AdaptationState adaptationState_;
650 };
651
652} // namespace Dune
653
654#include "albertagrid.cc"
655
656// undef all dangerous defines
657#undef DIM
658#undef DIM_OF_WORLD
659
660#ifdef _ABS_NOT_DEFINED_
661#undef ABS
662#endif
663
664#ifdef _MIN_NOT_DEFINED_
665#undef MIN
666#endif
667
668#ifdef _MAX_NOT_DEFINED_
669#undef MAX
670#endif
671
672#ifdef obstack_chunk_alloc
673#undef obstack_chunk_alloc
674#endif
675#ifdef obstack_chunk_free
676#undef obstack_chunk_free
677#endif
679
680// We use MEM_ALLOC, so undefine it here.
681#undef MEM_ALLOC
682
683// We use MEM_REALLOC, so undefine it here.
684#undef MEM_REALLOC
685
686// We use MEM_CALLOC, so undefine it here.
687#undef MEM_CALLOC
688
689// We use MEM_FREE, so undefine it here.
690#undef MEM_FREE
691
692// Macro ERROR may be defined by alberta_util.h. If so, undefine it.
693#ifdef ERROR
694#undef ERROR
695#endif // #ifdef ERROR
696
697// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.
698#ifdef ERROR_EXIT
699#undef ERROR_EXIT
700#endif // #ifdef ERROR_EXIT
701
702// Macro WARNING may be defined by alberta_util.h. If so, undefine it.
703#ifdef WARNING
704#undef WARNING
705#endif // #ifdef WARNING
706
707// Macro TEST may be defined by alberta_util.h. If so, undefine it.
708#ifdef TEST
709#undef TEST
710#endif // #ifdef TEST
711
712// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
713#ifdef TEST_EXIT
714#undef TEST_EXIT
715#endif // #ifdef TEST_EXIT
716
717// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.
718#ifdef DEBUG_TEST
719#undef DEBUG_TEST
720#endif // #ifdef DEBUG_TEST
721
722// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
723#ifdef DEBUG_TEST_EXIT
724#undef DEBUG_TEST_EXIT
725#endif // #ifdef DEBUG_TEST_EXIT
726
727// Macro INFO may be defined by alberta_util.h. If so, undefine it.
728#ifdef INFO
729#undef INFO
730#endif // #ifdef INFO
731
732// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.
733#ifdef PRINT_INFO
734#undef PRINT_INFO
735#endif // #ifdef PRINT_INFO
736
737// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it.
738#ifdef PRINT_INT_VEC
739#undef PRINT_INT_VEC
740#endif // #ifdef PRINT_INT_VEC
741
742// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine it.
743#ifdef PRINT_REAL_VEC
744#undef PRINT_REAL_VEC
745#endif // #ifdef PRINT_REAL_VEC
746
747// Macro WAIT may be defined by alberta_util.h. If so, undefine it.
748#ifdef WAIT
749#undef WAIT
750#endif // #ifdef WAIT
751
752// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.
753#ifdef WAIT_REALLY
754#undef WAIT_REALLY
755#endif // #ifdef WAIT_REALLY
756
757// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
758#ifdef GET_WORKSPACE
759#undef GET_WORKSPACE
760#endif // #ifdef GET_WORKSPACE
761
762// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
763#ifdef FREE_WORKSPACE
764#undef FREE_WORKSPACE
765#endif // #ifdef FREE_WORKSPACE
766
767// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.
768#ifdef MAT_ALLOC
769#undef MAT_ALLOC
770#endif // #ifdef MAT_ALLOC
771
772// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.
773#ifdef MAT_FREE
774#undef MAT_FREE
775#endif // #ifdef MAT_FREE
776
777// Macro NAME may be defined by alberta_util.h. If so, undefine it.
778#ifdef NAME
779#undef NAME
780#endif // #ifdef NAME
781
782// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.
783#ifdef GET_STRUCT
784#undef GET_STRUCT
785#endif // #ifdef GET_STRUCT
786
787// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it.
788#ifdef ADD_PARAMETER
789#undef ADD_PARAMETER
790#endif // #ifdef ADD_PARAMETER
791
792// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it.
793#ifdef GET_PARAMETER
794#undef GET_PARAMETER
795#endif // #ifdef GET_PARAMETER
796
797#define _ALBERTA_H_
798
799#endif // HAVE_ALBERTA || DOXYGEN
800
801#endif
interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
provides the GridFamily for AlbertaGrid
Implementation of the IntersectionIterator for AlbertaGrid.
Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
Definition: adaptcallback.hh:31
Definition: entity.hh:44
Definition: hierarchiciterator.hh:27
hierarchic index set of AlbertaGrid
Definition: indexsets.hh:532
Definition: treeiterator.hh:184
[ provides Dune::Grid ]
Definition: agrid.hh:139
bool readGrid(const std::string &filename, ctype &time)
read Grid from file filename and store time of mesh in time
Definition: albertagrid.cc:599
const CollectiveCommunication & comm() const
return reference to collective communication, if MPI found this is specialisation for MPI
Definition: agrid.hh:435
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafbegin() const
return LeafIterator which points to first leaf entity
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend(int level) const
one past the end on this level
bool writeGridXdr(const std::string &filename, ctype time) const
Definition: albertagrid.cc:573
int maxLevel() const
Definition: albertagrid.cc:481
AlbertaGrid()
create an empty grid
Definition: albertagrid.cc:40
Traits::template Codim< codim >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
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:394
bool adapt()
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
Definition: albertagrid.cc:413
bool readGridXdr(const std::string &filename, ctype &time)
reads ALBERTA mesh file
Definition: albertagrid.cc:581
void postAdapt()
clean up some markers
Definition: albertagrid.cc:354
const AlbertaGridLeafIntersection< const This > & getRealIntersection(const typename Traits::LeafIntersection &intersection) const
Definition: agrid.hh:589
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:481
std::size_t numBoundarySegments() const
number of boundary segments within the macro grid
Definition: agrid.hh:380
AlbertaGridFamily< dim, dimworld > GridFamily
the grid family of AlbertaGrid
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:518
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:488
Traits::HierarchicIndexSet HierarchicIndexSet
type of hierarchic index set
Definition: agrid.hh:187
const Traits::LeafIndexSet & leafIndexSet() const
return leaf index set
Definition: albertagrid.cc:533
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:589
Traits::LevelGridView levelGridView(int level) const
View for a grid level for All_Partition.
Definition: agrid.hh:386
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:475
void globalRefine(int refCount)
uses the interface, mark on entity and refineLocal
Definition: albertagrid.cc:302
int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
returns adaptation mark for given entity
Definition: albertagrid.cc:406
Traits::template Codim< EntitySeed::codimension >::Entity entity(const EntitySeed &seed) const
obtain Entity from EntitySeed.
Definition: agrid.hh:450
~AlbertaGrid()
desctructor
Definition: albertagrid.cc:194
bool preAdapt()
returns true, if a least one element is marked for coarsening
Definition: albertagrid.cc:346
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:383
marker assigning subentities to one element containing them
Definition: treeiterator.hh:32
Store a reference to an entity with a minimal memory footprint.
Definition: entityseed.hh:24
Implementation & impl()
access to the underlying implementation
Definition: entityseed.hh:57
Implementation & impl()
access to the underlying implementation
Definition: entity.hh:78
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:279
Definition: grid.hh:855
static std::conditional< std::is_reference< InterfaceType >::value, typenamestd::add_lvalue_reference< typenameReturnImplementationType< typenamestd::remove_reference< InterfaceType >::type >::ImplementationType >::type, typenamestd::remove_const< typenameReturnImplementationType< typenamestd::remove_reference< InterfaceType >::type >::ImplementationType >::type >::type getRealImplementation(InterfaceType &&i)
return real implementation of interface class
Definition: grid.hh:1027
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
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
Provide a generic factory class for unstructured grids.
Definition: gridfactory.hh:269
Grid view abstract base class.
Definition: gridview.hh:60
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
Id Set Interface.
Definition: indexidset.hh:441
Index Set Interface base class.
Definition: indexidset.hh:76
Default exception if a function was called while the object is not in a valid state for that function...
Definition: exceptions.hh:279
organizes the caching of sizes for one grid and one GeometryType
Definition: sizecache.hh:31
Different resources needed by all grid implementations.
Provide a generic factory class for unstructured grids.
Implements an utility class that provides collective communication methods for sequential programs.
Definition of the DUNE_DEPRECATED macro for the case that config.h is not available.
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Implements a vector constructed from a given type representing a field and a compile-time given size.
#define DUNE_DEPRECATED_MSG(text)
Mark some entity as deprecated.
Definition: deprecated.hh:169
#define DUNE_THROW(E, m)
Definition: exceptions.hh:216
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition: type.hh:797
Dune namespace.
Definition: alignedallocator.hh:14
STL namespace.
Provides size cache classes to implement the grids size method efficiently.
Standard Dune debug streams.
Static tag representing a codimension.
Definition: dimension.hh:22
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:31
Contains #undefs for all preprocessor macros defined by alberta.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 11, 23:29, 2024)