3 #ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_LFSINDEXCACHE_HH 4 #define DUNE_PDELAB_GRIDFUNCTIONSPACE_LFSINDEXCACHE_HH 9 #include <unordered_map> 11 #include <dune/common/reservedvector.hh> 12 #include <dune/common/exceptions.hh> 13 #include <dune/common/hash.hh> 14 #include <dune/common/iteratorfacades.hh> 16 #include <dune/typetree/typetree.hh> 24 template<
typename Iterator>
26 :
public RandomAccessIteratorFacade<DOFIndexViewIterator<Iterator>,
27 const typename std::iterator_traits<Iterator>::value_type::View,
28 const typename std::iterator_traits<Iterator>::value_type::View
32 friend class RandomAccessIteratorFacade<
34 const typename std::iterator_traits<Iterator>::value_type::View,
35 const typename std::iterator_traits<Iterator>::value_type::View
38 typedef typename std::iterator_traits<Iterator>::value_type::View View;
82 , _tail_length(tail_length)
95 const typename std::iterator_traits<Iterator>::reference
raw_index()
const 100 bool equals(
const DOFIndexViewIterator& other)
const 102 return _iterator == other._iterator;
122 return other._iterator - _iterator;
127 return _iterator->view(_iterator->treeIndex().size() - _tail_length);
138 std::size_t _tail_length;
143 template<
typename Iterator>
145 :
public TypeTree::TreeVisitor
146 ,
public TypeTree::DynamicTraversal
149 template<
typename LeafLFS,
typename TreePath>
150 void leaf(
const LeafLFS& leaf_lfs, TreePath tp)
152 (*it) = leaf_lfs.size();
157 : it(leaf_size_container_iterator)
164 template<
typename LFS,
typename Iterator>
168 TypeTree::applyToTree(lfs,visitor);
173 template<
typename DOFIterator,
174 typename ContainerIterator,
175 typename LeafSizeIterator,
176 std::size_t tree_depth>
178 :
public TypeTree::TreeVisitor
179 ,
public TypeTree::DynamicTraversal
182 template<
typename Ordering,
typename TreePath>
183 void leaf(
const Ordering& ordering, TreePath tp)
185 std::size_t leaf_size = *(leaf_size_pos++);
186 dof_end += leaf_size;
187 ordering.map_lfs_indices(dof_pos,dof_end,container_pos);
189 container_pos += leaf_size;
192 template<
typename Ordering,
typename TreePath>
193 void post(
const Ordering& ordering, TreePath tp)
195 if (Ordering::consume_tree_index)
197 dof_pos.restore_back();
198 dof_end.restore_back();
200 ordering.map_lfs_indices(dof_stack.top(),dof_end,container_stack.top());
202 container_stack.pop();
205 template<
typename Ordering,
typename TreePath>
206 void pre(
const Ordering& ordering, TreePath tp)
208 dof_stack.push(dof_pos);
209 container_stack.push(container_pos);
210 if (Ordering::consume_tree_index)
218 ContainerIterator container_begin,
219 LeafSizeIterator leaf_size_begin,
220 std::size_t dof_index_tail_length = 0)
221 : dof_pos(dof_begin,dof_index_tail_length)
222 , dof_end(dof_begin,dof_index_tail_length)
223 , container_pos(container_begin)
224 , leaf_size_pos(leaf_size_begin)
232 std::stack<DOFIndexViewIterator<DOFIterator>,ReservedVector<DOFIndexViewIterator<DOFIterator>,tree_depth> >
dof_stack;
233 std::stack<ContainerIterator,ReservedVector<ContainerIterator,tree_depth> >
container_stack;
239 template<
typename LFS,
typename C,
typename CacheTag>
245 DOF_NONCONSTRAINED = 0,
246 DOF_CONSTRAINED = 1<<0,
254 typedef typename LFS::Traits::GridFunctionSpace
GFS;
257 typedef ContainerIndex
CI;
258 typedef typename Ordering::Traits::DOFIndex
DOFIndex;
263 typedef std::unordered_map<DI,CI>
CIMap;
265 typedef std::unordered_map<const CI*,std::pair<size_type,bool> >
InverseMap;
268 :
public std::pair<const CI*,typename C::mapped_type::mapped_type>
271 typedef typename C::mapped_type::mapped_type
Weight;
275 return *(this->first);
291 , _enable_constraints_caching(enable_constraints_caching)
292 , _container_indices(lfs.maxSize())
293 , _dof_flags(lfs.maxSize(),0)
294 , _constraints_iterators(lfs.maxSize())
295 , _inverse_cache_built(false)
296 , _gfs_constraints(constraints)
303 _container_index_map.clear();
304 for (
typename CIVector::iterator it = _container_indices.begin(); it != _container_indices.end(); ++it)
307 _inverse_map.clear();
308 _inverse_cache_built =
false;
311 typedef ReservedVector<size_type,TypeTree::TreeInfo<LFS>::leafCount> LeafSizeVector;
312 LeafSizeVector leaf_sizes;
313 leaf_sizes.resize(TypeTree::TreeInfo<LFS>::leafCount);
318 typename LFS::Traits::DOFIndexContainer::const_iterator,
319 typename CIVector::iterator,
320 typename LeafSizeVector::const_iterator,
321 TypeTree::TreeInfo<Ordering>::depth
322 > index_mapper(_lfs._dof_indices->begin(),_container_indices.begin(),leaf_sizes.begin(),_lfs.subSpaceDepth());
323 TypeTree::applyToTree(_lfs.gridFunctionSpace().ordering(),index_mapper);
325 if (_enable_constraints_caching)
327 _constraints.resize(0);
328 std::vector<std::pair<size_type,typename C::const_iterator> > non_dirichlet_constrained_dofs;
329 size_type constraint_entry_count = 0;
330 for (size_type i = 0; i < _lfs.size(); ++i)
332 const CI& container_index = _container_indices[i];
333 const typename C::const_iterator cit = _gfs_constraints.find(container_index);
334 if (cit == _gfs_constraints.end())
336 _dof_flags[i] = DOF_NONCONSTRAINED;
340 if (cit->second.size() == 0)
342 _dof_flags[i] = DOF_CONSTRAINED | DOF_DIRICHLET;
343 _constraints_iterators[i] = make_pair(_constraints.end(),_constraints.end());
347 _dof_flags[i] = DOF_CONSTRAINED;
348 constraint_entry_count += cit->second.size();
349 non_dirichlet_constrained_dofs.push_back(make_pair(i,cit));
353 if (constraint_entry_count > 0)
355 _constraints.resize(constraint_entry_count);
356 typename ConstraintsVector::iterator eit = _constraints.begin();
357 for (
typename std::vector<std::pair<size_type,typename C::const_iterator> >::const_iterator it = non_dirichlet_constrained_dofs.begin();
358 it != non_dirichlet_constrained_dofs.end();
361 _constraints_iterators[it->first].first = eit;
362 for (
typename C::mapped_type::const_iterator cit = it->second->second.begin(); cit != it->second->second.end(); ++cit, ++eit)
364 eit->first = &(cit->first);
365 eit->second = cit->second;
367 _constraints_iterators[it->first].second = eit;
375 return _lfs.dofIndex(i);
380 return _container_indices[i];
386 std::pair<typename CIMap::iterator,bool> r = _container_index_map.insert(std::make_pair(std::ref(i),CI()));
390 _lfs.gridFunctionSpace().ordering().mapIndex(i.view(),r.first->second);
393 return r.first->second;
398 return _dof_flags[i] & DOF_CONSTRAINED;
403 return _dof_flags[i] & DOF_DIRICHLET;
408 assert(isConstrained(i));
409 return _constraints_iterators[i].first;
414 assert(isConstrained(i));
415 return _constraints_iterators[i].second;
428 std::pair<size_type,bool>
localIndex(
const ContainerIndex& ci)
const 430 if (!_inverse_cache_built)
431 build_inverse_cache();
432 return _inverse_map[ci];
437 if (!_inverse_cache_built)
438 build_inverse_cache();
444 if (!_inverse_cache_built)
445 build_inverse_cache();
446 return _extended_offsets[i];
451 return _enable_constraints_caching;
456 struct sort_container_indices
459 bool operator()(
const T* a,
const T* b)
const 461 return std::lexicographical_compare(reversed_iterator(a->end()),reversed_iterator(a->begin()),
462 reversed_iterator(b->end()),reversed_iterator(b->begin())
468 void build_inverse_cache()
473 for (
typename CIVector::const_iterator it = _container_indices.begin(),
474 endit = _container_indices.end();
479 _inverse_map.insert(std::make_pair(&(*it),std::make_pair(i,
false)));
480 if (it->back() != child)
482 _offsets[child+1] = i;
487 std::vector<const ContainerIndex*> extended_cis;
488 extended_cis.reserve(_constraints.size());
490 for (
typename ConstraintsVector::const_iterator it = _constraints.begin(),
491 endit = _constraints.end();
496 if (_inverse_map.count(it->first) == 0)
497 extended_cis.push_back(it->first);
500 std::sort(extended_cis.begin(),extended_cis.end(),sort_container_indices());
502 typename std::vector<const ContainerIndex*>::const_iterator endit = std::unique(extended_cis.begin(),extended_cis.end());
506 for (
typename std::vector<const ContainerIndex*>::const_iterator it = extended_cis.begin(); it != endit; ++it, ++i)
508 _inverse_map.insert(std::make_pair(&(*it),std::make_pair(i,
true)));
509 if (it->back() != child)
511 _extended_offsets[child+1] = i;
516 _inverse_cache_built =
true;
521 const bool _enable_constraints_caching;
522 CIVector _container_indices;
523 std::vector<unsigned char> _dof_flags;
524 std::vector<std::pair<ConstraintsIterator,ConstraintsIterator> > _constraints_iterators;
525 mutable CIMap _container_index_map;
526 ConstraintsVector _constraints;
529 mutable bool _inverse_cache_built;
530 mutable InverseMap _inverse_map;
532 const C& _gfs_constraints;
537 template<
typename LFS,
typename CacheTag>
544 typedef typename LFS::Traits::GridFunctionSpace
GFS;
547 typedef ContainerIndex
CI;
548 typedef typename Ordering::Traits::DOFIndex
DOFIndex;
553 typedef std::unordered_map<DI,CI>
CIMap;
555 struct ConstraintsEntry
556 :
public std::pair<const CI*,double>
563 return *(this->first);
577 , _container_indices(lfs.maxSize())
584 , _container_indices(lfs.maxSize())
592 _container_index_map.clear();
593 for (
typename CIVector::iterator it = _container_indices.begin(); it != _container_indices.end(); ++it)
597 typedef ReservedVector<size_type,TypeTree::TreeInfo<LFS>::leafCount> LeafSizeVector;
598 LeafSizeVector leaf_sizes;
599 leaf_sizes.resize(TypeTree::TreeInfo<LFS>::leafCount);
604 typename LFS::Traits::DOFIndexContainer::const_iterator,
605 typename CIVector::iterator,
606 typename LeafSizeVector::const_iterator,
607 TypeTree::TreeInfo<Ordering>::depth
608 > index_mapper(_lfs._dof_indices->begin(),_container_indices.begin(),leaf_sizes.begin(),_lfs.subSpaceDepth());
609 TypeTree::applyToTree(_lfs.gridFunctionSpace().ordering(),index_mapper);
614 return _lfs.dofIndex(i);
619 return _container_indices[i];
625 std::pair<typename CIMap::iterator,bool> r = _container_index_map.insert(std::make_pair(std::ref(i),CI()));
629 _lfs.gridFunctionSpace().ordering().mapIndex(i.view(),r.first->second);
632 return r.first->second;
647 return _constraints.begin();
652 return _constraints.end();
673 CIVector _container_indices;
674 mutable CIMap _container_index_map;
675 const ConstraintsVector _constraints;
681 template<
typename LFS,
typename C>
687 DOF_NONCONSTRAINED = 0,
688 DOF_CONSTRAINED = 1<<0,
696 typedef typename LFS::Traits::GridFunctionSpace
GFS;
698 typedef typename Ordering::Traits::ContainerIndex
CI;
699 typedef typename Ordering::Traits::DOFIndex
DI;
703 typedef std::unordered_map<DI,CI>
CIMap;
705 struct ConstraintsEntry
706 :
public std::pair<CI,typename C::mapped_type::mapped_type>
709 typedef typename C::mapped_type::mapped_type
Weight;
727 , _dof_flags(lfs.maxSize())
728 , _constraints_iterators(lfs.maxSize())
729 , _gfs_constraints(constraints)
735 _constraints.resize(0);
736 std::vector<std::pair<size_type,typename C::const_iterator> > non_dirichlet_constrained_dofs;
737 size_type constraint_entry_count = 0;
738 for (size_type i = 0; i < _lfs.size(); ++i)
740 const DI& dof_index = _lfs.dofIndex(i);
741 const typename C::const_iterator cit = _gfs_constraints.find(dof_index);
742 if (cit == _gfs_constraints.end())
744 _dof_flags[i] = DOF_NONCONSTRAINED;
748 if (cit->second.size() == 0)
750 _dof_flags[i] = DOF_CONSTRAINED | DOF_DIRICHLET;
751 _constraints_iterators[i] = make_pair(_constraints.end(),_constraints.end());
755 _dof_flags[i] = DOF_CONSTRAINED;
756 constraint_entry_count += cit->second.size();
757 non_dirichlet_constrained_dofs.push_back(make_pair(i,cit));
761 if (constraint_entry_count > 0)
763 _constraints.resize(constraint_entry_count);
764 typename ConstraintsVector::iterator eit = _constraints.begin();
765 for (
typename std::vector<std::pair<size_type,typename C::const_iterator> >::const_iterator it = non_dirichlet_constrained_dofs.begin();
766 it != non_dirichlet_constrained_dofs.end();
769 _constraints_iterators[it->first].first = eit;
770 for (
typename C::mapped_type::const_iterator cit = it->second->second.begin(); cit != it->second->second.end(); ++cit, ++eit)
772 eit->first = cit->first;
773 eit->second = cit->second;
775 _constraints_iterators[it->first].second = eit;
782 return _lfs.dofIndex(i);
787 return CI(_lfs.dofIndex(i)[0]);
797 return _dof_flags[i] & DOF_CONSTRAINED;
802 return _dof_flags[i] & DOF_DIRICHLET;
807 assert(isConstrained(i));
808 return _constraints_iterators[i].first;
813 assert(isConstrained(i));
814 return _constraints_iterators[i].second;
830 CIVector _container_indices;
831 std::vector<unsigned char> _dof_flags;
832 std::vector<std::pair<ConstraintsIterator,ConstraintsIterator> > _constraints_iterators;
833 mutable CIMap _container_index_map;
834 ConstraintsVector _constraints;
836 const C& _gfs_constraints;
841 template<
typename LFS>
848 typedef typename LFS::Traits::GridFunctionSpace
GFS;
851 typedef typename Ordering::Traits::ContainerIndex CI;
852 typedef typename Ordering::Traits::DOFIndex DI;
859 typedef std::unordered_map<DI,CI>
CIMap;
861 struct ConstraintsEntry
862 :
public std::pair<const CI*,double>
869 return *(this->first);
900 return CI(_lfs.dofIndex(i)[0]);
920 return _constraints.begin();
925 return _constraints.end();
941 mutable CIMap _container_index_map;
942 const ConstraintsVector _constraints;
947 template<
typename LFS,
typename C = EmptyTransformation>
949 :
public LFSIndexCacheBase<LFS,C,typename LFS::Traits::GridFunctionSpace::Ordering::CacheTag>
954 template<
typename CC>
971 #endif // DUNE_PDELAB_GRIDFUNCTIONSPACE_LFSINDEXCACHE_HH ConstraintsIterator constraintsEnd(size_type i) const
Definition: lfsindexcache.hh:923
DOFIndexViewIterator< DOFIterator > dof_pos
Definition: lfsindexcache.hh:228
bool isConstrained(size_type i) const
Definition: lfsindexcache.hh:795
GFS::Ordering Ordering
Definition: lfsindexcache.hh:545
Definition: lfsindexcache.hh:267
LFSIndexCacheBase(const LFS &lfs, const C &c, bool enable_constraints_caching)
Definition: lfsindexcache.hh:582
const View dereference() const
Definition: lfsindexcache.hh:125
const LocalFunctionSpace & localFunctionSpace() const
Definition: lfsindexcache.hh:655
View * operator->()
Definition: lfsindexcache.hh:64
ConstraintsIterator constraintsEnd(size_type i) const
Definition: lfsindexcache.hh:412
C::mapped_type::mapped_type Weight
Definition: lfsindexcache.hh:271
std::size_t size_type
Definition: lfsindexcache.hh:700
std::stack< DOFIndexViewIterator< DOFIterator >, ReservedVector< DOFIndexViewIterator< DOFIterator >, tree_depth > > dof_stack
Definition: lfsindexcache.hh:232
DOFIndex DI
Definition: lfsindexcache.hh:549
DI DOFIndex
Definition: lfsindexcache.hh:855
LFSIndexCacheBase(const LFS &lfs)
Definition: lfsindexcache.hh:575
std::pair< size_type, bool > localIndex(const ContainerIndex &ci) const
Definition: lfsindexcache.hh:428
LFS LocalFunctionSpace
Definition: lfsindexcache.hh:252
void decrement()
Definition: lfsindexcache.hh:110
Ordering::Traits::ContainerIndex ContainerIndex
Definition: lfsindexcache.hh:256
void advance(int n)
Definition: lfsindexcache.hh:115
void leaf(const Ordering &ordering, TreePath tp)
Definition: lfsindexcache.hh:183
bool constraintsCachingEnabled() const
Definition: lfsindexcache.hh:665
proxy(const View &v)
Definition: lfsindexcache.hh:60
GFS::Ordering Ordering
Definition: lfsindexcache.hh:849
LFS::Traits::GridFunctionSpace GFS
Definition: lfsindexcache.hh:848
CI ContainerIndex
Definition: lfsindexcache.hh:708
bool constraintsCachingEnabled() const
Definition: lfsindexcache.hh:449
const std::iterator_traits< Iterator >::reference raw_index() const
Definition: lfsindexcache.hh:95
Iterator it
Definition: lfsindexcache.hh:160
std::vector< CI > CIVector
Definition: lfsindexcache.hh:262
std::unordered_map< DI, CI > CIMap
Definition: lfsindexcache.hh:263
std::ptrdiff_t distanceTo(DOFIndexViewIterator &other) const
Definition: lfsindexcache.hh:120
DOFIndexViewIterator()
Definition: lfsindexcache.hh:75
ConstraintsVector::const_iterator ConstraintsIterator
Definition: lfsindexcache.hh:573
size_type size() const
Definition: lfsindexcache.hh:423
LeafSizeIterator leaf_size_pos
Definition: lfsindexcache.hh:231
LFS LocalFunctionSpace
Definition: lfsindexcache.hh:694
bool isDirichletConstraint(size_type i) const
Definition: lfsindexcache.hh:401
Ordering::Traits::ContainerIndex CI
Definition: lfsindexcache.hh:698
extract_lfs_leaf_size_visitor(Iterator leaf_size_container_iterator)
Definition: lfsindexcache.hh:156
size_type size() const
Definition: lfsindexcache.hh:822
const LocalFunctionSpace & localFunctionSpace() const
Definition: lfsindexcache.hh:418
void update()
Definition: lfsindexcache.hh:300
std::stack< ContainerIterator, ReservedVector< ContainerIterator, tree_depth > > container_stack
Definition: lfsindexcache.hh:233
const LocalFunctionSpace & localFunctionSpace() const
Definition: lfsindexcache.hh:928
const Weight & weight() const
Definition: lfsindexcache.hh:278
LFS::Traits::GridFunctionSpace GFS
Definition: lfsindexcache.hh:544
size_type extendedOffset(size_type i) const
Definition: lfsindexcache.hh:442
CI ContainerIndex
Definition: lfsindexcache.hh:558
LFS::Traits::GridFunctionSpace GFS
Definition: lfsindexcache.hh:696
std::size_t size_type
Definition: lfsindexcache.hh:550
LFSIndexCacheBase(const LFS &lfs, const C &constraints)
Definition: lfsindexcache.hh:725
const CI & containerIndex(const DI &i) const
Definition: lfsindexcache.hh:790
double Weight
Definition: lfsindexcache.hh:865
const DI & dofIndex(size_type i) const
Definition: lfsindexcache.hh:612
DOFIndexViewIterator< DOFIterator > dof_end
Definition: lfsindexcache.hh:229
ConstraintsVector::const_iterator ConstraintsIterator
Definition: lfsindexcache.hh:287
void pre(const Ordering &ordering, TreePath tp)
Definition: lfsindexcache.hh:206
DOFIndexViewIterator(Iterator it, std::size_t tail_length=0)
Definition: lfsindexcache.hh:80
ContainerIndex CI
Definition: lfsindexcache.hh:257
Definition: constraintstransformation.hh:111
bool isDirichletConstraint(size_type i) const
Definition: lfsindexcache.hh:640
const ContainerIndex & containerIndex() const
Definition: lfsindexcache.hh:273
void update()
Definition: lfsindexcache.hh:893
ConstraintsVector::const_iterator ConstraintsIterator
Definition: lfsindexcache.hh:723
const ContainerIndex & containerIndex() const
Definition: lfsindexcache.hh:561
std::vector< ConstraintsEntry > ConstraintsVector
Definition: lfsindexcache.hh:722
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
const LocalFunctionSpace & localFunctionSpace() const
Definition: lfsindexcache.hh:817
std::vector< CI > CIVector
Definition: lfsindexcache.hh:858
Ordering::Traits::DOFIndex DOFIndex
Definition: lfsindexcache.hh:258
LFS LocalFunctionSpace
Definition: lfsindexcache.hh:847
void cut_back()
Definition: lfsindexcache.hh:85
CI ContainerIndex
Definition: lfsindexcache.hh:854
LFSIndexCacheBase(const LFS &lfs, const C &c)
Definition: lfsindexcache.hh:887
const Weight & weight() const
Definition: lfsindexcache.hh:716
void update()
Definition: lfsindexcache.hh:589
map_dof_indices_to_container_indices(DOFIterator dof_begin, ContainerIterator container_begin, LeafSizeIterator leaf_size_begin, std::size_t dof_index_tail_length=0)
Definition: lfsindexcache.hh:217
Definition: lfsindexcache.hh:144
std::vector< CI > CIVector
Definition: lfsindexcache.hh:702
Ordering::Traits::ContainerIndex ContainerIndex
Definition: lfsindexcache.hh:546
ConstraintsIterator constraintsEnd(size_type i) const
Definition: lfsindexcache.hh:650
void restore_back()
Definition: lfsindexcache.hh:90
bool isConstrained(size_type i) const
Definition: lfsindexcache.hh:908
GFS::Ordering Ordering
Definition: lfsindexcache.hh:697
void increment()
Definition: lfsindexcache.hh:105
C::mapped_type::mapped_type Weight
Definition: lfsindexcache.hh:709
void post(const Ordering &ordering, TreePath tp)
Definition: lfsindexcache.hh:193
const CI & containerIndex(const DI &i) const
Definition: lfsindexcache.hh:622
pointer operator->() const
Definition: lfsindexcache.hh:130
const DI & dofIndex(size_type i) const
Definition: lfsindexcache.hh:780
Definition: lfsindexcache.hh:948
LFSIndexCache(const LFS &lfs)
Definition: lfsindexcache.hh:960
View _tmp
Definition: lfsindexcache.hh:69
bool equals(const DOFIndexViewIterator &other) const
Definition: lfsindexcache.hh:100
Ordering::Traits::DOFIndex DI
Definition: lfsindexcache.hh:699
ConstraintsIterator constraintsBegin(size_type i) const
Definition: lfsindexcache.hh:805
CI containerIndex(size_type i) const
Definition: lfsindexcache.hh:785
std::vector< ConstraintsEntry > ConstraintsVector
Definition: lfsindexcache.hh:878
std::unordered_map< DI, CI > CIMap
Definition: lfsindexcache.hh:703
GFS::Ordering Ordering
Definition: lfsindexcache.hh:255
void update()
Definition: lfsindexcache.hh:733
std::vector< ConstraintsEntry > ConstraintsVector
Definition: lfsindexcache.hh:286
std::vector< CI > CIVector
Definition: lfsindexcache.hh:552
std::unordered_map< DI, CI > CIMap
Definition: lfsindexcache.hh:859
ConstraintsIterator constraintsBegin(size_type i) const
Definition: lfsindexcache.hh:918
double Weight
Definition: lfsindexcache.hh:559
LFSIndexCache(const LFS &lfs, const CC &c, bool enable_constraints_caching=!std::is_same< C, EmptyTransformation >::value)
Definition: lfsindexcache.hh:955
Ordering::Traits::DOFIndex DOFIndex
Definition: lfsindexcache.hh:548
ConstraintsIterator constraintsBegin(size_type i) const
Definition: lfsindexcache.hh:645
ContainerIndex CI
Definition: lfsindexcache.hh:547
bool isDirichletConstraint(size_type i) const
Definition: lfsindexcache.hh:913
std::unordered_map< const CI *, std::pair< size_type, bool > > InverseMap
Definition: lfsindexcache.hh:265
ConstraintsVector::const_iterator ConstraintsIterator
Definition: lfsindexcache.hh:879
const CI & containerIndex(size_type i) const
Definition: lfsindexcache.hh:378
DOFIndex DI
Definition: lfsindexcache.hh:259
CI containerIndex(size_type i) const
Definition: lfsindexcache.hh:898
const DI & dofIndex(size_type i) const
Definition: lfsindexcache.hh:373
bool isConstrained(size_type i) const
Definition: lfsindexcache.hh:635
std::size_t size_type
Definition: lfsindexcache.hh:856
LFS LocalFunctionSpace
Definition: lfsindexcache.hh:543
std::unordered_map< DI, CI > CIMap
Definition: lfsindexcache.hh:553
ContainerIterator container_pos
Definition: lfsindexcache.hh:230
size_type offset(size_type i) const
Definition: lfsindexcache.hh:435
Definition: lfsindexcache.hh:240
LFSIndexCacheBase(const LFS &lfs, const C &constraints, bool enable_constraints_caching)
Definition: lfsindexcache.hh:289
Definition: lfsindexcache.hh:57
size_type size() const
Definition: lfsindexcache.hh:660
bool isConstrained(size_type i) const
Definition: lfsindexcache.hh:396
Definition: gridfunctionspace/tags.hh:216
CI ContainerIndex
Definition: lfsindexcache.hh:270
void constraints(const GFS &gfs, CG &cg, const bool verbose=false)
construct constraints
Definition: constraints.hh:751
bool isDirichletConstraint(size_type i) const
Definition: lfsindexcache.hh:800
const CI & containerIndex(const DI &i) const
Definition: lfsindexcache.hh:383
Iterator extract_lfs_leaf_sizes(const LFS &lfs, Iterator it)
Definition: lfsindexcache.hh:165
proxy pointer
Definition: lfsindexcache.hh:73
const ContainerIndex & containerIndex() const
Definition: lfsindexcache.hh:867
std::size_t size_type
Definition: lfsindexcache.hh:260
const Weight & weight() const
Definition: lfsindexcache.hh:872
const Weight & weight() const
Definition: lfsindexcache.hh:566
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139
const CI & containerIndex(size_type i) const
Definition: lfsindexcache.hh:617
LFSIndexCacheBase(const LFS &lfs)
Definition: lfsindexcache.hh:881
Definition: lfsindexcache.hh:177
std::vector< ConstraintsEntry > ConstraintsVector
Definition: lfsindexcache.hh:572
ConstraintsIterator constraintsBegin(size_type i) const
Definition: lfsindexcache.hh:406
const ContainerIndex & containerIndex() const
Definition: lfsindexcache.hh:711
LFS::Traits::GridFunctionSpace GFS
Definition: lfsindexcache.hh:254
CI ContainerIndex
Definition: lfsindexcache.hh:864
Definition: lfsindexcache.hh:25
A grid function space.
Definition: gridfunctionspace.hh:169
CI containerIndex(const DI &i) const
Definition: lfsindexcache.hh:903
ConstraintsIterator constraintsEnd(size_type i) const
Definition: lfsindexcache.hh:811
size_type size() const
Definition: lfsindexcache.hh:933
void leaf(const LeafLFS &leaf_lfs, TreePath tp)
Definition: lfsindexcache.hh:150