Reference documentation for deal.II version 9.0.0
trilinos_precondition.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2008 - 2018 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 at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_trilinos_precondition_h
17 #define dealii_trilinos_precondition_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #ifdef DEAL_II_WITH_TRILINOS
23 
24 # include <deal.II/base/subscriptor.h>
25 
26 # include <deal.II/lac/trilinos_vector.h>
27 # include <deal.II/lac/la_parallel_vector.h>
28 
29 # include <memory>
30 
31 # ifdef DEAL_II_WITH_MPI
32 # include <Epetra_MpiComm.h>
33 # else
34 # include <Epetra_SerialComm.h>
35 # endif
36 # include <Epetra_Map.h>
37 
38 # include <Teuchos_ParameterList.hpp>
39 # include <Epetra_RowMatrix.h>
40 # include <Epetra_Vector.h>
41 
42 // forward declarations
43 class Ifpack_Preconditioner;
44 class Ifpack_Chebyshev;
45 namespace ML_Epetra
46 {
47  class MultiLevelPreconditioner;
48 }
49 
50 
51 DEAL_II_NAMESPACE_OPEN
52 
53 // forward declarations
54 template <typename number> class SparseMatrix;
55 template <typename number> class Vector;
56 class SparsityPattern;
57 
62 namespace TrilinosWrappers
63 {
64  // forward declarations
65  class SparseMatrix;
66  class BlockSparseMatrix;
67  class SolverBase;
68 
78  {
79  public:
83  typedef ::types::global_dof_index size_type;
84 
90  {};
91 
98 
103 
107  ~PreconditionBase () = default;
108 
113  void clear ();
114 
118  MPI_Comm get_mpi_communicator () const;
119 
129  void transpose ();
130 
134  virtual void vmult (MPI::Vector &dst,
135  const MPI::Vector &src) const;
136 
140  virtual void Tvmult (MPI::Vector &dst,
141  const MPI::Vector &src) const;
142 
147  virtual void vmult (::Vector<double> &dst,
148  const ::Vector<double> &src) const;
149 
154  virtual void Tvmult (::Vector<double> &dst,
155  const ::Vector<double> &src) const;
156 
162  const ::LinearAlgebra::distributed::Vector<double> &src) const;
163 
169  const ::LinearAlgebra::distributed::Vector<double> &src) const;
170 
180  Epetra_Operator &trilinos_operator () const;
182 
187 
193 
200 
202 
212  std::string,
213  << "The sparse matrix the preconditioner is based on "
214  << "uses a map that is not compatible to the one in vector "
215  << arg1
216  << ". Check preconditioner and matrix setup.");
218 
219  friend class SolverBase;
220 
221  protected:
226  std::shared_ptr<Epetra_Operator> preconditioner;
227 
232 #ifdef DEAL_II_WITH_MPI
233  Epetra_MpiComm communicator;
234 #else
235  Epetra_SerialComm communicator;
236 #endif
237 
242  std::shared_ptr<Epetra_Map> vector_distributor;
243  };
244 
245 
263  {
264  public:
265 
278  {
283  AdditionalData (const double omega = 1,
284  const double min_diagonal = 0,
285  const unsigned int n_sweeps = 1);
286 
290  double omega;
291 
299  double min_diagonal;
300 
305  unsigned int n_sweeps;
306  };
307 
312  void initialize (const SparseMatrix &matrix,
313  const AdditionalData &additional_data = AdditionalData());
314  };
315 
316 
317 
318 
346  {
347  public:
348 
363  {
370  AdditionalData (const double omega = 1,
371  const double min_diagonal = 0,
372  const unsigned int overlap = 0,
373  const unsigned int n_sweeps = 1);
374 
379  double omega;
380 
388  double min_diagonal;
389 
394  unsigned int overlap;
395 
400  unsigned int n_sweeps;
401  };
402 
408  void initialize (const SparseMatrix &matrix,
409  const AdditionalData &additional_data = AdditionalData());
410  };
411 
412 
413 
414 
442  {
443  public:
444 
459  {
466  AdditionalData (const double omega = 1,
467  const double min_diagonal = 0,
468  const unsigned int overlap = 0,
469  const unsigned int n_sweeps = 1);
470 
475  double omega;
476 
484  double min_diagonal;
485 
490  unsigned int overlap;
491 
496  unsigned int n_sweeps;
497  };
498 
504  void initialize (const SparseMatrix &matrix,
505  const AdditionalData &additional_data = AdditionalData());
506  };
507 
508 
509 
528  {
529  public:
530 
549  {
555  AdditionalData (const unsigned int block_size = 1,
556  const std::string &block_creation_type = "linear",
557  const double omega = 1,
558  const double min_diagonal = 0,
559  const unsigned int n_sweeps = 1);
560 
564  unsigned int block_size;
565 
573  std::string block_creation_type;
574 
579  double omega;
580 
588  double min_diagonal;
589 
594  unsigned int n_sweeps;
595  };
596 
601  void initialize (const SparseMatrix &matrix,
602  const AdditionalData &additional_data = AdditionalData());
603  };
604 
605 
606 
607 
631  {
632  public:
633 
652  {
660  AdditionalData (const unsigned int block_size = 1,
661  const std::string &block_creation_type = "linear",
662  const double omega = 1,
663  const double min_diagonal = 0,
664  const unsigned int overlap = 0,
665  const unsigned int n_sweeps = 1);
666 
670  unsigned int block_size;
671 
679  std::string block_creation_type;
680 
685  double omega;
686 
694  double min_diagonal;
695 
700  unsigned int overlap;
701 
706  unsigned int n_sweeps;
707  };
708 
714  void initialize (const SparseMatrix &matrix,
715  const AdditionalData &additional_data = AdditionalData());
716  };
717 
718 
719 
720 
744  {
745  public:
746 
765  {
773  AdditionalData (const unsigned int block_size = 1,
774  const std::string &block_creation_type = "linear",
775  const double omega = 1,
776  const double min_diagonal = 0,
777  const unsigned int overlap = 0,
778  const unsigned int n_sweeps = 1);
779 
783  unsigned int block_size;
784 
792  std::string block_creation_type;
793 
798  double omega;
799 
807  double min_diagonal;
808 
813  unsigned int overlap;
814 
819  unsigned int n_sweeps;
820  };
821 
827  void initialize (const SparseMatrix &matrix,
828  const AdditionalData &additional_data = AdditionalData());
829  };
830 
831 
832 
869  {
870  public:
888  {
898  AdditionalData (const unsigned int ic_fill = 0,
899  const double ic_atol = 0.,
900  const double ic_rtol = 1.,
901  const unsigned int overlap = 0);
902 
911  unsigned int ic_fill;
912 
918  double ic_atol;
919 
924  double ic_rtol;
925 
930  unsigned int overlap;
931  };
932 
937  void initialize (const SparseMatrix &matrix,
938  const AdditionalData &additional_data = AdditionalData());
939  };
940 
941 
942 
973  {
974  public:
1013  {
1017  AdditionalData (const unsigned int ilu_fill = 0,
1018  const double ilu_atol = 0.,
1019  const double ilu_rtol = 1.,
1020  const unsigned int overlap = 0);
1021 
1025  unsigned int ilu_fill;
1026 
1031  double ilu_atol;
1032 
1037  double ilu_rtol;
1038 
1042  unsigned int overlap;
1043  };
1044 
1049  void initialize (const SparseMatrix &matrix,
1050  const AdditionalData &additional_data = AdditionalData());
1051  };
1052 
1053 
1054 
1055 
1056 
1057 
1094  {
1095  public:
1114  {
1125  AdditionalData (const double ilut_drop = 0.,
1126  const unsigned int ilut_fill = 0,
1127  const double ilut_atol = 0.,
1128  const double ilut_rtol = 1.,
1129  const unsigned int overlap = 0);
1130 
1135  double ilut_drop;
1136 
1145  unsigned int ilut_fill;
1146 
1152  double ilut_atol;
1153 
1158  double ilut_rtol;
1159 
1164  unsigned int overlap;
1165  };
1166 
1171  void initialize (const SparseMatrix &matrix,
1172  const AdditionalData &additional_data = AdditionalData());
1173  };
1174 
1175 
1176 
1196  {
1197  public:
1203  {
1207  AdditionalData (const unsigned int overlap = 0);
1208 
1209 
1214  unsigned int overlap;
1215  };
1216 
1221  void initialize (const SparseMatrix &matrix,
1222  const AdditionalData &additional_data = AdditionalData());
1223  };
1224 
1225 
1226 
1227 
1228 
1229 
1240  {
1241  public:
1247  {
1251  AdditionalData (const unsigned int degree = 1,
1252  const double max_eigenvalue = 10.,
1253  const double eigenvalue_ratio = 30.,
1254  const double min_eigenvalue = 1.,
1255  const double min_diagonal = 1e-12,
1256  const bool nonzero_starting = false);
1257 
1263  unsigned int degree;
1264 
1270 
1275 
1281 
1287 
1299  };
1300 
1305  void initialize (const SparseMatrix &matrix,
1306  const AdditionalData &additional_data = AdditionalData());
1307  };
1308 
1309 
1310 
1354  {
1355  public:
1356 
1364  {
1369  AdditionalData (const bool elliptic = true,
1370  const bool higher_order_elements = false,
1371  const unsigned int n_cycles = 1,
1372  const bool w_cyle = false,
1373  const double aggregation_threshold = 1e-4,
1374  const std::vector<std::vector<bool> > &constant_modes = std::vector<std::vector<bool> > (0),
1375  const unsigned int smoother_sweeps = 2,
1376  const unsigned int smoother_overlap = 0,
1377  const bool output_details = false,
1378  const char *smoother_type = "Chebyshev",
1379  const char *coarse_type = "Amesos-KLU");
1380 
1388  bool elliptic;
1389 
1395 
1400  unsigned int n_cycles;
1401 
1406  bool w_cycle;
1407 
1418 
1435  std::vector<std::vector<bool> > constant_modes;
1436 
1447  unsigned int smoother_sweeps;
1448 
1453  unsigned int smoother_overlap;
1454 
1461 
1496  const char *smoother_type;
1497 
1502  const char *coarse_type;
1503  };
1504 
1508  ~PreconditionAMG();
1509 
1510 
1516  void initialize (const SparseMatrix &matrix,
1517  const AdditionalData &additional_data = AdditionalData());
1518 
1537  void initialize (const Epetra_RowMatrix &matrix,
1538  const AdditionalData &additional_data = AdditionalData());
1539 
1552  void initialize (const SparseMatrix &matrix,
1553  const Teuchos::ParameterList &ml_parameters);
1554 
1562  void initialize (const Epetra_RowMatrix &matrix,
1563  const Teuchos::ParameterList &ml_parameters);
1564 
1571  template <typename number>
1572  void initialize (const ::SparseMatrix<number> &deal_ii_sparse_matrix,
1573  const AdditionalData &additional_data = AdditionalData(),
1574  const double drop_tolerance = 1e-13,
1575  const ::SparsityPattern *use_this_sparsity = nullptr);
1576 
1589  void reinit ();
1590 
1595  void clear ();
1596 
1600  size_type memory_consumption () const;
1601 
1602  private:
1606  std::shared_ptr<SparseMatrix> trilinos_matrix;
1607  };
1608 
1609 
1610 
1611 #if defined(DOXYGEN) || DEAL_II_TRILINOS_VERSION_GTE(11,14,0)
1612 
1630  {
1631  public:
1632 
1633 
1641  {
1646  AdditionalData (const bool elliptic = true,
1647  const unsigned int n_cycles = 1,
1648  const bool w_cyle = false,
1649  const double aggregation_threshold = 1e-4,
1650  const std::vector<std::vector<bool> > &constant_modes = std::vector<std::vector<bool> > (0),
1651  const unsigned int smoother_sweeps = 2,
1652  const unsigned int smoother_overlap = 0,
1653  const bool output_details = false,
1654  const char *smoother_type = "Chebyshev",
1655  const char *coarse_type = "Amesos-KLU");
1656 
1664  bool elliptic;
1665 
1670  unsigned int n_cycles;
1671 
1676  bool w_cycle;
1677 
1688 
1695  std::vector<std::vector<bool> > constant_modes;
1696 
1707  unsigned int smoother_sweeps;
1708 
1713  unsigned int smoother_overlap;
1714 
1721 
1756  const char *smoother_type;
1757 
1762  const char *coarse_type;
1763  };
1764 
1769 
1774 
1780  void initialize (const SparseMatrix &matrix,
1781  const AdditionalData &additional_data = AdditionalData());
1782 
1789  void initialize (const Epetra_CrsMatrix &matrix,
1790  const AdditionalData &additional_data = AdditionalData());
1791 
1803  void initialize (const SparseMatrix &matrix,
1804  Teuchos::ParameterList &muelu_parameters);
1805 
1811  void initialize (const Epetra_CrsMatrix &matrix,
1812  Teuchos::ParameterList &muelu_parameters);
1813 
1820  template <typename number>
1821  void initialize (const ::SparseMatrix<number> &deal_ii_sparse_matrix,
1822  const AdditionalData &additional_data = AdditionalData(),
1823  const double drop_tolerance = 1e-13,
1824  const ::SparsityPattern *use_this_sparsity = nullptr);
1825 
1830  void clear ();
1831 
1835  size_type memory_consumption () const;
1836 
1837  private:
1841  std::shared_ptr<SparseMatrix> trilinos_matrix;
1842  };
1843 #endif
1844 
1845 
1846 
1856  {
1857  public:
1858 
1864  {};
1865 
1872  void initialize (const SparseMatrix &matrix,
1873  const AdditionalData &additional_data = AdditionalData());
1874 
1878  void vmult (MPI::Vector &dst,
1879  const MPI::Vector &src) const;
1880 
1884  void Tvmult (MPI::Vector &dst,
1885  const MPI::Vector &src) const;
1886 
1891  void vmult (::Vector<double> &dst,
1892  const ::Vector<double> &src) const;
1893 
1898  void Tvmult (::Vector<double> &dst,
1899  const ::Vector<double> &src) const;
1900 
1906  const ::LinearAlgebra::distributed::Vector<double> &src) const;
1907 
1914  const ::LinearAlgebra::distributed::Vector<double> &src) const;
1915  };
1916 
1917 
1918 
1919 // -------------------------- inline and template functions ----------------------
1920 
1921 
1922 #ifndef DOXYGEN
1923 
1924 
1925  inline
1926  void
1928  {
1929  // This only flips a flag that tells
1930  // Trilinos that any vmult operation
1931  // should be done with the
1932  // transpose. However, the matrix
1933  // structure is not reset.
1934  int ierr;
1935 
1936  if (!preconditioner->UseTranspose())
1937  {
1938  ierr = preconditioner->SetUseTranspose (true);
1939  AssertThrow (ierr == 0, ExcTrilinosError(ierr));
1940  }
1941  else
1942  {
1943  ierr = preconditioner->SetUseTranspose (false);
1944  AssertThrow (ierr == 0, ExcTrilinosError(ierr));
1945  }
1946  }
1947 
1948 
1949  inline
1950  void
1951  PreconditionBase::vmult (MPI::Vector &dst,
1952  const MPI::Vector &src) const
1953  {
1954  Assert (dst.vector_partitioner().SameAs(preconditioner->OperatorRangeMap()),
1955  ExcNonMatchingMaps("dst"));
1956  Assert (src.vector_partitioner().SameAs(preconditioner->OperatorDomainMap()),
1957  ExcNonMatchingMaps("src"));
1958 
1959  const int ierr = preconditioner->ApplyInverse (src.trilinos_vector(),
1960  dst.trilinos_vector());
1961  AssertThrow (ierr == 0, ExcTrilinosError(ierr));
1962  }
1963 
1964  inline
1965  void
1966  PreconditionBase::Tvmult (MPI::Vector &dst,
1967  const MPI::Vector &src) const
1968  {
1969  Assert (dst.vector_partitioner().SameAs(preconditioner->OperatorRangeMap()),
1970  ExcNonMatchingMaps("dst"));
1971  Assert (src.vector_partitioner().SameAs(preconditioner->OperatorDomainMap()),
1972  ExcNonMatchingMaps("src"));
1973 
1974  preconditioner->SetUseTranspose(true);
1975  const int ierr = preconditioner->ApplyInverse (src.trilinos_vector(),
1976  dst.trilinos_vector());
1977  AssertThrow (ierr == 0, ExcTrilinosError(ierr));
1978  preconditioner->SetUseTranspose(false);
1979  }
1980 
1981 
1982  // For the implementation of the <code>vmult</code> function with deal.II
1983  // data structures we note that invoking a call of the Trilinos
1984  // preconditioner requires us to use Epetra vectors as well. We do this by
1985  // providing a view, i.e., feed Trilinos with a pointer to the data, so we
1986  // avoid copying the content of the vectors during the iteration (this
1987  // function is only useful when used in serial anyway). In the declaration
1988  // of the right hand side, we need to cast the source vector (that is
1989  // <code>const</code> in all deal.II calls) to non-constant value, as this
1990  // is the way Trilinos wants to have them.
1991  inline
1993  const ::Vector<double> &src) const
1994  {
1995  AssertDimension (static_cast<TrilinosWrappers::types::int_type>(dst.size()),
1996  preconditioner->OperatorDomainMap().NumMyElements());
1997  AssertDimension (static_cast<TrilinosWrappers::types::int_type>(src.size()),
1998  preconditioner->OperatorRangeMap().NumMyElements());
1999  Epetra_Vector tril_dst (View, preconditioner->OperatorDomainMap(),
2000  dst.begin());
2001  Epetra_Vector tril_src (View, preconditioner->OperatorRangeMap(),
2002  const_cast<double *>(src.begin()));
2003 
2004  const int ierr = preconditioner->ApplyInverse (tril_src, tril_dst);
2005  AssertThrow (ierr == 0, ExcTrilinosError(ierr));
2006  }
2007 
2008 
2009  inline
2011  const ::Vector<double> &src) const
2012  {
2013  AssertDimension (static_cast<TrilinosWrappers::types::int_type>(dst.size()),
2014  preconditioner->OperatorDomainMap().NumMyElements());
2015  AssertDimension (static_cast<TrilinosWrappers::types::int_type>(src.size()),
2016  preconditioner->OperatorRangeMap().NumMyElements());
2017  Epetra_Vector tril_dst (View, preconditioner->OperatorDomainMap(),
2018  dst.begin());
2019  Epetra_Vector tril_src (View, preconditioner->OperatorRangeMap(),
2020  const_cast<double *>(src.begin()));
2021 
2022  preconditioner->SetUseTranspose(true);
2023  const int ierr = preconditioner->ApplyInverse (tril_src, tril_dst);
2024  AssertThrow (ierr == 0, ExcTrilinosError(ierr));
2025  preconditioner->SetUseTranspose(false);
2026  }
2027 
2028 
2029 
2030  inline
2031  void
2034  {
2035  AssertDimension (static_cast<TrilinosWrappers::types::int_type>(dst.local_size()),
2036  preconditioner->OperatorDomainMap().NumMyElements());
2037  AssertDimension (static_cast<TrilinosWrappers::types::int_type>(src.local_size()),
2038  preconditioner->OperatorRangeMap().NumMyElements());
2039  Epetra_Vector tril_dst (View, preconditioner->OperatorDomainMap(),
2040  dst.begin());
2041  Epetra_Vector tril_src (View, preconditioner->OperatorRangeMap(),
2042  const_cast<double *>(src.begin()));
2043 
2044  const int ierr = preconditioner->ApplyInverse (tril_src, tril_dst);
2045  AssertThrow (ierr == 0, ExcTrilinosError(ierr));
2046  }
2047 
2048  inline
2049  void
2052  {
2053  AssertDimension (static_cast<TrilinosWrappers::types::int_type>(dst.local_size()),
2054  preconditioner->OperatorDomainMap().NumMyElements());
2055  AssertDimension (static_cast<TrilinosWrappers::types::int_type>(src.local_size()),
2056  preconditioner->OperatorRangeMap().NumMyElements());
2057  Epetra_Vector tril_dst (View, preconditioner->OperatorDomainMap(),
2058  dst.begin());
2059  Epetra_Vector tril_src (View, preconditioner->OperatorRangeMap(),
2060  const_cast<double *>(src.begin()));
2061 
2062  preconditioner->SetUseTranspose(true);
2063  const int ierr = preconditioner->ApplyInverse (tril_src, tril_dst);
2064  AssertThrow (ierr == 0, ExcTrilinosError(ierr));
2065  preconditioner->SetUseTranspose(false);
2066  }
2067 
2068 #endif
2069 
2070 }
2071 
2072 
2076 DEAL_II_NAMESPACE_CLOSE
2077 
2078 #endif // DEAL_II_WITH_TRILINOS
2079 
2080 /*---------------------------- trilinos_precondition.h ---------------------------*/
2081 
2082 #endif
2083 /*---------------------------- trilinos_precondition.h ---------------------------*/
static ::ExceptionBase & ExcTrilinosError(int arg1)
AdditionalData(const unsigned int block_size=1, const std::string &block_creation_type="linear", const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1248
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
AdditionalData(const bool elliptic=true, const unsigned int n_cycles=1, const bool w_cyle=false, const double aggregation_threshold=1e-4, const std::vector< std::vector< bool > > &constant_modes=std::vector< std::vector< bool > >(0), const unsigned int smoother_sweeps=2, const unsigned int smoother_overlap=0, const bool output_details=false, const char *smoother_type="Chebyshev", const char *coarse_type="Amesos-KLU")
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
virtual void vmult(MPI::Vector &dst, const MPI::Vector &src) const
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
std::shared_ptr< Epetra_Map > vector_distributor
#define AssertThrow(cond, exc)
Definition: exceptions.h:1221
AdditionalData(const unsigned int ilu_fill=0, const double ilu_atol=0., const double ilu_rtol=1., const unsigned int overlap=0)
AdditionalData(const unsigned int block_size=1, const std::string &block_creation_type="linear", const double omega=1, const double min_diagonal=0, const unsigned int n_sweeps=1)
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:346
#define Assert(cond, exc)
Definition: exceptions.h:1142
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
AdditionalData(const unsigned int degree=1, const double max_eigenvalue=10., const double eigenvalue_ratio=30., const double min_eigenvalue=1., const double min_diagonal=1e-12, const bool nonzero_starting=false)
AdditionalData(const bool elliptic=true, const bool higher_order_elements=false, const unsigned int n_cycles=1, const bool w_cyle=false, const double aggregation_threshold=1e-4, const std::vector< std::vector< bool > > &constant_modes=std::vector< std::vector< bool > >(0), const unsigned int smoother_sweeps=2, const unsigned int smoother_overlap=0, const bool output_details=false, const char *smoother_type="Chebyshev", const char *coarse_type="Amesos-KLU")
AdditionalData(const double ilut_drop=0., const unsigned int ilut_fill=0, const double ilut_atol=0., const double ilut_rtol=1., const unsigned int overlap=0)
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
iterator begin()
Epetra_Operator & trilinos_operator() const
std::shared_ptr< SparseMatrix > trilinos_matrix
std::shared_ptr< SparseMatrix > trilinos_matrix
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
virtual void Tvmult(MPI::Vector &dst, const MPI::Vector &src) const
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
static ::ExceptionBase & ExcNonMatchingMaps(std::string arg1)
size_type size() const
AdditionalData(const unsigned int ic_fill=0, const double ic_atol=0., const double ic_rtol=1., const unsigned int overlap=0)
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
std::shared_ptr< Epetra_Operator > preconditioner
AdditionalData(const unsigned int block_size=1, const std::string &block_creation_type="linear", const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void vmult(MPI::Vector &dst, const MPI::Vector &src) const
void Tvmult(MPI::Vector &dst, const MPI::Vector &src) const
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int n_sweeps=1)