dune-fem 2.8.0
Loading...
Searching...
No Matches
dofmanager.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_DOFMANAGER_HH
2#define DUNE_FEM_DOFMANAGER_HH
3
4#include <cassert>
5#include <string>
6#include <list>
7
8#include <dune/common/exceptions.hh>
9#include <dune/common/stdstreams.hh>
10#include <dune/common/version.hh>
11
12#if HAVE_DUNE_ALUGRID
13#include <dune/alugrid/common/interfaces.hh>
14#endif
15
26
27#include <dune/grid/common/datahandleif.hh>
28#if HAVE_DUNE_ALUGRID
29#include <dune/alugrid/common/ldbhandleif.hh>
30#endif
31
32namespace Dune
33{
34
35 namespace Fem
36 {
37
43 // forward declaration
44 template <class GridType> class DofManager;
45 template <class DofManagerImp> class DofManagerFactory;
46
47
49 //
50 // ManagedIndexSetInterface
51 //
53
59 {
61 protected:
62 // use address of object as id
63 typedef const void * IdentifierType;
64 // pointer to compare index sets
66 // reference counter
68
69 template< class IndexSet >
70 explicit ManagedIndexSetInterface ( const IndexSet &iset )
71 : setPtr_( getIdentifier( iset ) ),
73 {
74 }
75
76 public:
77 virtual ~ManagedIndexSetInterface () = default;
78
80 virtual void resize () = 0;
82 virtual bool compress () = 0;
83
85 virtual void backup() const = 0;
87 virtual void restore() = 0;
88
90 virtual void write( StandardOutStream& out ) const = 0;
91 virtual void read( StandardInStream& out ) = 0;
92
95
98 {
99 return (--referenceCounter_ == 0);
100 }
101
102 template< class IndexSet >
103 bool equals ( const IndexSet &iset ) const
104 {
105 return (getIdentifier( iset ) == setPtr_);
106 }
107
108 private:
109 template< class IndexSet >
110 IdentifierType getIdentifier ( const IndexSet &iset ) const
111 {
112 return static_cast< IdentifierType >( &iset );
113 }
114 };
115
116 template <class IndexSetType, class EntityType> class RemoveIndicesFromSet;
117 template <class IndexSetType, class EntityType> class InsertIndicesToSet;
118
119 template <class IndexSetType, class EntityType>
122 public LocalInlinePlus < ManagedIndexSet<IndexSetType,EntityType> , EntityType >
123 {
125
126 static const bool isConsecutive =
128
129 protected:
130 // the dof set stores number of dofs on entity for each codim
131 IndexSetType & indexSet_;
132
133 // insertion and removal of indices
134 InsertIndicesToSet <IndexSetType, EntityType> insertIdxObj_;
135 RemoveIndicesFromSet <IndexSetType, EntityType> removeIdxObj_;
136
139
140 public:
143
145 ManagedIndexSet ( const IndexSetType & iset,
146 LocalIndexSetObjectsType & insertList,
147 LocalIndexSetObjectsType & removeList )
148 : BaseType( iset )
149 , indexSet_ (const_cast<IndexSetType &> (iset))
151 , insertList_(insertList)
152 , removeList_(removeList)
153 {
154 this->setPtr_ = (void *) &indexSet_;
155
156 if constexpr ( isConsecutive )
157 {
160 }
161 }
162
165 {
166 if constexpr ( isConsecutive )
167 {
170 }
171 }
172
174 void resize ()
175 {
176 indexSet_.resize();
177 }
178
180 bool compress ()
181 {
182 return indexSet_.compress();
183 }
184
185 // forward backup call to indexSet
186 virtual void backup () const
187 {
188 indexSet_.backup();
189 }
190
191 // forward restore call to indexSet
192 virtual void restore ()
193 {
194 indexSet_.restore();
195 }
196
198 virtual void read( StandardInStream& in ) { indexSet_.read( in ); }
199
201 virtual void write( StandardOutStream& out ) const { indexSet_.write( out ); }
202 };
203
205 //
206 // DofStorageInterface
207 //
209
212 {
213 protected:
216
217 public:
219 virtual ~DofStorageInterface() = default;
220
222 virtual void enableDofCompression() { }
223
225 virtual int size () const = 0;
226 };
227
228
233 {
234 protected:
237
238 public:
240 virtual ~ManagedDofStorageInterface() = default;
241
243 virtual void resize ( const bool enlargeOnly ) = 0;
245 virtual void reserve (int newSize) = 0;
248 virtual void dofCompress ( const bool clearResizedArrays ) = 0;
250 virtual size_t usedMemorySize() const = 0;
251 };
252
253
254 template <class MemObjectType> class ResizeMemoryObjects;
255 template <class MemObjectType> class ReserveMemoryObjects;
256
268 template <class GridImp, class MapperType , class DofArrayType>
270 {
271 // interface for MemObject lists
273 protected:
274 // type of this class
275 typedef ManagedDofStorageImplementation <GridImp, MapperType , DofArrayType> ThisType;
276
278
279 // reference to dof manager
281
282 // the dof set stores number of dofs on entity for each codim
283 MapperType &mapper_;
284
285 // Array which the dofs are stored in
286 DofArrayType& array_;
287
288 typedef ResizeMemoryObjects < ThisType > ResizeMemoryObjectType;
289 typedef ReserveMemoryObjects < ThisType > ReserveMemoryObjectType;
292
293 // true if data need to be compressed
295
296 public:
298
299 protected:
301 ManagedDofStorageImplementation ( const GridImp& grid,
302 const MapperType& mapper,
303 DofArrayType& array )
304 : dm_( DofManagerType :: instance( grid ) ),
305 mapper_ ( const_cast<MapperType& >(mapper)),
306 array_( array ),
307 resizeMemObj_(*this),
308 reserveMemObj_(*this),
310 {
311 // add to dof manager
312 dm_.addDofStorage( *this );
313
314 // set memory over estimate factor, only for DofArray
315 array_.setMemoryFactor( dm_.memoryFactor() );
316 }
317
320 {
321 // remove from dof manager
322 dm_.removeDofStorage( *this );
323 }
324
325 public:
328
331
333 int size () const { return array_.size(); }
334
336 void resize ( const bool enlargeOnly )
337 {
338 resize( std::integral_constant< bool, Capabilities::isAdaptiveDofMapper< MapperType >::v >(), enlargeOnly );
339 }
340
342 inline void reserve ( const int needed )
343 {
344 // if index set is compressible, then add requested size
345 if( mapper().consecutive() )
346 {
347 const int nSize = size() + (needed * mapper().maxNumDofs());
348 array_.reserve( nSize );
349 }
350 else
351 {
352 // if compress is not needed just resize with given size
353 // therefore use newSize to enleage array
354 assert( ! mapper().consecutive() );
355 // resize array
356 resize ( false );
357 }
358 }
359
361 void dofCompress ( const bool clearResizedArrays )
362 {
363 // get current size
364 const int nSize = mapper().size();
365
366 // if data is non-temporary do data compression
368 {
369 // get old size (which we still have in array)
370 const int oldSize = array_.size();
371
372 // NOTE: new size can also be larger than old size
373 // e.g. during loadBalancing when ghosts where
374 // introduced before compressing the index set
375
376 // begin with block zero since closing of holes
377 // has to be done anyway if the mapper is consecutive
378 const int numBlocks = mapper().numBlocks();
379 for( int block = 0; block < numBlocks; ++block )
380 {
381 // move memory
382 moveToFront( oldSize, block );
383
384 // only close holes for consecutive mappers
385 if( mapper().consecutive () )
386 {
387 // run over all holes and copy array vules to new place
388 const int holes = mapper().numberOfHoles( block );
389 for( int i = 0; i < holes; ++i )
390 {
391 const int oldIndex = mapper().oldIndex( i, block );
392 const int newIndex = mapper().newIndex( i, block );
393
394 assert( newIndex < nSize );
395 // implements array_[ newIndex ] = array_[ oldIndex ] ;
396 array_.copyContent( newIndex, oldIndex );
397 }
398 }
399 }
400 }
401
402 // store new size, which should be smaller then actual size
403 array_.resize( nSize );
404
405 if( clearResizedArrays && ! dataCompressionEnabled_ )
406 {
407 // if enabled clear temporary data to avoid occasionally NaN values
408 array_.clear();
409 }
410 }
411
413 size_t usedMemorySize() const
414 {
415 return ((size_t) sizeof(ThisType) + array_.usedMemorySize());
416 }
417
420 {
422 }
423
425 DofArrayType & getArray() { return array_; }
426
427 protected:
428 inline MapperType &mapper () const
429 {
430 return mapper_;
431 }
432
433 // resize for non-adaptive mappers
434 void resize ( std::false_type, const bool enlargeOnly )
435 {
436 // note: The mapper might already have been updated, so do not use
437 // it to obtain old array size.
438 mapper().update(); // make sure the mapper is up2date
439
440 const int newSize = mapper().size();
441 const int oldSize = array_.size();
442
443 if( enlargeOnly && newSize < oldSize ) return ;
444
445 if( newSize != oldSize )
446 array_.resize( newSize );
447 }
448
449 // resize for adaptive mappers
450 void resize ( std::true_type, const bool enlargeOnly )
451 {
452 // note: The mapper is adaptive and has been updated automatically, so
453 // do not use it to obtain old array size.
454 const int oldSize = array_.size();
455
456 // get current size
457 const int nSize = mapper().size();
458
459 // if enlarge only option is given only resize
460 // if new size if larger than old size
461 if( enlargeOnly && nSize <= oldSize ) return ;
462
463 // if nothing changed do nothing
464 if( nSize == oldSize ) return ;
465
466 // resize memory to current value
467 array_.resize( nSize );
468
469 // if data is only temporary data, don't adjust memory
470 if( ! dataCompressionEnabled_ || enlargeOnly ) return ;
471
472 // now check all blocks beginning with the largest
473 const int numBlocks = mapper().numBlocks();
474
475 // initialize upperBound
476 int upperBound = oldSize ;
477
478 // make sure offset of block 0 is zero
479 assert( mapper().offSet( 0 ) == 0 );
480 assert( mapper().oldOffSet( 0 ) == 0 );
481
482 // skip block 0 (since offset == 0)
483 for( int block = numBlocks-1; block >= 1; --block )
484 {
485 // get offsets
486 const int newOffSet = mapper().offSet( block );
487 const int oldOffSet = mapper().oldOffSet( block );
488
489 // make sure new offset is larger
490 assert( newOffSet >= oldOffSet );
491
492 // if off set is not zero
493 if( newOffSet > oldOffSet )
494 {
495 // calculate block size
496 const int blockSize = upperBound - oldOffSet;
497 // move block backward
498 array_.memMoveBackward( blockSize, oldOffSet, newOffSet );
499
500 // update upper bound
501 upperBound = oldOffSet;
502 }
503 }
504 }
505
506 // move array to rear insertion points
508 {
509 }
510
512 void moveToFront ( const int oldSize, const int block )
513 {
514 // get insertion point from block
515 const int oldOffSet = mapper().oldOffSet( block );
516
517 // get new off set
518 const int newOffSet = mapper().offSet( block );
519
520 // here we should have at least the same offsets
521 assert( newOffSet <= oldOffSet );
522
523 // only if block is not starting from zero
524 if( newOffSet < oldOffSet )
525 {
526 // get number of blocks
527 const int numBlocks = mapper().numBlocks();
528
529 // for last section upperBound is size
530 const int upperBound
531 = (block == numBlocks - 1) ? oldSize : mapper().oldOffSet( block + 1 );
532 const int blockSize = upperBound - oldOffSet;
533
534 // move block forward
535 array_.memMoveForward( blockSize, oldOffSet, newOffSet );
536 }
537 }
538 };
539
541 template <class GridImp, class MapperType , class DofArrayType>
542 class ManagedDofStorage : public ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >
543 {
545 protected:
546 DofArrayType myArray_;
547 public:
549 ManagedDofStorage( const GridImp& grid,
550 const MapperType& mapper )
551 : BaseType( grid, mapper, myArray_ ),
552 myArray_( mapper.size() )
553 {
554 }
555 };
556
558 template< class DofStorageType, class GridType, class MapperType >
559 static inline std::pair< DofStorageInterface* , DofStorageType* >
560 allocateManagedDofStorage( const GridType& grid,
561 const MapperType& mapper,
562 const DofStorageType * = 0 )
563 {
564 // create managed dof storage
565 typedef ManagedDofStorage< GridType, MapperType,
566 DofStorageType > ManagedDofStorageType;
567
568 ManagedDofStorageType* mds = new ManagedDofStorageType( grid, mapper );
569 assert( mds );
570
571 // return pair with dof storage pointer and array pointer
572 return std::pair< DofStorageInterface* , DofStorageType* >
573 ( mds , & mds->getArray () );
574 }
575
576
577
579 //
580 // RestrictPorlong for Index Sets
581 //
583
584 template <class IndexSetType, class EntityType>
586 : public LocalInlinePlus < RemoveIndicesFromSet<IndexSetType,EntityType> , EntityType >
587 {
588 private:
589 // the dof set stores number of dofs on entity for each codim
590 IndexSetType & indexSet_;
591
592 public:
593 // Constructor of MemObject, only to call from DofManager
594 explicit RemoveIndicesFromSet ( IndexSetType & iset ) : indexSet_ (iset) {}
595
597 inline void apply ( EntityType & entity )
598 {
599 indexSet_.removeEntity( entity );
600 }
601 };
602
603 template <class IndexSetType, class EntityType>
605 : public LocalInlinePlus < InsertIndicesToSet< IndexSetType, EntityType > , EntityType >
606 {
607 private:
608 // the dof set stores number of dofs on entity for each codim
609 IndexSetType & indexSet_;
610
611 public:
612 // Constructor of MemObject, only to call from DofManager
613 explicit InsertIndicesToSet ( IndexSetType & iset ) : indexSet_ (iset) {}
614
616 inline void apply ( EntityType & entity )
617 {
618 indexSet_.insertEntity( entity );
619 }
620 };
621
622 template <class MemObjectType>
624 : public LocalInlinePlus < ResizeMemoryObjects < MemObjectType > , int >
625 {
626 private:
627 // the dof set stores number of dofs on entity for each codim
628 MemObjectType & memobj_;
629
630 public:
631 // Constructor of MemObject, only to call from DofManager
632 ResizeMemoryObjects ( MemObjectType & mo ) : memobj_ (mo) {}
634 : memobj_(org.memobj_)
635 {}
636
637 // resize mem object, parameter not needed
638 inline void apply ( int& enlargeOnly )
639 {
640 memobj_.resize( bool(enlargeOnly) );
641 }
642 };
643
644 // this class is the object for a single MemObject to
645 template <class MemObjectType>
647 : public LocalInlinePlus < ReserveMemoryObjects < MemObjectType > , int >
648 {
649 private:
650 // the dof set stores number of dofs on entity for each codim
651 MemObjectType & memobj_;
652
653 public:
654 // Constructor of MemObject, only to call from DofManager
655 ReserveMemoryObjects ( MemObjectType & mo ) : memobj_ (mo) {}
656
657 // reserve for at least chunkSize new values
658 inline void apply ( int & chunkSize )
659 {
660 memobj_.reserve( chunkSize );
661 }
662 };
663
664
665 // this is the dofmanagers object which is being used during restriction
666 // and prolongation process for adding and removing indices to and from
667 // index sets which belong to functions that belong to that dofmanager
668 template <class DofManagerType , class RestrictProlongIndexSetType, bool doResize >
671 RestrictProlongTraits<
672 IndexSetRestrictProlong<DofManagerType,RestrictProlongIndexSetType,doResize>, double > >
673 {
674 DofManagerType & dm_;
675
676 RestrictProlongIndexSetType & insert_;
677 RestrictProlongIndexSetType & remove_;
678 public:
679
680 IndexSetRestrictProlong ( DofManagerType & dm , RestrictProlongIndexSetType & is, RestrictProlongIndexSetType & rm )
681 : dm_(dm) , insert_( is ), remove_( rm ) {}
682
684 template <class EntityType>
685 inline void restrictLocal ( const EntityType & father, const EntityType & son , bool initialize ) const
686 {
687 // insert index of father
688 insert_.apply( father );
689 // mark index of son for removal
690 remove_.apply( son );
691
692 // resize memory if doResize is true
693 if ( doResize )
694 {
695 dm_.resizeMemory();
696 }
697 }
698
699 template <class EntityType>
700 inline void restrictFinalize( const EntityType &father ) const
701 {}
702
704 template <class EntityType>
705 inline void prolongLocal ( const EntityType & father, const EntityType & son , bool initialize ) const
706 {
707 // mark index of father for removal
708 remove_.apply( father );
709 // insert index of son
710 insert_.apply( son );
711
712 // resize memory if doResize is true
713 if ( doResize )
714 {
715 dm_.resizeMemory();
716 }
717 }
718 };
719
720 // empty restrict prolong operator
722 public RestrictProlongInterface< RestrictProlongTraits< EmptyIndexSetRestrictProlong, double > >
723 {
724 public:
727 template <class EntityType>
728 inline void restrictLocal ( EntityType & father, EntityType & son , bool initialize ) const {}
730 template <class EntityType>
731 inline void prolongLocal ( EntityType & father, EntityType & son , bool initialize ) const {}
732 };
733
734
735 class DofManError : public Exception {};
736
752 // --DofManager
753 template< class Grid >
755#if HAVE_DUNE_ALUGRID
756 public IsDofManager,
757 public LoadBalanceHandleWithReserveAndCompress,
758#endif
759 // DofManager behaves like a communication data handle for load balancing
760 public CommDataHandleIF< DofManager< Grid >, char >
761 {
763
764 friend struct DefaultSingletonFactory< const Grid*, ThisType >;
765 friend class DofManagerFactory< ThisType >;
766
767 public:
769 typedef Grid GridType;
770
773 public:
774 // types of inlining and xtraction stream types
775 typedef MessageBufferIF< XtractStreamImplType > XtractStreamType;
776 typedef MessageBufferIF< InlineStreamImplType > InlineStreamType;
777
778 // types of data collectors
781
782 typedef typename GridType :: template Codim< 0 > :: Entity ElementType ;
783
784 private:
785 typedef std::list< ManagedDofStorageInterface* > ListType;
787 typedef std::list< ManagedIndexSetInterface * > IndexListType;
788
789 // list with MemObjects, for each DiscreteFunction we have one MemObject
790 ListType memList_;
791
792 // list of all different indexsets
793 IndexListType indexList_;
794
795 // the dofmanager belong to one grid only
796 const GridType &grid_;
797
798 // index set for mapping
799 mutable DataInlinerType dataInliner_;
800 mutable DataXtractorType dataXtractor_;
801
804 typedef const ElementType ConstElementType;
806
807 mutable LocalIndexSetObjectsType insertIndices_;
808 mutable LocalIndexSetObjectsType removeIndices_;
809
810 // lists containing all MemObjects
811 // to have fast access during resize and reserve
812 mutable MemObjectCheckType resizeMemObjs_;
813 mutable MemObjectCheckType reserveMemObjs_;
814
816 const int defaultChunkSize_;
817
819 int sequence_;
820
821 public:
826
827 // old type
829
830 // this class needs to call resizeMemory
833
834 private:
835 // combine object holding all index set for restrict and prolong
836 NewIndexSetRestrictProlongType indexSetRestrictProlong_;
837 IndexSetRestrictProlongNoResizeType indexSetRestrictProlongNoResize_;
838
839 // old type
841
843 double memoryFactor_;
844
846 const bool clearResizedArrays_;
847
848 //**********************************************************
849 //**********************************************************
851 inline explicit DofManager ( const GridType *grid )
852 : grid_( *grid ),
853 defaultChunkSize_( 128 ),
854 sequence_( 0 ),
855 indexSetRestrictProlong_( *this, insertIndices_ , removeIndices_ ),
856 indexSetRestrictProlongNoResize_( *this, insertIndices_ , removeIndices_ ),
857 indexRPop_(),
858 memoryFactor_( Parameter :: getValidValue( "fem.dofmanager.memoryfactor", double( 1.1 ),
859 [] ( double value ) { return value >= 1.0; } ) ),
860 clearResizedArrays_( Parameter :: getValue("fem.dofmanager.clearresizedarrays", bool( true ) ) )
861 {
862 // only print memory factor if it deviates from the default value
863 if( std::abs( memoryFactor_ - 1.1 ) > 1e-12 )
864 if( Parameter::verbose() && (grid_.comm().rank() == 0) )
865 std::cout << "Created DofManager with memory factor " << memoryFactor_ << "." << std::endl;
866 }
867
869 ~DofManager ();
870
871 public:
872 DofManager( const ThisType& ) = delete;
873
875 double memoryFactor() const { return memoryFactor_; }
876
895 template <class IndexSetType>
896 inline void addIndexSet (const IndexSetType &iset );
897
905 template <class IndexSetType>
906 inline void removeIndexSet (const IndexSetType &iset );
907
912 template <class ManagedDofStorageImp>
913 void addDofStorage(ManagedDofStorageImp& dofStorage);
914
919 template <class ManagedDofStorageImp>
920 void removeDofStorage(ManagedDofStorageImp& dofStorage);
921
924 {
925 // hier muss statt dessen ein Combiniertes Object erzeugt werden.
926 // dafuer sollte bei einhaengen der IndexSets ein Methoden Pointer
927 // erzeugt werden, welcher die den IndexSet mit einem anderen Object
928 // kombiniert
929 return indexSetRestrictProlong_;
930 }
931
934 {
935 // return index set restrict/prolong operator that is only inserting
936 // and mark for removal indices but not doing resize
937 return indexSetRestrictProlongNoResize_;
938 }
939
941 bool hasIndexSets() const
942 {
943 return ! insertIndices_.empty();
944 }
945
947 size_t usedMemorySize () const
948 {
949 size_t used = 0;
950 for(auto memObjectPtr : memList_)
951 used += memObjectPtr->usedMemorySize();
952 return used;
953 }
954
959 {
960 resizeMemory();
961 }
962
965 void reserveMemory ( int nsize, bool dummy = false )
966 {
967 int localChunkSize = std::max(nsize, defaultChunkSize_ );
968 assert( localChunkSize > 0 );
969
970 // reserves (size + chunkSize * elementMemory), see above
971 reserveMemObjs_.apply ( localChunkSize );
972 }
973
978 int sequence () const { return sequence_; }
979
983 void resize()
984 {
985 for(auto indexSetPtr : indexList_)
986 indexSetPtr->resize();
987 resizeMemory();
988 }
989
991 inline void insertEntity( ConstElementType & element )
992 {
993 // insert new index
994 insertIndices_.apply( element );
995
996 // resize memory
997 resizeMemory();
998 }
999
1001 inline void removeEntity( ConstElementType & element )
1002 {
1003 removeIndices_.apply( element );
1004 }
1005
1008 {
1009 int enlargeOnly = 0;
1010 // pass dummy parameter
1011 resizeMemObjs_.apply ( enlargeOnly );
1012 }
1013
1016 {
1017 int enlargeOnly = 1;
1018 // pass dummy parameter
1019 resizeMemObjs_.apply ( enlargeOnly );
1020 }
1021
1026 {
1027 // mark next sequence
1028 ++sequence_;
1029
1030 // check that sequence number is the same for all processes
1031 assert( sequence_ == grid_.comm().max( sequence_ ) );
1032 }
1033
1034 //- --compress
1039 {
1040 // mark next sequence
1042
1043 // compress indexsets first
1044 for(auto indexSetPtr : indexList_)
1045 {
1046 // reset compressed so the next time compress of index set is called
1047 indexSetPtr->compress();
1048 }
1049
1050 // compress all data now
1051 for(auto memObjectPtr : memList_)
1052 {
1053 // if correponding index was not compressed yet, this is called in
1054 // the MemObject dofCompress, if index has not changes, nothing happens
1055 // if IndexSet actual needs no compress, nothing happens to the
1056 // data either
1057 // also data is resized, which means the vector is getting shorter
1058 memObjectPtr->dofCompress ( clearResizedArrays_ );
1059 }
1060 }
1061
1063 bool notifyGlobalChange( const bool wasChanged ) const
1064 {
1065 // make sure that wasChanged is the same on all cores
1066 int wasChangedCounter = int( wasChanged );
1067 return bool( grid_.comm().max( wasChangedCounter ) );
1068 }
1069
1071 template <class DataCollType>
1072 void addDataInliner ( DataCollType & d)
1073 {
1074 dataInliner_ += d;
1075 }
1076
1079 {
1080 dataInliner_.clear();
1081 }
1082
1084 template <class DataCollType>
1085 void addDataXtractor ( DataCollType & d)
1086 {
1087 dataXtractor_ += d;
1088 }
1089
1092 {
1093 dataXtractor_.clear();
1094 }
1095
1097 // CommDataHandleIF methods
1099
1101 bool contains( const int dim, const int codim ) const
1102 {
1103 return ( codim == 0 );
1104 }
1105
1107 bool fixedSize( const int dim, const int codim ) const
1108 {
1109 return false;
1110 }
1111
1113 template <class Entity>
1114 size_t size( const Entity& ) const
1115 {
1116 DUNE_THROW(NotImplemented,"DofManager::size should not be called!");
1117 return 0;
1118 }
1119
1121 void gather( InlineStreamType& str, ConstElementType& element ) const
1122 {
1123 dataInliner_.apply(str, element);
1124
1125 // remove entity from index sets
1126 const_cast< ThisType & >( *this ).removeEntity( element );
1127 }
1128
1129 template <class MessageBuffer, class Entity>
1130 void gather( MessageBuffer& str, const Entity& entity ) const
1131 {
1132 DUNE_THROW(NotImplemented,"DofManager::gather( entity ) with codim > 0 not implemented");
1133 }
1134
1136 void scatter ( XtractStreamType& str, ConstElementType& element, size_t )
1137 {
1138 // insert entity into index sets
1139 insertEntity( element );
1140
1141 // here the elements already have been created
1142 // that means we can xtract data
1143 dataXtractor_.apply(str, element);
1144 }
1145
1147 template <class MessageBuffer, class Entity>
1148 void scatter ( MessageBuffer & str, const Entity& entity, size_t )
1149 {
1150 DUNE_THROW(NotImplemented,"DofManager::scatter( entity ) with codim > 0 not implemented");
1151 }
1152
1153 //********************************************************
1154 // Interface for PersistentObjects
1155 //********************************************************
1156
1158 void backup () const
1159 {
1160 for(auto indexSetPtr : indexList_)
1161 indexSetPtr->backup();
1162 }
1163
1165 void restore ()
1166 {
1167 for(auto indexSetPtr : indexList_)
1168 indexSetPtr->restore();
1169
1170 // make all index sets consistent
1171 // before any data is read this can be
1172 // assured since DofManager is an
1173 // AutoPersistentObject and thus in the
1174 // beginning of the list, fater the grid of course
1175 resize();
1176 }
1177
1178 //********************************************************
1179 // read/write using fem streams
1180 //********************************************************
1185 template < class OutStream >
1186 void write( OutStream& out ) const
1187 {
1188 for(auto indexSetPtr : indexList_)
1189 indexSetPtr->write( out );
1190 }
1191
1196 template < class InStream >
1197 void read( InStream& in )
1198 {
1199 for(auto indexSetPtr : indexList_)
1200 indexSetPtr->read( in );
1201 }
1202
1203 //********************************************************
1204 // Interface for DofManager access
1205 //********************************************************
1206
1213 static inline ThisType& instance( const GridType& grid )
1214 {
1215 typedef DofManagerFactory< ThisType > DofManagerFactoryType;
1216 return DofManagerFactoryType :: instance( grid );
1217 }
1218 };
1219
1220 //***************************************************************************
1221 //
1222 // inline implemenations
1223 //
1224 //***************************************************************************
1225
1226 template <class GridType>
1227 inline DofManager<GridType>::~DofManager ()
1228 {
1229 if(memList_.size() > 0)
1230 {
1231 while( memList_.rbegin() != memList_.rend())
1232 {
1233 DofStorageInterface * mobj = (* memList_.rbegin() );
1234 dverb << "Removing '" << mobj << "' from DofManager!\n";
1235 memList_.pop_back();
1236 }
1237 }
1238
1239 if(indexList_.size() > 0)
1240 {
1241#ifndef NDEBUG
1242 std::cerr << "ERROR: Not all index sets have been removed from DofManager yet!" << std::endl;
1243#endif
1244 while ( indexList_.rbegin() != indexList_.rend())
1245 {
1246 ManagedIndexSetInterface* iobj = (* indexList_.rbegin() );
1247 indexList_.pop_back();
1248 if(iobj) delete iobj;
1249 }
1250 }
1251 }
1252
1253 template <class GridType>
1254 template <class IndexSetType>
1256 addIndexSet (const IndexSetType &iset )
1257 {
1258 // only call in single thread mode
1259 if( ! Fem :: MPIManager :: singleThreadMode() )
1260 {
1261 assert( Fem :: MPIManager :: singleThreadMode() );
1262 DUNE_THROW(InvalidStateException,"DofManager::addIndexSet: only call in single thread mode!");
1263 }
1264
1265 typedef ManagedIndexSet< IndexSetType, ConstElementType > ManagedIndexSetType;
1266 ManagedIndexSetType * indexSet = 0;
1267
1268 // search index set list in reverse order to find latest index sets faster
1269 auto endit = indexList_.rend();
1270 for(auto it = indexList_.rbegin(); it != endit; ++it )
1271 {
1272 ManagedIndexSetInterface *set = *it;
1273 if( set->equals( iset ) )
1274 {
1275 set->addReference();
1276
1277 indexSet = static_cast< ManagedIndexSetType * >( set );
1278 break;
1279 }
1280 }
1281
1282 if( !indexSet )
1283 {
1284 indexSet = new ManagedIndexSetType ( iset, insertIndices_ , removeIndices_ );
1285 indexList_.push_back( static_cast< ManagedIndexSetInterface * >( indexSet ) );
1286 }
1287 }
1288
1289 template <class GridType>
1290 template <class IndexSetType>
1291 inline void DofManager<GridType>::removeIndexSet ( const IndexSetType &iset )
1292 {
1293 // only call in single thread mode
1294 if( ! Fem :: MPIManager :: singleThreadMode() )
1295 {
1296 assert( Fem :: MPIManager :: singleThreadMode() );
1297 DUNE_THROW(InvalidStateException,"DofManager::removeIndexSet: only call in single thread mode!");
1298 }
1299
1300 // search index set list in reverse order to find latest index sets faster
1301 auto endit = indexList_.rend();
1302 for( auto it = indexList_.rbegin(); it != endit; ++it )
1303 {
1304 ManagedIndexSetInterface *set = *it;
1305 if( set->equals( iset ) )
1306 {
1307 if( set->removeReference() )
1308 {
1309 // reverse iterators cannot be erased directly, so erase the base
1310 // (forward) iterator
1311 // Note: see, e.g., Stroustrup, section 16.3.2 about the decrement
1312 auto fit = it.base();
1313 indexList_.erase( --fit );
1314 // delete proxy
1315 delete set;
1316 }
1317 return;
1318 }
1319 }
1320
1321 // we should never get here
1322 DUNE_THROW(InvalidStateException,"Could not remove index from DofManager set!");
1323 }
1324
1325 template <class GridType>
1326 template <class ManagedDofStorageImp>
1327 void DofManager<GridType>::addDofStorage(ManagedDofStorageImp& dofStorage)
1328 {
1329 // make sure we got an ManagedDofStorage
1330 ManagedDofStorageInterface* obj = &dofStorage;
1331
1332 // push_front, makes search faster
1333 memList_.push_front( obj );
1334
1335 // add the special object to the memResize list object
1336 resizeMemObjs_ += dofStorage.resizeMemoryObject();
1337
1338 // the same for the reserve call
1339 reserveMemObjs_ += dofStorage.reserveMemoryObject();
1340 }
1341
1342
1343 template <class GridType>
1344 template <class ManagedDofStorageImp>
1345 void DofManager<GridType>::removeDofStorage(ManagedDofStorageImp& dofStorage)
1346 {
1347 // make sure we got an ManagedDofStorage
1348 auto obj = &dofStorage;
1349
1350 // search list starting from tail
1351 auto endit = memList_.end();
1352 for( auto it = memList_.begin();it != endit ; ++it)
1353 {
1354 if(*it == obj)
1355 {
1356 // alloc new mem and copy old mem
1357 memList_.erase( it );
1358
1359 // remove from list
1360 resizeMemObjs_.remove( dofStorage.resizeMemoryObject() );
1361 reserveMemObjs_.remove( dofStorage.reserveMemoryObject() );
1362
1363 return ;
1364 }
1365 }
1366 }
1367
1369
1370
1378 template< class DofManagerImp >
1380 {
1382
1383 public:
1384 typedef DofManagerImp DofManagerType;
1385 typedef typename DofManagerType :: GridType GridType;
1386
1387 private:
1388 typedef const GridType *KeyType;
1389
1391
1392 // declare friendship becase of methods instance
1393 friend class DofManager< GridType >;
1394
1395 protected:
1402 inline static DofManagerType &instance ( const GridType &grid )
1403 {
1404 DofManagerType *dm = getDmFromList( grid );
1405 if( !dm )
1406 return DMProviderType :: getObject( &grid );
1407 return *dm;
1408 }
1409
1411 inline static bool
1413 const std :: string &filename,
1414 int timestep )
1415 {
1416 DofManagerType *dm = getDmFromList( grid );
1417 /*
1418 if( dm )
1419 return dm->writeIndexSets( filename, timestep );
1420 */
1421 return false;
1422 }
1423
1425 inline static bool
1427 const std :: string &filename,
1428 int timestep )
1429 {
1430 DofManagerType *dm = getDmFromList( grid );
1431 /*
1432 if( dm )
1433 return dm->readIndexSets( filename, timestep );
1434 */
1435 return false;
1436 }
1437
1438 public:
1440 inline static void deleteDofManager ( DofManagerType &dm )
1441 {
1442 DMProviderType :: removeObject( &dm );
1443 }
1444
1445 private:
1446 // return pointer to dof manager for given grid
1447 inline static DofManagerType *getDmFromList( const GridType &grid )
1448 {
1449 return (DMProviderType :: getObjFromList( &grid )).first;
1450 }
1451 };
1452
1453 } // namespace Fem
1454
1455} // namespace Dune
1456
1457#endif // #ifndef DUNE_FEM_DOFMANAGER_HH
virtual void backup() const =0
:: backup
IdentifierType setPtr_
Definition: dofmanager.hh:65
DofManagerType & dm_
Definition: dofmanager.hh:280
RemoveIndicesFromSet(IndexSetType &iset)
Definition: dofmanager.hh:594
bool removeReference()
decrease reference counter and return true if zero reached
Definition: dofmanager.hh:97
void resizeAndMoveToRear()
Definition: dofmanager.hh:507
virtual bool compress()=0
compress of index set
void restrictLocal(const EntityType &father, const EntityType &son, bool initialize) const
restrict data to father and resize memory if doResize is true
Definition: dofmanager.hh:685
DofManager(const ThisType &)=delete
void scatter(MessageBuffer &str, const Entity &entity, size_t)
unpacks all data of this entity from message buffer
Definition: dofmanager.hh:1148
void enlargeMemory()
resize the MemObject if necessary
Definition: dofmanager.hh:1015
ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType > ThisType
Definition: dofmanager.hh:275
void resize()
wrap resize of index set
Definition: dofmanager.hh:174
DataCollectorInterface< GridType, InlineStreamType > DataInlinerType
Definition: dofmanager.hh:780
size_t usedMemorySize() const
return used memory size of all MemObjects in bytes.
Definition: dofmanager.hh:947
IndexSetRestrictProlongNoResizeType & indexSetRestrictProlongNoResize()
returns the index set restriction and prolongation operator
Definition: dofmanager.hh:933
static DofManagerType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition: dofmanager.hh:1402
ResizeMemoryObjects< ThisType > ResizeMemoryObjectType
Definition: dofmanager.hh:288
ResizeMemoryObjectType resizeMemObj_
Definition: dofmanager.hh:290
size_t usedMemorySize() const
return used memory size
Definition: dofmanager.hh:413
void addDataXtractor(DataCollType &d)
add data handler for data xtracting to dof manager
Definition: dofmanager.hh:1085
void enableDofCompression()
enable dof compression for this MemObject
Definition: dofmanager.hh:419
DofManager< GridImp > DofManagerType
Definition: dofmanager.hh:277
virtual void write(StandardOutStream &out) const
new write method
Definition: dofmanager.hh:201
void resize()
Resize index sets and memory due to what the mapper has as new size.
Definition: dofmanager.hh:983
LocalIndexSetObjectsType & removeList_
Definition: dofmanager.hh:138
virtual void backup() const
:: backup
Definition: dofmanager.hh:186
int size() const
return size of underlying array
Definition: dofmanager.hh:333
void restore()
:: restore
Definition: dofmanager.hh:1165
void reserveMemory(int nsize, bool dummy=false)
reserve memory for at least nsize elements, dummy is needed for dune-grid ALUGrid version
Definition: dofmanager.hh:965
GridObjectStreamTraits< GridType >::OutStreamType InlineStreamImplType
Definition: dofmanager.hh:772
bool compress()
wrap compress of index set
Definition: dofmanager.hh:180
ManagedDofStorageImplementation(const ManagedDofStorageImplementation &)=delete
ResizeMemoryObjects(MemObjectType &mo)
Definition: dofmanager.hh:632
void resize(std::false_type, const bool enlargeOnly)
Definition: dofmanager.hh:434
virtual void read(StandardInStream &out)=0
void removeIndexSet(const IndexSetType &iset)
removed index set from dof manager's list of index sets
Definition: dofmanager.hh:1291
virtual void restore()=0
:: restore
void prolongLocal(const EntityType &father, const EntityType &son, bool initialize) const
prolong data to children and resize memory if doResize is true
Definition: dofmanager.hh:705
void resizeMemory()
resize the MemObject if necessary
Definition: dofmanager.hh:1007
void insertEntity(ConstElementType &element)
Inserts entity to all index sets added to dof manager.
Definition: dofmanager.hh:991
IndexSetType & indexSet_
Definition: dofmanager.hh:131
static void deleteDofManager(DofManagerType &dm)
delete the dof manager that belong to the given grid
Definition: dofmanager.hh:1440
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, true > NewIndexSetRestrictProlongType
Definition: dofmanager.hh:823
ReserveMemoryObjects(MemObjectType &mo)
Definition: dofmanager.hh:655
DofManagerType::GridType GridType
Definition: dofmanager.hh:1385
size_t size(const Entity &) const
for convenience
Definition: dofmanager.hh:1114
DataCollectorInterface< GridType, XtractStreamType > DataXtractorType
Definition: dofmanager.hh:779
const void * IdentifierType
Definition: dofmanager.hh:63
ReserveMemoryObjects< ThisType > ReserveMemoryObjectType
Definition: dofmanager.hh:289
void apply(int &chunkSize)
Definition: dofmanager.hh:658
void moveToFront(const int oldSize, const int block)
move block to front again
Definition: dofmanager.hh:512
void apply(int &enlargeOnly)
Definition: dofmanager.hh:638
double memoryFactor() const
return factor to over estimate new memory allocation
Definition: dofmanager.hh:875
void prolongLocal(EntityType &father, EntityType &son, bool initialize) const
prolong data to children and resize memory if doResize is true
Definition: dofmanager.hh:731
ResizeMemoryObjectType & resizeMemoryObject()
return object that calls resize of this memory object
Definition: dofmanager.hh:327
static bool writeDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
writes DofManager of corresponding grid, when DofManager exists
Definition: dofmanager.hh:1412
ManagedDofStorageImplementation(const GridImp &grid, const MapperType &mapper, DofArrayType &array)
Constructor of ManagedDofStorageImplementation, only to call from derived classes.
Definition: dofmanager.hh:301
NewIndexSetRestrictProlongType & indexSetRestrictProlong()
returns the index set restriction and prolongation operator
Definition: dofmanager.hh:923
virtual void resize(const bool enlargeOnly)=0
resize memory
virtual ~ManagedDofStorageInterface()=default
destructor
Grid GridType
type of Grid this DofManager belongs to
Definition: dofmanager.hh:769
void resize(std::true_type, const bool enlargeOnly)
Definition: dofmanager.hh:450
void resize(const bool enlargeOnly)
resize the memory with the new size
Definition: dofmanager.hh:336
ManagedIndexSetInterface BaseType
type of base class
Definition: dofmanager.hh:142
DofArrayType & array_
Definition: dofmanager.hh:286
virtual void dofCompress(const bool clearResizedArrays)=0
DofStorageInterface()=default
do not allow to create explicit instances
ReserveMemoryObjectType & reserveMemoryObject()
return object that calls reserve of this memory object
Definition: dofmanager.hh:330
void gather(InlineStreamType &str, ConstElementType &element) const
packs all data attached to this entity
Definition: dofmanager.hh:1121
~ManagedIndexSet()
destructor
Definition: dofmanager.hh:164
MapperType & mapper() const
Definition: dofmanager.hh:428
ManagedDofStorageInterface()=default
do not allow to create explicit instances
DofArrayType & getArray()
return reference to array for DiscreteFunction
Definition: dofmanager.hh:425
virtual void read(StandardInStream &in)
new write method
Definition: dofmanager.hh:198
void dofCompress(const bool clearResizedArrays)
copy the dof from the rear section of the vector to the holes
Definition: dofmanager.hh:361
virtual void reserve(int newSize)=0
resize memory
void read(InStream &in)
read all index sets from a given stream
Definition: dofmanager.hh:1197
void apply(EntityType &entity)
apply wraps the insertEntity method of the index set
Definition: dofmanager.hh:616
static ThisType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition: dofmanager.hh:1213
MessageBufferIF< InlineStreamImplType > InlineStreamType
Definition: dofmanager.hh:776
RemoveIndicesFromSet< IndexSetType, EntityType > removeIdxObj_
Definition: dofmanager.hh:135
void addDofStorage(ManagedDofStorageImp &dofStorage)
add a managed dof storage to the dof manager.
Definition: dofmanager.hh:1327
void compress()
Compress all data that is hold by this dofmanager.
Definition: dofmanager.hh:1038
virtual ~ManagedIndexSetInterface()=default
void incrementSequenceNumber()
increase the DofManagers internal sequence number
Definition: dofmanager.hh:1025
void restrictLocal(EntityType &father, EntityType &son, bool initialize) const
restrict data to father and resize memory if doResize is true
Definition: dofmanager.hh:728
static bool readDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
reads DofManager of corresponding grid, when DofManager exists
Definition: dofmanager.hh:1426
static std::pair< DofStorageInterface *, DofStorageType * > allocateManagedDofStorage(const GridType &grid, const MapperType &mapper, const DofStorageType *=0)
default implementation for creating a managed dof storage
Definition: dofmanager.hh:560
void addReference()
increase reference counter
Definition: dofmanager.hh:94
MessageBufferIF< XtractStreamImplType > XtractStreamType
Definition: dofmanager.hh:775
ResizeMemoryObjects(const ResizeMemoryObjects &org)
Definition: dofmanager.hh:633
GridObjectStreamTraits< GridType >::InStreamType XtractStreamImplType
Definition: dofmanager.hh:771
ManagedIndexSet(const IndexSetType &iset, LocalIndexSetObjectsType &insertList, LocalIndexSetObjectsType &removeList)
Constructor of MemObject, only to call from DofManager.
Definition: dofmanager.hh:145
virtual void write(StandardOutStream &out) const =0
new read/write methods using binary streams
void apply(EntityType &entity)
apply wraps the removeEntity Method of the index set
Definition: dofmanager.hh:597
void removeEntity(ConstElementType &element)
Removes entity from all index sets added to dof manager.
Definition: dofmanager.hh:1001
EmptyIndexSetRestrictProlong IndexSetRestrictProlongType
Definition: dofmanager.hh:828
void write(OutStream &out) const
write all index sets to a given stream
Definition: dofmanager.hh:1186
void removeDofStorage(ManagedDofStorageImp &dofStorage)
remove a managed dof storage from the dof manager.
Definition: dofmanager.hh:1345
void gather(MessageBuffer &str, const Entity &entity) const
Definition: dofmanager.hh:1130
EmptyIndexSetRestrictProlong()
Definition: dofmanager.hh:725
GridType::template Codim< 0 >::Entity ElementType
Definition: dofmanager.hh:782
DofManagerImp DofManagerType
Definition: dofmanager.hh:1384
void restrictFinalize(const EntityType &father) const
Definition: dofmanager.hh:700
void clearDataXtractors()
clear data xtractor list
Definition: dofmanager.hh:1091
bool contains(const int dim, const int codim) const
the dof manager only transfers element data during load balancing
Definition: dofmanager.hh:1101
void reserve(const int needed)
reserve memory for what is comming
Definition: dofmanager.hh:342
virtual void restore()
:: restore
Definition: dofmanager.hh:192
void resizeForRestrict()
resize memory before data restriction during grid adaptation is done.
Definition: dofmanager.hh:958
bool equals(const IndexSet &iset) const
Definition: dofmanager.hh:103
virtual void enableDofCompression()
enable dof compression for dof storage (default is empty)
Definition: dofmanager.hh:222
DofArrayType myArray_
Definition: dofmanager.hh:546
ReserveMemoryObjectType reserveMemObj_
Definition: dofmanager.hh:291
void clearDataInliners()
clear data inliner list
Definition: dofmanager.hh:1078
MapperType & mapper_
Definition: dofmanager.hh:283
bool notifyGlobalChange(const bool wasChanged) const
communicate new sequence number
Definition: dofmanager.hh:1063
IndexSetRestrictProlong(DofManagerType &dm, RestrictProlongIndexSetType &is, RestrictProlongIndexSetType &rm)
Definition: dofmanager.hh:680
bool fixedSize(const int dim, const int codim) const
fixed size is false
Definition: dofmanager.hh:1107
void backup() const
:: backup
Definition: dofmanager.hh:1158
void addDataInliner(DataCollType &d)
add data handler for data inlining to dof manager
Definition: dofmanager.hh:1072
void scatter(XtractStreamType &str, ConstElementType &element, size_t)
unpacks all data attached of this entity from message buffer
Definition: dofmanager.hh:1136
ManagedDofStorage(const GridImp &grid, const MapperType &mapper)
Constructor of ManagedDofStorage.
Definition: dofmanager.hh:549
LocalIndexSetObjectsType & insertList_
Definition: dofmanager.hh:137
ManagedIndexSetInterface(const IndexSet &iset)
Definition: dofmanager.hh:70
size_t referenceCounter_
Definition: dofmanager.hh:67
bool dataCompressionEnabled_
Definition: dofmanager.hh:294
bool hasIndexSets() const
if dofmanagers list is not empty return true
Definition: dofmanager.hh:941
virtual size_t usedMemorySize() const =0
return size of mem used by MemObject
virtual void resize()=0
resize of index set
virtual int size() const =0
size of space, i.e. mapper.size()
InsertIndicesToSet< IndexSetType, EntityType > insertIdxObj_
Definition: dofmanager.hh:134
InsertIndicesToSet(IndexSetType &iset)
Definition: dofmanager.hh:613
~ManagedDofStorageImplementation()
destructor deleting MemObject from resize and reserve List
Definition: dofmanager.hh:319
void addIndexSet(const IndexSetType &iset)
add index set to dof manager's list of index sets
Definition: dofmanager.hh:1256
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, false > IndexSetRestrictProlongNoResizeType
Definition: dofmanager.hh:825
virtual ~DofStorageInterface()=default
destructor
int sequence() const
return number of sequence, if dofmanagers memory was changed by calling some method like resize,...
Definition: dofmanager.hh:978
Dune::Fem::Double abs(const Dune::Fem::Double &a)
Definition: double.hh:942
double max(const Dune::Fem::Double &v, const double p)
Definition: double.hh:965
Definition: bindguard.hh:11
interface documentation for (grid part) index sets
Definition: common/indexset.hh:104
specialize with true if index set implements the interface for consecutive index sets
Definition: common/indexset.hh:42
Container for User Specified Parameters.
Definition: io/parameter.hh:191
static bool verbose()
obtain the cached value for fem.verbose
Definition: io/parameter.hh:445
output stream writing into a given std::ostream
Definition: standardstreams.hh:61
input stream reading from a given std::istream
Definition: standardstreams.hh:196
Definition: gridobjectstreams.hh:18
Definition: dofmanager.hh:761
Definition: datacollector.hh:232
Definition: datacollector.hh:83
void apply(ParamType &p) const
for all pointer to local operators call the func pointer
Definition: datacollector.hh:163
bool empty() const
Definition: datacollector.hh:224
void remove(const OpType &op)
Definition: datacollector.hh:203
Definition: datacollector.hh:262
virtual void clear()
clear object list
Definition: datacollector.hh:379
virtual void apply(ObjectStreamType &str, const EntityType &entity) const
Definition: datacollector.hh:289
Singleton provider for the DofManager.
Definition: dofmanager.hh:1380
Definition: dofmanager.hh:59
Definition: dofmanager.hh:587
Definition: dofmanager.hh:606
Definition: dofmanager.hh:123
Interface class for a dof storage object to be stored in discrete functions.
Definition: dofmanager.hh:212
Interface class for a dof storage object that can be managed (resized and compressed) by the DofManag...
Definition: dofmanager.hh:233
Definition: dofmanager.hh:625
Definition: dofmanager.hh:648
Definition: dofmanager.hh:270
Definition: dofmanager.hh:543
Definition: dofmanager.hh:673
Definition: dofmanager.hh:723
Definition: dofmanager.hh:735
Interface class defining the local behaviour of the restrict/prolong operation (using BN)
Definition: restrictprolonginterface.hh:39
void initialize()
initialize restrict prolong object (if necessary) before adaptation takes place
Definition: restrictprolonginterface.hh:51
Definition: space/mapper/capabilities.hh:22
Definition: singletonlist.hh:25
Singleton list for key/object pairs.
Definition: singletonlist.hh:53