10#if !defined(MiniTensor_Tensor_h)
11#define MiniTensor_Tensor_h
19#include <Kokkos_Core.hpp>
30template<
typename T, Index N>
36template<
typename T, Index N = DYNAMIC>
109 template<
class ArrayT>
124 template<
class ArrayT>
141 template<
class ArrayT>
160 template<
class ArrayT>
181 template<
class ArrayT>
204 template<
class ArrayT>
224 template<
class ArrayT>
229 Index const dimension,
241 template<
class ArrayT>
246 Index const dimension,
260 template<
class ArrayT>
265 Index const dimension,
281 template<
class ArrayT>
286 Index const dimension,
304 template<
class ArrayT>
309 Index const dimension,
329 template<
class ArrayT>
334 Index const dimension,
382 Tensor(T
const & s00, T
const & s01, T
const & s10, T
const & s11);
399 T
const & s00, T
const & s01, T
const & s02,
400 T
const & s10, T
const & s11, T
const & s12,
401 T
const & s20, T
const & s21, T
const & s22);
421 Index const dimension,
483template<
typename S,
typename T, Index N>
492template<
typename S,
typename T, Index N>
501template<
typename T, Index N>
511template<
typename T, Index N>
521template<
typename T, Index N>
532template<
typename S,
typename T, Index N>
543template<
typename S,
typename T, Index N>
552template<
typename S,
typename T, Index N>
563template<
typename S,
typename T, Index N>
574template<
typename S,
typename T, Index N>
585template<
typename S,
typename T, Index N>
596template<
typename S,
typename T, Index N>
607template<
typename T, Index N>
617template<
typename T, Index N>
627template<
typename T, Index N>
638template<
typename T, Index N>
649template<
typename S,
typename T, Index N>
660template<
typename S,
typename T, Index N>
671template<
typename S,
typename T, Index N>
682template<
typename S,
typename T, Index N>
693template<
typename S,
typename T, Index N, Index P>
704template<
typename S,
typename T, Index N>
715template<
typename S,
typename T, Index N>
726template<
typename S,
typename T, Index N>
737template<
typename S,
typename T, Index N>
739typename Promote<S, T>::type
748template<
typename S,
typename T, Index N>
759template<
typename S,
typename T, Index N>
770template<
typename S,
typename T, Index N>
780template<
typename T, Index N>
790template<
typename T, Index N>
799template<
typename T, Index N>
809template<
typename T, Index N>
817template<
typename T, Index N>
827template<
typename T, Index N>
835template<
typename T, Index N>
845template<
typename T, Index N>
853template<
typename T, Index N>
863template<
typename T, Index N>
871template<
typename T, Index N>
881template<
typename T, Index N>
889template<
typename T, Index N>
899template<
typename T, Index N>
907template<
typename T, Index N>
915template<
typename T, Index N>
924template<
typename T, Index N>
933template<
typename T, Index N>
944template<
typename T, Index N>
956template<
typename T, Index N>
965template<
typename T, Index N>
976template<
typename T, Index N>
984template<
typename T, Index N>
996template<
typename T, Index N>
997template<
class ArrayT>
1008template<
typename T, Index N>
1009template<
class ArrayT>
1021template<
typename T, Index N>
1022template<
class ArrayT>
1035template<
typename T, Index N>
1036template<
class ArrayT>
1057template<
typename T, Index N>
1058template<
class ArrayT>
1081template<
typename T, Index N>
1082template<
class ArrayT>
1107template<
typename T, Index N>
1108template<
class ArrayT>
1112 Index const dimension,
1120template<
typename T, Index N>
1121template<
class ArrayT>
1125 Index const dimension,
1134template<
typename T, Index N>
1135template<
class ArrayT>
1139 Index const dimension,
1155template<
typename T, Index N>
1156template<
class ArrayT>
1160 Index const dimension,
1178template<
typename T, Index N>
1179template<
class ArrayT>
1183 Index const dimension,
1203template<
typename T, Index N>
1204template<
class ArrayT>
1208 Index const dimension,
1230template<
typename T, Index N>
1238template<
typename T, Index N>
1248template<
typename T, Index N>
1260template<
typename T, Index N>
1263 T
const & s00, T
const & s01,
1264 T
const & s10, T
const & s11)
1284template<
typename T, Index N>
1287 T
const & s00, T
const & s01, T
const & s02,
1288 T
const & s10, T
const & s11, T
const & s12,
1289 T
const & s20, T
const & s21, T
const & s22)
1314template<
typename T, Index N>
1320 assert(data_ptr != NULL);
1322 fill(data_ptr, component_order);
1327template<
typename T, Index N>
1330 Index const dimension,
1334 assert(data_ptr != NULL);
1341 fill(data_ptr, component_order);
1349template<
typename T, Index N>
1354 dimension_4th = A.get_dimension();
1357 dimension_2nd = dimension_4th * dimension_4th;
1365 number_components = dimension_2nd * dimension_2nd;
1367 for (
Index i = 0; i < number_components; ++i) {
1377template<
typename T, Index N>
1387template<
typename T, Index N>
1398template<
typename T, Index N>
1403 return get_dimension();
1409template<
typename T, Index N>
1414 return get_dimension();
1420template<
typename T, Index N>
1432template<
typename T, Index N>
1443 return self[i * dimension + j];
1449template<
typename T, Index N>
1460 return self[i * dimension + j];
1468greater_than(S
const & a, S
const & b)
1470 return a.first > b.first;
1478template<
typename T, Index N>
1489 switch (dimension) {
1491 for (
Index j = 0; j < dimension; ++j) {
1514template<
typename T, Index N>
1525 switch (dimension) {
1527 for (
Index i = 0; i < dimension; ++i) {
1550template<
typename S,
typename T, Index N>
1552Tensor<typename Promote<S, T>::type, N>
1566template<
typename S,
typename T, Index N>
1568Tensor<typename Promote<S, T>::type, N>
1582template<
typename T, Index N>
1598template<
typename T, Index N>
1609template<
typename T, Index N>
1620template<
typename S,
typename T, Index N>
1623lazy_disable_if<order_1234<S>, apply_tensor<Promote<S, T>, N>>::type
1637template<
typename S,
typename T, Index N>
1640lazy_disable_if<order_1234<S>, apply_tensor<Promote<S, T>, N>>::type
1654template<
typename S,
typename T, Index N>
1656Tensor<typename Promote<S, T>::type, N>
1670template<
typename S,
typename T, Index N>
1672Tensor<typename Promote<S, T>::type, N>
1686template<
typename S,
typename T, Index N>
1688Vector<typename Promote<S, T>::type, N>
1697template<
typename S,
typename T, Index N>
1699Vector<typename Promote<S, T>::type, N>
1708template<
typename S,
typename T, Index N>
1710Tensor<typename Promote<S, T>::type, N>
1719template<
typename S,
typename T, Index N>
1721Vector<typename Promote<S, T>::type, N>
1732 switch (dimension) {
1735 for (
Index i = 0; i < dimension; ++i) {
1737 typename Promote<S, T>::type
1740 for (
Index p = 0; p < dimension; ++p) {
1741 s += A(i, p) * u(p);
1748 v(0) = A(0, 0) * u(0) + A(0, 1) * u(1) + A(0, 2) * u(2);
1749 v(1) = A(1, 0) * u(0) + A(1, 1) * u(1) + A(1, 2) * u(2);
1750 v(2) = A(2, 0) * u(0) + A(2, 1) * u(1) + A(2, 2) * u(2);
1754 v(0) = A(0, 0) * u(0) + A(0, 1) * u(1);
1755 v(1) = A(1, 0) * u(0) + A(1, 1) * u(1);
1766template<
typename S,
typename T, Index N>
1768Vector<typename Promote<S, T>::type, N>
1779 switch (dimension) {
1782 for (
Index i = 0; i < dimension; ++i) {
1784 typename Promote<S, T>::type
1787 for (
Index p = 0; p < dimension; ++p) {
1788 s += A(p, i) * u(p);
1795 v(0) = A(0, 0) * u(0) + A(1, 0) * u(1) + A(2, 0) * u(2);
1796 v(1) = A(0, 1) * u(0) + A(1, 1) * u(1) + A(2, 1) * u(2);
1797 v(2) = A(0, 2) * u(0) + A(1, 2) * u(1) + A(2, 2) * u(2);
1801 v(0) = A(0, 0) * u(0) + A(1, 0) * u(1);
1802 v(1) = A(0, 1) * u(0) + A(1, 1) * u(1);
1813template<
typename S,
typename T, Index N>
1815Tensor<typename Promote<S, T>::type, N>
1826 switch (dimension) {
1829 for (
Index i = 0; i < dimension; ++i) {
1830 for (
Index j = 0; j < dimension; ++j) {
1832 typename Promote<S, T>::type
1835 for (
Index p = 0; p < dimension; ++p) {
1836 s += A(i, p) * B(p, j);
1844 C(0, 0) = A(0, 0) * B(0, 0) + A(0, 1) * B(1, 0) + A(0, 2) * B(2, 0);
1845 C(0, 1) = A(0, 0) * B(0, 1) + A(0, 1) * B(1, 1) + A(0, 2) * B(2, 1);
1846 C(0, 2) = A(0, 0) * B(0, 2) + A(0, 1) * B(1, 2) + A(0, 2) * B(2, 2);
1848 C(1, 0) = A(1, 0) * B(0, 0) + A(1, 1) * B(1, 0) + A(1, 2) * B(2, 0);
1849 C(1, 1) = A(1, 0) * B(0, 1) + A(1, 1) * B(1, 1) + A(1, 2) * B(2, 1);
1850 C(1, 2) = A(1, 0) * B(0, 2) + A(1, 1) * B(1, 2) + A(1, 2) * B(2, 2);
1852 C(2, 0) = A(2, 0) * B(0, 0) + A(2, 1) * B(1, 0) + A(2, 2) * B(2, 0);
1853 C(2, 1) = A(2, 0) * B(0, 1) + A(2, 1) * B(1, 1) + A(2, 2) * B(2, 1);
1854 C(2, 2) = A(2, 0) * B(0, 2) + A(2, 1) * B(1, 2) + A(2, 2) * B(2, 2);
1858 C(0, 0) = A(0, 0) * B(0, 0) + A(0, 1) * B(1, 0);
1859 C(0, 1) = A(0, 0) * B(0, 1) + A(0, 1) * B(1, 1);
1861 C(1, 0) = A(1, 0) * B(0, 0) + A(1, 1) * B(1, 0);
1862 C(1, 1) = A(1, 0) * B(0, 1) + A(1, 1) * B(1, 1);
1873template<
typename S,
typename T, Index N>
1875Tensor<typename Promote<S, T>::type, N>
1886 switch (dimension) {
1889 for (
Index i = 0; i < dimension; ++i) {
1890 for (
Index j = 0; j < dimension; ++j) {
1892 typename Promote<S, T>::type
1895 for (
Index p = 0; p < dimension; ++p) {
1896 s += A(p, i) * B(p, j);
1904 C(0, 0) = A(0, 0) * B(0, 0) + A(1, 0) * B(1, 0) + A(2, 0) * B(2, 0);
1905 C(0, 1) = A(0, 0) * B(0, 1) + A(1, 0) * B(1, 1) + A(2, 0) * B(2, 1);
1906 C(0, 2) = A(0, 0) * B(0, 2) + A(1, 0) * B(1, 2) + A(2, 0) * B(2, 2);
1908 C(1, 0) = A(0, 1) * B(0, 0) + A(1, 1) * B(1, 0) + A(2, 1) * B(2, 0);
1909 C(1, 1) = A(0, 1) * B(0, 1) + A(1, 1) * B(1, 1) + A(2, 1) * B(2, 1);
1910 C(1, 2) = A(0, 1) * B(0, 2) + A(1, 1) * B(1, 2) + A(2, 1) * B(2, 2);
1912 C(2, 0) = A(0, 2) * B(0, 0) + A(1, 2) * B(1, 0) + A(2, 2) * B(2, 0);
1913 C(2, 1) = A(0, 2) * B(0, 1) + A(1, 2) * B(1, 1) + A(2, 2) * B(2, 1);
1914 C(2, 2) = A(0, 2) * B(0, 2) + A(1, 2) * B(1, 2) + A(2, 2) * B(2, 2);
1918 C(0, 0) = A(0, 0) * B(0, 0) + A(1, 0) * B(1, 0);
1919 C(0, 1) = A(0, 0) * B(0, 1) + A(1, 0) * B(1, 1);
1921 C(1, 0) = A(0, 1) * B(0, 0) + A(1, 1) * B(1, 0);
1922 C(1, 1) = A(0, 1) * B(0, 1) + A(1, 1) * B(1, 1);
1933template<
typename S,
typename T, Index N, Index P>
1935Matrix<typename Promote<S, T>::type, N, P>
1947 C(dimension, num_cols);
1949 for (
Index i{0}; i < dimension; ++i) {
1950 for (
Index j{0}; j < num_cols; ++j) {
1952 typename Promote<S, T>::type
1955 for (
Index p{0}; p < dimension; ++p) {
1956 s += A(p, i) * B(p, j);
1968template<
typename S,
typename T, Index N>
1970Vector<typename Promote<S, T>::type, N>
1979template<
typename S,
typename T, Index N>
1981Tensor<typename Promote<S, T>::type, N>
1992 switch (dimension) {
1995 for (
Index i = 0; i < dimension; ++i) {
1996 for (
Index j = 0; j < dimension; ++j) {
1998 typename Promote<S, T>::type
2001 for (
Index p = 0; p < dimension; ++p) {
2002 s += A(i, p) * B(j, p);
2010 C(0, 0) = A(0, 0) * B(0, 0) + A(0, 1) * B(0, 1) + A(0, 2) * B(0, 2);
2011 C(0, 1) = A(0, 0) * B(1, 0) + A(0, 1) * B(1, 1) + A(0, 2) * B(1, 2);
2012 C(0, 2) = A(0, 0) * B(2, 0) + A(0, 1) * B(2, 1) + A(0, 2) * B(2, 2);
2014 C(1, 0) = A(1, 0) * B(0, 0) + A(1, 1) * B(0, 1) + A(1, 2) * B(0, 2);
2015 C(1, 1) = A(1, 0) * B(1, 0) + A(1, 1) * B(1, 1) + A(1, 2) * B(1, 2);
2016 C(1, 2) = A(1, 0) * B(2, 0) + A(1, 1) * B(2, 1) + A(1, 2) * B(2, 2);
2018 C(2, 0) = A(2, 0) * B(0, 0) + A(2, 1) * B(0, 1) + A(2, 2) * B(0, 2);
2019 C(2, 1) = A(2, 0) * B(1, 0) + A(2, 1) * B(1, 1) + A(2, 2) * B(1, 2);
2020 C(2, 2) = A(2, 0) * B(2, 0) + A(2, 1) * B(2, 1) + A(2, 2) * B(2, 2);
2024 C(0, 0) = A(0, 0) * B(0, 0) + A(0, 1) * B(0, 1);
2025 C(0, 1) = A(0, 0) * B(1, 0) + A(0, 1) * B(1, 1);
2027 C(1, 0) = A(1, 0) * B(0, 0) + A(1, 1) * B(0, 1);
2028 C(1, 1) = A(1, 0) * B(1, 0) + A(1, 1) * B(1, 1);
2039template<
typename S,
typename T, Index N>
2041Tensor<typename Promote<S, T>::type, N>
2052 switch (dimension) {
2055 for (
Index i = 0; i < dimension; ++i) {
2056 for (
Index j = 0; j < dimension; ++j) {
2058 typename Promote<S, T>::type
2061 for (
Index p = 0; p < dimension; ++p) {
2062 s += A(p, i) * B(j, p);
2070 C(0, 0) = A(0, 0) * B(0, 0) + A(1, 0) * B(0, 1) + A(2, 0) * B(0, 2);
2071 C(0, 1) = A(0, 0) * B(1, 0) + A(1, 0) * B(1, 1) + A(2, 0) * B(1, 2);
2072 C(0, 2) = A(0, 0) * B(2, 0) + A(1, 0) * B(2, 1) + A(2, 0) * B(2, 2);
2074 C(1, 0) = A(0, 1) * B(0, 0) + A(1, 1) * B(0, 1) + A(2, 1) * B(0, 2);
2075 C(1, 1) = A(0, 1) * B(1, 0) + A(1, 1) * B(1, 1) + A(2, 1) * B(1, 2);
2076 C(1, 2) = A(0, 1) * B(2, 0) + A(1, 1) * B(2, 1) + A(2, 1) * B(2, 2);
2078 C(2, 0) = A(0, 2) * B(0, 0) + A(1, 2) * B(0, 1) + A(2, 2) * B(0, 2);
2079 C(2, 1) = A(0, 2) * B(1, 0) + A(1, 2) * B(1, 1) + A(2, 2) * B(1, 2);
2080 C(2, 2) = A(0, 2) * B(2, 0) + A(1, 2) * B(2, 1) + A(2, 2) * B(2, 2);
2084 C(0, 0) = A(0, 0) * B(0, 0) + A(1, 0) * B(0, 1);
2085 C(0, 1) = A(0, 0) * B(1, 0) + A(1, 0) * B(1, 1);
2087 C(1, 0) = A(0, 1) * B(0, 0) + A(1, 1) * B(0, 1);
2088 C(1, 1) = A(0, 1) * B(1, 0) + A(1, 1) * B(1, 1);
2099template<
typename S,
typename T, Index N>
2101typename Promote<S, T>::type
2109 typename Promote<S, T>::type
2112 switch (dimension) {
2115 for (
Index p = 0; p < dimension; ++p) {
2116 for (
Index q = 0; q < dimension; ++q) {
2117 s += A(p, q) * B(p, q);
2123 s += A(0, 0) * B(0, 0) + A(0, 1) * B(0, 1) + A(0, 2) * B(0, 2);
2124 s += A(1, 0) * B(1, 0) + A(1, 1) * B(1, 1) + A(1, 2) * B(1, 2);
2125 s += A(2, 0) * B(2, 0) + A(2, 1) * B(2, 1) + A(2, 2) * B(2, 2);
2129 s += A(0, 0) * B(0, 0) + A(0, 1) * B(0, 1);
2130 s += A(1, 0) * B(1, 0) + A(1, 1) * B(1, 1);
2141template<
typename S,
typename T, Index N>
2143Tensor<typename Promote<S, T>::type, N>
2154 switch (dimension) {
2157 for (
Index i = 0; i < dimension; ++i) {
2159 typename Promote<S, T>::type
const
2162 for (
Index j = 0; j < dimension; ++j) {
2169 A(0, 0) = u(0) * v(0);
2170 A(0, 1) = u(0) * v(1);
2171 A(0, 2) = u(0) * v(2);
2173 A(1, 0) = u(1) * v(0);
2174 A(1, 1) = u(1) * v(1);
2175 A(1, 2) = u(1) * v(2);
2177 A(2, 0) = u(2) * v(0);
2178 A(2, 1) = u(2) * v(1);
2179 A(2, 2) = u(2) * v(2);
2183 A(0, 0) = u(0) * v(0);
2184 A(0, 1) = u(0) * v(1);
2186 A(1, 0) = u(1) * v(0);
2187 A(1, 1) = u(1) * v(1);
2198template<
typename S,
typename T, Index N>
2200Tensor<typename Promote<S, T>::type, N>
2209template<
typename S,
typename T, Index N>
2211Tensor<typename Promote<S, T>::type, N>
2220template<
typename T, Index N>
2229 A = zero<T, N>(dimension);
2231 switch (dimension) {
2234 for (
Index i = 0; i < dimension; ++i) {
2258template<
typename T, Index N>
2269 switch (dimension) {
2272 for (
Index i = 0; i < dimension; ++i) {
2297template<
typename T, Index N>
2310Tensor<T, DYNAMIC>
const
2319template<
typename T, Index N>
2330template<
typename T, Index N>
2332void ones_in_diagonal(Tensor<T, N> & A)
2335 dimension = A.get_dimension();
2337 switch (dimension) {
2340 for (
Index i = 0; i < dimension; ++i) {
2361template<
typename T, Index N>
2363void fill_levi_civita(Tensor<T, N> & A)
2366 dimension = A.get_dimension();
2368 for (
Index i = 0; i < dimension; ++i) {
2369 for (
Index j = 0; j < dimension; ++j) {
2370 A(i, j) = levi_civita<T>(i, j);
2382template<
typename T, Index N>
2390 ones_in_diagonal(A);
2400Tensor<T, DYNAMIC>
const
2406 ones_in_diagonal(A);
2414template<
typename T, Index N>
2423 ones_in_diagonal(A);
2431template<
typename T, Index N>
2436 return identity<T, N>();
2444Tensor<T, DYNAMIC>
const
2447 return identity<T, DYNAMIC>(dimension);
2453template<
typename T, Index N>
2458 return identity<T, N>(dimension);
2464template<
typename T, Index N>
2472 fill_levi_civita(A);
2482Tensor<T, DYNAMIC>
const
2488 fill_levi_civita(A);
2496template<
typename T, Index N>
2505 fill_levi_civita(A);
2513template<
typename T, Index N>
2518 return levi_civita_2<T, N>();
2526Tensor<T, DYNAMIC>
const
2529 return levi_civita_2<T, DYNAMIC>(dimension);
2536template<
typename T, Index N>
2541 return levi_civita_2<T, N>(dimension);
2547template<
typename T, Index N>
2552 return levi_civita_2<T, N>();
2560Tensor<T, DYNAMIC>
const
2563 return levi_civita_2<T, DYNAMIC>(dimension);
2569template<
typename T, Index N>
2574 return levi_civita_2<T, N>(dimension);
2580template<
typename T, Index N>
2591 switch (dimension) {
2593 for (
Index i = 0; i < dimension; ++i) {
2594 for (
Index j = i + 1; j < dimension; ++j) {
2618template<
typename T, Index N>
2629 switch (dimension) {
2637 T
const & s00 = A(0, 0);
2638 T
const & s11 = A(1, 1);
2639 T
const & s22 = A(2, 2);
2641 T
const s01 = 0.5 * (A(0, 1) + A(1, 0));
2642 T
const s02 = 0.5 * (A(0, 2) + A(2, 0));
2643 T
const s12 = 0.5 * (A(1, 2) + A(2, 1));
2661 T
const & s00 = A(0, 0);
2662 T
const & s11 = A(1, 1);
2664 T
const s01 = 0.5 * (A(0, 1) + A(1, 0));
2683template<
typename T, Index N>
2694 switch (dimension) {
2702 T
const s01 = 0.5 * (A(0, 1) - A(1, 0));
2703 T
const s02 = 0.5 * (A(0, 2) - A(2, 0));
2704 T
const s12 = 0.5 * (A(1, 2) - A(2, 1));
2722 T
const s01 = 0.5 * (A(0, 1) - A(1, 0));
2742template<
typename T, Index N>
2753 switch (dimension) {
2783template<
typename T, Index N>
2791 for (
Index i = 0; i < dimension; ++i) {
2792 for (
Index j = 0; j < dimension; ++j) {
2803template<
typename T, Index N>
2810 if (dimension == 0) {
2814 os << std::scientific << std::setprecision(17);
2816 for (
Index i = 0; i < dimension; ++i) {
2818 os << std::setw(24) << A(i,0);
2820 for (
Index j = 1; j < dimension; ++j) {
2821 os <<
"," << std::setw(24) << A(i,j);
#define KOKKOS_INLINE_FUNCTION
#define MT_ERROR_EXIT(...)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, Index const dimension, ArrayT &data, Index index1)
KOKKOS_INLINE_FUNCTION Matrix< typename Promote< S, T >::type, M, N > operator+(Matrix< S, M, N > const &A, Matrix< T, M, N > const &B)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, Index const dimension, ArrayT &data, Index index1, Index index2)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, ArrayT &data, Index index1, Index index2)
KOKKOS_INLINE_FUNCTION void minus(TensorBase< T, ST > const &A, TensorBase< T, ST > &B)
KOKKOS_INLINE_FUNCTION Tensor< T, N > const eye()
KOKKOS_INLINE_FUNCTION Matrix< typename Promote< S, T >::type, M, N > operator-(Matrix< S, M, N > const &A, Matrix< T, M, N > const &B)
std::ostream & operator<<(std::ostream &os, Matrix< T, M, N > const &A)
KOKKOS_INLINE_FUNCTION void add(TensorBase< R, SR > const &A, TensorBase< S, SS > const &B, TensorBase< T, ST > &C)
KOKKOS_INLINE_FUNCTION Tensor(T const *data_ptr, ComponentOrder const component_order)
KOKKOS_INLINE_FUNCTION Index get_num_cols() const
std::istream & operator>>(std::istream &is, Matrix< T, M, N > &A)
KOKKOS_INLINE_FUNCTION Tensor< typename Promote< S, T >::type, N > dyad(Vector< S, N > const &u, Vector< T, N > const &v)
KOKKOS_INLINE_FUNCTION Tensor< T, N > const alternator_2()
KOKKOS_INLINE_FUNCTION Tensor< T, N > const identity()
KOKKOS_INLINE_FUNCTION Matrix< typename Promote< S, T >::type, M, N > operator/(Matrix< T, M, N > const &A, S const &s)
KOKKOS_INLINE_FUNCTION Vector< typename Promote< S, T >::type, M > operator*(Matrix< T, M, N > const &A, Vector< S, N > const &u)
KOKKOS_INLINE_FUNCTION Tensor< T, N > const permutation_2()
KOKKOS_INLINE_FUNCTION Promote< S, T >::type dotdot(Matrix< S, M, N > const &A, Matrix< T, M, N > const &B)
KOKKOS_INLINE_FUNCTION Matrix< typename Promote< S, T >::type, M, N > t_dot_t(Matrix< S, P, M > const &A, Matrix< T, N, P > const &B)
KOKKOS_INLINE_FUNCTION Tensor()
KOKKOS_INLINE_FUNCTION Tensor(T const &s00, T const &s01, T const &s10, T const &s11)
KOKKOS_INLINE_FUNCTION Tensor< typename Promote< S, T >::type, N > bun(Vector< S, N > const &u, Vector< T, N > const &v)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, Index const dimension, ArrayT &data, Index index1, Index index2, Index index3, Index index4)
KOKKOS_INLINE_FUNCTION Tensor< T, N > const zero()
KOKKOS_INLINE_FUNCTION Index get_dimension() const
KOKKOS_INLINE_FUNCTION Tensor(Index const dimension, T const *data_ptr, ComponentOrder const component_order)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, ArrayT &data, Index index1, Index index2, Index index3, Index index4, Index index5, Index index6)
KOKKOS_INLINE_FUNCTION bool equal(TensorBase< T, ST > const &A, TensorBase< T, ST > const &B)
KOKKOS_INLINE_FUNCTION Vector< T, M > col(Matrix< T, M, N > const &A, Index const j)
KOKKOS_INLINE_FUNCTION Index get_dimension() const
KOKKOS_INLINE_FUNCTION Index get_dimension(Index const order) const
KOKKOS_INLINE_FUNCTION Matrix< typename Promote< S, T >::type, M, N > dot_t(Matrix< S, M, P > const &A, Matrix< T, N, P > const &B)
KOKKOS_INLINE_FUNCTION T & operator()(Index const i, Index const j)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, ArrayT &data, Index index1)
KOKKOS_INLINE_FUNCTION Tensor< T, N > diag(Vector< T, N > const &v)
KOKKOS_INLINE_FUNCTION Tensor< T, N > const levi_civita_2()
KOKKOS_INLINE_FUNCTION Tensor(Source const source, Index const dimension, ArrayT &data, Index index1, Index index2, Index index3)
KOKKOS_INLINE_FUNCTION void scale(TensorBase< R, SR > const &A, S const &s, TensorBase< T, ST > &B)
KOKKOS_INLINE_FUNCTION bool operator!=(Matrix< T, M, N > const &A, Matrix< T, M, N > const &B)
KOKKOS_INLINE_FUNCTION void set_dimension(Index const dimension)
KOKKOS_INLINE_FUNCTION Matrix< T, M, N > adjoint(Matrix< T, N, M > const &A)
KOKKOS_INLINE_FUNCTION Tensor(Index const dimension)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, ArrayT &data, Index index1, Index index2, Index index3, Index index4, Index index5)
KOKKOS_INLINE_FUNCTION bool operator==(Matrix< T, M, N > const &A, Matrix< T, M, N > const &B)
KOKKOS_INLINE_FUNCTION Vector< typename Promote< S, T >::type, M > dot(Matrix< T, M, N > const &A, Vector< S, N > const &u)
KOKKOS_INLINE_FUNCTION Tensor(Tensor4< T, dimension_sqrt< N >::value > const &A)
KOKKOS_INLINE_FUNCTION Index get_num_cols() const
KOKKOS_INLINE_FUNCTION Tensor(Filler const value)
KOKKOS_INLINE_FUNCTION Tensor(T const *data_ptr)
KOKKOS_INLINE_FUNCTION void split(TensorBase< R, SR > const &A, S const &s, TensorBase< T, ST > &B)
KOKKOS_INLINE_FUNCTION Index get_num_rows() const
KOKKOS_INLINE_FUNCTION Tensor(T const &s00, T const &s01, T const &s02, T const &s10, T const &s11, T const &s12, T const &s20, T const &s21, T const &s22)
static constexpr bool IS_DYNAMIC
KOKKOS_INLINE_FUNCTION Tensor(Source const source, Index const dimension, ArrayT &data, Index index1, Index index2, Index index3, Index index4, Index index5, Index index6)
KOKKOS_INLINE_FUNCTION Matrix< typename Promote< S, T >::type, M, N > t_dot(Matrix< S, P, M > const &A, Matrix< T, P, N > const &B)
KOKKOS_INLINE_FUNCTION Tensor< typename Promote< S, T >::type, N > tensor(Vector< S, N > const &u, Vector< T, N > const &v)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, ArrayT &data, Index index1, Index index2, Index index3, Index index4)
KOKKOS_INLINE_FUNCTION Tensor(Index const dimension, Filler const value)
KOKKOS_INLINE_FUNCTION Tensor(Source const source, Index const dimension, ArrayT &data, Index index1, Index index2, Index index3, Index index4, Index index5)
virtual KOKKOS_INLINE_FUNCTION ~Tensor()
KOKKOS_INLINE_FUNCTION bool not_equal(TensorBase< T, ST > const &A, TensorBase< T, ST > const &B)
static constexpr Index ORDER
KOKKOS_INLINE_FUNCTION Tensor(Index const dimension, T const *data_ptr)
KOKKOS_INLINE_FUNCTION void set_dimension(Index const dimension, Index const order)
KOKKOS_INLINE_FUNCTION Index get_num_rows() const
KOKKOS_INLINE_FUNCTION Tensor(Source const source, ArrayT &data, Index index1, Index index2, Index index3)
KOKKOS_INLINE_FUNCTION Matrix< T, M, N > transpose(Matrix< T, N, M > const &A)
KOKKOS_INLINE_FUNCTION Tensor(Tensor< T, N > const &A)
KOKKOS_INLINE_FUNCTION Tensor< T, N > sym(Tensor< T, N > const &A)
KOKKOS_INLINE_FUNCTION void divide(TensorBase< R, SR > const &A, S const &s, TensorBase< T, ST > &B)
static KOKKOS_INLINE_FUNCTION constexpr Index get_order()
KOKKOS_INLINE_FUNCTION Tensor< T, N > skew(Tensor< T, N > const &A)
KOKKOS_INLINE_FUNCTION Vector< T, N > row(Matrix< T, M, N > const &A, Index const i)
KOKKOS_INLINE_FUNCTION T const & operator()(Index const i, Index const j) const
KOKKOS_INLINE_FUNCTION void subtract(TensorBase< R, SR > const &A, TensorBase< S, SS > const &B, TensorBase< T, ST > &C)
uint32_t Index
Indexing type.
constexpr Index DYNAMIC
Indicator for dynamic storage.
KOKKOS_INLINE_FUNCTION void swap(T &a, T &b)