deal.II version GIT relicensing-2165-gc91f007519 2024-11-20 01:40:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
array_view.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2015 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_array_view_h
16#define dealii_array_view_h
17
18#include <deal.II/base/config.h>
19
24#include <deal.II/base/tensor.h>
25
26#include <boost/container/small_vector.hpp>
27
28#include <array>
29#include <type_traits>
30#include <vector>
31
33
34// Forward declaration
35template <class T>
36class AlignedVector;
37
38template <int N, typename T>
39class Table;
40
41template <typename number>
43
44
86template <typename ElementType, typename MemorySpaceType = MemorySpace::Host>
88{
89public:
94 using value_type = ElementType;
95
100
104 using const_iterator = const ElementType *;
105
110
134
145 const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType> &view);
146
151 explicit ArrayView(value_type &element);
152
153#ifdef DEAL_II_HAVE_CXX20
171 template <typename ContiguousContainer>
172 ArrayView(const ContiguousContainer &container)
173 requires(std::is_same_v<
174 std::remove_cv_t<ElementType>,
175 std::remove_cv_t<typename ContiguousContainer::value_type>> &&
176 std::is_const_v<ElementType> &&
178
196 template <typename ContiguousContainer>
197 ArrayView(ContiguousContainer &container)
198 requires(std::is_same_v<
199 std::remove_cv_t<ElementType>,
200 std::remove_cv_t<typename ContiguousContainer::value_type>> &&
202
203#else
204
205
223 template <typename ContiguousContainer,
224 typename = decltype(std::data(std::declval<ContiguousContainer>())),
225 typename = decltype(std::size(std::declval<ContiguousContainer>())),
226 typename = std::enable_if_t<
227 std::is_same_v<
228 std::remove_cv_t<ElementType>,
229 std::remove_cv_t<typename ContiguousContainer::value_type>> &&
230 std::is_const_v<ElementType>>>
231 ArrayView(const ContiguousContainer &container);
232
250 template <typename ContiguousContainer,
251 typename = decltype(std::data(std::declval<ContiguousContainer>())),
252 typename = decltype(std::size(std::declval<ContiguousContainer>())),
253 typename = std::enable_if_t<std::is_same_v<
254 std::remove_cv_t<ElementType>,
255 std::remove_cv_t<typename ContiguousContainer::value_type>>>>
256 ArrayView(ContiguousContainer &container);
257
258#endif
259
274 template <std::size_t N>
275 ArrayView(value_type (&array)[N]);
276
321 const std::initializer_list<std::remove_cv_t<value_type>> &initializer_list)
322 DEAL_II_CXX20_REQUIRES(std::is_const_v<ElementType>);
323
343 void
345
359 bool
361 const ArrayView<const value_type, MemorySpaceType> &other_view) const;
362
376 bool
377 operator==(const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType>
378 &other_view) const;
379
396 bool
398 const ArrayView<const value_type, MemorySpaceType> &other_view) const;
399
413 bool
414 operator!=(const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType>
415 &other_view) const;
416
421 std::size_t
422 size() const;
423
427 bool
428 empty() const;
429
435 data() const noexcept;
436
441 begin() const;
442
447 end() const;
448
453 cbegin() const;
454
459 cend() const;
460
473 value_type &
474 operator[](const std::size_t i) const;
475
476private:
482
487
488 friend class ArrayView<const ElementType, MemorySpaceType>;
489};
490
491
492
493//---------------------------------------------------------------------------
494
495
496template <typename ElementType, typename MemorySpaceType>
497inline ArrayView<ElementType, MemorySpaceType>::ArrayView()
498 : starting_element(nullptr)
499 , n_elements(0)
500{}
501
502
503
504template <typename ElementType, typename MemorySpaceType>
507 const std::size_t n_elements)
508 :
509#ifdef DEBUG
511#else
513#endif
515{}
516
517
518
519template <typename ElementType, typename MemorySpaceType>
520inline void
522 const std::size_t n_elements)
523{
524#ifdef DEBUG
525 if (n_elements > 0)
526 this->starting_element = starting_element;
527 else
528 this->starting_element = nullptr;
529#else
530 this->starting_element = starting_element;
531#endif
532 this->n_elements = n_elements;
533}
534
535
536
537template <typename ElementType, typename MemorySpaceType>
539 : starting_element(&element)
540 , n_elements(1)
541{}
542
543
544
545template <typename ElementType, typename MemorySpaceType>
547 const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType> &view)
548 : starting_element(view.starting_element)
549 , n_elements(view.n_elements)
550{}
551
552
553#ifdef DEAL_II_HAVE_CXX20
554
555template <typename ElementType, typename MemorySpaceType>
556template <typename ContiguousContainer>
558 const ContiguousContainer &container)
559 requires(std::is_same_v<
560 std::remove_cv_t<ElementType>,
561 std::remove_cv_t<typename ContiguousContainer::value_type>> &&
562 std::is_const_v<ElementType> &&
564 : // use delegating constructor
565 ArrayView(container.data(), container.size())
566{}
567
568
569
570template <typename ElementType, typename MemorySpaceType>
571template <typename ContiguousContainer>
573 ContiguousContainer &container)
574 requires(std::is_same_v<
575 std::remove_cv_t<ElementType>,
576 std::remove_cv_t<typename ContiguousContainer::value_type>> &&
578 : // use delegating constructor
579 ArrayView(std::data(container), std::size(container))
580{}
581
582
583#else
584
585template <typename ElementType, typename MemorySpaceType>
586template <typename ContiguousContainer, typename, typename, typename>
588 const ContiguousContainer &container)
589 : // use delegating constructor
590 ArrayView(container.data(), container.size())
591{}
592
593
594
595template <typename ElementType, typename MemorySpaceType>
596template <typename ContiguousContainer, typename, typename, typename>
598 ContiguousContainer &container)
599 : // use delegating constructor
600 ArrayView(std::data(container), std::size(container))
601{}
602
603#endif
604
605
606
607template <typename ElementType, typename MemorySpaceType>
608template <std::size_t N>
610 ElementType (&array)[N])
611 : ArrayView(&array[0], N)
612{}
613
614
615template <typename ElementType, typename MemorySpaceType>
617 const std::initializer_list<std::remove_cv_t<value_type>> &initializer)
618 DEAL_II_CXX20_REQUIRES(std::is_const_v<ElementType>)
619 : // use delegating constructor
620 ArrayView(initializer.begin(), initializer.size())
621{}
622
623
624
625template <typename ElementType, typename MemorySpaceType>
626inline bool
628 const ArrayView<const value_type, MemorySpaceType> &other_view) const
629{
630 return (other_view.data() == starting_element) &&
631 (other_view.size() == n_elements);
632}
633
634
635
636template <typename ElementType, typename MemorySpaceType>
637inline bool
639 const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType> &other_view)
640 const
641{
642 return (other_view.data() == starting_element) &&
643 (other_view.size() == n_elements);
644}
645
646
647
648template <typename ElementType, typename MemorySpaceType>
649inline bool
651 const ArrayView<const value_type, MemorySpaceType> &other_view) const
652{
653 return !(*this == other_view);
654}
655
656
657
658template <typename ElementType, typename MemorySpaceType>
662{
663 if (n_elements == 0)
664 return nullptr;
665 else
666 return starting_element;
667}
668
669
670
671template <typename ElementType, typename MemorySpaceType>
672inline bool
674 const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType> &other_view)
675 const
676{
677 return !(*this == other_view);
678}
679
680
681
682template <typename ElementType, typename MemorySpaceType>
683inline std::size_t
685{
686 return n_elements;
687}
688
689
690
691template <typename ElementType, typename MemorySpaceType>
692inline bool
694{
695 return n_elements == 0;
696}
697
698
699
700template <typename ElementType, typename MemorySpaceType>
703{
704 return starting_element;
705}
706
707
708
709template <typename ElementType, typename MemorySpaceType>
712{
713 return starting_element + n_elements;
714}
715
716
717
718template <typename ElementType, typename MemorySpaceType>
721{
722 return starting_element;
723}
724
725
726
727template <typename ElementType, typename MemorySpaceType>
730{
731 return starting_element + n_elements;
732}
733
734
735
736template <typename ElementType, typename MemorySpaceType>
739{
740 AssertIndexRange(i, n_elements);
741
742 return *(starting_element + i);
743}
744
745
746
752template <typename ElementType, std::size_t stride = 1>
754{
755public:
760 using value_type = ElementType;
761
782
787 std::size_t
788 size() const;
789
793 bool
794 empty() const;
795
800 value_type *
801 data() const noexcept;
802
815 value_type &
816 operator[](const std::size_t i) const;
817
818protected:
824
829};
830
831
832
833template <typename ElementType, std::size_t stride>
834typename StridedArrayView<ElementType, stride>::value_type &
835StridedArrayView<ElementType, stride>::operator[](const std::size_t i) const
836{
837 AssertIndexRange(i, this->n_elements);
838
839 return *(this->starting_element + stride * i);
840}
841
842
843
844template <typename ElementType, std::size_t stride>
847{
848 if (this->n_elements == 0)
849 return nullptr;
850 else
851 return this->starting_element;
852}
853
854
855
856template <typename ElementType, std::size_t stride>
857bool
859{
860 return this->n_elements == 0;
861}
862
863
864
865template <typename ElementType, std::size_t stride>
866std::size_t
868{
869 return this->n_elements;
870}
871
872
873
874template <typename ElementType, std::size_t stride>
881
882
883
884#ifndef DOXYGEN
885namespace internal
886{
887 namespace ArrayViewHelper
888 {
894 template <class Iterator>
895 bool
896 is_contiguous(const Iterator &first, const Iterator &last)
897 {
898 const auto n = std::distance(first, last);
899 for (std::decay_t<decltype(n)> i = 0; i < n; ++i)
900 if (std::addressof(*(std::next(first, i))) !=
901 std::next(std::addressof(*first), i))
902 return false;
903 return true;
904 }
905
906
917 template <class T>
918 constexpr bool
919 is_contiguous(T *, T *)
920 {
921 return true;
922 }
923 } // namespace ArrayViewHelper
924} // namespace internal
925#endif
926
927
928
945template <typename Iterator, typename MemorySpaceType = MemorySpace::Host>
947 std::remove_reference_t<typename std::iterator_traits<Iterator>::reference>,
948 MemorySpaceType>
949make_array_view(const Iterator begin, const Iterator end)
950{
951 static_assert(
952 std::is_same_v<typename std::iterator_traits<Iterator>::iterator_category,
953 typename std::random_access_iterator_tag>
954#ifdef DEAL_II_HAVE_CXX20
955 ||
956 std::is_same_v<typename std::iterator_traits<Iterator>::iterator_category,
957 typename std::contiguous_iterator_tag>
958#endif
959 ,
960 "The provided iterator needs to be a random access iterator.");
961 Assert(begin <= end,
963 "The beginning of the array view needs to be before the end."));
964 Assert(internal::ArrayViewHelper::is_contiguous(begin, end),
965 ExcMessage("The provided range isn't contiguous in memory!"));
966 // the reference type, not the value type, knows the constness of the iterator
967 return ArrayView<
968 std::remove_reference_t<typename std::iterator_traits<Iterator>::reference>,
969 MemorySpaceType>(std::addressof(*begin), end - begin);
970}
971
972
973
983template <typename ElementType, typename MemorySpaceType = MemorySpace::Host>
985make_array_view(ElementType *const begin, ElementType *const end)
986{
987 Assert(begin <= end,
989 "The beginning of the array view needs to be before the end."));
990 return ArrayView<ElementType, MemorySpaceType>(begin, end - begin);
991}
992
993
994
1005template <typename Number, typename MemorySpaceType>
1008{
1009 return make_array_view(array_view.cbegin(), array_view.cend());
1010}
1011
1012
1013
1024template <typename Number, typename MemorySpaceType>
1027{
1028 return make_array_view(array_view.begin(), array_view.end());
1029}
1030
1031
1032
1046template <typename ElementType, int N>
1048make_array_view(ElementType (&array)[N])
1049{
1050 return ArrayView<ElementType>(array, N);
1051}
1052
1053
1054
1069template <typename ElementType>
1072{
1073 return ArrayView<ElementType>(vector.begin(), vector.size());
1074}
1075
1076
1077
1092template <typename ElementType>
1095{
1096 return ArrayView<const ElementType>(vector.begin(), vector.size());
1097}
1098
1099
1100
1115template <typename ElementType>
1117make_array_view(std::vector<ElementType> &vector)
1118{
1119 return ArrayView<ElementType>(vector.data(), vector.size());
1120}
1121
1122
1123
1138template <typename ElementType>
1140make_array_view(const std::vector<ElementType> &vector)
1141{
1142 return ArrayView<const ElementType>(vector.data(), vector.size());
1143}
1144
1145
1146
1166template <typename ElementType>
1168make_array_view(std::vector<ElementType> &vector,
1169 const std::size_t starting_index,
1170 const std::size_t size_of_view)
1171{
1172 Assert(starting_index + size_of_view <= vector.size(),
1173 ExcMessage("The starting index and size of the view you want to "
1174 "create would lead to a view that extends beyond the end "
1175 "of the given vector."));
1176 return ArrayView<ElementType>(&vector[starting_index], size_of_view);
1177}
1178
1179
1180
1200template <typename ElementType>
1202make_array_view(const std::vector<ElementType> &vector,
1203 const std::size_t starting_index,
1204 const std::size_t size_of_view)
1205{
1206 Assert(starting_index + size_of_view <= vector.size(),
1207 ExcMessage("The starting index and size of the view you want to "
1208 "create would lead to a view that extends beyond the end "
1209 "of the given vector."));
1210 return ArrayView<const ElementType>(&vector[starting_index], size_of_view);
1211}
1212
1213
1214
1222template <typename ElementType>
1225{
1226 return ArrayView<ElementType>(vector.data(), vector.size());
1227}
1228
1229
1230
1238template <typename ElementType>
1241{
1242 return ArrayView<const ElementType>(vector.data(), vector.size());
1243}
1244
1245
1246
1254template <typename ElementType>
1257 const std::size_t starting_index,
1258 const std::size_t size_of_view)
1259{
1260 Assert(starting_index + size_of_view <= vector.size(),
1261 ExcMessage("The starting index and size of the view you want to "
1262 "create would lead to a view that extends beyond the end "
1263 "of the given vector."));
1264 return ArrayView<ElementType>(&vector[starting_index], size_of_view);
1265}
1266
1267
1268
1276template <typename ElementType>
1279 const std::size_t starting_index,
1280 const std::size_t size_of_view)
1281{
1282 Assert(starting_index + size_of_view <= vector.size(),
1283 ExcMessage("The starting index and size of the view you want to "
1284 "create would lead to a view that extends beyond the end "
1285 "of the given vector."));
1286 return ArrayView<const ElementType>(&vector[starting_index], size_of_view);
1287}
1288
1289
1290
1305template <typename ElementType, std::size_t N>
1307make_array_view(std::array<ElementType, N> &array)
1308{
1309 return ArrayView<ElementType>(array);
1310}
1311
1312
1313
1328template <typename ElementType, std::size_t N>
1330make_array_view(const std::array<ElementType, N> &array)
1331{
1332 return ArrayView<const ElementType>(array);
1333}
1334
1335
1336
1353template <typename ElementType>
1356 const typename Table<2, ElementType>::size_type row)
1357{
1358 AssertIndexRange(row, table.size()[0]);
1359 return ArrayView<ElementType>(&table[row][0], table.size()[1]);
1360}
1361
1362
1363
1380template <typename ElementType>
1383{
1384 return ArrayView<ElementType>(&table[0][0], table.n_elements());
1385}
1386
1387
1388
1405template <typename ElementType>
1408{
1409 return ArrayView<const ElementType>(&table[0][0], table.n_elements());
1410}
1411
1412
1430template <typename ElementType>
1433{
1434 return ArrayView<ElementType>(&matrix(0, 0), matrix.n_elements());
1435}
1436
1437
1438
1455template <typename ElementType>
1458{
1459 return ArrayView<const ElementType>(&matrix(0, 0), matrix.n_elements());
1460}
1461
1462
1463
1480template <typename ElementType>
1483 const typename Table<2, ElementType>::size_type row)
1484{
1485 AssertIndexRange(row, table.size()[0]);
1486 return ArrayView<const ElementType>(&table[row][0], table.size()[1]);
1487}
1488
1489
1490
1510template <typename ElementType>
1513 const typename Table<2, ElementType>::size_type row,
1514 const typename Table<2, ElementType>::size_type starting_column,
1515 const std::size_t size_of_view)
1516{
1517 AssertIndexRange(row, table.size()[0]);
1518 AssertIndexRange(starting_column, table.size()[1]);
1519 Assert(starting_column + size_of_view <= table.size()[1],
1520 ExcMessage("The starting index and size of the view you want to "
1521 "create would lead to a view that extends beyond the end "
1522 "of a column of the given table."));
1523 return ArrayView<ElementType>(&table[row][starting_column], size_of_view);
1524}
1525
1526
1527
1547template <typename ElementType>
1550 const typename Table<2, ElementType>::size_type row,
1551 const typename Table<2, ElementType>::size_type starting_column,
1552 const std::size_t size_of_view)
1553{
1554 AssertIndexRange(row, table.size()[0]);
1555 AssertIndexRange(starting_column, table.size()[1]);
1556 Assert(starting_column + size_of_view <= table.size()[1],
1557 ExcMessage("The starting index and size of the view you want to "
1558 "create would lead to a view that extends beyond the end "
1559 "of a column of the given table."));
1560 return ArrayView<const ElementType>(&table[row][starting_column],
1561 size_of_view);
1562}
1563
1564
1565
1566/*
1567 * Create a view that doesn't allow the container it points to to be modified.
1568 * This is useful if the object passed in is not `const` already and a function
1569 * requires a view to constant memory in its signature.
1570 *
1571 * This function returns an object of type `ArrayView<const T>` where `T` is the
1572 * element type of the container.
1573 *
1574 * @relatesalso ArrayView
1575 */
1576template <typename Container>
1577inline auto
1578make_const_array_view(const Container &container)
1579 -> decltype(make_array_view(container))
1580{
1581 return make_array_view(container);
1582}
1583
1584
1586
1587#endif
auto make_const_array_view(const Container &container) -> decltype(make_array_view(container))
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
Definition array_view.h:949
pointer data()
size_type size() const
ArrayView(ContiguousContainer &container)
Definition array_view.h:597
ArrayView< const ElementType > make_array_view(const Vector< ElementType > &vector)
ArrayView(value_type &element)
Definition array_view.h:538
iterator begin() const
Definition array_view.h:702
bool operator!=(const ArrayView< std::remove_cv_t< value_type >, MemorySpaceType > &other_view) const
Definition array_view.h:673
ArrayView< Number, MemorySpaceType > make_array_view(ArrayView< Number, MemorySpaceType > &array_view)
ArrayView(const ArrayView< std::remove_cv_t< value_type >, MemorySpaceType > &view)
Definition array_view.h:546
value_type * iterator
Definition array_view.h:99
value_type & operator[](const std::size_t i) const
Definition array_view.h:738
ArrayView< const ElementType > make_array_view(const LAPACKFullMatrix< ElementType > &matrix)
ArrayView< ElementType > make_array_view(std::array< ElementType, N > &array)
bool empty() const
Definition array_view.h:693
bool operator==(const ArrayView< std::remove_cv_t< value_type >, MemorySpaceType > &other_view) const
Definition array_view.h:638
ArrayView< ElementType > make_array_view(LAPACKFullMatrix< ElementType > &matrix)
ArrayView< ElementType > make_array_view(ElementType(&array)[N])
ArrayView< ElementType, MemorySpaceType > make_array_view(ElementType *const begin, ElementType *const end)
Definition array_view.h:985
const_iterator cend() const
Definition array_view.h:729
ArrayView(const ContiguousContainer &container)
Definition array_view.h:587
iterator end() const
Definition array_view.h:711
ArrayView< const ElementType > make_array_view(const std::vector< ElementType > &vector, const std::size_t starting_index, const std::size_t size_of_view)
ArrayView< const ElementType > make_array_view(const Table< 2, ElementType > &table)
ArrayView< const ElementType > make_array_view(const Table< 2, ElementType > &table, const typename Table< 2, ElementType >::size_type row, const typename Table< 2, ElementType >::size_type starting_column, const std::size_t size_of_view)
ArrayView< ElementType > make_array_view(std::vector< ElementType > &vector)
bool operator==(const ArrayView< const value_type, MemorySpaceType > &other_view) const
Definition array_view.h:627
ArrayView< ElementType > make_array_view(std::vector< ElementType > &vector, const std::size_t starting_index, const std::size_t size_of_view)
bool operator!=(const ArrayView< const value_type, MemorySpaceType > &other_view) const
Definition array_view.h:650
const_iterator cbegin() const
Definition array_view.h:720
ArrayView(value_type(&array)[N])
Definition array_view.h:609
value_type * data() const noexcept
Definition array_view.h:661
ArrayView< ElementType > make_array_view(Table< 2, ElementType > &table, const typename Table< 2, ElementType >::size_type row, const typename Table< 2, ElementType >::size_type starting_column, const std::size_t size_of_view)
void reinit(value_type *starting_element, const std::size_t n_elements)
Definition array_view.h:521
ArrayView< ElementType > make_array_view(Table< 2, ElementType > &table)
value_type * starting_element
Definition array_view.h:481
std::size_t size() const
Definition array_view.h:684
ElementType value_type
Definition array_view.h:94
ArrayView(const std::initializer_list< std::remove_cv_t< value_type > > &initializer_list)
Definition array_view.h:616
ArrayView(value_type *starting_element, const std::size_t n_elements)
Definition array_view.h:505
std::size_t n_elements
Definition array_view.h:486
ArrayView< const Number, MemorySpaceType > make_array_view(const ArrayView< Number, MemorySpaceType > &array_view)
ArrayView< const ElementType > make_array_view(const Table< 2, ElementType > &table, const typename Table< 2, ElementType >::size_type row)
ArrayView< const ElementType > make_array_view(const AlignedVector< ElementType > &vector, const std::size_t starting_index, const std::size_t size_of_view)
ArrayView< const ElementType > make_array_view(const AlignedVector< ElementType > &vector)
const ElementType * const_iterator
Definition array_view.h:104
ArrayView< ElementType > make_array_view(Vector< ElementType > &vector)
ArrayView< ElementType > make_array_view(Table< 2, ElementType > &table, const typename Table< 2, ElementType >::size_type row)
ArrayView< const ElementType > make_array_view(const std::vector< ElementType > &vector)
ArrayView< ElementType > make_array_view(AlignedVector< ElementType > &vector, const std::size_t starting_index, const std::size_t size_of_view)
ArrayView< const ElementType > make_array_view(const std::array< ElementType, N > &array)
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
Definition array_view.h:949
ArrayView< ElementType > make_array_view(AlignedVector< ElementType > &vector)
std::size_t n_elements
Definition array_view.h:828
StridedArrayView(value_type *starting_element, const std::size_t n_elements)
Definition array_view.h:875
ElementType value_type
Definition array_view.h:760
value_type * starting_element
Definition array_view.h:823
value_type * data() const noexcept
Definition array_view.h:846
std::size_t size() const
Definition array_view.h:867
bool empty() const
Definition array_view.h:858
virtual size_type size() const override
iterator begin()
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:175
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
Point< 2 > first
Definition grid_out.cc:4623
#define Assert(cond, exc)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcMessage(std::string arg1)
std::vector< index_type > data
Definition mpi.cc:735
std::size_t size
Definition mpi.cc:734
STL namespace.
#define DEAL_II_HOST_DEVICE
Definition numbers.h:30