16 #ifndef dealii__table_h 17 #define dealii__table_h 19 #include <deal.II/base/config.h> 20 #include <deal.II/base/exceptions.h> 21 #include <deal.II/base/subscriptor.h> 22 #include <deal.II/base/table_indices.h> 23 #include <deal.II/base/memory_consumption.h> 24 #include <deal.II/base/aligned_vector.h> 29 DEAL_II_NAMESPACE_OPEN
33 template <
int N,
typename T>
class Table;
34 template <
typename T>
class Table<1,T>;
35 template <
typename T>
class Table<2,T>;
36 template <
typename T>
class Table<3,T>;
37 template <
typename T>
class Table<4,T>;
38 template <
typename T>
class Table<5,T>;
39 template <
typename T>
class Table<6,T>;
62 namespace TableBaseAccessors
71 template <
int N,
typename T,
bool Constness>
80 template <
int N,
typename T>
struct Types<N,T,true>
82 typedef const T value_type;
85 typedef typename AlignedVector<T>::const_iterator iterator;
86 typedef typename AlignedVector<T>::const_iterator const_iterator;
88 typedef typename AlignedVector<T>::const_reference reference;
89 typedef typename AlignedVector<T>::const_reference const_reference;
97 template <
int N,
typename T>
struct Types<N,T,false>
102 typedef typename AlignedVector<T>::iterator iterator;
103 typedef typename AlignedVector<T>::const_iterator const_iterator;
105 typedef typename AlignedVector<T>::reference reference;
106 typedef typename AlignedVector<T>::const_reference const_reference;
148 template <
int N,
typename T,
bool C,
unsigned int P>
152 typedef typename Types<N,T,C>::TableType TableType;
154 typedef typename Types<N,T,C>::iterator iterator;
155 typedef typename Types<N,T,C>::const_iterator const_iterator;
158 typedef ptrdiff_t difference_type;
165 Accessor (
const TableType &table,
166 const iterator data);
182 Accessor (
const Accessor &a);
187 Accessor<N,T,
C,P-1> operator [] (
const unsigned int i)
const;
194 <<
"Index " << N-P+1 <<
"has a value of " 195 << arg1 <<
" but needs to be in the range [" 196 << arg2 <<
"," << arg3 <<
"[.");
203 const TableType &table;
210 template <
int N1,
typename T1>
friend class ::Table;
211 template <
int N1,
typename T1,
bool C1,
unsigned int P1>
212 friend class Accessor;
213 # ifndef DEAL_II_TEMPL_SPEC_FRIEND_BUG 214 friend class ::Table<N,T>;
215 friend class Accessor<N,T,
C,P+1>;
230 template <
int N,
typename T,
bool C>
231 class Accessor<N,T,
C,1>
239 typedef typename Types<N,T,C>::value_type value_type;
241 typedef typename Types<N,T,C>::iterator iterator;
242 typedef typename Types<N,T,C>::const_iterator const_iterator;
244 typedef typename Types<N,T,C>::reference reference;
245 typedef typename Types<N,T,C>::const_reference const_reference;
248 typedef ptrdiff_t difference_type;
253 typedef typename Types<N,T,C>::TableType TableType;
268 Accessor (
const TableType &table,
269 const iterator data);
284 Accessor (
const Accessor &a);
290 reference operator [] (
const unsigned int)
const;
296 unsigned int size ()
const;
301 iterator begin ()
const;
306 iterator end ()
const;
314 const TableType &table;
321 template <
int N1,
typename T1>
friend class ::Table;
322 template <
int N1,
typename T1,
bool C1,
unsigned int P1>
323 friend class Accessor;
324 # ifndef DEAL_II_TEMPL_SPEC_FRIEND_BUG 325 friend class ::Table<2,T>;
326 friend class Accessor<N,T,
C,2>;
402 template <
int N,
typename T>
406 typedef T value_type;
430 template <
typename InputIterator>
432 InputIterator entries,
433 const bool C_style_indexing =
true);
444 template <
typename T2>
447 #ifdef DEAL_II_WITH_CXX11 478 template<
typename T2>
481 #ifdef DEAL_II_WITH_CXX11 511 const bool omit_default_initialization =
false);
516 unsigned int size (
const unsigned int i)
const;
571 template <
typename InputIterator>
572 void fill (InputIterator entries,
573 const bool C_style_indexing =
true);
578 void fill (
const T &value);
583 typename AlignedVector<T>::reference
593 typename AlignedVector<T>::const_reference
620 template <
class Archive>
621 void serialize (Archive &ar,
const unsigned int version);
648 typename AlignedVector<T>::const_reference
el (
const TableIndices<N> &indices)
const;
681 template <
int N,
typename T>
699 template <
typename T>
755 template <
typename InputIterator>
757 InputIterator entries,
758 const bool C_style_indexing =
true);
764 typename AlignedVector<T>::const_reference
765 operator [] (
const unsigned int i)
const;
771 typename AlignedVector<T>::reference
772 operator [] (
const unsigned int i);
778 typename AlignedVector<T>::const_reference
785 typename AlignedVector<T>::reference
792 typename AlignedVector<T>::reference
799 typename AlignedVector<T>::const_reference
818 template <
typename T>
835 Table (
const unsigned int size1,
836 const unsigned int size2);
876 template <
typename InputIterator>
877 Table (
const unsigned int size1,
878 const unsigned int size2,
879 InputIterator entries,
880 const bool C_style_indexing =
true);
887 void reinit (
const unsigned int size1,
888 const unsigned int size2,
889 const bool omit_default_initialization =
false);
899 ::internal::TableBaseAccessors::Accessor<2,T,true,1>
900 operator [] (
const unsigned int i)
const;
908 ::internal::TableBaseAccessors::Accessor<2,T,false,1>
909 operator [] (
const unsigned int i);
917 typename AlignedVector<T>::const_reference
919 const unsigned int j)
const;
928 typename AlignedVector<T>::reference
930 const unsigned int j);
936 typename AlignedVector<T>::reference
943 typename AlignedVector<T>::const_reference
951 unsigned int n_rows ()
const;
957 unsigned int n_cols ()
const;
970 typename AlignedVector<T>::reference
el (
const unsigned int i,
971 const unsigned int j);
987 typename AlignedVector<T>::const_reference
el (
const unsigned int i,
988 const unsigned int j)
const;
1003 template <
typename T>
1020 Table (
const unsigned int size1,
1021 const unsigned int size2,
1022 const unsigned int size3);
1064 template <
typename InputIterator>
1065 Table (
const unsigned int size1,
1066 const unsigned int size2,
1067 const unsigned int size3,
1068 InputIterator entries,
1069 const bool C_style_indexing =
true);
1078 ::internal::TableBaseAccessors::Accessor<3,T,true,2>
1079 operator [] (
const unsigned int i)
const;
1088 ::internal::TableBaseAccessors::Accessor<3,T,false,2>
1089 operator [] (
const unsigned int i);
1097 typename AlignedVector<T>::const_reference
operator () (
const unsigned int i,
1098 const unsigned int j,
1099 const unsigned int k)
const;
1108 typename AlignedVector<T>::reference
operator () (
const unsigned int i,
1109 const unsigned int j,
1110 const unsigned int k);
1137 template <
typename T>
1154 Table (
const unsigned int size1,
1155 const unsigned int size2,
1156 const unsigned int size3,
1157 const unsigned int size4);
1166 ::internal::TableBaseAccessors::Accessor<4,T,true,3>
1167 operator [] (
const unsigned int i)
const;
1176 ::internal::TableBaseAccessors::Accessor<4,T,false,3>
1177 operator [] (
const unsigned int i);
1185 typename AlignedVector<T>::const_reference
operator () (
const unsigned int i,
1186 const unsigned int j,
1187 const unsigned int k,
1188 const unsigned int l)
const;
1197 typename AlignedVector<T>::reference
operator () (
const unsigned int i,
1198 const unsigned int j,
1199 const unsigned int k,
1200 const unsigned int l);
1206 typename AlignedVector<T>::reference
1213 typename AlignedVector<T>::const_reference
1229 template <
typename T>
1247 Table (
const unsigned int size1,
1248 const unsigned int size2,
1249 const unsigned int size3,
1250 const unsigned int size4,
1251 const unsigned int size5);
1260 ::internal::TableBaseAccessors::Accessor<5,T,true,4>
1261 operator [] (
const unsigned int i)
const;
1270 ::internal::TableBaseAccessors::Accessor<5,T,false,4>
1271 operator [] (
const unsigned int i);
1279 typename AlignedVector<T>::const_reference
operator () (
const unsigned int i,
1280 const unsigned int j,
1281 const unsigned int k,
1282 const unsigned int l,
1283 const unsigned int m)
const;
1291 typename AlignedVector<T>::reference
operator () (
const unsigned int i,
1292 const unsigned int j,
1293 const unsigned int k,
1294 const unsigned int l,
1295 const unsigned int m);
1301 typename AlignedVector<T>::reference
1308 typename AlignedVector<T>::const_reference
1324 template <
typename T>
1341 Table (
const unsigned int size1,
1342 const unsigned int size2,
1343 const unsigned int size3,
1344 const unsigned int size4,
1345 const unsigned int size5,
1346 const unsigned int size6);
1355 ::internal::TableBaseAccessors::Accessor<6,T,true,5>
1356 operator [] (
const unsigned int i)
const;
1365 ::internal::TableBaseAccessors::Accessor<6,T,false,5>
1366 operator [] (
const unsigned int i);
1374 typename AlignedVector<T>::const_reference
operator () (
const unsigned int i,
1375 const unsigned int j,
1376 const unsigned int k,
1377 const unsigned int l,
1378 const unsigned int m,
1379 const unsigned int n)
const;
1387 typename AlignedVector<T>::reference
operator () (
const unsigned int i,
1388 const unsigned int j,
1389 const unsigned int k,
1390 const unsigned int l,
1391 const unsigned int m,
1392 const unsigned int n);
1398 typename AlignedVector<T>::reference
1405 typename AlignedVector<T>::const_reference
1420 template <
typename T>
1437 Table (
const unsigned int size1,
1438 const unsigned int size2,
1439 const unsigned int size3,
1440 const unsigned int size4,
1441 const unsigned int size5,
1442 const unsigned int size6,
1443 const unsigned int size7);
1452 ::internal::TableBaseAccessors::Accessor<7,T,true,6>
1453 operator [] (
const unsigned int i)
const;
1462 ::internal::TableBaseAccessors::Accessor<7,T,false,6>
1463 operator [] (
const unsigned int i);
1471 typename AlignedVector<T>::const_reference
operator () (
const unsigned int i,
1472 const unsigned int j,
1473 const unsigned int k,
1474 const unsigned int l,
1475 const unsigned int m,
1476 const unsigned int n,
1477 const unsigned int o)
const;
1485 typename AlignedVector<T>::reference
operator () (
const unsigned int i,
1486 const unsigned int j,
1487 const unsigned int k,
1488 const unsigned int l,
1489 const unsigned int m,
1490 const unsigned int n,
1491 const unsigned int o);
1497 typename AlignedVector<T>::reference
1504 typename AlignedVector<T>::const_reference
1523 template <
typename T>
1541 const unsigned int size2);
1548 void reinit (
const unsigned int size1,
1549 const unsigned int size2,
1550 const bool omit_default_initialization =
false);
1558 typename AlignedVector<T>::const_reference
operator () (
const unsigned int i,
1559 const unsigned int j)
const;
1567 typename AlignedVector<T>::reference
operator () (
const unsigned int i,
1568 const unsigned int j);
1574 unsigned int n_rows ()
const;
1580 unsigned int n_cols ()
const;
1593 typename AlignedVector<T>::reference
el (
const unsigned int i,
1594 const unsigned int j);
1610 typename AlignedVector<T>::const_reference
el (
const unsigned int i,
1611 const unsigned int j)
const;
1621 template <
int N,
typename T>
1627 template <
int N,
typename T>
1635 template <
int N,
typename T>
1636 template <
typename InputIterator>
1639 InputIterator entries,
1640 const bool C_style_indexing)
1643 fill (entries, C_style_indexing);
1649 template <
int N,
typename T>
1660 template <
int N,
typename T>
1661 template <
typename T2>
1666 std::copy (src.
values.begin(), src.
values.end(), values.begin());
1671 #ifdef DEAL_II_WITH_CXX11 1673 template <
int N,
typename T>
1677 values (
std::move(src.values)),
1678 table_size (src.table_size)
1687 template <
int N,
typename T>
1688 template <
class Archive>
1695 ar &values &table_size;
1702 namespace TableBaseAccessors
1704 template <
int N,
typename T,
bool C,
unsigned int P>
1706 Accessor<N,T,C,P>::Accessor (
const TableType &table,
1707 const iterator data)
1715 template <
int N,
typename T,
bool C,
unsigned int P>
1717 Accessor<N,T,C,P>::Accessor (
const Accessor &a)
1725 template <
int N,
typename T,
bool C,
unsigned int P>
1727 Accessor<N,T,C,P>::Accessor ()
1729 table (*static_cast<const TableType *>(0)),
1740 template <
int N,
typename T,
bool C,
unsigned int P>
1743 Accessor<N,T,C,P>::operator [] (
const unsigned int i)
const 1745 Assert (i < table.size()[N-P],
1752 return Accessor<N,T,
C,P-1> (table, data);
1758 size_type subobject_size = table.size()[N-1];
1759 for (
int p=P-1; p>1; --p)
1760 subobject_size *= table.size()[N-p];
1761 const iterator new_data = data + i*subobject_size;
1762 return Accessor<N,T,
C,P-1> (table, new_data);
1768 template <
int N,
typename T,
bool C>
1770 Accessor<N,T,C,1>::Accessor (
const TableType &table,
1771 const iterator data)
1779 template <
int N,
typename T,
bool C>
1781 Accessor<N,T,C,1>::Accessor ()
1783 table (*static_cast<const TableType *>(0)),
1794 template <
int N,
typename T,
bool C>
1796 Accessor<N,T,C,1>::Accessor (
const Accessor &a)
1804 template <
int N,
typename T,
bool C>
1806 typename Accessor<N,T,C,1>::reference
1807 Accessor<N,T,C,1>::operator [] (
const unsigned int i)
const 1809 Assert (i < table.size()[N-1],
1816 template <
int N,
typename T,
bool C>
1819 Accessor<N,T,C,1>::size ()
const 1821 return table.size()[N-1];
1826 template <
int N,
typename T,
bool C>
1828 typename Accessor<N,T,C,1>::iterator
1829 Accessor<N,T,C,1>::begin ()
const 1836 template <
int N,
typename T,
bool C>
1838 typename Accessor<N,T,C,1>::iterator
1839 Accessor<N,T,C,1>::end ()
const 1841 return data+table.size()[N-1];
1848 template <
int N,
typename T>
1855 template <
int N,
typename T>
1862 reinit (m.
size(),
true);
1869 template <
int N,
typename T>
1870 template <
typename T2>
1875 reinit (m.
size(),
true);
1877 std::copy (m.
values.begin(), m.
values.begin() + n_elements(),
1885 #ifdef DEAL_II_WITH_CXX11 1887 template <
int N,
typename T>
1893 values = std::move(m.
values);
1904 template <
int N,
typename T>
1909 return (values == T2.
values);
1914 template <
int N,
typename T>
1920 if (n_elements() != 0)
1926 template <
int N,
typename T>
1931 if (n_elements() != 0)
1938 template <
int N,
typename T>
1942 const bool omit_default_initialization)
1944 table_size = new_sizes;
1946 const size_type new_size = n_elements();
1967 if (!omit_default_initialization)
1970 values.resize(new_size, T());
1973 values.resize_fast(new_size);
1978 values.resize_fast (new_size);
1983 template <
int N,
typename T>
1993 template <
int N,
typename T>
1999 return table_size[i];
2004 template <
int N,
typename T>
2010 for (
unsigned int n=0; n<N; ++n)
2017 template <
int N,
typename T>
2022 return (n_elements() == 0);
2031 template <
typename InputIterator,
typename T>
2032 void fill_Fortran_style (InputIterator entries,
2035 for (
unsigned int i=0; i<table.
size()[0]; ++i)
2040 template <
typename InputIterator,
typename T>
2041 void fill_Fortran_style (InputIterator entries,
2044 for (
unsigned int j=0; j<table.
size()[1]; ++j)
2045 for (
unsigned int i=0; i<table.
size()[0]; ++i)
2050 template <
typename InputIterator,
typename T>
2051 void fill_Fortran_style (InputIterator entries,
2054 for (
unsigned int k=0; k<table.
size()[2]; ++k)
2055 for (
unsigned int j=0; j<table.
size()[1]; ++j)
2056 for (
unsigned int i=0; i<table.
size()[0]; ++i)
2061 template <
typename InputIterator,
typename T,
int N>
2062 void fill_Fortran_style (InputIterator,
2071 template <
int N,
typename T>
2072 template <
typename InputIterator>
2076 const bool C_style_indexing)
2078 Assert (n_elements() != 0,
2079 ExcMessage(
"Trying to fill an empty matrix."));
2081 if (C_style_indexing)
2082 for (
typename AlignedVector<T>::iterator p = values.begin();
2083 p != values.end(); ++p)
2086 internal::Table::fill_Fortran_style (entries, *
this);
2091 template <
int N,
typename T>
2102 template <
int N,
typename T>
2112 template <
int N,
typename T>
2127 return size_type(indices[0])*table_size[1] + indices[1];
2129 return ((
size_type(indices[0])*table_size[1] + indices[1])*table_size[2]
2134 for (
unsigned int n=1; n<N; ++n)
2135 s = s*table_size[n] + indices[n];
2143 template <
int N,
typename T>
2145 typename AlignedVector<T>::const_reference
2148 for (
unsigned int n=0; n<N; ++n)
2149 Assert (indices[n] < table_size[n],
2156 template <
int N,
typename T>
2158 typename AlignedVector<T>::reference
2161 for (
unsigned int n=0; n<N; ++n)
2162 Assert (indices[n] < table_size[n],
2169 template <
int N,
typename T>
2171 typename AlignedVector<T>::const_reference
2174 return values[position(indices)];
2179 template <
int N,
typename T>
2181 typename AlignedVector<T>::reference
2184 Assert (position(indices) < values.size(),
2186 return values[position(indices)];
2191 template <
typename T>
2198 template <
typename T>
2207 template <
typename T>
2208 template <
typename InputIterator>
2211 InputIterator entries,
2212 const bool C_style_indexing)
2221 template <
typename T>
2223 typename AlignedVector<T>::const_reference
2233 template <
typename T>
2235 typename AlignedVector<T>::reference
2245 template <
typename T>
2247 typename AlignedVector<T>::const_reference
2257 template <
typename T>
2259 typename AlignedVector<T>::reference
2269 template <
typename T>
2271 typename AlignedVector<T>::const_reference
2279 template <
typename T>
2281 typename AlignedVector<T>::reference
2290 template <
typename T>
2297 template <
typename T>
2300 const unsigned int size2)
2307 template <
typename T>
2308 template <
typename InputIterator>
2311 const unsigned int size2,
2312 InputIterator entries,
2313 const bool C_style_indexing)
2322 template <
typename T>
2326 const unsigned int size2,
2327 const bool omit_default_initialization)
2334 template <
typename T>
2336 ::internal::TableBaseAccessors::Accessor<2,T,true,1>
2341 return ::internal::TableBaseAccessors::Accessor<2,T,true,1>(*
this,
2347 template <
typename T>
2349 ::internal::TableBaseAccessors::Accessor<2,T,false,1>
2354 return ::internal::TableBaseAccessors::Accessor<2,T,false,1>(*
this,
2360 template <
typename T>
2362 typename AlignedVector<T>::const_reference
2364 const unsigned int j)
const 2375 template <
typename T>
2377 typename AlignedVector<T>::reference
2379 const unsigned int j)
2390 template <
typename T>
2392 typename AlignedVector<T>::const_reference
2400 template <
typename T>
2402 typename AlignedVector<T>::reference
2410 template <
typename T>
2412 typename AlignedVector<T>::const_reference
2414 const unsigned int j)
const 2421 template <
typename T>
2423 typename AlignedVector<T>::reference
2425 const unsigned int j)
2432 template <
typename T>
2437 return this->table_size[0];
2442 template <
typename T>
2447 return this->table_size[1];
2454 template <
typename T>
2461 template <
typename T>
2464 const unsigned int size2)
2471 template <
typename T>
2475 const unsigned int size2,
2476 const bool omit_default_initialization)
2483 template <
typename T>
2485 typename AlignedVector<T>::const_reference
2487 const unsigned int j)
const 2489 Assert (i < this->table_size[1],
2491 Assert (j < this->table_size[0],
2493 return this->values[
size_type(j)*this->table_size[1]+i];
2498 template <
typename T>
2500 typename AlignedVector<T>::reference
2502 const unsigned int j)
2504 Assert (i < this->table_size[1],
2506 Assert (j < this->table_size[0],
2508 return this->values[
size_type(j)*this->table_size[1]+i];
2513 template <
typename T>
2515 typename AlignedVector<T>::const_reference
2517 const unsigned int j)
const 2519 return this->values[
size_type(j)*this->table_size[1]+i];
2524 template <
typename T>
2526 typename AlignedVector<T>::reference
2528 const unsigned int j)
2530 return this->values[
size_type(j)*this->table_size[1]+i];
2535 template <
typename T>
2540 return this->table_size[1];
2545 template <
typename T>
2550 return this->table_size[0];
2558 template <
typename T>
2565 template <
typename T>
2568 const unsigned int size2,
2569 const unsigned int size3)
2576 template <
typename T>
2577 template <
typename InputIterator>
2580 const unsigned int size2,
2581 const unsigned int size3,
2582 InputIterator entries,
2583 const bool C_style_indexing)
2592 template <
typename T>
2594 ::internal::TableBaseAccessors::Accessor<3,T,true,2>
2600 this->table_size[2];
2601 return (::internal::TableBaseAccessors::Accessor<3,T,true,2>
2603 this->
values.begin() + i*subobject_size));
2608 template <
typename T>
2610 ::internal::TableBaseAccessors::Accessor<3,T,false,2>
2616 this->table_size[2];
2617 return (::internal::TableBaseAccessors::Accessor<3,T,false,2>
2619 this->
values.begin() + i*subobject_size));
2624 template <
typename T>
2626 typename AlignedVector<T>::const_reference
2628 const unsigned int j,
2629 const unsigned int k)
const 2638 *this->table_size[2] + k];
2643 template <
typename T>
2645 typename AlignedVector<T>::reference
2647 const unsigned int j,
2648 const unsigned int k)
2657 *this->table_size[2] + k];
2662 template <
typename T>
2664 typename AlignedVector<T>::const_reference
2672 template <
typename T>
2674 typename AlignedVector<T>::reference
2682 template <
typename T>
2689 template <
typename T>
2692 const unsigned int size2,
2693 const unsigned int size3,
2694 const unsigned int size4)
2701 template <
typename T>
2703 ::internal::TableBaseAccessors::Accessor<4,T,true,3>
2709 this->table_size[2] *
2710 this->table_size[3];
2711 return (::internal::TableBaseAccessors::Accessor<4,T,true,3>
2713 this->
values.begin() + i*subobject_size));
2718 template <
typename T>
2720 ::internal::TableBaseAccessors::Accessor<4,T,false,3>
2726 this->table_size[2] *
2727 this->table_size[3];
2728 return (::internal::TableBaseAccessors::Accessor<4,T,false,3>
2730 this->
values.begin() + i*subobject_size));
2735 template <
typename T>
2737 typename AlignedVector<T>::const_reference
2739 const unsigned int j,
2740 const unsigned int k,
2741 const unsigned int l)
const 2752 *this->table_size[2] + k)
2753 *this->table_size[3] +
l];
2758 template <
typename T>
2760 typename AlignedVector<T>::reference
2762 const unsigned int j,
2763 const unsigned int k,
2764 const unsigned int l)
2775 *this->table_size[2] + k)
2776 *this->table_size[3] +
l];
2781 template <
typename T>
2783 typename AlignedVector<T>::const_reference
2791 template <
typename T>
2793 typename AlignedVector<T>::reference
2801 template <
typename T>
2808 template <
typename T>
2811 const unsigned int size2,
2812 const unsigned int size3,
2813 const unsigned int size4,
2814 const unsigned int size5)
2821 template <
typename T>
2823 ::internal::TableBaseAccessors::Accessor<5,T,true,4>
2829 this->table_size[2] *
2830 this->table_size[3] *
2831 this->table_size[4];
2832 return (::internal::TableBaseAccessors::Accessor<5,T,true,4>
2834 this->
values.begin() + i*subobject_size));
2839 template <
typename T>
2841 ::internal::TableBaseAccessors::Accessor<5,T,false,4>
2847 this->table_size[2] *
2848 this->table_size[3] *
2849 this->table_size[4];
2850 return (::internal::TableBaseAccessors::Accessor<5,T,false,4>
2852 this->
values.begin() + i*subobject_size));
2857 template <
typename T>
2859 typename AlignedVector<T>::const_reference
2861 const unsigned int j,
2862 const unsigned int k,
2863 const unsigned int l,
2864 const unsigned int m)
const 2877 *this->table_size[2] + k)
2878 *this->table_size[3] +
l)
2879 *this->table_size[4] + m];
2884 template <
typename T>
2886 typename AlignedVector<T>::reference
2888 const unsigned int j,
2889 const unsigned int k,
2890 const unsigned int l,
2891 const unsigned int m)
2904 *this->table_size[2] + k)
2905 *this->table_size[3] +
l)
2906 *this->table_size[4] + m];
2911 template <
typename T>
2913 typename AlignedVector<T>::const_reference
2921 template <
typename T>
2923 typename AlignedVector<T>::reference
2931 template <
typename T>
2938 template <
typename T>
2941 const unsigned int size2,
2942 const unsigned int size3,
2943 const unsigned int size4,
2944 const unsigned int size5,
2945 const unsigned int size6)
2952 template <
typename T>
2954 ::internal::TableBaseAccessors::Accessor<6,T,true,5>
2960 this->table_size[2] *
2961 this->table_size[3] *
2962 this->table_size[4] *
2963 this->table_size[5];
2964 return (::internal::TableBaseAccessors::Accessor<6,T,true,5>
2966 this->
values.begin() + i*subobject_size));
2971 template <
typename T>
2973 ::internal::TableBaseAccessors::Accessor<6,T,false,5>
2979 this->table_size[2] *
2980 this->table_size[3] *
2981 this->table_size[4] *
2982 this->table_size[5];
2983 return (::internal::TableBaseAccessors::Accessor<6,T,false,5>
2985 this->
values.begin() + i*subobject_size));
2990 template <
typename T>
2992 typename AlignedVector<T>::const_reference
2994 const unsigned int j,
2995 const unsigned int k,
2996 const unsigned int l,
2997 const unsigned int m,
2998 const unsigned int n)
const 3013 *this->table_size[2] + k)
3014 *this->table_size[3] +
l)
3015 *this->table_size[4] + m)
3016 *this->table_size[5] + n];
3021 template <
typename T>
3023 typename AlignedVector<T>::reference
3025 const unsigned int j,
3026 const unsigned int k,
3027 const unsigned int l,
3028 const unsigned int m,
3029 const unsigned int n)
3044 *this->table_size[2] + k)
3045 *this->table_size[3] +
l)
3046 *this->table_size[4] + m)
3047 *this->table_size[5] + n];
3052 template <
typename T>
3054 typename AlignedVector<T>::const_reference
3062 template <
typename T>
3064 typename AlignedVector<T>::reference
3072 template <
typename T>
3079 template <
typename T>
3082 const unsigned int size2,
3083 const unsigned int size3,
3084 const unsigned int size4,
3085 const unsigned int size5,
3086 const unsigned int size6,
3087 const unsigned int size7)
3094 template <
typename T>
3096 ::internal::TableBaseAccessors::Accessor<7,T,true,6>
3102 this->table_size[2] *
3103 this->table_size[3] *
3104 this->table_size[4] *
3105 this->table_size[5] *
3106 this->table_size[6];
3107 return (::internal::TableBaseAccessors::Accessor<7,T,true,6>
3109 this->
values.begin() + i*subobject_size));
3114 template <
typename T>
3116 ::internal::TableBaseAccessors::Accessor<7,T,false,6>
3122 this->table_size[2] *
3123 this->table_size[3] *
3124 this->table_size[4] *
3125 this->table_size[5] *
3126 this->table_size[6];
3127 return (::internal::TableBaseAccessors::Accessor<7,T,false,6>
3129 this->
values.begin() + i*subobject_size));
3134 template <
typename T>
3136 typename AlignedVector<T>::const_reference
3138 const unsigned int j,
3139 const unsigned int k,
3140 const unsigned int l,
3141 const unsigned int m,
3142 const unsigned int n,
3143 const unsigned int o)
const 3160 *this->table_size[2] + k)
3161 *this->table_size[3] +
l)
3162 *this->table_size[4] + m)
3163 *this->table_size[5] + n)
3164 *this->table_size[6] + o];
3169 template <
typename T>
3171 typename AlignedVector<T>::reference
3173 const unsigned int j,
3174 const unsigned int k,
3175 const unsigned int l,
3176 const unsigned int m,
3177 const unsigned int n,
3178 const unsigned int o)
3195 *this->table_size[2] + k)
3196 *this->table_size[3] +
l)
3197 *this->table_size[4] + m)
3198 *this->table_size[5] + n)
3199 *this->table_size[6] + o];
3204 template <
typename T>
3206 typename AlignedVector<T>::const_reference
3214 template <
typename T>
3216 typename AlignedVector<T>::reference
3234 template <
int N,
typename T>
3241 DEAL_II_NAMESPACE_CLOSE
bool operator==(const TableBase< N, T > &T2) const
types::global_dof_index size_type
TableBase< 6, T >::size_type size_type
size_type position(const TableIndices< N > &indices) const
void serialize(Archive &ar, const unsigned int version)
void swap(TableBase< N, T > &v)
const TableIndices< N > & size() const
AlignedVector< T >::reference el(const unsigned int i, const unsigned int j)
TableBase< N, T > & operator=(const TableBase< N, T > &src)
TableBase< 7, T >::size_type size_type
TableBase< 4, T >::size_type size_type
unsigned int n_cols() const
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
size_type n_elements() const
SymmetricTensor< 2, dim, Number > C(const Tensor< 2, dim, Number > &F)
TableBase< 2, T >::size_type size_type
static ::ExceptionBase & ExcMessage(std::string arg1)
TableBase< 5, T >::size_type size_type
TableBase< 2, T >::size_type size_type
void swap(BlockIndices &u, BlockIndices &v)
void reinit(const TableIndices< N > &new_size, const bool omit_default_initialization=false)
#define Assert(cond, exc)
AlignedVector< T >::reference el(const TableIndices< N > &indices)
unsigned int n_rows() const
AlignedVector< T >::const_reference operator()(const unsigned int i, const unsigned int j) const
std_cxx11::enable_if< std_cxx11::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
std::size_t memory_consumption() const
TableBase< 3, T >::size_type size_type
static ::ExceptionBase & ExcNotImplemented()
unsigned int size(const unsigned int i) const
TableIndices< N > table_size
#define DeclException3(Exception3, type1, type2, type3, outsequence)
AlignedVector< T >::size_type size_type
TableBase< 1, T >::size_type size_type
AlignedVector< T >::reference operator()(const TableIndices< N > &indices)
AlignedVector< T > values
void reinit(const unsigned int size1, const unsigned int size2, const bool omit_default_initialization=false)
void fill(InputIterator entries, const bool C_style_indexing=true)
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
static ::ExceptionBase & ExcInternalError()