1 #ifndef DUNE_FEM_GENERICPADAPTIVEDOFMAPPER_HH 2 #define DUNE_FEM_GENERICPADAPTIVEDOFMAPPER_HH 4 #include <dune/common/exceptions.hh> 5 #include <dune/common/nullptr.hh> 7 #include <dune/geometry/type.hh> 9 #include <dune/grid/utility/persistentcontainer.hh> 12 #include <dune/fem/misc/metaprogramming.hh> 28 template<
class TraitsImp >
52 typedef typename GridPartType::GridType
GridType;
88 std::vector< DofVectorType >
dofs_;
104 assert( dofs_.size() == other.
dofs_.size() );
110 used_[ k ] = other.
used_[ k ];
111 DofVectorType& dofs = dofs_[ k ];
112 const DofVectorType& otherDofs = other.
dofs_[ k ];
113 const int dofSize = otherDofs.size();
114 dofs.resize( dofSize );
115 for(
int d = 0; d<dofSize; ++d )
116 dofs[ d ] = otherDofs[ d ];
132 bool exists(
const int codim,
const int polOrd )
const 135 return dofs_[ entry ].size() > 0 ;
139 bool use(
const int codim,
const int polOrd )
143 return ( used_[ entry ] == 1 );
149 const int numDofs,
const int startDof )
151 use( codim, polOrd );
152 assert( !
exists ( codim, polOrd ) );
157 dofs.resize( numDofs );
165 assert( codim >= 0 );
166 assert( codim <= highestDimension );
170 return (codim < dimension) ? (polOrd-
minOrder) : 0;
175 void remove(
const int codim,
const int polOrd )
178 if( used_[ entry ] > 0 )
188 int dof (
const int codim,
const int polOrd,
const size_t dofNumber )
const 191 assert( entry < dofs_.size() );
192 assert( type_ != GeometryType() );
193 assert( dofNumber < dofs_[ entry ].
size() );
194 return dofs_[ entry ][ dofNumber ];
201 const int dofSize = dofs_[ k ].size();
202 if( dofNumber < dofSize )
203 return dofs_[ k ][ dofNumber ];
205 dofNumber -= dofSize;
218 dofSize += dofs_[ k ].size();
223 template <
class VectorType>
229 DofVectorType& dofs = dofs_[ k ];
230 const int dofSize = dofs.size();
236 for(
int d = 0; d<dofSize; ++d )
238 const int dof = dofs[ d ] ;
241 assert( dof < (
int)isHole.size() );
242 isHole[
dof ] = false ;
258 const DofVectorType& dofs = dofs_[ k ];
259 const int dofSize = dofs.size();
260 for(
int d = 0; d<dofSize; ++d )
261 std::cout << dofs[ d ] <<
" dofs " << std::endl;
265 template <
class VectorType>
267 VectorType& holesVec,
int& currentHole,
268 const int usedSize,
int& holes )
270 bool haveToCopy = false ;
273 DofVectorType& dofs = dofs_[ k ];
274 const int dofSize = dofs.size();
277 assert( used_[ k ] );
279 int& currDof = dofs[
dof ] ;
282 if( currDof >= usedSize )
289 assert(currentHole >= 0);
290 assert( holesVec[currentHole] < usedSize );
293 oldIdx[ holes ] = currDof;
294 currDof = holesVec[ currentHole ];
295 newIdx[ holes ] = currDof ;
317 void set (
const int k ) { k_ = k; active_ = 1 ; }
338 template <
int codim,
bool dg>
341 static int numDofs(
const ElementType& entity,
342 const CompiledLocalKeyType& clk,
343 const int subEntity )
345 return clk.numDofs( codim, subEntity );
352 static int numDofs(
const ElementType& entity,
353 const CompiledLocalKeyType& clk,
354 const int subEntity )
363 template <
int codim >
367 const CompiledLocalKeyType& clk,
370 unsigned int& globalSize,
371 unsigned int& notAlreadyCounted,
379 bool notCountedYet = false ;
380 if( ! entityDofs.
exists( codim, polOrd ) )
382 entityDofs.
insert( entity.type(), codim, polOrd,
numDofs, globalSize );
384 notCountedYet = true ;
389 notCountedYet = entityDofs.
use( codim, polOrd );
400 static void apply(
const ElementType& entity,
401 const CompiledLocalKeyType& clk,
403 unsigned int& globalSize,
404 unsigned int& notAlreadyCounted,
405 std::vector< DofContainerType* > dofContainers )
407 DofContainerType &
dofContainer = *dofContainers[ codim ];
410 insertDofs( entity, clk, polOrd, 0, globalSize,
411 notAlreadyCounted, dofContainer[ entity ] );
415 const int count = entity.subEntities( codim );
416 for(
int i=0; i<count; ++i )
418 insertDofs( entity, clk, polOrd, i, globalSize,
425 template <
int codim >
428 static void apply(
const ElementType& entity,
430 std::vector< DofContainerType* > dofContainers )
432 DofContainerType &
dofContainer = *dofContainers[ codim ];
433 const int count = entity.subEntities( codim );
434 for(
int i=0; i<count; ++i )
437 entityDofs.
remove( codim, polOrd );
445 CompiledLocalKeyVectorType &compiledLocalKeyVector )
446 : gridPart_( gridPart ),
447 dm_( DofManagerType :: instance(gridPart.grid()) ),
448 compiledLocalKeys_( compiledLocalKeyVector ),
449 entityPolynomOrder_( gridPart.grid(), 0 ),
450 dofContainer_( dimension+1, nullptr ),
456 sequence_( dm_.sequence() )
470 for(
size_t i=0; i<compiledLocalKeys_.size(); ++i )
472 maxNumDofs_ =
std :: max( maxNumDofs_, compiledLocalKeys_[ i ].maxSize() );
477 dm_.addIndexSet(
asImp() );
482 CompiledLocalKeyVectorType &compiledLocalKeyVector )
483 : gridPart_( other.gridPart_ ),
485 compiledLocalKeys_( compiledLocalKeyVector ),
486 entityPolynomOrder_( other.entityPolynomOrder_ ),
487 dofContainer_( dimension+1, nullptr ),
488 numberOfHoles_( other.numberOfHoles_ ),
489 oldIndex_( other.oldIndex_ ),
490 newIndex_( other.newIndex_ ),
491 size_( other.size_ ),
492 maxNumDofs_( other.maxNumDofs_ ),
493 sequence_( other.sequence_ )
496 dofContainer_[ codim ] =
new DofContainerType( *(other.dofContainer_[ codim ]) );
498 dm_.addIndexSet(
asImp() );
503 return entityPolynomOrder_[ entity ].order();
508 if( polOrd < 1 || polOrd > polynomialOrder )
511 entityPolynomOrder_[ entity ].set( polOrd );
516 assert( codim < dofContainer_.size() );
517 assert( dofContainer_[ codim ] );
518 return *(dofContainer_[ codim ]);
521 const CompiledLocalKeyType&
525 return compiledLocalKeys_[ polOrd ][
type ];
531 dm_.removeIndexSet(
asImp() );
540 template<
class Functor >
541 void mapEach (
const ElementType &element, Functor f )
const 543 const int n =
numDofs( element );
544 for(
int i = 0; i < n; ++i )
549 int mapToGlobal (
const ElementType &entity,
const int localDof )
const 551 if( discontinuousMapper )
557 return dofContainer( 0 )[ entity ].dof( 0, polOrd, localDof );
564 const CompiledLocalKeyType& compLocalKey =
compiledLocalKey( polOrd, entity.type() );
566 const Fem::LocalKey &dofInfo = compLocalKey.localKey( localDof );
568 const unsigned int codim = dofInfo.
codim();
569 const unsigned int subEntity = dofInfo.subEntity();
571 unsigned int index = dofInfo.index() ;
574 if( dimension == 2 && codim == 1 )
576 const Dune::ReferenceElement< FieldType, dimension > &refElem
577 = Dune::ReferenceElements< FieldType, dimension >::general( entity.type() );
580 const int vxSize = refElem.size( subEntity, codim, dimension );
582 assert( vxSize == 2 );
584 const int vx[ 2 ] = { refElem.subEntity ( subEntity, codim, 0, dimension ),
585 refElem.subEntity ( subEntity, codim, 1, dimension ) };
588 if( gridPart_.grid().localIdSet().subId( entity, vx[ 0 ], dimension ) >
589 gridPart_.grid().localIdSet().subId( entity, vx[ 1 ], dimension ) )
591 const unsigned int numDofsSubEntity = compLocalKey.numDofs( codim, subEntity );
592 index = numDofsSubEntity - index - 1;
596 assert( index < compLocalKey.numDofs( codim, subEntity ) );
597 return dofContainer( codim )( entity, subEntity ).
dof( codim, polOrd, index );
602 template<
class Entity,
class Functor >
606 for(
int i = 0; i < n; ++i )
617 int numDofs (
const ElementType &entity )
const 624 template<
class Entity >
627 if( discontinuousMapper )
629 if( Entity :: codimension == 0 )
638 return dofContainer( Entity :: codimension )[ entity ].entityDofs();
645 return (discontinuousMapper) ? (codim == 0) :
true;
655 int oldIndex (
const int hole,
const int block )
const 657 assert( oldIndex_[ hole ] >= 0 );
658 return oldIndex_[ hole ];
662 int newIndex (
const int hole,
const int block )
const 664 assert( newIndex_[ hole ] >= 0 );
665 return newIndex_[ hole ];
671 return numberOfHoles_;
704 entityPolynomOrder_.resize();
705 entityPolynomOrder_.shrinkToFit();
722 PolynomOrderStorageType& polyStorage = entityPolynomOrder_[ entity ];
723 if( ! polyStorage.active() )
725 unsigned int notAlreadyCounted = 0;
727 const int polOrd = polyStorage.order();
729 const CompiledLocalKeyType& clk =
compiledLocalKey( polOrd, entity.type() );
734 polyStorage.activate();
737 ForLoop< InsertSubEntities, 0, highestDimension>::
738 apply( entity, clk, polOrd, size_, notAlreadyCounted, dofContainer_ );
741 return notAlreadyCounted ;
751 if( entityPolynomOrder_[ entity ].deactivate( polOrd ) )
753 ForLoop< RemoveSubEntities, 0, highestDimension>::
754 apply( entity, polOrd, dofContainer_ );
775 if( entity.hasFather() )
793 return DGFGridInfo< GridType > :: refineStepsForHalf() > 1 ||
794 ! Dune::Capabilities::hasSingleGeometryType<GridType> :: v ;
808 typedef typename GridPartType :: template Codim< 0 > :: IteratorType IteratorType;
809 const IteratorType end = gridPart_.template end<0>();
810 for( IteratorType it = gridPart_.template begin<0>();
813 const ElementType &element = *it;
814 if( considerHierarchyOfElements )
833 typedef typename GridPartType :: template Codim< 0 > :: IteratorType IteratorType;
834 const IteratorType end = gridPart_.template end<0>();
835 for( IteratorType it = gridPart_.template begin<0>();
844 std::cout <<
"Print entity " << gridPart_.grid().localIdSet().id( entity ) <<
" with " << std::endl;
845 for(
int i = 0; i<
numDofs( entity ); ++i )
847 std::cout <<
"en[ " << i <<
" ] = " <<
mapToGlobal( entity, i ) << std::endl;
856 typedef typename PolyOrderContainerType :: Iterator Iterator;
857 const Iterator endit = entityPolynomOrder_.end();
858 for( Iterator it = entityPolynomOrder_.begin(); it != endit; ++it )
860 PolynomOrderStorageType& p = *it;
862 p.deactivate( pOrd );
868 DofContainerType& codimContainer =
dofContainer( codim );
869 typedef typename DofContainerType :: Iterator Iterator;
870 const Iterator endit = codimContainer.end();
871 for( Iterator it = codimContainer.begin(); it != endit; ++it )
881 if( sequence_ == dm_.sequence() )
901 bool haveToCopy =
false;
903 std::vector<int> validHoles;
907 std::vector< bool > holeMarker( size_,
true );
912 DofContainerType& codimContainer =
dofContainer( codim );
913 typedef typename DofContainerType :: Iterator Iterator;
914 const Iterator endit = codimContainer.end();
915 for( Iterator it = codimContainer.begin(); it != endit; ++it )
917 EntityDofStorageType&
dof = *it;
919 dof.detectUnusedDofs( holeMarker, usedSize );
924 validHoles.reserve( usedSize );
925 validHoles.resize( 0 );
928 for(
size_t i=0; i<usedSize; ++i )
931 if( holeMarker[ i ] )
934 validHoles.push_back( i );
939 if( validHoles.size() > 0 )
942 int currentHole = validHoles.size();
945 oldIndex_.resize( currentHole, -1) ;
946 newIndex_.resize( currentHole, -1) ;
950 DofContainerType& codimContainer =
dofContainer( codim );
951 typedef typename DofContainerType :: Iterator Iterator;
952 const Iterator endit = codimContainer.end();
953 for( Iterator it = codimContainer.begin(); it != endit; ++it )
956 EntityDofStorageType&
dof = *it;
960 haveToCopy |= dof.removeHoles( oldIndex_, newIndex_,
961 validHoles, currentHole,
962 usedSize, numberOfHoles_ );
973 sequence_ = dm_.sequence();
984 template<
class InStream >
988 template<
class OutStream >
997 const GridPartType& gridPart_;
1001 CompiledLocalKeyVectorType &compiledLocalKeys_;
1003 PolyOrderContainerType entityPolynomOrder_;
1005 mutable std::vector< DofContainerType* > dofContainer_;
1007 int numberOfHoles_ ;
1008 std::vector< int > oldIndex_ ;
1009 std::vector< int > newIndex_ ;
1011 mutable unsigned int size_;
1012 unsigned int maxNumDofs_;
1020 #endif // #ifndef DUNE_FEM_GENERICPADAPTIVEDOFMAPPER_HH
void assign(const EntityDofStorage &other)
Definition: genericadaptivedofmapper.hh:102
Extended interface for adaptive DoF mappers.
Definition: mapper/dofmapper.hh:204
void mapEachEntityDof(const Entity &entity, Functor f) const
map each local DoF number to a global key
Definition: genericadaptivedofmapper.hh:603
unsigned int codim() const
Definition: localkey.hh:27
EntityDofStorage & operator=(const EntityDofStorage &other)
Definition: genericadaptivedofmapper.hh:126
PolynomOrderStorage PolynomOrderStorageType
Definition: genericadaptivedofmapper.hh:332
Traits::CompiledLocalKeyVectorType CompiledLocalKeyVectorType
type of vector containing compiled local keys
Definition: genericadaptivedofmapper.hh:73
static const int highestDimension
highest codimension used to attach dofs
Definition: genericadaptivedofmapper.hh:67
int entityDofs() const
Definition: genericadaptivedofmapper.hh:213
std::vector< BaseSetLocalKeyStorageType > CompiledLocalKeyVectorType
Definition: mapper.hh:53
void printDofs() const
Definition: genericadaptivedofmapper.hh:254
unsigned char k_
Definition: genericadaptivedofmapper.hh:312
Definition: genericadaptivedofmapper.hh:364
void reset()
Definition: genericadaptivedofmapper.hh:182
unsigned char active_
Definition: genericadaptivedofmapper.hh:313
Definition: genericadaptivedofmapper.hh:81
void activate()
Definition: genericadaptivedofmapper.hh:318
static const int polynomialOrder
order of the Lagrange polynoms
Definition: genericadaptivedofmapper.hh:70
int entityDof(int dofNumber) const
Definition: genericadaptivedofmapper.hh:197
EntityDofStorage()
Definition: genericadaptivedofmapper.hh:93
Definition: genericadaptivedofmapper.hh:29
static constexpr T max(T a)
Definition: utility.hh:65
void resizeContainers()
Definition: genericadaptivedofmapper.hh:702
void resize()
Definition: genericadaptivedofmapper.hh:758
Definition: genericadaptivedofmapper.hh:310
void insert(const GeometryType type, const int codim, const int polOrd, const int numDofs, const int startDof)
Definition: genericadaptivedofmapper.hh:146
int oldIndex(const int hole, const int block) const
Definition: genericadaptivedofmapper.hh:655
static const int dimension
dimension of the grid
Definition: genericadaptivedofmapper.hh:64
int oldOffSet(const int block) const
Definition: genericadaptivedofmapper.hh:683
void setPolynomOrder(const ElementType &entity, const int polOrd)
Definition: genericadaptivedofmapper.hh:506
int order() const
Definition: genericadaptivedofmapper.hh:316
Traits::ElementType ElementType
type of entities (codim 0)
Definition: genericadaptivedofmapper.hh:49
Definition: datacollector.hh:45
const TraitsImp::DofMapperType & asImp() const
Definition: bartonnackmaninterface.hh:37
static int numDofs(const ElementType &entity, const CompiledLocalKeyType &clk, const int subEntity)
Definition: genericadaptivedofmapper.hh:352
DofContainerType & dofContainer(const std::size_t codim) const
Definition: genericadaptivedofmapper.hh:514
int determineVectorEntry(const int codim, const int polOrd) const
Definition: genericadaptivedofmapper.hh:163
bool contains(int codim) const
Check, whether any DoFs are associated with a codimension.
Definition: genericadaptivedofmapper.hh:643
const GeometryType & type() const
Definition: genericadaptivedofmapper.hh:173
GridPart GridPartType
Definition: mapper.hh:40
int numBlocks() const
Definition: genericadaptivedofmapper.hh:676
GridPartType::GridType GridType
type of the underlying grid
Definition: genericadaptivedofmapper.hh:52
const CompiledLocalKeyType & compiledLocalKey(const int polOrd, const GeometryType type) const
Definition: genericadaptivedofmapper.hh:522
std::vector< DofVectorType > dofs_
Definition: genericadaptivedofmapper.hh:88
static void apply(const ElementType &entity, const CompiledLocalKeyType &clk, const int polOrd, unsigned int &globalSize, unsigned int ¬AlreadyCounted, std::vector< DofContainerType * > dofContainers)
Definition: genericadaptivedofmapper.hh:400
Dune::EntityPointer< Grid, Implementation >::Entity make_entity(const Dune::EntityPointer< Grid, Implementation > &entityPointer)
Definition: compatibility.hh:23
int polynomOrder(const ElementType &entity) const
Definition: genericadaptivedofmapper.hh:501
bool exists(const int codim, const int polOrd) const
Definition: genericadaptivedofmapper.hh:132
int numberOfHoles(const int block) const
Definition: genericadaptivedofmapper.hh:669
int numEntityDofs(const Entity &entity) const
obtain number of DoFs actually belonging to an entity
Definition: genericadaptivedofmapper.hh:625
std::vector< int > DofVectorType
Definition: genericadaptivedofmapper.hh:87
Definition: genericadaptivedofmapper.hh:83
Definition: coordinate.hh:4
GridPartType::template Codim< 0 >::EntityType ElementType
Definition: mapper.hh:46
static void apply(const ElementType &entity, const int polOrd, std::vector< DofContainerType * > dofContainers)
Definition: genericadaptivedofmapper.hh:428
EntityDofStorage EntityDofStorageType
Definition: genericadaptivedofmapper.hh:308
GenericAdaptiveDofMapper(const GenericAdaptiveDofMapper &other, CompiledLocalKeyVectorType &compiledLocalKeyVector)
sort of copy constructor
Definition: genericadaptivedofmapper.hh:481
void write(OutStream &out)
Definition: genericadaptivedofmapper.hh:989
size_t insertAllUsed()
return number of DoFs currently used for space
Definition: genericadaptivedofmapper.hh:798
void detectUnusedDofs(VectorType &isHole, const int actSize)
Definition: genericadaptivedofmapper.hh:224
void adapt()
adjust mapper to newly set polynomial orders
Definition: genericadaptivedofmapper.hh:765
void remove(const int codim, const int polOrd)
Definition: genericadaptivedofmapper.hh:175
PersistentContainer< GridType, EntityDofStorageType > DofContainerType
Definition: genericadaptivedofmapper.hh:334
int mapToGlobal(const ElementType &entity, const int localDof) const
Definition: genericadaptivedofmapper.hh:549
static int numDofs(const ElementType &entity, const CompiledLocalKeyType &clk, const int subEntity)
Definition: genericadaptivedofmapper.hh:341
void read(InStream &in)
Definition: genericadaptivedofmapper.hh:985
Definition: genericadaptivedofmapper.hh:85
int maxNumDofs() const
obtain maximal number of DoFs on one entity
Definition: genericadaptivedofmapper.hh:611
void mapEach(const ElementType &element, Functor f) const
Definition: genericadaptivedofmapper.hh:541
bool use(const int codim, const int polOrd)
returns true if entry has a reference count of 1
Definition: genericadaptivedofmapper.hh:139
bool active() const
Definition: genericadaptivedofmapper.hh:319
int offSet(const int block) const
Definition: genericadaptivedofmapper.hh:690
bool deactivate(int &k)
Definition: genericadaptivedofmapper.hh:320
void restore()
Definition: genericadaptivedofmapper.hh:981
GenericAdaptiveDofMapper(const GridPartType &gridPart, CompiledLocalKeyVectorType &compiledLocalKeyVector)
constructor
Definition: genericadaptivedofmapper.hh:444
Traits::GridPartType GridPartType
type of the grid part
Definition: genericadaptivedofmapper.hh:46
static void insertDofs(const ElementType &entity, const CompiledLocalKeyType &clk, const int polOrd, const int subEntity, unsigned int &globalSize, unsigned int ¬AlreadyCounted, EntityDofStorage &entityDofs)
Definition: genericadaptivedofmapper.hh:366
unsigned int insertFather(const ElementType &entity)
Definition: genericadaptivedofmapper.hh:773
GeometryType type_
Definition: genericadaptivedofmapper.hh:90
bool removeHoles(VectorType &oldIdx, VectorType &newIdx, VectorType &holesVec, int ¤tHole, const int usedSize, int &holes)
Definition: genericadaptivedofmapper.hh:266
bool consecutive() const
Definition: genericadaptivedofmapper.hh:696
unsigned int insertEntityDofs(const ElementType &entity)
Definition: genericadaptivedofmapper.hh:720
PersistentContainer< GridType, PolynomOrderStorageType > PolyOrderContainerType
Definition: genericadaptivedofmapper.hh:336
Traits::GlobalKeyType GlobalKeyType
type of global key
Definition: genericadaptivedofmapper.hh:58
TraitsImp Traits
Definition: genericadaptivedofmapper.hh:36
int numDofs(const ElementType &entity) const
obtain number of DoFs on an entity
Definition: genericadaptivedofmapper.hh:617
CompiledLocalKeyVectorType::value_type::value_type CompiledLocalKeyType
compiled local key type
Definition: genericadaptivedofmapper.hh:76
int newIndex(const int hole, const int block) const
Definition: genericadaptivedofmapper.hh:662
bool compress()
Definition: genericadaptivedofmapper.hh:879
DofManager< GridType > DofManagerType
type of the DoF manager
Definition: genericadaptivedofmapper.hh:79
Definition: genericadaptivedofmapper.hh:426
int size() const
return overall number of degrees of freedom
Definition: genericadaptivedofmapper.hh:535
GridType::ctype FieldType
type of coordinates within the grid
Definition: genericadaptivedofmapper.hh:61
static const bool discontinuousMapper
Definition: genericadaptivedofmapper.hh:39
int dof(const int codim, const int polOrd, const size_t dofNumber) const
Definition: genericadaptivedofmapper.hh:188
bool fixedDataSize(int codim) const
Check, whether the data in a codimension has fixed size.
Definition: genericadaptivedofmapper.hh:649
int GlobalKeyType
Definition: mapper.hh:56
void printDofs() const
Definition: genericadaptivedofmapper.hh:830
char used_[numOrders]
Definition: genericadaptivedofmapper.hh:91
EntityDofStorage(const EntityDofStorage &other)
Definition: genericadaptivedofmapper.hh:120
void printEntityDofs(const ElementType &entity) const
Definition: genericadaptivedofmapper.hh:842
Definition: genericadaptivedofmapper.hh:339
PolynomOrderStorage(const int k)
Definition: genericadaptivedofmapper.hh:315
Definition: genericadaptivedofmapper.hh:82
void removeEntity(const ElementType &entity)
Definition: genericadaptivedofmapper.hh:747
bool considerHierarchy() const
return true if elements can be refined more than once during adaptation
Definition: genericadaptivedofmapper.hh:791
virtual ~GenericAdaptiveDofMapper()
destructor
Definition: genericadaptivedofmapper.hh:529
GridPartType::IndexSetType IndexSetType
type of the index set
Definition: genericadaptivedofmapper.hh:55
PolynomOrderStorage()
Definition: genericadaptivedofmapper.hh:314
void backup() const
Definition: genericadaptivedofmapper.hh:978
Definition: localkey.hh:20
void insertEntity(const ElementType &entity)
Definition: genericadaptivedofmapper.hh:713
void setUnused()
reset all used flags of all DoF entries
Definition: genericadaptivedofmapper.hh:852