deal.II version GIT relicensing-2165-gc91f007519 2024-11-20 01:40:00+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 - 2024 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
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
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
1086
1098
1104 number,
1105 << "The maximal pivot is " << arg1
1106 << ", which is below the threshold. The matrix may be singular.");
1111 size_type,
1112 size_type,
1113 size_type,
1114 << "Target region not in matrix: size in this direction="
1115 << arg1 << ", size of new matrix=" << arg2
1116 << ", offset=" << arg3);
1121 "You are attempting an operation on two vectors that "
1122 "are the same object, but the operation requires that the "
1123 "two objects are in fact different.");
1129};
1130
1133#ifndef DOXYGEN
1134/*-------------------------Inline functions -------------------------------*/
1135
1136
1137
1138template <typename number>
1139inline typename FullMatrix<number>::size_type
1141{
1142 return this->n_rows();
1143}
1144
1145
1146
1147template <typename number>
1148inline typename FullMatrix<number>::size_type
1150{
1151 return this->n_cols();
1152}
1153
1154
1155
1156template <typename number>
1158FullMatrix<number>::operator=(const number d)
1159{
1161 (void)d; // removes -Wunused-parameter warning in optimized mode
1162
1163 if (this->n_elements() != 0)
1164 this->reset_values();
1165
1166 return *this;
1167}
1168
1169
1170
1171template <typename number>
1172template <typename number2>
1173inline void
1174FullMatrix<number>::fill(const number2 *src)
1175{
1177}
1178
1179
1180
1181template <typename number>
1182template <typename MatrixType>
1183void
1184FullMatrix<number>::copy_from(const MatrixType &M)
1185{
1186 this->reinit(M.m(), M.n());
1187
1188 // loop over the elements of the argument matrix row by row, as suggested
1189 // in the documentation of the sparse matrix iterator class, and
1190 // copy them into the current object
1191 for (size_type row = 0; row < M.m(); ++row)
1192 {
1193 const typename MatrixType::const_iterator end_row = M.end(row);
1194 for (typename MatrixType::const_iterator entry = M.begin(row);
1195 entry != end_row;
1196 ++entry)
1197 this->el(row, entry->column()) = entry->value();
1198 }
1199}
1200
1201
1202
1203template <typename number>
1204template <int dim>
1205void
1207 const unsigned int src_r_i,
1208 const unsigned int src_r_j,
1209 const unsigned int src_c_i,
1210 const unsigned int src_c_j,
1211 const size_type dst_r,
1212 const size_type dst_c)
1213{
1214 Assert(!this->empty(), ExcEmptyMatrix());
1215 AssertIndexRange(src_r_j - src_r_i, this->m() - dst_r);
1216 AssertIndexRange(src_c_j - src_c_i, this->n() - dst_c);
1217 AssertIndexRange(src_r_j, dim);
1218 AssertIndexRange(src_c_j, dim);
1219 AssertIndexRange(src_r_i, src_r_j + 1);
1220 AssertIndexRange(src_c_i, src_c_j + 1);
1221
1222 for (size_type i = 0; i < src_r_j - src_r_i + 1; ++i)
1223 for (size_type j = 0; j < src_c_j - src_c_i + 1; ++j)
1224 {
1225 const unsigned int src_r_index = static_cast<unsigned int>(i + src_r_i);
1226 const unsigned int src_c_index = static_cast<unsigned int>(j + src_c_i);
1227 (*this)(i + dst_r, j + dst_c) = number(T[src_r_index][src_c_index]);
1228 }
1229}
1230
1231
1232
1233template <typename number>
1234template <int dim>
1235void
1237 const size_type src_r_i,
1238 const size_type src_r_j,
1239 const size_type src_c_i,
1240 const size_type src_c_j,
1241 const unsigned int dst_r,
1242 const unsigned int dst_c) const
1243{
1244 Assert(!this->empty(), ExcEmptyMatrix());
1245 AssertIndexRange(src_r_j - src_r_i, dim - dst_r);
1246 AssertIndexRange(src_c_j - src_c_i, dim - dst_c);
1247 AssertIndexRange(src_r_j, this->m());
1248 AssertIndexRange(src_r_j, this->n());
1249 AssertIndexRange(src_r_i, src_r_j + 1);
1250 AssertIndexRange(src_c_j, src_c_j + 1);
1251
1252 for (size_type i = 0; i < src_r_j - src_r_i + 1; ++i)
1253 for (size_type j = 0; j < src_c_j - src_c_i + 1; ++j)
1254 {
1255 const unsigned int dst_r_index = static_cast<unsigned int>(i + dst_r);
1256 const unsigned int dst_c_index = static_cast<unsigned int>(j + dst_c);
1257 T[dst_r_index][dst_c_index] = double((*this)(i + src_r_i, j + src_c_i));
1258 }
1259}
1260
1261
1262
1263template <typename number>
1264template <typename MatrixType>
1265void
1266FullMatrix<number>::copy_transposed(const MatrixType &M)
1267{
1268 this->reinit(M.n(), M.m());
1269
1270 // loop over the elements of the argument matrix row by row, as suggested
1271 // in the documentation of the sparse matrix iterator class, and
1272 // copy them into the current object
1273 for (size_type row = 0; row < M.m(); ++row)
1274 {
1275 const typename MatrixType::const_iterator end_row = M.end(row);
1276 for (typename MatrixType::const_iterator entry = M.begin(row);
1277 entry != end_row;
1278 ++entry)
1279 this->el(entry->column(), row) = entry->value();
1280 }
1281}
1282
1283
1284
1285template <typename number>
1286template <typename MatrixType, typename index_type>
1287inline void
1289 const MatrixType &matrix,
1290 const std::vector<index_type> &row_index_set,
1291 const std::vector<index_type> &column_index_set)
1292{
1293 AssertDimension(row_index_set.size(), this->n_rows());
1294 AssertDimension(column_index_set.size(), this->n_cols());
1295
1296 const size_type n_rows_submatrix = row_index_set.size();
1297 const size_type n_cols_submatrix = column_index_set.size();
1298
1299 for (size_type sub_row = 0; sub_row < n_rows_submatrix; ++sub_row)
1300 for (size_type sub_col = 0; sub_col < n_cols_submatrix; ++sub_col)
1301 (*this)(sub_row, sub_col) =
1302 matrix.el(row_index_set[sub_row], column_index_set[sub_col]);
1303}
1304
1305
1306
1307template <typename number>
1308template <typename MatrixType, typename index_type>
1309inline void
1311 const std::vector<index_type> &row_index_set,
1312 const std::vector<index_type> &column_index_set,
1313 MatrixType &matrix) const
1314{
1315 AssertDimension(row_index_set.size(), this->n_rows());
1316 AssertDimension(column_index_set.size(), this->n_cols());
1317
1318 const size_type n_rows_submatrix = row_index_set.size();
1319 const size_type n_cols_submatrix = column_index_set.size();
1320
1321 for (size_type sub_row = 0; sub_row < n_rows_submatrix; ++sub_row)
1322 for (size_type sub_col = 0; sub_col < n_cols_submatrix; ++sub_col)
1323 matrix.set(row_index_set[sub_row],
1324 column_index_set[sub_col],
1325 (*this)(sub_row, sub_col));
1326}
1327
1328
1329template <typename number>
1330inline void
1331FullMatrix<number>::set(const size_type i,
1332 const size_type j,
1333 const number value)
1334{
1335 (*this)(i, j) = value;
1336}
1337
1338
1339
1340template <typename number>
1341template <typename number2>
1342void
1344 const Vector<number2> &v) const
1345{
1346 vmult(w, v, true);
1347}
1348
1349
1350template <typename number>
1351template <typename number2>
1352void
1354 const Vector<number2> &v) const
1355{
1356 Tvmult(w, v, true);
1357}
1358
1359
1360//---------------------------------------------------------------------------
1361template <typename number>
1362inline typename FullMatrix<number>::iterator
1363FullMatrix<number>::begin(const size_type r)
1364{
1365 AssertIndexRange(r, m());
1366 return iterator(this, r, 0);
1367}
1368
1369
1370
1371template <typename number>
1372inline typename FullMatrix<number>::iterator
1373FullMatrix<number>::end(const size_type r)
1374{
1375 AssertIndexRange(r, m());
1376 return iterator(this, r + 1, 0);
1377}
1378
1379
1380
1381template <typename number>
1383FullMatrix<number>::begin(const size_type r) const
1384{
1385 AssertIndexRange(r, m());
1386 return const_iterator(this, r, 0);
1387}
1388
1389
1390
1391template <typename number>
1393FullMatrix<number>::end(const size_type r) const
1394{
1395 AssertIndexRange(r, m());
1396 return const_iterator(this, r + 1, 0);
1397}
1398
1399
1400
1401template <typename number>
1402inline void
1403FullMatrix<number>::add(const size_type r, const size_type c, const number v)
1404{
1405 AssertIndexRange(r, this->m());
1406 AssertIndexRange(c, this->n());
1407
1408 this->operator()(r, c) += v;
1409}
1410
1411
1412
1413template <typename number>
1414template <typename number2, typename index_type>
1415inline void
1416FullMatrix<number>::add(const size_type row,
1417 const size_type n_cols,
1418 const index_type *col_indices,
1419 const number2 *values,
1420 const bool,
1421 const bool)
1422{
1423 AssertIndexRange(row, this->m());
1424 for (size_type col = 0; col < n_cols; ++col)
1425 {
1426 AssertIndexRange(col_indices[col], this->n());
1427 this->operator()(row, col_indices[col]) += values[col];
1428 }
1429}
1430
1431
1432template <typename number>
1433template <typename StreamType>
1434inline void
1435FullMatrix<number>::print(StreamType &s,
1436 const unsigned int w,
1437 const unsigned int p) const
1438{
1439 Assert(!this->empty(), ExcEmptyMatrix());
1440
1441 // save the state of out stream
1442 const std::streamsize old_precision = s.precision(p);
1443 const std::streamsize old_width = s.width(w);
1444
1445 for (size_type i = 0; i < this->m(); ++i)
1446 {
1447 for (size_type j = 0; j < this->n(); ++j)
1448 {
1449 s.width(w);
1450 s.precision(p);
1451 s << this->el(i, j);
1452 }
1453 s << std::endl;
1454 }
1455
1456 // reset output format
1457 s.precision(old_precision);
1458 s.width(old_width);
1459}
1460
1461
1462#endif // DOXYGEN
1463
1465
1466#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
void compress(VectorOperation::values)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
#define DeclException0(Exception0)
Definition exceptions.h:466
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:489
static ::ExceptionBase & ExcMatrixNotPositiveDefinite()
static ::ExceptionBase & ExcSourceEqualsDestination()
#define DeclException3(Exception3, type1, type2, type3, outsequence)
Definition exceptions.h:557
static ::ExceptionBase & ExcInvalidDestination(size_type arg1, size_type arg2, size_type arg3)
#define DeclException1(Exception1, type1, outsequence)
Definition exceptions.h:511
@ matrix
Contents is actually a matrix.
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)