Dune Core Modules (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>
29 
30 #include <dune/grid/common/grid.hh>
34 
35 //- Local includes
36 // some cpp defines and include of alberta.h
37 #include "albertaheader.hh"
38 
39 #include <dune/grid/albertagrid/misc.hh>
40 #include <dune/grid/albertagrid/capabilities.hh>
41 #include <dune/grid/albertagrid/backuprestore.hh>
42 
43 #include <dune/grid/albertagrid/coordcache.hh>
45 #include <dune/grid/albertagrid/level.hh>
46 #include <dune/grid/albertagrid/intersection.hh>
48 #include <dune/grid/albertagrid/datahandle.hh>
49 #include <dune/grid/albertagrid/entityseed.hh>
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 
59 namespace 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  {
112  < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
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 >
137  friend class Alberta::AdaptRestrictProlongHandler;
138 
139  public:
141  typedef AlbertaGridFamily< dim, dimworld > GridFamily;
142 
143  typedef typename GridFamily::ctype ctype;
144 
145  static const int dimension = GridFamily::dimension;
146  static const int dimensionworld = GridFamily::dimensionworld;
147 
148  // the Traits
149  typedef typename AlbertaGridFamily< dim, dimworld >::Traits Traits;
150 
155 
157  typedef typename Traits::HierarchicIndexSet HierarchicIndexSet;
158 
162  typedef typename Traits::LocalIdSet LocalIdSet;
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;
262  typedef Alberta::HierarchyDofNumbering< dimension > DofNumbering;
263  typedef AlbertaGridLevelProvider< dimension > LevelProvider;
264 
265  public:
266  AlbertaGrid ( const This & ) = delete;
267  This &operator= ( const This & ) = delete;
268 
270  AlbertaGrid ();
271 
277  AlbertaGrid ( const Alberta::MacroData< dimension > &macroData,
278  const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
279  = std::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
280 
281  template< class Proj, class Impl >
282  AlbertaGrid ( const Alberta::MacroData< dimension > &macroData,
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 
473  const DofNumbering &dofNumbering () const
474  {
475  return dofNumbering_;
476  }
477 
478  const LevelProvider &levelProvider () const
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  //**********************************************************************
519  typedef MakeableInterfaceObject< typename Traits::template Codim< 0 >::Entity >
520  EntityObject;
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_
553  const Alberta::GlobalVector &
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
570  Alberta::NumberingMap< dimension, Alberta::Dune2AlbertaNumbering > numberingMap_;
571  Alberta::NumberingMap< dimension, Alberta::Generic2AlbertaNumbering > genericNumberingMap_;
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
602  Alberta::CoordCache< dimension > coordCache_;
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
interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
provides the GridFamily for AlbertaGrid
Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
Definition: adaptcallback.hh:33
Definition: entity.hh:46
Definition: hierarchiciterator.hh:29
hierarchic index set of AlbertaGrid
Definition: indexsets.hh:534
Definition: treeiterator.hh:189
[ 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
Traits ::template Codim< codim >::template Partition< pitype >::LeafIterator leafbegin() const
return LeafIterator which points to first leaf entity
const Communication & comm() const
return reference to communication, if MPI found this is specialisation for MPI
Definition: agrid.hh:411
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: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: grid.hh:927
Traits::Communication Communication
type of communication
Definition: agrid.hh:165
int maxLevel() const
Definition: albertagrid.cc:483
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
Definition: albertagrid.cc:206
AlbertaGrid()
create an empty grid
Definition: albertagrid.cc:42
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend(int level) const
one past the end on this level
Definition: albertagrid.cc:226
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
const LocalIdSet & localIdSet() const
return local IdSet
Definition: agrid.hh:457
void postAdapt()
clean up some markers
Definition: albertagrid.cc:356
std::size_t numBoundarySegments() const
number of boundary segments within the macro grid
Definition: agrid.hh:356
AlbertaGridFamily< dim, dimworld > GridFamily
the grid family of AlbertaGrid
Definition: agrid.hh:141
const Traits ::LevelIndexSet & levelIndexSet(int level) const
return level index set for given level
Definition: albertagrid.cc:520
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
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
Traits ::template Codim< codim >::template Partition< pitype >::LeafIterator leafend() const
return LeafIterator which points behind last leaf entity
void globalRefine(int refCount)
uses the interface, mark on entity and refineLocal
Definition: albertagrid.cc:304
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
const GlobalIdSet & globalIdSet() const
return global IdSet
Definition: agrid.hh:451
bool preAdapt()
returns true, if a least one element is marked for coarsening
Definition: albertagrid.cc:348
marker assigning subentities to one element containing them
Definition: treeiterator.hh:35
Store a reference to an entity with a minimal memory footprint.
Definition: entityseed.hh:26
Implementation & impl()
access to the underlying implementation
Definition: entityseed.hh:59
Implementation & impl()
access to the underlying implementation
Definition: entity.hh:80
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:125
Definition: 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: 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: grid.hh:927
Provide a generic factory class for unstructured grids.
Definition: gridfactory.hh:314
Grid view abstract base class.
Definition: gridview.hh:66
Id Set Interface.
Definition: indexidset.hh:452
Index Set Interface base class.
Definition: indexidset.hh:78
Default exception if a function was called while the object is not in a valid state for that function...
Definition: exceptions.hh:281
Implements an utility class that provides collective communication methods for sequential programs.
Implementation of the IntersectionIterator for AlbertaGrid.
Different resources needed by all grid implementations.
Provide a generic factory class for unstructured grids.
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_THROW(E, m)
Definition: exceptions.hh:218
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition: type.hh:506
Dune namespace.
Definition: alignedallocator.hh:13
Provides size cache classes to implement the grids size method efficiently.
Standard Dune debug streams.
Static tag representing a codimension.
Definition: dimension.hh:24
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:33
A Traits struct that collects all associated types of one implementation.
Definition: grid.hh:411
GridFamily::Traits::template Codim< cd >::Entity Entity
A type that is a model of a Dune::Entity<cd,dim,...>.
Definition: grid.hh:419
Contains #undefs for all preprocessor macros defined by alberta.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 27, 22:29, 2024)