Reference documentation for deal.II version GIT 8ad845fa53 2023-12-10 20:50:02+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\}}\)
full_matrix.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1999 - 2023 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_full_matrix_h
17 #define dealii_full_matrix_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #include <deal.II/base/numbers.h>
23 #include <deal.II/base/table.h>
24 #include <deal.II/base/tensor.h>
25 
26 #include <deal.II/lac/exceptions.h>
28 
29 #include <cstring>
30 #include <iomanip>
31 #include <vector>
32 
34 
35 
36 // forward declarations
37 #ifndef DOXYGEN
38 template <typename number>
39 class Vector;
40 template <typename number>
41 class LAPACKFullMatrix;
42 #endif
43 
77 template <typename number>
78 class FullMatrix : public Table<2, number>
79 {
80 public:
88  static_assert(
89  std::is_arithmetic<
91  "The FullMatrix class only supports basic numeric types. In particular, it "
92  "does not support automatically differentiated numbers.");
93 
94 
98  using size_type = std::size_t;
99 
104  using value_type = number;
105 
110 
115 
120 
124  using Table<2, number>::end;
125 
136 
151  explicit FullMatrix(const size_type n = 0);
152 
156  FullMatrix(const size_type rows, const size_type cols);
157 
162  FullMatrix(const size_type rows, const size_type cols, const number *entries);
163 
185  template <typename number2>
188 
197  operator=(const number d);
198 
209 
214  template <typename number2>
217 
218 
224  template <typename MatrixType>
225  void
226  copy_from(const MatrixType &);
227 
233  template <typename MatrixType>
234  void
235  copy_transposed(const MatrixType &);
236 
244  template <int dim>
245  void
247  const unsigned int src_r_i = 0,
248  const unsigned int src_r_j = dim - 1,
249  const unsigned int src_c_i = 0,
250  const unsigned int src_c_j = dim - 1,
251  const size_type dst_r = 0,
252  const size_type dst_c = 0);
253 
261  template <int dim>
262  void
264  const size_type src_r_i = 0,
265  const size_type src_r_j = dim - 1,
266  const size_type src_c_i = 0,
267  const size_type src_c_j = dim - 1,
268  const unsigned int dst_r = 0,
269  const unsigned int dst_c = 0) const;
270 
283  template <typename MatrixType, typename index_type>
284  void
285  extract_submatrix_from(const MatrixType &matrix,
286  const std::vector<index_type> &row_index_set,
287  const std::vector<index_type> &column_index_set);
288 
301  template <typename MatrixType, typename index_type>
302  void
303  scatter_matrix_to(const std::vector<index_type> &row_index_set,
304  const std::vector<index_type> &column_index_set,
305  MatrixType &matrix) const;
306 
317  template <typename number2>
318  void
320  const size_type dst_offset_i = 0,
321  const size_type dst_offset_j = 0,
322  const size_type src_offset_i = 0,
323  const size_type src_offset_j = 0);
324 
325 
329  template <typename number2>
330  void
331  fill(const number2 *);
332 
344  template <typename number2>
345  void
347  const std::vector<size_type> &p_rows,
348  const std::vector<size_type> &p_cols);
349 
360  void
361  set(const size_type i, const size_type j, const number value);
375  bool
377 
382  size_type
383  m() const;
384 
389  size_type
390  n() const;
391 
397  bool
398  all_zero() const;
399 
415  template <typename number2>
416  number2
418 
428  template <typename number2>
429  number2
431  const Vector<number2> &v) const;
432 
437  real_type
438  l1_norm() const;
439 
444  real_type
445  linfty_norm() const;
446 
454  real_type
455  frobenius_norm() const;
456 
465  real_type
467 
473  number
474  determinant() const;
475 
481  number
482  trace() const;
483 
490  template <typename StreamType>
491  void
492  print(StreamType &s,
493  const unsigned int width = 5,
494  const unsigned int precision = 2) const;
495 
522  void
523  print_formatted(std::ostream &out,
524  const unsigned int precision = 3,
525  const bool scientific = true,
526  const unsigned int width = 0,
527  const char *zero_string = " ",
528  const double denominator = 1.,
529  const double threshold = 0.,
530  const char *separator = " ") const;
531 
536  std::size_t
538 
548  iterator
549  begin(const size_type r);
550 
554  iterator
555  end(const size_type r);
556 
561  begin(const size_type r) const;
562 
567  end(const size_type r) const;
568 
578  FullMatrix &
579  operator*=(const number factor);
580 
584  FullMatrix &
585  operator/=(const number factor);
586 
594  template <typename number2>
595  void
596  add(const number a, const FullMatrix<number2> &A);
597 
605  template <typename number2>
606  void
607  add(const number a,
608  const FullMatrix<number2> &A,
609  const number b,
610  const FullMatrix<number2> &B);
611 
620  template <typename number2>
621  void
622  add(const number a,
623  const FullMatrix<number2> &A,
624  const number b,
625  const FullMatrix<number2> &B,
626  const number c,
627  const FullMatrix<number2> &C);
628 
640  template <typename number2>
641  void
643  const number factor,
644  const size_type dst_offset_i = 0,
645  const size_type dst_offset_j = 0,
646  const size_type src_offset_i = 0,
647  const size_type src_offset_j = 0);
648 
654  template <typename number2>
655  void
656  Tadd(const number s, const FullMatrix<number2> &B);
657 
669  template <typename number2>
670  void
672  const number factor,
673  const size_type dst_offset_i = 0,
674  const size_type dst_offset_j = 0,
675  const size_type src_offset_i = 0,
676  const size_type src_offset_j = 0);
677 
681  void
682  add(const size_type row, const size_type column, const number value);
683 
693  template <typename number2, typename index_type>
694  void
695  add(const size_type row,
696  const size_type n_cols,
697  const index_type *col_indices,
698  const number2 *values,
699  const bool elide_zero_values = true,
700  const bool col_indices_are_sorted = false);
701 
705  void
706  add_row(const size_type i, const number s, const size_type j);
707 
712  void
714  const number s,
715  const size_type j,
716  const number t,
717  const size_type k);
718 
722  void
723  add_col(const size_type i, const number s, const size_type j);
724 
729  void
731  const number s,
732  const size_type j,
733  const number t,
734  const size_type k);
735 
739  void
740  swap_row(const size_type i, const size_type j);
741 
745  void
746  swap_col(const size_type i, const size_type j);
747 
752  void
753  diagadd(const number s);
754 
758  template <typename number2>
759  void
760  equ(const number a, const FullMatrix<number2> &A);
761 
765  template <typename number2>
766  void
767  equ(const number a,
768  const FullMatrix<number2> &A,
769  const number b,
770  const FullMatrix<number2> &B);
771 
775  template <typename number2>
776  void
777  equ(const number a,
778  const FullMatrix<number2> &A,
779  const number b,
780  const FullMatrix<number2> &B,
781  const number c,
782  const FullMatrix<number2> &C);
783 
790  void
792 
807  void
809 
816  template <typename number2>
817  void
819 
828  template <typename number2>
829  void
831 
836  template <typename number2>
837  void
839 
845  template <typename number2>
846  void
848 
854  template <typename number2>
855  void
857 
882  template <typename number2>
883  void
885  const FullMatrix<number2> &B,
886  const bool adding = false) const;
887 
906  template <typename number2>
907  void
909  const FullMatrix<number2> &B,
910  const bool adding = false) const;
911 
930  template <typename number2>
931  void
933  const FullMatrix<number2> &B,
934  const bool adding = false) const;
935 
955  template <typename number2>
956  void
958  const FullMatrix<number2> &B,
959  const bool adding = false) const;
960 
971  void
973  const FullMatrix<number> &B,
974  const FullMatrix<number> &D,
975  const bool transpose_B = false,
976  const bool transpose_D = false,
977  const number scaling = number(1.));
978 
991  template <typename number2>
992  void
994  const Vector<number2> &v,
995  const bool adding = false) const;
996 
1002  template <typename number2>
1003  void
1005 
1019  template <typename number2>
1020  void
1022  const Vector<number2> &v,
1023  const bool adding = false) const;
1024 
1031  template <typename number2>
1032  void
1034 
1040  template <typename somenumber>
1041  void
1043  const Vector<somenumber> &src,
1044  const number omega = 1.) const;
1045 
1052  template <typename number2, typename number3>
1053  number
1055  const Vector<number2> &x,
1056  const Vector<number3> &b) const;
1057 
1068  template <typename number2>
1069  void
1070  forward(Vector<number2> &dst, const Vector<number2> &src) const;
1071 
1079  template <typename number2>
1080  void
1081  backward(Vector<number2> &dst, const Vector<number2> &src) const;
1082 
1094 
1099  ExcNotRegular,
1100  number,
1101  << "The maximal pivot is " << arg1
1102  << ", which is below the threshold. The matrix may be singular.");
1107  size_type,
1108  size_type,
1109  size_type,
1110  << "Target region not in matrix: size in this direction="
1111  << arg1 << ", size of new matrix=" << arg2
1112  << ", offset=" << arg3);
1117  "You are attempting an operation on two vectors that "
1118  "are the same object, but the operation requires that the "
1119  "two objects are in fact different.");
1125 };
1126 
1129 #ifndef DOXYGEN
1130 /*-------------------------Inline functions -------------------------------*/
1131 
1132 
1133 
1134 template <typename number>
1135 inline typename FullMatrix<number>::size_type
1136 FullMatrix<number>::m() const
1137 {
1138  return this->n_rows();
1139 }
1140 
1141 
1142 
1143 template <typename number>
1144 inline typename FullMatrix<number>::size_type
1145 FullMatrix<number>::n() const
1146 {
1147  return this->n_cols();
1148 }
1149 
1150 
1151 
1152 template <typename number>
1154 FullMatrix<number>::operator=(const number d)
1155 {
1156  Assert(d == number(0), ExcScalarAssignmentOnlyForZeroValue());
1157  (void)d; // removes -Wunused-parameter warning in optimized mode
1158 
1159  if (this->n_elements() != 0)
1160  this->reset_values();
1161 
1162  return *this;
1163 }
1164 
1165 
1166 
1167 template <typename number>
1168 template <typename number2>
1169 inline void
1170 FullMatrix<number>::fill(const number2 *src)
1171 {
1173 }
1174 
1175 
1176 
1177 template <typename number>
1178 template <typename MatrixType>
1179 void
1180 FullMatrix<number>::copy_from(const MatrixType &M)
1181 {
1182  this->reinit(M.m(), M.n());
1183 
1184  // loop over the elements of the argument matrix row by row, as suggested
1185  // in the documentation of the sparse matrix iterator class, and
1186  // copy them into the current object
1187  for (size_type row = 0; row < M.m(); ++row)
1188  {
1189  const typename MatrixType::const_iterator end_row = M.end(row);
1190  for (typename MatrixType::const_iterator entry = M.begin(row);
1191  entry != end_row;
1192  ++entry)
1193  this->el(row, entry->column()) = entry->value();
1194  }
1195 }
1196 
1197 
1198 
1199 template <typename number>
1200 template <int dim>
1201 void
1203  const unsigned int src_r_i,
1204  const unsigned int src_r_j,
1205  const unsigned int src_c_i,
1206  const unsigned int src_c_j,
1207  const size_type dst_r,
1208  const size_type dst_c)
1209 {
1210  Assert(!this->empty(), ExcEmptyMatrix());
1211  AssertIndexRange(src_r_j - src_r_i, this->m() - dst_r);
1212  AssertIndexRange(src_c_j - src_c_i, this->n() - dst_c);
1213  AssertIndexRange(src_r_j, dim);
1214  AssertIndexRange(src_c_j, dim);
1215  AssertIndexRange(src_r_i, src_r_j + 1);
1216  AssertIndexRange(src_c_i, src_c_j + 1);
1217 
1218  for (size_type i = 0; i < src_r_j - src_r_i + 1; ++i)
1219  for (size_type j = 0; j < src_c_j - src_c_i + 1; ++j)
1220  {
1221  const unsigned int src_r_index = static_cast<unsigned int>(i + src_r_i);
1222  const unsigned int src_c_index = static_cast<unsigned int>(j + src_c_i);
1223  (*this)(i + dst_r, j + dst_c) = number(T[src_r_index][src_c_index]);
1224  }
1225 }
1226 
1227 
1228 
1229 template <typename number>
1230 template <int dim>
1231 void
1233  const size_type src_r_i,
1234  const size_type src_r_j,
1235  const size_type src_c_i,
1236  const size_type src_c_j,
1237  const unsigned int dst_r,
1238  const unsigned int dst_c) const
1239 {
1240  Assert(!this->empty(), ExcEmptyMatrix());
1241  AssertIndexRange(src_r_j - src_r_i, dim - dst_r);
1242  AssertIndexRange(src_c_j - src_c_i, dim - dst_c);
1243  AssertIndexRange(src_r_j, this->m());
1244  AssertIndexRange(src_r_j, this->n());
1245  AssertIndexRange(src_r_i, src_r_j + 1);
1246  AssertIndexRange(src_c_j, src_c_j + 1);
1247 
1248  for (size_type i = 0; i < src_r_j - src_r_i + 1; ++i)
1249  for (size_type j = 0; j < src_c_j - src_c_i + 1; ++j)
1250  {
1251  const unsigned int dst_r_index = static_cast<unsigned int>(i + dst_r);
1252  const unsigned int dst_c_index = static_cast<unsigned int>(j + dst_c);
1253  T[dst_r_index][dst_c_index] = double((*this)(i + src_r_i, j + src_c_i));
1254  }
1255 }
1256 
1257 
1258 
1259 template <typename number>
1260 template <typename MatrixType>
1261 void
1262 FullMatrix<number>::copy_transposed(const MatrixType &M)
1263 {
1264  this->reinit(M.n(), M.m());
1265 
1266  // loop over the elements of the argument matrix row by row, as suggested
1267  // in the documentation of the sparse matrix iterator class, and
1268  // copy them into the current object
1269  for (size_type row = 0; row < M.m(); ++row)
1270  {
1271  const typename MatrixType::const_iterator end_row = M.end(row);
1272  for (typename MatrixType::const_iterator entry = M.begin(row);
1273  entry != end_row;
1274  ++entry)
1275  this->el(entry->column(), row) = entry->value();
1276  }
1277 }
1278 
1279 
1280 
1281 template <typename number>
1282 template <typename MatrixType, typename index_type>
1283 inline void
1285  const MatrixType &matrix,
1286  const std::vector<index_type> &row_index_set,
1287  const std::vector<index_type> &column_index_set)
1288 {
1289  AssertDimension(row_index_set.size(), this->n_rows());
1290  AssertDimension(column_index_set.size(), this->n_cols());
1291 
1292  const size_type n_rows_submatrix = row_index_set.size();
1293  const size_type n_cols_submatrix = column_index_set.size();
1294 
1295  for (size_type sub_row = 0; sub_row < n_rows_submatrix; ++sub_row)
1296  for (size_type sub_col = 0; sub_col < n_cols_submatrix; ++sub_col)
1297  (*this)(sub_row, sub_col) =
1298  matrix.el(row_index_set[sub_row], column_index_set[sub_col]);
1299 }
1300 
1301 
1302 
1303 template <typename number>
1304 template <typename MatrixType, typename index_type>
1305 inline void
1307  const std::vector<index_type> &row_index_set,
1308  const std::vector<index_type> &column_index_set,
1309  MatrixType &matrix) const
1310 {
1311  AssertDimension(row_index_set.size(), this->n_rows());
1312  AssertDimension(column_index_set.size(), this->n_cols());
1313 
1314  const size_type n_rows_submatrix = row_index_set.size();
1315  const size_type n_cols_submatrix = column_index_set.size();
1316 
1317  for (size_type sub_row = 0; sub_row < n_rows_submatrix; ++sub_row)
1318  for (size_type sub_col = 0; sub_col < n_cols_submatrix; ++sub_col)
1319  matrix.set(row_index_set[sub_row],
1320  column_index_set[sub_col],
1321  (*this)(sub_row, sub_col));
1322 }
1323 
1324 
1325 template <typename number>
1326 inline void
1328  const size_type j,
1329  const number value)
1330 {
1331  (*this)(i, j) = value;
1332 }
1333 
1334 
1335 
1336 template <typename number>
1337 template <typename number2>
1338 void
1340  const Vector<number2> &v) const
1341 {
1342  vmult(w, v, true);
1343 }
1344 
1345 
1346 template <typename number>
1347 template <typename number2>
1348 void
1350  const Vector<number2> &v) const
1351 {
1352  Tvmult(w, v, true);
1353 }
1354 
1355 
1356 //---------------------------------------------------------------------------
1357 template <typename number>
1358 inline typename FullMatrix<number>::iterator
1360 {
1361  AssertIndexRange(r, m());
1362  return iterator(this, r, 0);
1363 }
1364 
1365 
1366 
1367 template <typename number>
1368 inline typename FullMatrix<number>::iterator
1370 {
1371  AssertIndexRange(r, m());
1372  return iterator(this, r + 1, 0);
1373 }
1374 
1375 
1376 
1377 template <typename number>
1378 inline typename FullMatrix<number>::const_iterator
1379 FullMatrix<number>::begin(const size_type r) const
1380 {
1381  AssertIndexRange(r, m());
1382  return const_iterator(this, r, 0);
1383 }
1384 
1385 
1386 
1387 template <typename number>
1388 inline typename FullMatrix<number>::const_iterator
1389 FullMatrix<number>::end(const size_type r) const
1390 {
1391  AssertIndexRange(r, m());
1392  return const_iterator(this, r + 1, 0);
1393 }
1394 
1395 
1396 
1397 template <typename number>
1398 inline void
1399 FullMatrix<number>::add(const size_type r, const size_type c, const number v)
1400 {
1401  AssertIndexRange(r, this->m());
1402  AssertIndexRange(c, this->n());
1403 
1404  this->operator()(r, c) += v;
1405 }
1406 
1407 
1408 
1409 template <typename number>
1410 template <typename number2, typename index_type>
1411 inline void
1413  const size_type n_cols,
1414  const index_type *col_indices,
1415  const number2 *values,
1416  const bool,
1417  const bool)
1418 {
1419  AssertIndexRange(row, this->m());
1420  for (size_type col = 0; col < n_cols; ++col)
1421  {
1422  AssertIndexRange(col_indices[col], this->n());
1423  this->operator()(row, col_indices[col]) += values[col];
1424  }
1425 }
1426 
1427 
1428 template <typename number>
1429 template <typename StreamType>
1430 inline void
1431 FullMatrix<number>::print(StreamType &s,
1432  const unsigned int w,
1433  const unsigned int p) const
1434 {
1435  Assert(!this->empty(), ExcEmptyMatrix());
1436 
1437  // save the state of out stream
1438  const std::streamsize old_precision = s.precision(p);
1439  const std::streamsize old_width = s.width(w);
1440 
1441  for (size_type i = 0; i < this->m(); ++i)
1442  {
1443  for (size_type j = 0; j < this->n(); ++j)
1444  {
1445  s.width(w);
1446  s.precision(p);
1447  s << this->el(i, j);
1448  }
1449  s << std::endl;
1450  }
1451 
1452  // reset output format
1453  s.precision(old_precision);
1454  s.width(old_width);
1455 }
1456 
1457 
1458 #endif // DOXYGEN
1459 
1461 
1462 #endif
typename numbers::NumberTraits< number >::real_type real_type
Definition: full_matrix.h:135
typename Table< 2, number >::const_iterator const_iterator
Definition: full_matrix.h:114
void triple_product(const FullMatrix< number > &A, const FullMatrix< number > &B, const FullMatrix< number > &D, const bool transpose_B=false, const bool transpose_D=false, const number scaling=number(1.))
void TmTmult(FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
FullMatrix(const size_type rows, const size_type cols)
number residual(Vector< number2 > &dst, const Vector< number2 > &x, const Vector< number3 > &b) const
std::size_t memory_consumption() const
void diagadd(const number s)
void fill_permutation(const FullMatrix< number2 > &src, const std::vector< size_type > &p_rows, const std::vector< size_type > &p_cols)
void add_row(const size_type i, const number s, const size_type j)
void mmult(FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
real_type relative_symmetry_norm2() const
void add(const size_type row, const size_type column, const number value)
void copy_from(const Tensor< 2, dim > &T, const unsigned int src_r_i=0, const unsigned int src_r_j=dim - 1, const unsigned int src_c_i=0, const unsigned int src_c_j=dim - 1, const size_type dst_r=0, const size_type dst_c=0)
void symmetrize()
void equ(const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B)
number trace() const
void right_invert(const FullMatrix< number2 > &M)
std::size_t size_type
Definition: full_matrix.h:98
void set(const size_type i, const size_type j, const number value)
size_type n() const
void add_row(const size_type i, const number s, const size_type j, const number t, const size_type k)
FullMatrix< number > & operator=(const FullMatrix< number2 > &)
number value_type
Definition: full_matrix.h:104
typename Table< 2, number >::iterator iterator
Definition: full_matrix.h:109
void add(const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B, const number c, const FullMatrix< number2 > &C)
FullMatrix & operator/=(const number factor)
void Tadd(const number s, const FullMatrix< number2 > &B)
void vmult(Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
bool all_zero() const
void add_col(const size_type i, const number s, const size_type j, const number t, const size_type k)
void scatter_matrix_to(const std::vector< index_type > &row_index_set, const std::vector< index_type > &column_index_set, MatrixType &matrix) const
void swap_row(const size_type i, const size_type j)
void add(const FullMatrix< number2 > &src, const number factor, const size_type dst_offset_i=0, const size_type dst_offset_j=0, const size_type src_offset_i=0, const size_type src_offset_j=0)
void copy_to(Tensor< 2, dim > &T, const size_type src_r_i=0, const size_type src_r_j=dim - 1, const size_type src_c_i=0, const size_type src_c_j=dim - 1, const unsigned int dst_r=0, const unsigned int dst_c=0) const
number2 matrix_norm_square(const Vector< number2 > &v) const
void equ(const number a, const FullMatrix< number2 > &A)
const_iterator end(const size_type r) const
FullMatrix(const size_type rows, const size_type cols, const number *entries)
bool operator==(const FullMatrix< number > &) const
void Tvmult(Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
void print_formatted(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const unsigned int width=0, const char *zero_string=" ", const double denominator=1., const double threshold=0., const char *separator=" ") const
void Tmmult(FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
number2 matrix_scalar_product(const Vector< number2 > &u, const Vector< number2 > &v) const
void gauss_jordan()
void add(const size_type row, const size_type n_cols, const index_type *col_indices, const number2 *values, const bool elide_zero_values=true, const bool col_indices_are_sorted=false)
void add_col(const size_type i, const number s, const size_type j)
void precondition_Jacobi(Vector< somenumber > &dst, const Vector< somenumber > &src, const number omega=1.) const
FullMatrix(const IdentityMatrix &id)
void vmult_add(Vector< number2 > &w, const Vector< number2 > &v) const
FullMatrix< number > & operator=(const IdentityMatrix &id)
void invert(const FullMatrix< number2 > &M)
void cholesky(const FullMatrix< number2 > &A)
void fill(const FullMatrix< number2 > &src, const size_type dst_offset_i=0, const size_type dst_offset_j=0, const size_type src_offset_i=0, const size_type src_offset_j=0)
void add(const number a, const FullMatrix< number2 > &A)
FullMatrix & operator*=(const number factor)
FullMatrix< number > & operator=(const number d)
number determinant() const
void equ(const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B, const number c, const FullMatrix< number2 > &C)
void fill(const number2 *)
void copy_transposed(const MatrixType &)
void print(StreamType &s, const unsigned int width=5, const unsigned int precision=2) const
void Tvmult_add(Vector< number2 > &w, const Vector< number2 > &v) const
void mTmult(FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
void left_invert(const FullMatrix< number2 > &M)
iterator begin(const size_type r)
iterator end(const size_type r)
void add(const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B)
void outer_product(const Vector< number2 > &V, const Vector< number2 > &W)
real_type frobenius_norm() const
void forward(Vector< number2 > &dst, const Vector< number2 > &src) const
void Tadd(const FullMatrix< number2 > &src, const number factor, const size_type dst_offset_i=0, const size_type dst_offset_j=0, const size_type src_offset_i=0, const size_type src_offset_j=0)
FullMatrix< number > & operator=(const LAPACKFullMatrix< number2 > &)
FullMatrix(const size_type n=0)
size_type m() const
void swap_col(const size_type i, const size_type j)
void extract_submatrix_from(const MatrixType &matrix, const std::vector< index_type > &row_index_set, const std::vector< index_type > &column_index_set)
void backward(Vector< number2 > &dst, const Vector< number2 > &src) const
void copy_from(const MatrixType &)
const_iterator begin(const size_type r) const
real_type l1_norm() const
real_type linfty_norm() const
Definition: vector.h:110
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
#define DeclException0(Exception0)
Definition: exceptions.h:472
static ::ExceptionBase & ExcSourceEqualsDestination()
static ::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
#define Assert(cond, exc)
Definition: exceptions.h:1631
static ::ExceptionBase & ExcInvalidDestination(size_type arg1, size_type arg2, size_type arg3)
static ::ExceptionBase & ExcNotRegular(number arg1)
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1820
#define AssertIndexRange(index, range)
Definition: exceptions.h:1888
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:495
#define DeclException3(Exception3, type1, type2, type3, outsequence)
Definition: exceptions.h:563
static ::ExceptionBase & ExcMatrixNotPositiveDefinite()
static ::ExceptionBase & ExcEmptyMatrix()
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:517
@ matrix
Contents is actually a matrix.
static const char A
static const char T
static const char V
types::global_dof_index size_type
Definition: cuda_kernels.h:45
SymmetricTensor< 2, dim, Number > C(const Tensor< 2, dim, Number > &F)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
Tensor< 2, dim, Number > w(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
Definition: matrix_block.h:618