DUNE PDELab (git)

partitionviewentityset.hh
1#ifndef DUNE_PDELAB_COMMON_PARTITIONVIEWENTITYSET_HH
2#define DUNE_PDELAB_COMMON_PARTITIONVIEWENTITYSET_HH
3
4#include <cassert>
5#include <vector>
6#include <bitset>
7#include <memory>
8#include <algorithm>
9#include <numeric>
10#include <type_traits>
11
13#include <dune/geometry/referenceelements.hh>
16#include <dune/grid/common/partitionset.hh>
17#include <dune/grid/common/rangegenerators.hh>
18
19namespace Dune {
20
21 namespace PDELab {
22
23 // import range generators to make sure they work with PartitionViewEntitySet
24 using Dune::entities;
25 using Dune::elements;
26 using Dune::facets;
27 using Dune::edges;
28 using Dune::vertices;
29 using Dune::descendantElements;
30 using Dune::intersections;
31
32 template<typename GV, typename P>
33 class PartitionViewEntitySet;
34
35 template<typename GV, typename P>
36 class PartitionViewEntitySetIndexSet;
37
38 template<typename GV, typename P>
39 struct PartitionViewEntitySetTraits
40 {
41
42 using Partitions = typename std::decay<P>::type;
43
44 using Grid = typename GV::Traits::Grid;
45 using GridView = GV;
47 using IndexSet = PartitionViewEntitySetIndexSet<GV,Partitions>;
48 using BaseIndexSet = typename GV::Traits::IndexSet;
49
50 using Element = typename GV::template Codim<0>::Entity;
51
52 using Intersection = typename GV::Traits::Intersection;
53
54 using IntersectionIterator = typename GV::Traits::IntersectionIterator;
55
56 using Communication = typename GV::Traits::Communication;
57
58 using size_type = std::size_t;
59 using dim_type = int;
60
61 using Index = typename BaseIndexSet::IndexType;
62
63 using Types = std::vector<GeometryType>;
64
65 using CodimMask = std::bitset<GV::dimension + 1>;
66
67 using CoordinateField = typename Grid::ctype;
68
69 constexpr static Index invalidIndex()
70 {
71 return ~static_cast<Index>(0ull);
72 }
73
74 static const bool conforming = GV::Traits::conforming;
75
76 static const dim_type dimension = GV::dimension;
77
78 static const dim_type dimensionworld = GV::dimensionworld;
79
80 template<dim_type codim>
81 struct Codim
82 {
83
84 using Iterator = typename GV::template Codim<codim>::template Partition<Partitions::partitionIterator()>::Iterator;
85
86 using Entity = typename GV::template Codim<codim>::Entity;
87
88 using Geometry = typename GV::template Codim<codim>::Geometry;
89
90 using LocalGeometry = typename GV::template Codim<codim>::LocalGeometry;
91
92 template<PartitionIteratorType pitype>
93 struct Partition
94 {
95
96 using Iterator = typename GV::template Codim<codim>::template Partition<pitype>::Iterator;
97
98 };
99
100 };
101
102 };
103
104
117 template<typename GV, typename P>
119 {
120
121 public:
122
123 using Traits = PartitionViewEntitySetTraits<GV,P>;
124
125 using Partitions = typename Traits::Partitions;
126 using Grid = typename Traits::Grid;
127 using GridView = typename Traits::GridView;
128 using IndexSet = typename Traits::IndexSet;
129 using BaseIndexSet = typename Traits::BaseIndexSet;
130 using Element = typename Traits::Element;
131 using Intersection = typename Traits::Intersection;
132 using IntersectionIterator = typename Traits::IntersectionIterator;
133 using Communication = typename Traits::Communication;
134 using CodimMask = typename Traits::CodimMask;
135 using CoordinateField = typename Traits::CoordinateField;
136 using size_type = typename Traits::size_type;
137 using dim_type = typename Traits::dim_type;
138
139 using ctype = CoordinateField;
140
141 static const bool conforming = Traits::conforming;
142 static const dim_type dimension = Traits::dimension;
143 static const dim_type dimensionworld = Traits::dimensionworld;
144
145 template<dim_type codim>
146 using Codim = typename Traits::template Codim<codim>;
147
148 constexpr static Partitions partitions()
149 {
150 return {};
151 }
152
153 constexpr static CodimMask allCodims()
154 {
155 return {~0ull};
156 }
157
158 const Grid& grid() const
159 {
160 return gridView().grid();
161 }
162
164 const IndexSet& indexSet() const
165 {
166 return *_index_set;
167 }
168
170 const BaseIndexSet& baseIndexSet() const
171 {
172 return indexSet().baseIndexSet();
173 }
174
175 template<dim_type codim>
177 begin() const
178 {
179 return gridView().template begin<codim,Partitions::partitionIterator()>();
180 }
181
182 template<dim_type codim>
184 end() const
185 {
186 return gridView().template end<codim,Partitions::partitionIterator()>();
187 }
188
189 template<dim_type codim, PartitionIteratorType pitype>
190 typename GV::template Codim<codim>::template Partition<pitype>::Iterator
191 begin() const
192 {
193 return gridView().template begin<codim,pitype>();
194 }
195
196 template<dim_type codim, PartitionIteratorType pitype>
197 typename GV::template Codim<codim>::template Partition<pitype>::Iterator
198 end() const
199 {
200 return gridView().template end<codim,pitype>();
201 }
202
203 size_type size(dim_type codim) const
204 {
205 return indexSet().size(codim);
206 }
207
208 size_type size(const GeometryType& gt) const
209 {
210 return indexSet().size(gt);
211 }
212
213 template<typename Entity>
214 bool contains(const Entity& e) const
215 {
216 return indexSet().contains(e);
217 }
218
219 bool contains(dim_type codim) const
220 {
221 return indexSet().contains(codim);
222 }
223
224 bool contains(const GeometryType& gt) const
225 {
226 return indexSet().contains(gt);
227 }
228
229 IntersectionIterator ibegin(const typename Codim<0>::Entity& entity) const
230 {
231 return gridView().ibegin(entity);
232 }
233
234 IntersectionIterator iend(const typename Codim<0>::Entity& entity) const
235 {
236 return gridView().iend(entity);
237 }
238
239 const Communication& comm() const
240 {
241 return gridView().comm();
242 }
243
245 size_type overlapSize(dim_type codim) const
246 {
247 return Partitions::contains(Dune::Partitions::overlap) ? gridView().overlapSize(codim) : 0;
248 }
249
251 size_type ghostSize(dim_type codim) const
252 {
253 return Partitions::contains(Dune::Partitions::ghost) ? gridView().ghostSize(codim) : 0;
254 }
255
256 template<typename DataHandle>
257 void communicate(DataHandle& data, InterfaceType iftype, CommunicationDirection dir) const
258 {
259 gridView().communicate(data,iftype,dir);
260 }
261
263 const GridView& gridView() const
264 {
265 return indexSet().gridView();
266 }
267
268 PartitionViewEntitySet(const GridView& gv, CodimMask supported_codims)
269 : _index_set(std::make_shared<IndexSet>(gv,supported_codims,true))
270 {}
271
272 explicit PartitionViewEntitySet(const GridView& gv, bool initialize = true)
273 : _index_set(std::make_shared<IndexSet>(gv,CodimMask(initialize ? ~0ull : 0ull),initialize))
274 {}
275
277 void reset()
278 {
279 _index_set->reset();
280 }
281
283 void addCodim(dim_type codim)
284 {
285 _index_set->addCodim(codim);
286 }
287
289 void removeCodim(dim_type codim)
290 {
291 _index_set->removeCodim(codim);
292 }
293
295 bool needsUpdate() const
296 {
297 return _index_set->needsUpdate();
298 }
299
301
309 bool update(bool force = false)
310 {
311 return _index_set->update(force);
312 }
313
322 bool operator==(const PartitionViewEntitySet& other) const {
323 return _index_set == other._index_set;
324 }
325
327 bool operator!=(const PartitionViewEntitySet& other) const {
328 return not (*this == other);
329 }
330
331 private:
332
333 std::shared_ptr<IndexSet> _index_set;
334
335 };
336
337 template<typename GV, typename P>
338 class PartitionViewEntitySetIndexSetBase
339 {
340
341 template<typename,typename>
342 friend class PartitionViewEntitySet;
343
344 public:
345
346 using Traits = PartitionViewEntitySetTraits<GV,P>;
347
348 using Partitions = typename Traits::Partitions;
349 using Grid = typename Traits::Grid;
350 using GridView = typename Traits::GridView;
351 using BaseIndexSet = typename Traits::BaseIndexSet;
352 using size_type = typename Traits::size_type;
353 using dim_type = typename Traits::dim_type;
354 using Index = typename Traits::Index;
355 using Types = typename Traits::Types;
356 using CodimMask = typename Traits::CodimMask;
357
358 using IndexType = Index;
359
360 static const dim_type dimension = Traits::dimension;
361
362 constexpr static Index invalidIndex()
363 {
364 return Traits::invalidIndex();
365 }
366
367 template<dim_type codim>
368 using Codim = typename Traits::template Codim<codim>;
369
370 PartitionViewEntitySetIndexSetBase(const PartitionViewEntitySetIndexSetBase&) = delete;
371 PartitionViewEntitySetIndexSetBase& operator=(const PartitionViewEntitySetIndexSetBase&) = delete;
372
373
374 protected:
375
376 bool update(bool force)
377 {
378 if (!(_needs_update || force))
379 return false;
380 std::fill(_gt_offsets.begin(),_gt_offsets.end(),0);
381 std::fill(_mapped_gt_offsets.begin(),_mapped_gt_offsets.end(),0);
382 _active_geometry_types.reset();
383 _geometry_types.resize(0);
384 for (dim_type codim = 0; codim <= GV::dimension; ++codim)
385 {
386 if (!_wanted_codims.test(codim))
387 continue;
388 for (const auto& gt : baseIndexSet().types(codim))
389 {
390 auto gt_index = GlobalGeometryTypeIndex::index(gt);
391 _gt_offsets[gt_index + 1] = baseIndexSet().size(gt);
392 _geometry_types.push_back(gt);
393 _active_geometry_types.set(gt_index);
394 }
395 }
396 for (dim_type codim = 0; codim <= GV::dimension; ++codim)
397 {
398 auto range = std::equal_range(
399 _geometry_types.begin(),
400 _geometry_types.end(),
401 GeometryTypes::none(GV::dimension - codim),
402 [](const GeometryType& x, const GeometryType& y)
403 {
404 // reverse order because we store in ascending order with regard to the codim, not the dim
405 return y.dim() < x.dim();
406 });
407 _per_codim_geometry_types[codim] = Types{range.first,range.second};
408 }
409
410 std::partial_sum(_gt_offsets.begin(),_gt_offsets.end(),_gt_offsets.begin());
411 _active_codims = _wanted_codims;
412 _needs_update = false;
413 return true;
414 }
415
416 public:
417
418 size_type size(GeometryType gt) const
419 {
420 assert(!needsUpdate());
421 auto gt_index = GlobalGeometryTypeIndex::index(gt);
422 return _mapped_gt_offsets[gt_index + 1] - _mapped_gt_offsets[gt_index];
423 }
424
425 size_type size(dim_type codim) const
426 {
427 assert(!needsUpdate());
428 auto dim = GV::dimension;
429 return _mapped_gt_offsets[GlobalGeometryTypeIndex::offset(dim-codim+1)] -
430 _mapped_gt_offsets[GlobalGeometryTypeIndex::offset(dim-codim)];
431 }
432
433 template<typename Entity>
434 bool contains(const Entity& e) const
435 {
436 return Partitions::contains(e.partitionType()) ? baseIndexSet().contains(e) : false;
437 }
438
439 bool contains(dim_type codim) const
440 {
441 return _active_codims.test(codim);
442 }
443
444 bool contains(const GeometryType& gt) const
445 {
446 return _active_geometry_types.test(GlobalGeometryTypeIndex::index(gt));
447 }
448
449 const BaseIndexSet& baseIndexSet() const
450 {
451 return _gv.indexSet();
452 }
453
454 Types types(dim_type codim) const
455 {
456 assert(!needsUpdate());
457 return _per_codim_geometry_types[codim];
458 }
459
460 Types types() const
461 {
462 assert(!needsUpdate());
463 return _geometry_types;
464 }
465
466 PartitionViewEntitySetIndexSetBase(const GV& gv, CodimMask wanted_codims)
467 : _gv(gv)
468 , _needs_update(true)
469 , _wanted_codims(wanted_codims)
470 {}
471
472 const GridView& gridView() const
473 {
474 return _gv;
475 }
476
477 bool needsUpdate() const
478 {
479 return _needs_update;
480 }
481
482 protected:
483
484 void reset()
485 {
486 _needs_update = true;
487 _wanted_codims.reset();
488 }
489
490 void addCodim(dim_type codim)
491 {
492 _wanted_codims.set(codim);
493 _needs_update = _wanted_codims != _active_codims || _wanted_codims.none();
494 }
495
496 void removeCodim(dim_type codim)
497 {
498 _wanted_codims.reset(codim);
499 _needs_update = _wanted_codims != _active_codims || _wanted_codims.none();
500 }
501
502 GV _gv;
503 bool _needs_update;
504 CodimMask _wanted_codims;
505 std::bitset<GlobalGeometryTypeIndex::size(GV::dimension)> _active_geometry_types;
506 CodimMask _active_codims;
507 std::array<size_type,GlobalGeometryTypeIndex::size(GV::dimension) + 1> _gt_offsets;
508 std::array<size_type,GlobalGeometryTypeIndex::size(GV::dimension) + 1> _mapped_gt_offsets;
509
510 private:
511
512 std::vector<GeometryType> _geometry_types;
513 std::array<Types,GV::dimension + 1> _per_codim_geometry_types;
514
515 };
516
517 template<typename GV, typename P>
518 class PartitionViewEntitySetIndexSet
519 : public PartitionViewEntitySetIndexSetBase<GV,P>
520 {
521
522 using Base = PartitionViewEntitySetIndexSetBase<GV,P>;
523
524 template<typename,typename>
525 friend class PartitionViewEntitySet;
526
527 public:
528
529 using typename Base::Traits;
530 using typename Base::Index;
531 using typename Base::Partitions;
532 using typename Base::size_type;
533 using typename Base::dim_type;
534
535 using typename Base::Grid;
536
537 using Base::gridView;
538 using Base::baseIndexSet;
539 using Base::invalidIndex;
540 using Base::contains;
541 using typename Base::CodimMask;
542 using Base::needsUpdate;
543
544 private:
545
546 static constexpr bool hasAllEntityIterators(Dune::Dim<Grid::dimension + 1>)
547 {
548 return true;
549 }
550
551 template<dim_type dim = 0>
552 static constexpr bool hasAllEntityIterators(Dune::Dim<dim> = {})
553 {
554 return Capabilities::hasEntityIterator<Grid,dim>::v && hasAllEntityIterators(Dune::Dim<dim+1>{});
555 }
556
557 bool update(bool force)
558 {
559 if (!Base::update(force))
560 return false;
561 _indices.assign(_gt_offsets.back(),invalidIndex());
562 _mapped_gt_offsets[0] = 0;
563 update_codims(std::integral_constant<bool,hasAllEntityIterators()>{});
564 std::partial_sum(_mapped_gt_offsets.begin(),_mapped_gt_offsets.end(),_mapped_gt_offsets.begin());
565 return true;
566 }
567
568 void update_codims(std::true_type)
569 {
570 update_codim(Dune::Codim<0>{});
571 }
572
573 void update_codim(Dune::Codim<GV::dimension+1>)
574 {}
575
576 template<dim_type cd>
577 void update_codim(Dune::Codim<cd> codim)
578 {
579 if (_active_codims.test(codim))
580 for (const auto& e : entities(gridView(),codim,Dune::Partitions::all))
581 {
582 auto gt = e.type();
583 auto gt_index = GlobalGeometryTypeIndex::index(gt);
584 if (Partitions::contains(e.partitionType()))
585 _indices[_gt_offsets[gt_index] + baseIndexSet().index(e)] = _mapped_gt_offsets[gt_index + 1]++;
586 }
587 update_codim(Dune::Codim<cd+1>{});
588 }
589
590
591 void update_codims(std::false_type)
592 {
593 std::fill(_indices.begin(),_indices.end(),invalidIndex());
594
595 auto& index_set = baseIndexSet();
596
597 for (const auto& e : elements(gridView(),Dune::Partitions::all))
598 {
599 if (!Partitions::contains(e.partitionType()))
600 continue;
601
603 for (dim_type codim = 0; codim <= Grid::dimension; ++codim)
604 {
605 if (!_active_codims.test(codim))
606 continue;
607
608 size_type sub_entity_count = ref_el.size(codim);
609
610 for(size_type i = 0; i < sub_entity_count; ++i)
611 {
612 auto gt = ref_el.type(i,codim);
613 auto gt_index = GlobalGeometryTypeIndex::index(gt);
614 auto index = index_set.subIndex(e,i,codim);
615 if (_indices[_gt_offsets[gt_index] + index] == invalidIndex())
616 _indices[_gt_offsets[gt_index] + index] = _mapped_gt_offsets[gt_index + 1]++;
617 }
618 }
619 }
620 }
621
622 template<class Entity>
623 Index indexImpl(const Entity& e) const
624 {
625 assert(!needsUpdate());
626 assert(Partitions::contains(e.partitionType()));
627 assert(contains(e.type()));
628 auto gt_index = GlobalGeometryTypeIndex::index(e.type());
629 return _indices[_gt_offsets[gt_index] + baseIndexSet().index(e)];
630 }
631
632 template<typename E>
633 Index subIndexImpl(const E& e, size_type i, dim_type codim) const
634 {
635 assert(!needsUpdate());
636 assert(Partitions::contains(e.partitionType()));
638 assert(contains(gt));
639 auto gt_index = GlobalGeometryTypeIndex::index(gt);
640 return _indices[_gt_offsets[gt_index] + baseIndexSet().subIndex(e,i,codim)];
641 }
642
643 public:
644
645 template<int cc>
646 Index index(const typename Traits::template Codim<cc>::Entity& e) const {
647 return indexImpl(e);
648 }
649
650 template<class Entity>
651 Index index(const Entity& e) const {
652 return indexImpl(e);
653 }
654
655 template<int cc>
656 Index subIndex(const typename Traits::template Codim<cc>::Entity& e, size_type i, dim_type codim) const {
657 return subIndexImpl(e,i,codim);
658 }
659
660
661 template<typename E>
662 Index subIndex(const E& e, size_type i, dim_type codim) const {
663 return subIndexImpl(e,i,codim);
664 }
665
666 template<typename E>
667 Index uniqueIndex(const E& e) const
668 {
669 assert(!needsUpdate());
670 assert(Partitions::contains(e.partitionType()));
671 assert(contains(e.type()));
672 auto gt_index = GlobalGeometryTypeIndex::index(e.type());
673 return _indices[_gt_offsets[gt_index] + baseIndexSet().index(e)] + _mapped_gt_offsets[gt_index];
674 }
675
676 template<typename E>
677 Index uniqueSubIndex(const E& e, size_type i, dim_type codim) const
678 {
679 assert(!needsUpdate());
680 assert(Partitions::contains(e.partitionType()));
682 assert(contains(gt));
683 auto gt_index = GlobalGeometryTypeIndex::index(gt);
684 return _indices[_gt_offsets[gt_index] + baseIndexSet().subIndex(e,i,codim)] + _mapped_gt_offsets[gt_index];
685 }
686
687
688 PartitionViewEntitySetIndexSet(const GV& gv, CodimMask wanted_codims, bool initialize)
689 : Base(gv,wanted_codims)
690 {
691 if (initialize)
692 update(true);
693 }
694
695 private:
696
697 using Base::_active_codims;
698 using Base::_gt_offsets;
699 using Base::_mapped_gt_offsets;
700
701 std::vector<Index> _indices;
702
703 };
704
705 template<typename GV>
706 class PartitionViewEntitySetIndexSet<GV,Partitions::All>
707 : public PartitionViewEntitySetIndexSetBase<GV,Partitions::All>
708 {
709
710 using Base = PartitionViewEntitySetIndexSetBase<GV,Dune::Partitions::All>;
711
712 template<typename,typename>
714
715 public:
716
717 using typename Base::Traits;
718 using typename Base::Index;
719 using typename Base::Partitions;
720 using typename Base::size_type;
721 using typename Base::dim_type;
722 using typename Base::CodimMask;
723
724 using Base::baseIndexSet;
725 using Base::contains;
726
727 private:
728
729 bool update(bool force)
730 {
731 if (!Base::update(force))
732 return false;
733 _mapped_gt_offsets[0] = 0;
734 for (const auto& gt : Base::types())
735 _mapped_gt_offsets[GlobalGeometryTypeIndex::index(gt) + 1] = baseIndexSet().size(gt);
736 std::partial_sum(_mapped_gt_offsets.begin(),_mapped_gt_offsets.end(),_mapped_gt_offsets.begin());
737 return true;
738 }
739
740 template<typename E>
741 Index subIndexImpl(const E& e, size_type i, dim_type codim) const
742 {
743#ifndef NDEBUG
745 assert(contains(gt));
746#endif
747 return baseIndexSet().subIndex(e,i,codim);
748 }
749
750 public:
751
752 template<typename E>
753 Index index(const E& e) const
754 {
755 assert(contains(e.type()));
756 return baseIndexSet().index(e);
757 }
758
759 template<int cc>
760 Index index(const typename Traits::template Codim<cc>::Entity& e) const
761 {
762 assert(contains(e.type()));
763 return baseIndexSet().index(e);
764 }
765
766 template<typename E>
767 Index uniqueIndex(const E& e) const
768 {
769 assert(contains(e.type()));
770 return baseIndexSet().index(e) + _mapped_gt_offsets[Dune::GlobalGeometryTypeIndex::index(e.type())];
771 }
772
773
774 template<int cc>
775 Index subIndex(const typename Traits::template Codim<cc>::Entity& e, size_type i, dim_type codim) const {
776 return subIndexImpl(e,i,codim);
777 }
778
779 template<typename E>
780 Index subIndex(const E& e, size_type i, dim_type codim) const {
781 return subIndexImpl(e,i,codim);
782 }
783
784 template<typename E>
785 Index uniqueSubIndex(const E& e, size_type i, dim_type codim) const
786 {
788 assert(contains(gt));
789 return baseIndexSet().subIndex(e,i,codim) + _mapped_gt_offsets[Dune::GlobalGeometryTypeIndex::index(gt)];
790 }
791
792 PartitionViewEntitySetIndexSet(const GV& gv, CodimMask wanted_codims, bool initialize = true)
793 : Base(gv,wanted_codims)
794 {
795 if (initialize)
796 update(true);
797 }
798
799 private:
800
801 using Base::_mapped_gt_offsets;
802
803 };
804
805 template<typename GV>
806 using AllEntitySet = PartitionViewEntitySet<GV,Partitions::All>;
807
808 template<typename GV>
809 using OverlappingEntitySet = PartitionViewEntitySet<GV,Partitions::InteriorBorderOverlapFront>;
810
811 template<typename GV>
812 using NonOverlappingEntitySet = PartitionViewEntitySet<GV,Partitions::InteriorBorder>;
813
814#ifndef DOXYGEN
815
816 namespace impl {
817
818 template<typename T>
819 struct _isEntitySet
820 {
821 using type = std::false_type;
822 };
823
824 template<typename GV,typename P>
825 struct _isEntitySet<PartitionViewEntitySet<GV,P>>
826 {
827 using type = std::true_type;
828 };
829
830 }
831
832#endif // DOXYGEN
833
835 template<typename T>
836 using isEntitySet = typename impl::_isEntitySet<T>::type;
837
838 } // namespace PDELab
839} // namespace Dune
840
841
842#endif // DUNE_PDELAB_COMMON_PARTITIONVIEWENTITYSET_HH
static constexpr std::size_t index(const GeometryType &gt)
Compute the index for the given geometry type over all dimensions.
Definition: typeindex.hh:138
static constexpr std::size_t offset(std::size_t dim)
Compute the starting index for a given dimension including irregular geometry types.
Definition: typeindex.hh:113
static constexpr std::size_t size(std::size_t maxdim)
Compute total number of geometry types up to and including the given dimension.
Definition: typeindex.hh:125
Grid view abstract base class.
Definition: gridview.hh:66
Grid abstract base class.
Definition: grid.hh:375
static constexpr int dimension
The dimension of the grid.
Definition: grid.hh:387
ct ctype
Define type used for coordinates in grid module.
Definition: grid.hh:518
Index Set Interface base class.
Definition: indexidset.hh:78
Partition view (or entity set) of a grid view.
Definition: partitionviewentityset.hh:119
const IndexSet & indexSet() const
Returns the IndexSet of this EntitySet.
Definition: partitionviewentityset.hh:164
void reset()
Reset this EntitySet, which removes all entities from it.
Definition: partitionviewentityset.hh:277
bool operator==(const PartitionViewEntitySet &other) const
Compare to another partition view.
Definition: partitionviewentityset.hh:322
bool update(bool force=false)
Update the internal state of this EntitySet.
Definition: partitionviewentityset.hh:309
const GridView & gridView() const
Returns the underlying GridView.
Definition: partitionviewentityset.hh:263
bool operator!=(const PartitionViewEntitySet &other) const
Compare to another partition view.
Definition: partitionviewentityset.hh:327
void removeCodim(dim_type codim)
Remove all entities of the given codim from this EntitySet.
Definition: partitionviewentityset.hh:289
size_type overlapSize(dim_type codim) const
Returns the overlap size of this EntitySet, which depends on its PartitionSet.
Definition: partitionviewentityset.hh:245
const BaseIndexSet & baseIndexSet() const
Returns the IndexSet of the underlying GridView.
Definition: partitionviewentityset.hh:170
bool needsUpdate() const
Returns true if you need to call update on this EntitySet before using it.
Definition: partitionviewentityset.hh:295
void addCodim(dim_type codim)
Add all entities of the given codim to this EntitySet.
Definition: partitionviewentityset.hh:283
size_type ghostSize(dim_type codim) const
Returns the ghost size of this EntitySet, which depends on its PartitionSet.
Definition: partitionviewentityset.hh:251
A set of traits classes to store static information about grid implementation.
@ conforming
Output conforming data.
Definition: common.hh:73
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:158
static constexpr bool isEntitySet()
Check if F models the GridFunction concept with given signature and entity set.
Definition: functionconcepts.hh:235
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:170
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:86
constexpr GeometryType none(unsigned int dim)
Returns a GeometryType representing a singular of dimension dim.
Definition: type.hh:471
constexpr Overlap overlap
PartitionSet for the overlap partition.
Definition: partitionset.hh:277
PartitionSet<... > All
Type of PartitionSet for all partitions.
Definition: partitionset.hh:267
constexpr All all
PartitionSet for all partitions.
Definition: partitionset.hh:295
constexpr Ghost ghost
PartitionSet for the ghost partition.
Definition: partitionset.hh:283
Dune namespace.
Definition: alignedallocator.hh:13
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
constexpr std::bool_constant<((II==value)||...)> contains(std::integer_sequence< T, II... >, std::integral_constant< T, value >)
Checks whether or not a given sequence contains a value.
Definition: integersequence.hh:137
STL namespace.
Static tag representing a codimension.
Definition: dimension.hh:24
Static tag representing a dimension.
Definition: dimension.hh:16
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition: referenceelements.hh:156
Helper classes to provide indices for geometrytypes for use in a vector.
Various macros to work with Dune module version numbers.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)