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