deal.II version 9.7.0
\(\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
full_matrix.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 1999 - 2025 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_full_matrix_h
16#define dealii_full_matrix_h
17
18
19#include <deal.II/base/config.h>
20
22#include <deal.II/base/table.h>
23#include <deal.II/base/tensor.h>
24
28
29#include <cstring>
30#include <iomanip>
31#include <vector>
32
34
35
36// forward declarations
37#ifndef DOXYGEN
38template <typename number>
39class Vector;
40template <typename number>
42#endif
43
48
49
77template <typename number>
78class FullMatrix : public Table<2, number>
79{
80public:
88 static_assert(
89 std::is_arithmetic_v<typename numbers::NumberTraits<number>::real_type>,
90 "The FullMatrix class only supports basic numeric types. In particular, it "
91 "does not support automatically differentiated numbers.");
92
93
97 using size_type = std::size_t;
98
103 using value_type = number;
104
109
114
118 using Table<2, number>::begin;
119
123 using Table<2, number>::end;
124
135
140
150 explicit FullMatrix(const size_type n = 0);
151
155 FullMatrix(const size_type rows, const size_type cols);
156
161 FullMatrix(const size_type rows, const size_type cols, const number *entries);
162
175
180
184 template <typename number2>
187
196 operator=(const number d);
197
208
213 template <typename number2>
216
217
223 template <typename MatrixType>
224 void
225 copy_from(const MatrixType &);
226
232 template <typename MatrixType>
233 void
234 copy_transposed(const MatrixType &);
235
243 template <int dim>
244 void
246 const unsigned int src_r_i = 0,
247 const unsigned int src_r_j = dim - 1,
248 const unsigned int src_c_i = 0,
249 const unsigned int src_c_j = dim - 1,
250 const size_type dst_r = 0,
251 const size_type dst_c = 0);
252
260 template <int dim>
261 void
263 const size_type src_r_i = 0,
264 const size_type src_r_j = dim - 1,
265 const size_type src_c_i = 0,
266 const size_type src_c_j = dim - 1,
267 const unsigned int dst_r = 0,
268 const unsigned int dst_c = 0) const;
269
282 template <typename MatrixType, typename index_type>
283 void
284 extract_submatrix_from(const MatrixType &matrix,
285 const std::vector<index_type> &row_index_set,
286 const std::vector<index_type> &column_index_set);
287
300 template <typename MatrixType, typename index_type>
301 void
302 scatter_matrix_to(const std::vector<index_type> &row_index_set,
303 const std::vector<index_type> &column_index_set,
304 MatrixType &matrix) const;
305
316 template <typename number2>
317 void
319 const size_type dst_offset_i = 0,
320 const size_type dst_offset_j = 0,
321 const size_type src_offset_i = 0,
322 const size_type src_offset_j = 0);
323
324
328 template <typename number2>
329 void
330 fill(const number2 *);
331
343 template <typename number2>
344 void
346 const std::vector<size_type> &p_rows,
347 const std::vector<size_type> &p_cols);
348
359 void
360 set(const size_type i, const size_type j, const number value);
368
374 bool
376
382 m() const;
383
389 n() const;
390
396 bool
397 all_zero() const;
398
414 template <typename number2>
415 number2
417
427 template <typename number2>
428 number2
430 const Vector<number2> &v) const;
431
437 l1_norm() const;
438
444 linfty_norm() const;
445
455
466
472 number
473 determinant() const;
474
480 number
481 trace() const;
482
489 template <typename StreamType>
490 void
491 print(StreamType &s,
492 const unsigned int width = 5,
493 const unsigned int precision = 2) const;
494
521 void
522 print_formatted(std::ostream &out,
523 const unsigned int precision = 3,
524 const bool scientific = true,
525 const unsigned int width = 0,
526 const char *zero_string = " ",
527 const double denominator = 1.,
528 const double threshold = 0.,
529 const char *separator = " ") const;
530
535 std::size_t
537
543
548 begin(const size_type r);
549
554 end(const size_type r);
555
560 begin(const size_type r) const;
561
566 end(const size_type r) const;
567
573
577 FullMatrix &
578 operator*=(const number factor);
579
583 FullMatrix &
584 operator/=(const number factor);
585
593 template <typename number2>
594 void
595 add(const number a, const FullMatrix<number2> &A);
596
604 template <typename number2>
605 void
606 add(const number a,
607 const FullMatrix<number2> &A,
608 const number b,
609 const FullMatrix<number2> &B);
610
619 template <typename number2>
620 void
621 add(const number a,
622 const FullMatrix<number2> &A,
623 const number b,
624 const FullMatrix<number2> &B,
625 const number c,
626 const FullMatrix<number2> &C);
627
639 template <typename number2>
640 void
642 const number factor,
643 const size_type dst_offset_i = 0,
644 const size_type dst_offset_j = 0,
645 const size_type src_offset_i = 0,
646 const size_type src_offset_j = 0);
647
653 template <typename number2>
654 void
655 Tadd(const number s, const FullMatrix<number2> &B);
656
668 template <typename number2>
669 void
671 const number factor,
672 const size_type dst_offset_i = 0,
673 const size_type dst_offset_j = 0,
674 const size_type src_offset_i = 0,
675 const size_type src_offset_j = 0);
676
680 void
681 add(const size_type row, const size_type column, const number value);
682
692 template <typename number2, typename index_type>
693 void
694 add(const size_type row,
695 const size_type n_cols,
696 const index_type *col_indices,
697 const number2 *values,
698 const bool elide_zero_values = true,
699 const bool col_indices_are_sorted = false);
700
704 void
705 add_row(const size_type i, const number s, const size_type j);
706
711 void
713 const number s,
714 const size_type j,
715 const number t,
716 const size_type k);
717
721 void
722 add_col(const size_type i, const number s, const size_type j);
723
728 void
730 const number s,
731 const size_type j,
732 const number t,
733 const size_type k);
734
738 void
739 swap_row(const size_type i, const size_type j);
740
744 void
745 swap_col(const size_type i, const size_type j);
746
751 void
752 diagadd(const number s);
753
757 template <typename number2>
758 void
759 equ(const number a, const FullMatrix<number2> &A);
760
764 template <typename number2>
765 void
766 equ(const number a,
767 const FullMatrix<number2> &A,
768 const number b,
769 const FullMatrix<number2> &B);
770
774 template <typename number2>
775 void
776 equ(const number a,
777 const FullMatrix<number2> &A,
778 const number b,
779 const FullMatrix<number2> &B,
780 const number c,
781 const FullMatrix<number2> &C);
782
789 void
791
806 void
808
815 template <typename number2>
816 void
818
827 template <typename number2>
828 void
830
835 template <typename number2>
836 void
838
844 template <typename number2>
845 void
847
853 template <typename number2>
854 void
856
862
881 template <typename number2>
882 void
884 const FullMatrix<number2> &B,
885 const bool adding = false) const;
886
905 template <typename number2>
906 void
908 const FullMatrix<number2> &B,
909 const bool adding = false) const;
910
929 template <typename number2>
930 void
932 const FullMatrix<number2> &B,
933 const bool adding = false) const;
934
954 template <typename number2>
955 void
957 const FullMatrix<number2> &B,
958 const bool adding = false) const;
959
970 void
972 const FullMatrix<number> &B,
973 const FullMatrix<number> &D,
974 const bool transpose_B = false,
975 const bool transpose_D = false,
976 const number scaling = number(1.));
977
978
1000 void
1002 const FullMatrix<number> &B,
1003 const bool adding = false);
1004
1017 template <typename number2>
1018 void
1020 const Vector<number2> &v,
1021 const bool adding = false) const;
1022
1028 template <typename number2>
1029 void
1031
1045 template <typename number2>
1046 void
1048 const Vector<number2> &v,
1049 const bool adding = false) const;
1050
1057 template <typename number2>
1058 void
1060
1066 template <typename somenumber>
1067 void
1069 const Vector<somenumber> &src,
1070 const number omega = 1.) const;
1071
1078 template <typename number2, typename number3>
1079 number
1081 const Vector<number2> &x,
1082 const Vector<number3> &b) const;
1083
1094 template <typename number2>
1095 void
1096 forward(Vector<number2> &dst, const Vector<number2> &src) const;
1097
1105 template <typename number2>
1106 void
1108
1113
1115
1120
1125
1131 number,
1132 << "The maximal pivot is " << arg1
1133 << ", which is below the threshold. The matrix may be singular.");
1138 size_type,
1139 size_type,
1140 size_type,
1141 << "Target region not in matrix: size in this direction="
1142 << arg1 << ", size of new matrix=" << arg2
1143 << ", offset=" << arg3);
1148 "You are attempting an operation on two vectors that "
1149 "are the same object, but the operation requires that the "
1150 "two objects are in fact different.");
1156};
1157
1159
1160#ifndef DOXYGEN
1161/*-------------------------Inline functions -------------------------------*/
1162
1163
1164
1165template <typename number>
1166inline typename FullMatrix<number>::size_type
1168{
1169 return this->n_rows();
1170}
1171
1172
1173
1174template <typename number>
1175inline typename FullMatrix<number>::size_type
1177{
1178 return this->n_cols();
1179}
1180
1181
1182
1183template <typename number>
1185FullMatrix<number>::operator=(const number d)
1186{
1188
1189 if (this->n_elements() != 0)
1190 this->reset_values();
1191
1192 return *this;
1193}
1194
1195
1196
1197template <typename number>
1198template <typename number2>
1199inline void
1200FullMatrix<number>::fill(const number2 *src)
1201{
1203}
1204
1205
1206
1207template <typename number>
1208template <typename MatrixType>
1209void
1210FullMatrix<number>::copy_from(const MatrixType &M)
1211{
1212 this->reinit(M.m(), M.n());
1213
1214 // loop over the elements of the argument matrix row by row, as suggested
1215 // in the documentation of the sparse matrix iterator class, and
1216 // copy them into the current object
1217 for (size_type row = 0; row < M.m(); ++row)
1218 {
1219 const typename MatrixType::const_iterator end_row = M.end(row);
1220 for (typename MatrixType::const_iterator entry = M.begin(row);
1221 entry != end_row;
1222 ++entry)
1223 this->el(row, entry->column()) = entry->value();
1224 }
1225}
1226
1227
1228
1229template <typename number>
1230template <int dim>
1231void
1233 const unsigned int src_r_i,
1234 const unsigned int src_r_j,
1235 const unsigned int src_c_i,
1236 const unsigned int src_c_j,
1237 const size_type dst_r,
1238 const size_type dst_c)
1239{
1240 Assert(!this->empty(), ExcEmptyMatrix());
1241 AssertIndexRange(src_r_j - src_r_i, this->m() - dst_r);
1242 AssertIndexRange(src_c_j - src_c_i, this->n() - dst_c);
1243 AssertIndexRange(src_r_j, dim);
1244 AssertIndexRange(src_c_j, dim);
1245 AssertIndexRange(src_r_i, src_r_j + 1);
1246 AssertIndexRange(src_c_i, 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 src_r_index = static_cast<unsigned int>(i + src_r_i);
1252 const unsigned int src_c_index = static_cast<unsigned int>(j + src_c_i);
1253 (*this)(i + dst_r, j + dst_c) = number(T[src_r_index][src_c_index]);
1254 }
1255}
1256
1257
1258
1259template <typename number>
1260template <int dim>
1261void
1263 const size_type src_r_i,
1264 const size_type src_r_j,
1265 const size_type src_c_i,
1266 const size_type src_c_j,
1267 const unsigned int dst_r,
1268 const unsigned int dst_c) const
1269{
1270 Assert(!this->empty(), ExcEmptyMatrix());
1271 AssertIndexRange(src_r_j - src_r_i, dim - dst_r);
1272 AssertIndexRange(src_c_j - src_c_i, dim - dst_c);
1273 AssertIndexRange(src_r_j, this->m());
1274 AssertIndexRange(src_r_j, this->n());
1275 AssertIndexRange(src_r_i, src_r_j + 1);
1276 AssertIndexRange(src_c_j, src_c_j + 1);
1277
1278 for (size_type i = 0; i < src_r_j - src_r_i + 1; ++i)
1279 for (size_type j = 0; j < src_c_j - src_c_i + 1; ++j)
1280 {
1281 const unsigned int dst_r_index = static_cast<unsigned int>(i + dst_r);
1282 const unsigned int dst_c_index = static_cast<unsigned int>(j + dst_c);
1283 T[dst_r_index][dst_c_index] = double((*this)(i + src_r_i, j + src_c_i));
1284 }
1285}
1286
1287
1288
1289template <typename number>
1290template <typename MatrixType>
1291void
1292FullMatrix<number>::copy_transposed(const MatrixType &M)
1293{
1294 this->reinit(M.n(), M.m());
1295
1296 // loop over the elements of the argument matrix row by row, as suggested
1297 // in the documentation of the sparse matrix iterator class, and
1298 // copy them into the current object
1299 for (size_type row = 0; row < M.m(); ++row)
1300 {
1301 const typename MatrixType::const_iterator end_row = M.end(row);
1302 for (typename MatrixType::const_iterator entry = M.begin(row);
1303 entry != end_row;
1304 ++entry)
1305 this->el(entry->column(), row) = entry->value();
1306 }
1307}
1308
1309
1310
1311template <typename number>
1312template <typename MatrixType, typename index_type>
1313inline void
1315 const MatrixType &matrix,
1316 const std::vector<index_type> &row_index_set,
1317 const std::vector<index_type> &column_index_set)
1318{
1319 AssertDimension(row_index_set.size(), this->n_rows());
1320 AssertDimension(column_index_set.size(), this->n_cols());
1321
1322 const size_type n_rows_submatrix = row_index_set.size();
1323 const size_type n_cols_submatrix = column_index_set.size();
1324
1325 for (size_type sub_row = 0; sub_row < n_rows_submatrix; ++sub_row)
1326 for (size_type sub_col = 0; sub_col < n_cols_submatrix; ++sub_col)
1327 (*this)(sub_row, sub_col) =
1328 matrix.el(row_index_set[sub_row], column_index_set[sub_col]);
1329}
1330
1331
1332
1333template <typename number>
1334template <typename MatrixType, typename index_type>
1335inline void
1337 const std::vector<index_type> &row_index_set,
1338 const std::vector<index_type> &column_index_set,
1339 MatrixType &matrix) const
1340{
1341 AssertDimension(row_index_set.size(), this->n_rows());
1342 AssertDimension(column_index_set.size(), this->n_cols());
1343
1344 const size_type n_rows_submatrix = row_index_set.size();
1345 const size_type n_cols_submatrix = column_index_set.size();
1346
1347 for (size_type sub_row = 0; sub_row < n_rows_submatrix; ++sub_row)
1348 for (size_type sub_col = 0; sub_col < n_cols_submatrix; ++sub_col)
1349 matrix.set(row_index_set[sub_row],
1350 column_index_set[sub_col],
1351 (*this)(sub_row, sub_col));
1352}
1353
1354
1355template <typename number>
1356inline void
1357FullMatrix<number>::set(const size_type i,
1358 const size_type j,
1359 const number value)
1360{
1361 (*this)(i, j) = value;
1362}
1363
1364
1365
1366template <typename number>
1367template <typename number2>
1368void
1370 const Vector<number2> &v) const
1371{
1372 vmult(w, v, true);
1373}
1374
1375
1376template <typename number>
1377template <typename number2>
1378void
1380 const Vector<number2> &v) const
1381{
1382 Tvmult(w, v, true);
1383}
1384
1385
1386//---------------------------------------------------------------------------
1387template <typename number>
1388inline typename FullMatrix<number>::iterator
1389FullMatrix<number>::begin(const size_type r)
1390{
1391 AssertIndexRange(r, m());
1392 return iterator(this, r, 0);
1393}
1394
1395
1396
1397template <typename number>
1398inline typename FullMatrix<number>::iterator
1399FullMatrix<number>::end(const size_type r)
1400{
1401 AssertIndexRange(r, m());
1402 return iterator(this, r + 1, 0);
1403}
1404
1405
1406
1407template <typename number>
1409FullMatrix<number>::begin(const size_type r) const
1410{
1411 AssertIndexRange(r, m());
1412 return const_iterator(this, r, 0);
1413}
1414
1415
1416
1417template <typename number>
1419FullMatrix<number>::end(const size_type r) const
1420{
1421 AssertIndexRange(r, m());
1422 return const_iterator(this, r + 1, 0);
1423}
1424
1425
1426
1427template <typename number>
1428inline void
1429FullMatrix<number>::add(const size_type r, const size_type c, const number v)
1430{
1431 AssertIndexRange(r, this->m());
1432 AssertIndexRange(c, this->n());
1433
1434 this->operator()(r, c) += v;
1435}
1436
1437
1438
1439template <typename number>
1440template <typename number2, typename index_type>
1441inline void
1442FullMatrix<number>::add(const size_type row,
1443 const size_type n_cols,
1444 const index_type *col_indices,
1445 const number2 *values,
1446 const bool,
1447 const bool)
1448{
1449 AssertIndexRange(row, this->m());
1450 for (size_type col = 0; col < n_cols; ++col)
1451 {
1452 AssertIndexRange(col_indices[col], this->n());
1453 this->operator()(row, col_indices[col]) += values[col];
1454 }
1455}
1456
1457
1458template <typename number>
1459template <typename StreamType>
1460inline void
1461FullMatrix<number>::print(StreamType &s,
1462 const unsigned int w,
1463 const unsigned int p) const
1464{
1465 Assert(!this->empty(), ExcEmptyMatrix());
1466
1467 // save the state of out stream
1468 const std::streamsize old_precision = s.precision(p);
1469 const std::streamsize old_width = s.width(w);
1470
1471 for (size_type i = 0; i < this->m(); ++i)
1472 {
1473 for (size_type j = 0; j < this->n(); ++j)
1474 {
1475 s.width(w);
1476 s.precision(p);
1477 s << this->el(i, j);
1478 }
1479 s << std::endl;
1480 }
1481
1482 // reset output format
1483 s.precision(old_precision);
1484 s.width(old_width);
1485}
1486
1487
1488#endif // DOXYGEN
1489
1491
1492#endif
typename numbers::NumberTraits< number >::real_type real_type
typename Table< 2, number >::const_iterator const_iterator
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.))
FullMatrix< number > & operator=(const number d)
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 kronecker_product(const FullMatrix< number > &A, const FullMatrix< number > &B, const bool adding=false)
Compute the Kronecker product of two matrices.
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)
FullMatrix< number > & operator=(const FullMatrix< number2 > &)
FullMatrix & operator/=(const number factor)
std::size_t size_type
Definition full_matrix.h:97
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 IdentityMatrix &id)
number value_type
typename Table< 2, number >::iterator iterator
void add(const number a, const FullMatrix< number2 > &A, const number b, const FullMatrix< number2 > &B, const number c, const FullMatrix< number2 > &C)
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
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)
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
FullMatrix< number > & operator=(const LAPACKFullMatrix< number2 > &)
FullMatrix & operator*=(const number factor)
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(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
void compress(VectorOperation::values)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:40
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:41
#define DeclException0(Exception0)
static ::ExceptionBase & ExcEmptyMatrix()
static ::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcNotRegular(number arg1)
#define AssertIndexRange(index, range)
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcMatrixNotPositiveDefinite()
static ::ExceptionBase & ExcSourceEqualsDestination()
#define DeclException3(Exception3, type1, type2, type3, outsequence)
static ::ExceptionBase & ExcInvalidDestination(size_type arg1, size_type arg2, size_type arg3)
#define DeclException1(Exception1, type1, outsequence)
const bool IsBlockVector< VectorType >::value
@ matrix
Contents is actually a matrix.
constexpr char T
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)