Reference documentation for deal.II version GIT relicensing-218-g1f873f3929 2024-03-28 15:00: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\}}\)
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 - 2023 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
27
28#include <cstring>
29#include <iomanip>
30#include <vector>
31
33
34
35// forward declarations
36#ifndef DOXYGEN
37template <typename number>
38class Vector;
39template <typename number>
41#endif
42
76template <typename number>
77class FullMatrix : public Table<2, number>
78{
79public:
87 static_assert(
88 std::is_arithmetic<
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
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
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);
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
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
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
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
990 template <typename number2>
991 void
993 const Vector<number2> &v,
994 const bool adding = false) const;
995
1001 template <typename number2>
1002 void
1004
1018 template <typename number2>
1019 void
1021 const Vector<number2> &v,
1022 const bool adding = false) const;
1023
1030 template <typename number2>
1031 void
1033
1039 template <typename somenumber>
1040 void
1042 const Vector<somenumber> &src,
1043 const number omega = 1.) const;
1044
1051 template <typename number2, typename number3>
1052 number
1054 const Vector<number2> &x,
1055 const Vector<number3> &b) const;
1056
1067 template <typename number2>
1068 void
1069 forward(Vector<number2> &dst, const Vector<number2> &src) const;
1070
1078 template <typename number2>
1079 void
1081
1093
1099 number,
1100 << "The maximal pivot is " << arg1
1101 << ", which is below the threshold. The matrix may be singular.");
1106 size_type,
1107 size_type,
1108 size_type,
1109 << "Target region not in matrix: size in this direction="
1110 << arg1 << ", size of new matrix=" << arg2
1111 << ", offset=" << arg3);
1116 "You are attempting an operation on two vectors that "
1117 "are the same object, but the operation requires that the "
1118 "two objects are in fact different.");
1124};
1125
1128#ifndef DOXYGEN
1129/*-------------------------Inline functions -------------------------------*/
1130
1131
1132
1133template <typename number>
1134inline typename FullMatrix<number>::size_type
1136{
1137 return this->n_rows();
1138}
1139
1140
1141
1142template <typename number>
1143inline typename FullMatrix<number>::size_type
1145{
1146 return this->n_cols();
1147}
1148
1149
1150
1151template <typename number>
1153FullMatrix<number>::operator=(const number d)
1154{
1156 (void)d; // removes -Wunused-parameter warning in optimized mode
1157
1158 if (this->n_elements() != 0)
1159 this->reset_values();
1160
1161 return *this;
1162}
1163
1164
1165
1166template <typename number>
1167template <typename number2>
1168inline void
1169FullMatrix<number>::fill(const number2 *src)
1170{
1172}
1173
1174
1175
1176template <typename number>
1177template <typename MatrixType>
1178void
1179FullMatrix<number>::copy_from(const MatrixType &M)
1180{
1181 this->reinit(M.m(), M.n());
1182
1183 // loop over the elements of the argument matrix row by row, as suggested
1184 // in the documentation of the sparse matrix iterator class, and
1185 // copy them into the current object
1186 for (size_type row = 0; row < M.m(); ++row)
1187 {
1188 const typename MatrixType::const_iterator end_row = M.end(row);
1189 for (typename MatrixType::const_iterator entry = M.begin(row);
1190 entry != end_row;
1191 ++entry)
1192 this->el(row, entry->column()) = entry->value();
1193 }
1194}
1195
1196
1197
1198template <typename number>
1199template <int dim>
1200void
1202 const unsigned int src_r_i,
1203 const unsigned int src_r_j,
1204 const unsigned int src_c_i,
1205 const unsigned int src_c_j,
1206 const size_type dst_r,
1207 const size_type dst_c)
1208{
1209 Assert(!this->empty(), ExcEmptyMatrix());
1210 AssertIndexRange(src_r_j - src_r_i, this->m() - dst_r);
1211 AssertIndexRange(src_c_j - src_c_i, this->n() - dst_c);
1212 AssertIndexRange(src_r_j, dim);
1213 AssertIndexRange(src_c_j, dim);
1214 AssertIndexRange(src_r_i, src_r_j + 1);
1215 AssertIndexRange(src_c_i, src_c_j + 1);
1216
1217 for (size_type i = 0; i < src_r_j - src_r_i + 1; ++i)
1218 for (size_type j = 0; j < src_c_j - src_c_i + 1; ++j)
1219 {
1220 const unsigned int src_r_index = static_cast<unsigned int>(i + src_r_i);
1221 const unsigned int src_c_index = static_cast<unsigned int>(j + src_c_i);
1222 (*this)(i + dst_r, j + dst_c) = number(T[src_r_index][src_c_index]);
1223 }
1224}
1225
1226
1227
1228template <typename number>
1229template <int dim>
1230void
1232 const size_type src_r_i,
1233 const size_type src_r_j,
1234 const size_type src_c_i,
1235 const size_type src_c_j,
1236 const unsigned int dst_r,
1237 const unsigned int dst_c) const
1238{
1239 Assert(!this->empty(), ExcEmptyMatrix());
1240 AssertIndexRange(src_r_j - src_r_i, dim - dst_r);
1241 AssertIndexRange(src_c_j - src_c_i, dim - dst_c);
1242 AssertIndexRange(src_r_j, this->m());
1243 AssertIndexRange(src_r_j, this->n());
1244 AssertIndexRange(src_r_i, src_r_j + 1);
1245 AssertIndexRange(src_c_j, src_c_j + 1);
1246
1247 for (size_type i = 0; i < src_r_j - src_r_i + 1; ++i)
1248 for (size_type j = 0; j < src_c_j - src_c_i + 1; ++j)
1249 {
1250 const unsigned int dst_r_index = static_cast<unsigned int>(i + dst_r);
1251 const unsigned int dst_c_index = static_cast<unsigned int>(j + dst_c);
1252 T[dst_r_index][dst_c_index] = double((*this)(i + src_r_i, j + src_c_i));
1253 }
1254}
1255
1256
1257
1258template <typename number>
1259template <typename MatrixType>
1260void
1261FullMatrix<number>::copy_transposed(const MatrixType &M)
1262{
1263 this->reinit(M.n(), M.m());
1264
1265 // loop over the elements of the argument matrix row by row, as suggested
1266 // in the documentation of the sparse matrix iterator class, and
1267 // copy them into the current object
1268 for (size_type row = 0; row < M.m(); ++row)
1269 {
1270 const typename MatrixType::const_iterator end_row = M.end(row);
1271 for (typename MatrixType::const_iterator entry = M.begin(row);
1272 entry != end_row;
1273 ++entry)
1274 this->el(entry->column(), row) = entry->value();
1275 }
1276}
1277
1278
1279
1280template <typename number>
1281template <typename MatrixType, typename index_type>
1282inline void
1284 const MatrixType &matrix,
1285 const std::vector<index_type> &row_index_set,
1286 const std::vector<index_type> &column_index_set)
1287{
1288 AssertDimension(row_index_set.size(), this->n_rows());
1289 AssertDimension(column_index_set.size(), this->n_cols());
1290
1291 const size_type n_rows_submatrix = row_index_set.size();
1292 const size_type n_cols_submatrix = column_index_set.size();
1293
1294 for (size_type sub_row = 0; sub_row < n_rows_submatrix; ++sub_row)
1295 for (size_type sub_col = 0; sub_col < n_cols_submatrix; ++sub_col)
1296 (*this)(sub_row, sub_col) =
1297 matrix.el(row_index_set[sub_row], column_index_set[sub_col]);
1298}
1299
1300
1301
1302template <typename number>
1303template <typename MatrixType, typename index_type>
1304inline void
1306 const std::vector<index_type> &row_index_set,
1307 const std::vector<index_type> &column_index_set,
1308 MatrixType &matrix) const
1309{
1310 AssertDimension(row_index_set.size(), this->n_rows());
1311 AssertDimension(column_index_set.size(), this->n_cols());
1312
1313 const size_type n_rows_submatrix = row_index_set.size();
1314 const size_type n_cols_submatrix = column_index_set.size();
1315
1316 for (size_type sub_row = 0; sub_row < n_rows_submatrix; ++sub_row)
1317 for (size_type sub_col = 0; sub_col < n_cols_submatrix; ++sub_col)
1318 matrix.set(row_index_set[sub_row],
1319 column_index_set[sub_col],
1320 (*this)(sub_row, sub_col));
1321}
1322
1323
1324template <typename number>
1325inline void
1326FullMatrix<number>::set(const size_type i,
1327 const size_type j,
1328 const number value)
1329{
1330 (*this)(i, j) = value;
1331}
1332
1333
1334
1335template <typename number>
1336template <typename number2>
1337void
1339 const Vector<number2> &v) const
1340{
1341 vmult(w, v, true);
1342}
1343
1344
1345template <typename number>
1346template <typename number2>
1347void
1349 const Vector<number2> &v) const
1350{
1351 Tvmult(w, v, true);
1352}
1353
1354
1355//---------------------------------------------------------------------------
1356template <typename number>
1357inline typename FullMatrix<number>::iterator
1358FullMatrix<number>::begin(const size_type r)
1359{
1360 AssertIndexRange(r, m());
1361 return iterator(this, r, 0);
1362}
1363
1364
1365
1366template <typename number>
1367inline typename FullMatrix<number>::iterator
1368FullMatrix<number>::end(const size_type r)
1369{
1370 AssertIndexRange(r, m());
1371 return iterator(this, r + 1, 0);
1372}
1373
1374
1375
1376template <typename number>
1378FullMatrix<number>::begin(const size_type r) const
1379{
1380 AssertIndexRange(r, m());
1381 return const_iterator(this, r, 0);
1382}
1383
1384
1385
1386template <typename number>
1388FullMatrix<number>::end(const size_type r) const
1389{
1390 AssertIndexRange(r, m());
1391 return const_iterator(this, r + 1, 0);
1392}
1393
1394
1395
1396template <typename number>
1397inline void
1398FullMatrix<number>::add(const size_type r, const size_type c, const number v)
1399{
1400 AssertIndexRange(r, this->m());
1401 AssertIndexRange(c, this->n());
1402
1403 this->operator()(r, c) += v;
1404}
1405
1406
1407
1408template <typename number>
1409template <typename number2, typename index_type>
1410inline void
1411FullMatrix<number>::add(const size_type row,
1412 const size_type n_cols,
1413 const index_type *col_indices,
1414 const number2 *values,
1415 const bool,
1416 const bool)
1417{
1418 AssertIndexRange(row, this->m());
1419 for (size_type col = 0; col < n_cols; ++col)
1420 {
1421 AssertIndexRange(col_indices[col], this->n());
1422 this->operator()(row, col_indices[col]) += values[col];
1423 }
1424}
1425
1426
1427template <typename number>
1428template <typename StreamType>
1429inline void
1430FullMatrix<number>::print(StreamType &s,
1431 const unsigned int w,
1432 const unsigned int p) const
1433{
1434 Assert(!this->empty(), ExcEmptyMatrix());
1435
1436 // save the state of out stream
1437 const std::streamsize old_precision = s.precision(p);
1438 const std::streamsize old_width = s.width(w);
1439
1440 for (size_type i = 0; i < this->m(); ++i)
1441 {
1442 for (size_type j = 0; j < this->n(); ++j)
1443 {
1444 s.width(w);
1445 s.precision(p);
1446 s << this->el(i, j);
1447 }
1448 s << std::endl;
1449 }
1450
1451 // reset output format
1452 s.precision(old_precision);
1453 s.width(old_width);
1454}
1455
1456
1457#endif // DOXYGEN
1458
1460
1461#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 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
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
#define DeclException0(Exception0)
Definition exceptions.h:471
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)
Definition exceptions.h:494
static ::ExceptionBase & ExcMatrixNotPositiveDefinite()
static ::ExceptionBase & ExcSourceEqualsDestination()
#define DeclException3(Exception3, type1, type2, type3, outsequence)
Definition exceptions.h:562
static ::ExceptionBase & ExcInvalidDestination(size_type arg1, size_type arg2, size_type arg3)
#define DeclException1(Exception1, type1, outsequence)
Definition exceptions.h:516
@ matrix
Contents is actually a matrix.
types::global_dof_index size_type
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)