FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
index_set.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7
8// includes, FEAT
9#include <kernel/shape.hpp>
10#include <kernel/adjacency/permutation.hpp>
11
12// includes, system
13#include <array>
14#include <vector>
15
16namespace FEAT
17{
21 namespace Geometry
22 {
33 template<int num_indices_>
35 {
36 static_assert(num_indices_ > 0, "invalid number of indices");
37
39 static constexpr int num_indices = num_indices_;
40
43
46 {
47 ASSERT(i >= 0);
49 return indices[i];
50 }
51
53 const Index& operator[](int i) const
54 {
55 ASSERT(i >= 0);
57 return indices[i];
58 }
59
60 void permute_map(const Adjacency::Permutation& inv_perm)
61 {
62 for(int i(0); i < num_indices; ++i)
63 indices[i] = inv_perm.map(indices[i]);
64 }
65 }; // struct IndexTuple
66
80 template<int num_indices_>
82 {
83 static_assert(num_indices_ > 0, "invalid index count");
84
85 public:
87 static constexpr int num_indices = num_indices_;
88
91
93 typedef const Index* ImageIterator;
94
95 protected:
99
101 std::vector<IndexTupleType> _indices;
102
104 explicit IndexSet(Index idx_bnd, const std::vector<IndexTupleType>& idx) :
105 _index_bound(idx_bnd), _indices(idx)
106 {
107 }
108
109 public:
119 explicit IndexSet(
120 Index num_entities = 0,
121 Index index_bound = 0)
122 :
123 _index_bound(index_bound),
124 _indices(std::size_t(num_entities))
125 {
126 }
127
131 _indices(std::forward<std::vector<IndexTupleType>>(other._indices))
132 {
133 }
134
137 {
138 // avoid self-move
139 if(this == &other)
140 return *this;
141
142 _index_bound = other._index_bound;
143 _indices = std::forward<std::vector<IndexTupleType>>(other._indices);
144
145 return *this;
146 }
147
149 virtual ~IndexSet()
150 {
151 }
152
155 {
156 return IndexSet(this->_index_bound, this->_indices);
157 }
158
160 std::size_t bytes() const
161 {
162 return _indices.size() * sizeof(IndexTupleType);
163 }
164
170 int get_num_indices() const
171 {
172 return num_indices_;
173 }
174
181 {
182 return Index(_indices.size());
183 }
184
191 {
192 return _index_bound;
193 }
194
201 {
202 return _indices.data();
203 }
204
207 {
208 return _indices.data();
209 }
210
221 {
223 return _indices[i];
224 }
225
228 {
230 return _indices[i];
231 }
232
246 {
248 ASSERT(j < num_indices);
249 return _indices[i][j];
250 }
251
252 // copy-paste documentation because \copydoc does not work with operators
265 const Index& operator()(Index i, int j) const
266 {
268 ASSERT(j < num_indices);
269 return _indices[i][j];
270 }
271
279 {
280 _index_bound = bound;
281 }
282
292 void permute(const Adjacency::Permutation& perm, const Adjacency::Permutation& inv_perm_face)
293 {
294 if(_indices.empty())
295 return;
296
297 // first, permute the actual index tuples by the forward permutation
298 if(!perm.empty())
299 {
300 XASSERT(perm.size() == get_num_entities());
301 perm.apply(_indices.data());
302 }
303
304 // now, permute all indices by the inverse face permutation
305 if(!inv_perm_face.empty())
306 {
307 XASSERT(inv_perm_face.size() == get_index_bound());
308 const Index n = Index(_indices.size());
309 for(Index i(0); i < n; ++i)
310 _indices.at(i).permute_map(inv_perm_face);
311 }
312 }
313
319 static String name()
320 {
321 return "IndexSet<" + stringify(num_indices_) + ">";
322 }
323
324 /* *************************************************************************************** */
325 /* A D J A C T O R I N T E R F A C E I M P L E M E N T A T I O N */
326 /* *************************************************************************************** */
329 {
330 return get_num_entities();
331 }
332
335 {
336 return _index_bound;
337 }
338
340 ImageIterator image_begin(Index domain_node) const
341 {
342 ASSERT(domain_node < get_num_entities());
343 return reinterpret_cast<const Index*>(&_indices.data()[domain_node]);
344 }
345
347 ImageIterator image_end(Index domain_node) const
348 {
349 ASSERT(domain_node < get_num_entities());
350 return reinterpret_cast<const Index*>(&_indices.data()[domain_node+1]);
351 }
352 }; // class IndexSet<...>
353
354 /* ***************************************************************************************** */
355 /* ***************************************************************************************** */
356 /* ***************************************************************************************** */
357
359 template<
360 typename Shape_,
361 int face_dim_ = Shape_::dimension - 1>
362 class IndexSetWrapper :
363 public IndexSetWrapper<Shape_, face_dim_ - 1>
364 {
365 static_assert(face_dim_ < Shape_::dimension, "invalid face dimension");
366 static_assert(face_dim_ > 0, "invalid face dimension");
367
368 public:
369 typedef IndexSetWrapper<Shape_, face_dim_ - 1> BaseClass;
370 typedef IndexSet<Shape::FaceTraits<Shape_, face_dim_>::count> IndexSetType;
371
372 protected:
373 IndexSetType _index_set;
374
375 public:
376 IndexSetWrapper() :
377 BaseClass(),
378 _index_set()
379 {
380 }
381
382 explicit IndexSetWrapper(const Index num_entities[]) :
383 BaseClass(num_entities),
384 _index_set(
385 num_entities[Shape_::dimension],
386 num_entities[face_dim_])
387 {
388 }
389
390 template<std::size_t m_>
391 explicit IndexSetWrapper(const std::array<Index, m_>& num_entities) :
392 BaseClass(num_entities),
393 _index_set(
394 num_entities[Shape_::dimension],
395 num_entities[face_dim_])
396 {
397 static_assert(int(m_) > Shape_::dimension, "invalid array size");
398 }
399
400 IndexSetWrapper(IndexSetWrapper&& other) :
401 BaseClass(std::forward<BaseClass>(other)),
402 _index_set(std::forward<IndexSetType>(other._index_set))
403 {
404 }
405
406 IndexSetWrapper& operator=(IndexSetWrapper&& other)
407 {
408 if(this == &other)
409 return *this;
410
411 BaseClass::operator=(std::forward<BaseClass>(other));
412 _index_set = std::forward<IndexSetType>(other._index_set);
413
414 return *this;
415 }
416
417 virtual ~IndexSetWrapper()
418 {
419 }
420
421 void clone(const IndexSetWrapper& other)
422 {
423 BaseClass::clone(other);
424 this->_index_set = other._index_set.clone();
425 }
426
427 IndexSetWrapper clone() const
428 {
429 IndexSetWrapper isw;
430 isw.clone(*this);
431 return isw;
432 }
433
434 template<int face_dim__>
435 IndexSet<Shape::FaceTraits<Shape_, face_dim__>::count>& get_index_set()
436 {
437 static_assert(face_dim__ >= 0, "invalid face dimension");
438 static_assert(face_dim__ < Shape_::dimension, "invalid face dimension");
439 return IndexSetWrapper<Shape_, face_dim__>::_index_set;
440 }
441
442 template<int face_dim__>
443 const IndexSet<Shape::FaceTraits<Shape_, face_dim__>::count>& get_index_set() const
444 {
445 static_assert(face_dim__ >= 0, "invalid face dimension");
446 static_assert(face_dim__ < Shape_::dimension, "invalid face dimension");
447 return IndexSetWrapper<Shape_, face_dim__>::_index_set;
448 }
449
450 template<std::size_t np_>
451 void permute(const Adjacency::Permutation& shape_perm,
452 const std::array<Adjacency::Permutation, np_>& inv_perm)
453 {
454 BaseClass::permute(shape_perm, inv_perm);
455 _index_set.permute(shape_perm, inv_perm.at(face_dim_));
456 }
457
458 static String name()
459 {
460 return "IndexSetWrapper<" + Shape_::name() + "," + stringify(face_dim_) + ">";
461 }
462
463 std::size_t bytes() const
464 {
465 return BaseClass::bytes() + _index_set.bytes();
466 }
467 };
468
469 template<typename Shape_>
470 class IndexSetWrapper<Shape_, 0>
471 {
472 static_assert(Shape_::dimension > 0, "invalid shape dimension");
473
474 public:
475 typedef IndexSet<Shape::FaceTraits<Shape_, 0>::count> IndexSetType;
476
477 protected:
478 IndexSetType _index_set;
479
480 public:
481 IndexSetWrapper() :
482 _index_set()
483 {
484 }
485
486 explicit IndexSetWrapper(const Index num_entities[]) :
487 _index_set(
488 num_entities[Shape_::dimension],
489 num_entities[0])
490 {
491 }
492
493 template<std::size_t m_>
494 explicit IndexSetWrapper(const std::array<Index, m_>& num_entities) :
495 _index_set(
496 num_entities[Shape_::dimension],
497 num_entities[0])
498 {
499 static_assert(int(m_) > Shape_::dimension, "invalid array size");
500 }
501
502 IndexSetWrapper(IndexSetWrapper&& other) :
503 _index_set(std::forward<IndexSetType>(other._index_set))
504 {
505 }
506
507 IndexSetWrapper& operator=(IndexSetWrapper&& other)
508 {
509 if(this == &other)
510 return *this;
511
512 _index_set = std::forward<IndexSetType>(other._index_set);
513
514 return *this;
515 }
516
517 virtual ~IndexSetWrapper()
518 {
519 }
520
521 void clone(const IndexSetWrapper& other)
522 {
523 this->_index_set = other._index_set.clone();
524 }
525
526 IndexSetWrapper clone() const
527 {
528 IndexSetWrapper isw;
529 isw.clone(*this);
530 return isw;
531 }
532
533 template<int face_dim__>
534 IndexSet<Shape::FaceTraits<Shape_, face_dim__>::count>& get_index_set()
535 {
536 static_assert(face_dim__ == 0, "invalid face dimension");
537 return IndexSetWrapper<Shape_, face_dim__>::_index_set;
538 }
539
540 template<int face_dim__>
541 const IndexSet<Shape::FaceTraits<Shape_, face_dim__>::count>& get_index_set() const
542 {
543 static_assert(face_dim__ == 0, "invalid face dimension");
544 return IndexSetWrapper<Shape_, face_dim__>::_index_set;
545 }
546
547 template<std::size_t np_>
548 void permute(const Adjacency::Permutation& shape_perm,
549 const std::array<Adjacency::Permutation, np_>& inv_perm)
550 {
551 _index_set.permute(shape_perm, inv_perm.at(0));
552 }
553
554 static String name()
555 {
556 return "IndexSetWrapper<" + Shape_::name() + ",0>";
557 }
558
559 std::size_t bytes() const
560 {
561 return _index_set.bytes();
562 }
563 };
564
565 /* ***************************************************************************************** */
566 /* ***************************************************************************************** */
567 /* ***************************************************************************************** */
568
598 template<typename Shape_>
599 class IndexSetHolder :
600 public IndexSetHolder<typename Shape::FaceTraits<Shape_, Shape_::dimension - 1>::ShapeType>
601 {
602 public:
603 typedef IndexSetHolder<typename Shape::FaceTraits<Shape_, Shape_::dimension - 1>::ShapeType> BaseClass;
604 typedef IndexSetWrapper<Shape_> IndexSetWrapperType;
605
606 template<
607 int cell_dim_,
608 int face_dim_>
609 struct IndexSet
610 {
612 typedef Geometry::IndexSet
613 <
614 Shape::FaceTraits
615 <
616 typename Shape::FaceTraits<Shape_, cell_dim_> ::ShapeType,
617 face_dim_
618 >
619 ::count
620 > Type;
621 }; // struct IndexSet<...>
622
623 protected:
624 IndexSetWrapperType _index_set_wrapper;
625
626 public:
627 IndexSetHolder() :
628 BaseClass(),
629 _index_set_wrapper()
630 {
631 }
632
633 explicit IndexSetHolder(const Index num_entities[]) :
634 BaseClass(num_entities),
635 _index_set_wrapper(num_entities)
636 {
637 }
638
639 template<std::size_t m_>
640 explicit IndexSetHolder(const std::array<Index, m_>& num_entities) :
641 BaseClass(num_entities),
642 _index_set_wrapper(num_entities)
643 {
644 static_assert(int(m_) > Shape_::dimension, "invalid array size");
645 }
646
647 IndexSetHolder(IndexSetHolder&& other) :
648 BaseClass(std::forward<BaseClass>(other)),
649 _index_set_wrapper(std::forward<IndexSetWrapperType>(other._index_set_wrapper))
650 {
651 }
652
653 IndexSetHolder& operator=(IndexSetHolder&& other)
654 {
655 if(this == &other)
656 return *this;
657
658 BaseClass::operator=(std::forward<BaseClass>(other));
659 _index_set_wrapper = std::forward<IndexSetWrapperType>(other._index_set_wrapper);
660
661 return *this;
662 }
663
664 virtual ~IndexSetHolder()
665 {
666 }
667
668 void clone(const IndexSetHolder& other)
669 {
670 BaseClass::clone(other);
671 this->_index_set_wrapper.clone(other._index_set_wrapper);
672 }
673
674 IndexSetHolder clone() const
675 {
676 IndexSetHolder ish;
677 ish.clone(*this);
678 return ish;
679 }
680
681 template<int shape_dim_>
682 IndexSetWrapper<typename Shape::FaceTraits<Shape_, shape_dim_>::ShapeType>& get_index_set_wrapper()
683 {
684 static_assert(shape_dim_ > 0, "invalid shape dimension");
685 static_assert(shape_dim_ <= Shape_::dimension, "invalid shape dimension");
686 typedef typename Shape::FaceTraits<Shape_, shape_dim_>::ShapeType ShapeType;
687 return IndexSetHolder<ShapeType>::_index_set_wrapper;
688 }
689
690 template<int shape_dim_>
691 const IndexSetWrapper<typename Shape::FaceTraits<Shape_, shape_dim_>::ShapeType>& get_index_set_wrapper() const
692 {
693 static_assert(shape_dim_ > 0, "invalid shape dimension");
694 static_assert(shape_dim_ <= Shape_::dimension, "invalid shape dimension");
695 typedef typename Shape::FaceTraits<Shape_, shape_dim_>::ShapeType ShapeType;
696 return IndexSetHolder<ShapeType>::_index_set_wrapper;
697 }
698
699 template<
700 int cell_dim_,
701 int face_dim_>
702 Geometry::IndexSet<
703 Shape::FaceTraits<
704 typename Shape::FaceTraits<
705 Shape_,
706 cell_dim_>
707 ::ShapeType,
708 face_dim_>
709 ::count>&
710 get_index_set()
711 {
712 static_assert(cell_dim_ <= Shape_::dimension, "invalid cell dimension");
713 static_assert(face_dim_ < cell_dim_, "invalid face/cell dimension");
714 static_assert(face_dim_ >= 0, "invalid face dimension");
715 return get_index_set_wrapper<cell_dim_>().template get_index_set<face_dim_>();
716 }
717
718 template<
719 int cell_dim_,
720 int face_dim_>
721 const Geometry::IndexSet<
722 Shape::FaceTraits<
723 typename Shape::FaceTraits<
724 Shape_,
725 cell_dim_>
726 ::ShapeType,
727 face_dim_>
728 ::count>&
729 get_index_set() const
730 {
731 static_assert(cell_dim_ <= Shape_::dimension, "invalid cell dimension");
732 static_assert(face_dim_ < cell_dim_, "invalid face/cell dimension");
733 static_assert(face_dim_ >= 0, "invalid face dimension");
734 return get_index_set_wrapper<cell_dim_>().template get_index_set<face_dim_>();
735 }
736
737 template<std::size_t np_>
738 void permute(const std::array<Adjacency::Permutation, np_>& perms,
739 const std::array<Adjacency::Permutation, np_>& inv_perms)
740 {
741 BaseClass::permute(perms, inv_perms);
742 _index_set_wrapper.permute(perms.at(Shape_::dimension), inv_perms);
743 }
744
745 static String name()
746 {
747 return "IndexSetHolder<" + Shape_::name() + ">";
748 }
749
750 std::size_t bytes() const
751 {
752 return BaseClass::bytes() + _index_set_wrapper.bytes();
753 }
754 };
755
756 template<>
757 class IndexSetHolder<Shape::Vertex>
758 {
759 public:
760 IndexSetHolder()
761 {
762 }
763
764 explicit IndexSetHolder(const Index* /*num_entities*/)
765 {
766 }
767
768 template<std::size_t m_>
769 explicit IndexSetHolder(const std::array<Index, m_>&)
770 {
771 }
772
773 IndexSetHolder(IndexSetHolder&&)
774 {
775 }
776
777 IndexSetHolder& operator=(IndexSetHolder&&)
778 {
779 return *this;
780 }
781
782 virtual ~IndexSetHolder()
783 {
784 }
785
786 void clone(const IndexSetHolder&)
787 {
788 }
789
790 IndexSetHolder clone() const
791 {
792 return IndexSetHolder();
793 }
794
795 template<std::size_t np_>
796 void permute(const std::array<Adjacency::Permutation, np_>&,
797 const std::array<Adjacency::Permutation, np_>&)
798 {
799 }
800
801 static String name()
802 {
803 return "IndexSetHolder<Vertex>";
804 }
805
806 std::size_t bytes() const
807 {
808 return std::size_t(0);
809 }
810 };
811
838 template<int shape_dim_, int co_dim_>
839 struct IndexSetHolderDimensionUpdater
840 {
850 template<typename IndexSetHolderType_>
851 static void update(IndexSetHolderType_& DOXY(ish))
852 {
853 //dummy
854 }
855 };
856
861 template<int shape_dim_>
862 struct IndexSetHolderDimensionUpdater<shape_dim_,1>
863 {
864 template<typename IndexSetHolderType_>
865 static void update(IndexSetHolderType_& ish)
866 {
867 auto& vert_at_subshape_index_set(ish.template get_index_set<shape_dim_-1,0>());
868
869 Index num_shapes(ish.template get_index_set<shape_dim_,0>().get_num_entities());
870 // Get the type of the IndexSet to dimensions <Shape_::dimension, face_dim_>
871 typename std::remove_reference<decltype( (ish.template get_index_set<shape_dim_, shape_dim_-1>()) )>::type
872 // The output IndexSet has num_shapes entities and the maximum index is the number of subshapes
873 subshape_at_shape_index_set(num_shapes, vert_at_subshape_index_set.get_num_entities());
874
875 // Replace the corresponding IndexSet in the IndexSetHolder by the just generated IndexSet of the right
876 // size
877 ish.template get_index_set<shape_dim_, shape_dim_-1>() = std::move(subshape_at_shape_index_set);
878 }
879 };
880
885 template<int shape_dim_>
886 struct IndexSetHolderDimensionUpdater<shape_dim_,2>
887 {
888 template<typename IndexSetHolderType_>
889 static void update(IndexSetHolderType_& ish)
890 {
891 // Update edge\@cell IndexSet dimensions
892 // vert\@edge IndexSet
893 auto& vert_at_subshape_index_set(ish.template get_index_set<shape_dim_-2,0>());
894 // Number of cells
895 Index num_shapes(ish.template get_index_set<shape_dim_,0>().get_num_entities());
896 // Get the type of the IndexSet to dimensions <Shape_::dimension, Shape::dimension-2>
897 typename std::remove_reference<decltype( (ish.template get_index_set<shape_dim_, shape_dim_-2>()) )>::type
898 // The output IndexSet has num_shapes entities and the maximum index is the number of subshapes (=edges)
899 subshape_at_shape_index_set(num_shapes, vert_at_subshape_index_set.get_num_entities());
900 // Replace the corresponding IndexSet in the IndexSetHolder by the just generated IndexSet of the right
901 // size
902 ish.template get_index_set<shape_dim_, shape_dim_-2>() = std::move(subshape_at_shape_index_set);
903
904 // Now do it again for the edge\@face IndexSet
905 // Number of faces
906 Index num_intermediate_shapes(ish.template get_index_set<shape_dim_-1,0>().get_num_entities());
907 // Get the type of the IndexSet to dimensions <Shape_::dimension-1, Shape::dimension-2>
908 typename std::remove_reference<decltype( (ish.template get_index_set<shape_dim_-1, shape_dim_-2>()) )>::type
909 // The output IndexSet has num_intermediate_shapes entities and the maximum index is the number of subshapes
910 subshape_at_intermediate_index_set(
911 num_intermediate_shapes, vert_at_subshape_index_set.get_num_entities());
912 // Replace the corresponding IndexSet in the IndexSetHolder by the just generated IndexSet of the right
913 // size
914 ish.template get_index_set<shape_dim_-1, shape_dim_-2>() = std::move(subshape_at_intermediate_index_set);
915 }
916 };
917
934 template<int dim_>
935 struct NumEntitiesExtractor
936 {
950 template<typename IndexSetHolderType_>
951 static void set_num_entities(const IndexSetHolderType_& ish, Index* num_entities)
952 {
953 // The number of entities of dimension dim_ is the length of the vertex\@shape[dim_] IndexSet
954 num_entities[dim_] = ish.template get_index_set<dim_,0>().get_num_entities();
955 // Recurse down
956 NumEntitiesExtractor<dim_-1>::set_num_entities(ish, num_entities);
957 }
958
959 template<typename IndexSetHolderType_>
960 static void set_num_entities_with_numverts(const IndexSetHolderType_& ish, Index* num_entities)
961 {
962 // The number of entities of dimension dim_ is the length of the vertex\@shape[dim_] IndexSet
963 num_entities[dim_] = ish.template get_index_set<dim_,0>().get_num_entities();
964 // Recurse down
965 NumEntitiesExtractor<dim_-1>::set_num_entities_with_numverts(ish, num_entities);
966 }
967 };
968
975 template<>
976 struct NumEntitiesExtractor<1>
977 {
978 template<typename IndexSetHolderType_>
979 static void set_num_entities(const IndexSetHolderType_& ish, Index* num_entities)
980 {
981 num_entities[1] = ish.template get_index_set<1,0>().get_num_entities();
982 }
983
984 template<typename IndexSetHolderType_>
985 static void set_num_entities_with_numverts(const IndexSetHolderType_& ish, Index* num_entities)
986 {
987 num_entities[0] = ish.template get_index_set<1,0>().get_index_bound();
988 num_entities[1] = ish.template get_index_set<1,0>().get_num_entities();
989 }
990 };
992 } // namespace Geometry
993} // namespace FEAT
#define ASSERT(expr)
Debug-Assertion macro definition.
Definition: assertion.hpp:229
#define XASSERT(expr)
Assertion macro definition.
Definition: assertion.hpp:262
Index size() const
returns the size of the permutation
bool empty() const
Checks whether the permutation is empty.
void apply(Tx_ *x, bool invert=false) const
Applies In-Situ permutation.
Conformal Index-Set class template.
Definition: index_set.hpp:82
Index get_num_nodes_domain() const
Returns the number of domain nodes.
Definition: index_set.hpp:328
Index & operator()(Index i, int j)
Maps a face index.
Definition: index_set.hpp:245
IndexSet(IndexSet &&other)
move constructor
Definition: index_set.hpp:129
static constexpr int num_indices
number of indices per entry
Definition: index_set.hpp:87
IndexSet(Index num_entities=0, Index index_bound=0)
Constructor.
Definition: index_set.hpp:119
IndexSet(Index idx_bnd, const std::vector< IndexTupleType > &idx)
internal clone constructor
Definition: index_set.hpp:104
std::size_t bytes() const
Definition: index_set.hpp:160
const Index * ImageIterator
ImageIterator type for Adjactor interface implementation.
Definition: index_set.hpp:93
virtual ~IndexSet()
virtual destructor
Definition: index_set.hpp:149
void set_index_bound(Index bound)
Sets the index bound.
Definition: index_set.hpp:278
IndexTupleType * get_indices()
Returns the index vector array.
Definition: index_set.hpp:200
Index get_index_bound() const
Returns the index bound.
Definition: index_set.hpp:190
std::vector< IndexTupleType > _indices
index vector array
Definition: index_set.hpp:101
const Index & operator()(Index i, int j) const
Maps a face index.
Definition: index_set.hpp:265
const IndexTupleType & operator[](Index i) const
Returns a reference to an index tuple.
Definition: index_set.hpp:227
ImageIterator image_begin(Index domain_node) const
Returns an iterator for the first adjacent image node.
Definition: index_set.hpp:340
void permute(const Adjacency::Permutation &perm, const Adjacency::Permutation &inv_perm_face)
Permutes this index set in-situ.
Definition: index_set.hpp:292
const IndexTupleType * get_indices() const
Returns the index vector array.
Definition: index_set.hpp:206
IndexTupleType & operator[](Index i)
Returns a reference to an index tuple.
Definition: index_set.hpp:220
IndexTuple< num_indices > IndexTupleType
index tuple type
Definition: index_set.hpp:90
Index get_num_entities() const
Returns the number of entities.
Definition: index_set.hpp:180
Index get_num_nodes_image() const
Returns the number of image nodes.
Definition: index_set.hpp:334
static String name()
Returns the name of the class.
Definition: index_set.hpp:319
IndexSet & operator=(IndexSet &&other)
move-assignment operator
Definition: index_set.hpp:136
ImageIterator image_end(Index domain_node) const
Returns an iterator for the first position past the last adjacent image node.
Definition: index_set.hpp:347
int get_num_indices() const
Returns the number of indices per entity.
Definition: index_set.hpp:170
IndexSet clone() const
Definition: index_set.hpp:154
String class implementation.
Definition: string.hpp:46
@ other
generic/other permutation strategy
Type
bitmask for zfp header
Definition: pack.hpp:81
FEAT namespace.
Definition: adjactor.hpp:12
String stringify(const T_ &item)
Converts an item into a String.
Definition: string.hpp:944
std::uint64_t Index
Index data type.
Index Tuple class template.
Definition: index_set.hpp:35
const Index & operator[](int i) const
access operator
Definition: index_set.hpp:53
Index & operator[](int i)
access operator
Definition: index_set.hpp:45
static constexpr int num_indices
number of indices per tuple
Definition: index_set.hpp:39
Index indices[num_indices]
indices array
Definition: index_set.hpp:42