Reference documentation for deal.II version GIT 1e9e64a91d 2022-09-28 19:20: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\}}\)
sparsity_pattern.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2022 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_sparsity_pattern_h
17 #define dealii_sparsity_pattern_h
18 
19 
20 #include <deal.II/base/config.h>
21 
26 
27 // boost::serialization::make_array used to be in array.hpp, but was
28 // moved to a different file in BOOST 1.64
29 #include <boost/version.hpp>
30 #if BOOST_VERSION >= 106400
31 # include <boost/serialization/array_wrapper.hpp>
32 #else
33 # include <boost/serialization/array.hpp>
34 #endif
35 #include <boost/serialization/split_member.hpp>
36 
37 #include <algorithm>
38 #include <iostream>
39 #include <memory>
40 #include <vector>
41 
43 
44 // Forward declarations
45 #ifndef DOXYGEN
46 class SparsityPattern;
50 template <typename number>
51 class FullMatrix;
52 template <typename number>
53 class SparseMatrix;
54 template <typename number>
56 template <typename number>
57 class SparseILU;
58 
60 {
61  class Accessor;
62 }
63 #endif
64 
70 namespace internals
71 {
72  namespace SparsityPatternTools
73  {
78 
84  size_type
86 
92  template <typename value>
93  size_type
94  get_column_index_from_iterator(const std::pair<size_type, value> &i);
95 
101  template <typename value>
102  size_type
103  get_column_index_from_iterator(const std::pair<const size_type, value> &i);
104 
105  } // namespace SparsityPatternTools
106 } // namespace internals
107 
108 
113 {
114  // forward declaration
115  class Iterator;
116 
121 
132  class Accessor
133  {
134  public:
139 
143  Accessor(const SparsityPatternBase *matrix, const std::size_t linear_index);
144 
149 
156 
161  size_type
162  row() const;
163 
169  size_type
170  index() const;
171 
181  size_type
182  global_index() const;
183 
188  size_type
189  column() const;
190 
200  bool
201  is_valid_entry() const;
202 
206  bool
207  operator==(const Accessor &) const;
208 
216  bool
217  operator<(const Accessor &) const;
218 
219  protected:
221  "The instance of this class was initialized"
222  " without SparsityPattern object, which"
223  " means that it is a dummy accessor that can"
224  " not do any operations.");
225 
230 
238  std::size_t linear_index;
239 
243  void
245 
246  // Grant access to iterator class.
247  friend class LinearIndexIterator<Iterator, Accessor>;
248 
249  // Grant access to accessor class of ChunkSparsityPattern.
251  };
252 
253 
254 
279  class Iterator : public LinearIndexIterator<Iterator, Accessor>
280  {
281  public:
286 
291 
297  Iterator(const SparsityPatternBase *sp, const std::size_t linear_index);
298 
304  };
305 } // namespace SparsityPatternIterators
306 
307 
308 
327 {
328 public:
333 
339 
348 
364 
380 
384  ~SparsityPatternBase() override = default;
385 
394  void
395  reinit(const size_type m, const size_type n, const unsigned int max_per_row);
396 
407  void
408  reinit(const size_type m,
409  const size_type n,
410  const std::vector<unsigned int> &row_lengths);
411 
417  virtual void
418  reinit(const size_type m,
419  const size_type n,
420  const ArrayView<const unsigned int> &row_lengths) = 0;
421 
429  void
430  symmetrize();
431 
438  void
439  add(const size_type i, const size_type j);
440 
459  iterator
460  begin() const;
461 
465  iterator
466  end() const;
467 
479  iterator
480  begin(const size_type r) const;
481 
490  iterator
491  end(const size_type r) const;
492 
493 
507  bool
509 
514  bool
515  empty() const;
516 
520  bool
521  exists(const size_type i, const size_type j) const;
522 
528  size_type
529  max_entries_per_row() const;
530 
540  size_type
541  bandwidth() const;
542 
551  std::size_t
553 
557  bool
558  is_compressed() const;
559 
564  size_type
565  n_rows() const;
566 
571  size_type
572  n_cols() const;
573 
577  unsigned int
578  row_length(const size_type row) const;
579 
584  std::size_t
585  memory_consumption() const;
586 
607  size_type
608  column_number(const size_type row, const unsigned int index) const;
609 
617  size_type
618  row_position(const size_type i, const size_type j) const;
619 
631  std::pair<size_type, size_type>
632  matrix_position(const std::size_t global_index) const;
633 
649  void
650  print(std::ostream &out) const;
651 
665  void
666  print_gnuplot(std::ostream &out) const;
667 
675  void
676  print_svg(std::ostream &out) const;
677 
683  template <class Archive>
684  void
685  save(Archive &ar, const unsigned int version) const;
686 
692  template <class Archive>
693  void
694  load(Archive &ar, const unsigned int version);
695 
696 #ifdef DOXYGEN
702  template <class Archive>
703  void
704  serialize(Archive &archive, const unsigned int version);
705 #else
706  // This macro defines the serialize() method that is compatible with
707  // the templated save() and load() method that have been implemented.
708  BOOST_SERIALIZATION_SPLIT_MEMBER()
709 #endif
710 
727  "The operation you attempted is only allowed after the SparsityPattern "
728  "has been set up and compress() was called.");
729 
734  int,
735  int,
736  << "Upon entering a new entry to row " << arg1
737  << ": there was no free entry any more. " << std::endl
738  << "(Maximum number of entries for this row: " << arg2
739  << "; maybe the matrix is already compressed?)");
740 
747  "The operation you attempted changes the structure of the SparsityPattern "
748  "and is not possible after compress() has been called.");
749 
755 protected:
764 
769 
774 
780  std::size_t max_vec_len;
781 
789  unsigned int max_row_length;
790 
804  std::unique_ptr<std::size_t[]> rowstart;
805 
828  std::unique_ptr<size_type[]> colnums;
829 
834 
835  // Make all sparse matrices friends of this class.
836  template <typename number>
837  friend class SparseMatrix;
838  template <typename number>
839  friend class SparseLUDecomposition;
840  template <typename number>
841  friend class SparseILU;
842  template <typename number>
843  friend class ChunkSparseMatrix;
844 
845  friend class ChunkSparsityPattern;
847 
848  // Also give access to internal details to the iterator/accessor classes.
852 };
853 
890 {
891 public:
896 
902 
911 
918 
934  SparsityPattern();
935 
952 
960  SparsityPattern(const size_type m,
961  const size_type n,
962  const unsigned int max_per_row);
963 
964 
973  SparsityPattern(const size_type m,
974  const size_type n,
975  const std::vector<unsigned int> &row_lengths);
976 
985  SparsityPattern(const size_type m, const unsigned int max_per_row);
986 
994  SparsityPattern(const size_type m,
995  const std::vector<unsigned int> &row_lengths);
996 
1019  SparsityPattern(const SparsityPattern &original,
1020  const unsigned int max_per_row,
1021  const size_type extra_off_diagonals);
1022 
1026  ~SparsityPattern() override = default;
1027 
1033  SparsityPattern &
1034  operator=(const SparsityPattern &);
1035 
1041  virtual void
1042  reinit(const size_type m,
1043  const size_type n,
1044  const ArrayView<const unsigned int> &row_lengths) override;
1045 
1058  void
1059  compress();
1060 
1061 
1138  template <typename ForwardIterator>
1139  void
1141  const size_type n_cols,
1142  const ForwardIterator begin,
1143  const ForwardIterator end);
1144 
1149  void
1150  copy_from(const DynamicSparsityPattern &dsp);
1151 
1156  void
1157  copy_from(const SparsityPattern &sp);
1158 
1173  template <typename number>
1174  void
1176 
1183  template <typename ForwardIterator>
1184  void
1185  add_entries(const size_type row,
1186  ForwardIterator begin,
1187  ForwardIterator end,
1188  const bool indices_are_sorted = false);
1189 
1205  bool
1206  operator==(const SparsityPattern &) const;
1207 
1220  bool
1222 
1227  std::size_t
1228  memory_consumption() const;
1229 
1262  size_type
1263  operator()(const size_type i, const size_type j) const;
1264 
1286  void
1287  block_write(std::ostream &out) const;
1288 
1302  void
1303  block_read(std::istream &in);
1304 
1309  template <class Archive>
1310  void
1311  save(Archive &ar, const unsigned int version) const;
1312 
1317  template <class Archive>
1318  void
1319  load(Archive &ar, const unsigned int version);
1320 
1321 #ifdef DOXYGEN
1326  template <class Archive>
1327  void
1328  serialize(Archive &archive, const unsigned int version);
1329 #else
1330  // This macro defines the serialize() method that is compatible with
1331  // the templated save() and load() method that have been implemented.
1332  BOOST_SERIALIZATION_SPLIT_MEMBER()
1333 #endif
1334 
1348  int,
1349  int,
1350  << "The iterators denote a range of " << arg1
1351  << " elements, but the given number of rows was " << arg2);
1356  int,
1357  << "The number of partitions you gave is " << arg1
1358  << ", but must be greater than zero.");
1362 private:
1367 
1368  // Make all sparse matrices friends of this class.
1369  template <typename number>
1370  friend class SparseMatrix;
1371  template <typename number>
1373  template <typename number>
1374  friend class SparseILU;
1375  template <typename number>
1376  friend class ChunkSparseMatrix;
1377 
1378  friend class ChunkSparsityPattern;
1380 
1381  // Also give access to internal details to the iterator/accessor classes.
1385 };
1386 
1387 
1391 /*---------------------- Inline functions -----------------------------------*/
1392 
1393 #ifndef DOXYGEN
1394 
1395 
1396 namespace SparsityPatternIterators
1397 {
1398  inline Accessor::Accessor(const SparsityPatternBase *sparsity_pattern,
1399  const std::size_t i)
1400  : container(sparsity_pattern)
1401  , linear_index(i)
1402  {}
1403 
1404 
1405 
1406  inline Accessor::Accessor(const SparsityPatternBase *sparsity_pattern)
1407  : container(sparsity_pattern)
1408  , linear_index(container->rowstart[container->rows])
1409  {}
1410 
1411 
1412 
1413  inline Accessor::Accessor()
1414  : container(nullptr)
1415  , linear_index(numbers::invalid_size_type)
1416  {}
1417 
1418 
1419 
1420  inline bool
1421  Accessor::is_valid_entry() const
1422  {
1423  Assert(container != nullptr, DummyAccessor());
1424  return (linear_index < container->rowstart[container->rows] &&
1425  container->colnums[linear_index] != SparsityPattern::invalid_entry);
1426  }
1427 
1428 
1429 
1430  inline size_type
1431  Accessor::row() const
1432  {
1433  Assert(is_valid_entry() == true, ExcInvalidIterator());
1434 
1435  const std::size_t *insert_point =
1436  std::upper_bound(container->rowstart.get(),
1437  container->rowstart.get() + container->rows + 1,
1438  linear_index);
1439  return insert_point - container->rowstart.get() - 1;
1440  }
1441 
1442 
1443 
1444  inline size_type
1445  Accessor::column() const
1446  {
1447  Assert(is_valid_entry() == true, ExcInvalidIterator());
1448 
1449  return (container->colnums[linear_index]);
1450  }
1451 
1452 
1453 
1454  inline size_type
1455  Accessor::index() const
1456  {
1457  Assert(is_valid_entry() == true, ExcInvalidIterator());
1458 
1459  return linear_index - container->rowstart[row()];
1460  }
1461 
1462 
1463 
1464  inline size_type
1465  Accessor::global_index() const
1466  {
1467  Assert(is_valid_entry() == true, ExcInvalidIterator());
1468 
1469  return linear_index;
1470  }
1471 
1472 
1473 
1474  inline bool
1475  Accessor::operator==(const Accessor &other) const
1476  {
1477  return (container == other.container && linear_index == other.linear_index);
1478  }
1479 
1480 
1481 
1482  inline bool
1483  Accessor::operator<(const Accessor &other) const
1484  {
1485  Assert(container != nullptr, DummyAccessor());
1486  Assert(other.container != nullptr, DummyAccessor());
1487  Assert(container == other.container, ExcInternalError());
1488 
1489  return linear_index < other.linear_index;
1490  }
1491 
1492 
1493 
1494  inline void
1496  {
1497  Assert(container != nullptr, DummyAccessor());
1498  Assert(linear_index < container->rowstart[container->rows],
1499  ExcIteratorPastEnd());
1500  ++linear_index;
1501  }
1502 
1503 
1504  inline Iterator::Iterator(const SparsityPatternBase *sp,
1505  const std::size_t linear_index)
1506  : LinearIndexIterator<Iterator, Accessor>(Accessor(sp, linear_index))
1507  {}
1508 
1509 
1510  inline Iterator::Iterator(const Accessor &accessor)
1511  : LinearIndexIterator<Iterator, Accessor>(accessor)
1512  {}
1513 
1514 
1515 } // namespace SparsityPatternIterators
1516 
1517 
1518 
1521 {
1522  if (n_rows() > 0)
1523  return {this, rowstart[0]};
1524  else
1525  return end();
1526 }
1527 
1528 
1529 
1532 {
1533  if (n_rows() > 0)
1534  return {this, rowstart[rows]};
1535  else
1536  return {nullptr, 0};
1537 }
1538 
1539 
1540 
1543 {
1544  AssertIndexRange(r, n_rows());
1545 
1546  return {this, rowstart[r]};
1547 }
1548 
1549 
1550 
1552 SparsityPatternBase::end(const size_type r) const
1553 {
1554  AssertIndexRange(r, n_rows());
1555 
1556  return {this, rowstart[r + 1]};
1557 }
1558 
1559 
1560 
1563 {
1564  return rows;
1565 }
1566 
1567 
1568 
1571 {
1572  return cols;
1573 }
1574 
1575 
1576 
1577 inline bool
1579 {
1580  return compressed;
1581 }
1582 
1583 
1584 
1585 inline bool
1587 {
1588  return (store_diagonal_first_in_row == false);
1589 }
1590 
1591 
1592 
1593 inline unsigned int
1595 {
1596  AssertIndexRange(row, rows);
1597  return rowstart[row + 1] - rowstart[row];
1598 }
1599 
1600 
1601 
1604  const unsigned int index) const
1605 {
1606  AssertIndexRange(row, rows);
1607  AssertIndexRange(index, row_length(row));
1608 
1609  return colnums[rowstart[row] + index];
1610 }
1611 
1612 
1613 
1614 inline std::size_t
1616 {
1618 
1619  if ((rowstart != nullptr) && (colnums != nullptr))
1620  return rowstart[rows] - rowstart[0];
1621  else
1622  // the object is empty or has zero size
1623  return 0;
1624 }
1625 
1626 
1627 
1628 template <class Archive>
1629 inline void
1630 SparsityPatternBase::save(Archive &ar, const unsigned int) const
1631 {
1632  // forward to serialization function in the base class.
1633  ar &boost::serialization::base_object<const Subscriptor>(*this);
1634 
1636 
1637  if (max_dim != 0)
1638  ar &boost::serialization::make_array(rowstart.get(), max_dim + 1);
1639  else
1640  Assert(rowstart.get() == nullptr, ExcInternalError());
1641 
1642  if (max_vec_len != 0)
1643  ar &boost::serialization::make_array(colnums.get(), max_vec_len);
1644  else
1645  Assert(colnums.get() == nullptr, ExcInternalError());
1646 }
1647 
1648 
1649 
1650 template <class Archive>
1651 inline void
1652 SparsityPatternBase::load(Archive &ar, const unsigned int)
1653 {
1654  // forward to serialization function in the base class.
1655  ar &boost::serialization::base_object<Subscriptor>(*this);
1656 
1658 
1659  if (max_dim != 0)
1660  {
1661  rowstart = std::make_unique<std::size_t[]>(max_dim + 1);
1662  ar &boost::serialization::make_array(rowstart.get(), max_dim + 1);
1663  }
1664  else
1665  rowstart.reset();
1666 
1667  if (max_vec_len != 0)
1668  {
1669  colnums = std::make_unique<size_type[]>(max_vec_len);
1670  ar &boost::serialization::make_array(colnums.get(), max_vec_len);
1671  }
1672  else
1673  colnums.reset();
1674 }
1675 
1676 
1677 
1678 template <class Archive>
1679 inline void
1680 SparsityPattern::save(Archive &ar, const unsigned int) const
1681 {
1682  // forward to serialization function in the base class.
1683  ar &boost::serialization::base_object<const SparsityPatternBase>(*this);
1685 }
1686 
1687 
1688 
1689 template <class Archive>
1690 inline void
1691 SparsityPattern::load(Archive &ar, const unsigned int)
1692 {
1693  // forward to serialization function in the base class.
1694  ar &boost::serialization::base_object<SparsityPatternBase>(*this);
1696 }
1697 
1698 
1699 
1700 inline bool
1702 {
1703  // it isn't quite necessary to compare *all* member variables. by only
1704  // comparing the essential ones, we can say that two sparsity patterns are
1705  // equal even if one is compressed and the other is not (in which case some
1706  // of the member variables are not yet set correctly)
1707  if (rows != sp2.rows || cols != sp2.cols || compressed != sp2.compressed)
1708  return false;
1709 
1710  if (rows > 0)
1711  for (size_type i = 0; i < rows + 1; ++i)
1712  if (rowstart[i] != sp2.rowstart[i])
1713  return false;
1714 
1715  if (rows > 0)
1716  for (size_type i = 0; i < rowstart[rows]; ++i)
1717  if (colnums[i] != sp2.colnums[i])
1718  return false;
1719 
1720  return true;
1721 }
1722 
1723 
1724 
1725 inline bool
1727 {
1728  return (static_cast<const SparsityPatternBase &>(*this) == sp2) &&
1730 }
1731 
1732 
1733 
1734 namespace internal
1735 {
1736  namespace SparsityPatternTools
1737  {
1742 
1743  inline size_type
1745  {
1746  return i;
1747  }
1748 
1749 
1750 
1751  template <typename value>
1752  inline size_type
1753  get_column_index_from_iterator(const std::pair<size_type, value> &i)
1754  {
1755  return i.first;
1756  }
1757 
1758 
1759 
1760  template <typename value>
1761  inline size_type
1762  get_column_index_from_iterator(const std::pair<const size_type, value> &i)
1763  {
1764  return i.first;
1765  }
1766  } // namespace SparsityPatternTools
1767 } // namespace internal
1768 
1769 
1770 
1771 template <typename ForwardIterator>
1772 void
1774  const size_type n_cols,
1775  const ForwardIterator begin,
1776  const ForwardIterator end)
1777 {
1778  Assert(static_cast<size_type>(std::distance(begin, end)) == n_rows,
1779  ExcIteratorRange(std::distance(begin, end), n_rows));
1780 
1781  // first determine row lengths for each row. if the matrix is quadratic,
1782  // then we might have to add an additional entry for the diagonal, if that
1783  // is not yet present. as we have to call compress anyway later on, don't
1784  // bother to check whether that diagonal entry is in a certain row or not
1785  const bool is_square = (n_rows == n_cols);
1786  std::vector<unsigned int> row_lengths;
1787  row_lengths.reserve(n_rows);
1788  for (ForwardIterator i = begin; i != end; ++i)
1789  row_lengths.push_back(std::distance(i->begin(), i->end()) +
1790  (is_square ? 1 : 0));
1791  reinit(n_rows, n_cols, row_lengths);
1792 
1793  // now enter all the elements into the matrix. note that if the matrix is
1794  // quadratic, then we already have the diagonal element preallocated
1795  //
1796  // for use in the inner loop, we define an alias to the type of the inner
1797  // iterators
1798  size_type row = 0;
1799  using inner_iterator =
1800  typename std::iterator_traits<ForwardIterator>::value_type::const_iterator;
1801  for (ForwardIterator i = begin; i != end; ++i, ++row)
1802  {
1803  size_type * cols = &colnums[rowstart[row]] + (is_square ? 1 : 0);
1804  const inner_iterator end_of_row = i->end();
1805  for (inner_iterator j = i->begin(); j != end_of_row; ++j)
1806  {
1807  const size_type col =
1809  AssertIndexRange(col, n_cols);
1810 
1811  if ((col != row) || !is_square)
1812  *cols++ = col;
1813  }
1814  }
1815 
1816  // finally compress everything. this also sorts the entries within each row
1817  compress();
1818 }
1819 
1820 
1821 #endif // DOXYGEN
1822 
1824 
1825 #endif
bool operator==(const AlignedVector< T > &lhs, const AlignedVector< T > &rhs)
void serialize(Archive &archive, const unsigned int version)
void save(Archive &ar, const unsigned int version) const
std::size_t n_nonzero_elements() const
bool operator==(const SparsityPatternBase &) const
unsigned int max_row_length
void print_svg(std::ostream &out) const
void add(const size_type i, const size_type j)
SparsityPatternIterators::Iterator iterator
types::global_dof_index size_type
void reinit(const size_type m, const size_type n, const unsigned int max_per_row)
unsigned int row_length(const size_type row) const
size_type n_rows() const
std::unique_ptr< size_type[]> colnums
std::unique_ptr< std::size_t[]> rowstart
void print(std::ostream &out) const
bool exists(const size_type i, const size_type j) const
iterator end() const
size_type column_number(const size_type row, const unsigned int index) const
iterator begin(const size_type r) const
virtual void reinit(const size_type m, const size_type n, const ArrayView< const unsigned int > &row_lengths)=0
void print_gnuplot(std::ostream &out) const
static const size_type invalid_entry
size_type bandwidth() const
bool is_compressed() const
size_type max_entries_per_row() const
void load(Archive &ar, const unsigned int version)
std::pair< size_type, size_type > matrix_position(const std::size_t global_index) const
~SparsityPatternBase() override=default
std::size_t memory_consumption() const
SparsityPatternIterators::Iterator const_iterator
iterator begin() const
size_type row_position(const size_type i, const size_type j) const
iterator end(const size_type r) const
size_type n_cols() const
bool operator==(const Accessor &) const
SparsityPatternIterators::size_type size_type
const SparsityPatternBase * container
bool operator<(const Accessor &) const
Accessor(const SparsityPatternBase *matrix)
Accessor(const SparsityPatternBase *matrix, const std::size_t linear_index)
Iterator(const SparsityPatternBase *sp, const std::size_t linear_index)
types::global_dof_index size_type
Iterator(const Accessor &accessor)
void load(Archive &ar, const unsigned int version)
void block_write(std::ostream &out) const
void reinit(const size_type m, const size_type n, const unsigned int max_per_row)
bool stores_only_added_elements() const
void add_entries(const size_type row, ForwardIterator begin, ForwardIterator end, const bool indices_are_sorted=false)
void serialize(Archive &archive, const unsigned int version)
SparsityPattern & operator=(const SparsityPattern &)
SparsityPatternBase::size_type size_type
~SparsityPattern() override=default
void copy_from(const size_type n_rows, const size_type n_cols, const ForwardIterator begin, const ForwardIterator end)
size_type operator()(const size_type i, const size_type j) const
void save(Archive &ar, const unsigned int version) const
std::size_t memory_consumption() const
bool operator==(const SparsityPattern &) const
void block_read(std::istream &in)
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:457
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:458
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcIteratorPastEnd()
#define Assert(cond, exc)
Definition: exceptions.h:1501
static ::ExceptionBase & ExcInvalidIterator()
static ::ExceptionBase & ExcNotEnoughSpace(int arg1, int arg2)
static ::ExceptionBase & ExcIteratorRange(int arg1, int arg2)
static ::ExceptionBase & ExcMatrixIsCompressed()
static ::ExceptionBase & ExcNotCompressed()
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:532
#define AssertIndexRange(index, range)
Definition: exceptions.h:1760
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:487
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:509
static ::ExceptionBase & ExcInvalidNumberOfPartitions(int arg1)
static ::ExceptionBase & DummyAccessor()
@ matrix
Contents is actually a matrix.
types::global_dof_index size_type
VectorType::value_type * begin(VectorType &V)
VectorType::value_type * end(VectorType &V)
TrilinosWrappers::types::int_type global_index(const Epetra_BlockMap &map, const ::types::global_dof_index i)
types::global_dof_index size_type
size_type get_column_index_from_iterator(const size_type i)
size_type get_column_index_from_iterator(const std::pair< const size_type, value > &i)
const types::global_dof_index invalid_size_type
Definition: types.h:215
unsigned int global_dof_index
Definition: types.h:81
bool operator<(const SynchronousIterators< Iterators > &a, const SynchronousIterators< Iterators > &b)
void advance(std::tuple< I1, I2 > &t, const unsigned int n)