Reference documentation for deal.II version 8.5.1
trilinos_linear_operator.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2016 - 2017 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_linear_operator_h
17 #define dealii__trilinos_linear_operator_h
18 
19 #include <deal.II/base/config.h>
20 
21 #if defined(DEAL_II_WITH_CXX11) && defined(DEAL_II_WITH_TRILINOS)
22 
23 #include <deal.II/lac/linear_operator.h>
24 #include <deal.II/lac/block_linear_operator.h>
25 
26 DEAL_II_NAMESPACE_OPEN
27 
28 namespace TrilinosWrappers
29 {
30 
31  // Forward declarations:
32  class SparseMatrix;
33  class PreconditionBase;
34  class BlockSparseMatrix;
35 
36  namespace internal
37  {
38  namespace LinearOperator
39  {
40  class TrilinosPayload;
41  }
42 
43  namespace BlockLinearOperator
44  {
45  template<typename PayloadBlockType>
46  class TrilinosBlockPayload;
47  }
48  }
49 
50 
55 
56 
72  template <typename Range, typename Domain = Range,
73  typename Matrix>
75  linear_operator(const TrilinosWrappers::SparseMatrix &operator_exemplar, const Matrix &matrix)
76  {
77  typedef TrilinosWrappers::SparseMatrix OperatorExemplar;
79  return ::linear_operator<Range, Domain, Payload, OperatorExemplar, Matrix>(operator_exemplar, matrix);
80  }
81 
82 
97  template <typename Range, typename Domain = Range>
100  {
101  typedef TrilinosWrappers::SparseMatrix Matrix;
103  return ::linear_operator<Range, Domain, Payload, Matrix, Matrix>(matrix, matrix);
104  }
105 
106 
108 
112 
113 
127  template <typename Range,
128  typename Domain = Range>
131  {
132  typedef TrilinosWrappers::BlockSparseMatrix BlockMatrix;
135  return ::block_operator<Range,Domain,BlockPayload,BlockMatrix>(block_matrix);
136  }
137 
138 
154  template <size_t m, size_t n,
155  typename Range,
156  typename Domain = Range>
159  {
162  return ::block_operator<m,n,Range,Domain,BlockPayload>(ops);
163  }
164 
165 
183  template <typename Range,
184  typename Domain = Range>
187  {
188  typedef TrilinosWrappers::BlockSparseMatrix BlockMatrix;
191  return ::block_diagonal_operator<Range, Domain, BlockPayload, BlockMatrix>(block_matrix);
192  }
193 
194 
210  template <size_t m, typename Range, typename Domain = Range>
213  {
216  return ::block_diagonal_operator<m,Range,Domain,BlockPayload>(ops);
217  }
218 
220 
221 } // namespace TrilinosWrappers
222 
223 DEAL_II_NAMESPACE_CLOSE
224 
225 #endif // DEAL_II_WITH_CXX11 && DEAL_II_WITH_TRILINOS
226 #endif
LinearOperator< Range, Domain, TrilinosWrappers::internal::LinearOperator::TrilinosPayload > linear_operator(const TrilinosWrappers::SparseMatrix &operator_exemplar, const Matrix &matrix)
BlockLinearOperator< Range, Domain, TrilinosWrappers::internal::BlockLinearOperator::TrilinosBlockPayload< TrilinosWrappers::internal::LinearOperator::TrilinosPayload > > block_operator(const std::array< std::array< LinearOperator< typename Range::BlockType, typename Domain::BlockType, TrilinosWrappers::internal::LinearOperator::TrilinosPayload >, n >, m > &ops)
BlockLinearOperator< Range, Domain, TrilinosWrappers::internal::BlockLinearOperator::TrilinosBlockPayload< TrilinosWrappers::internal::LinearOperator::TrilinosPayload > > block_operator(const TrilinosWrappers::BlockSparseMatrix &block_matrix)
BlockLinearOperator< Range, Domain, TrilinosWrappers::internal::BlockLinearOperator::TrilinosBlockPayload< TrilinosWrappers::internal::LinearOperator::TrilinosPayload > > block_diagonal_operator(const std::array< LinearOperator< typename Range::BlockType, typename Domain::BlockType, TrilinosWrappers::internal::LinearOperator::TrilinosPayload >, m > &ops)
LinearOperator< Range, Domain, TrilinosWrappers::internal::LinearOperator::TrilinosPayload > linear_operator(const TrilinosWrappers::SparseMatrix &matrix)
BlockLinearOperator< Range, Domain, TrilinosWrappers::internal::BlockLinearOperator::TrilinosBlockPayload< TrilinosWrappers::internal::LinearOperator::TrilinosPayload > > block_diagonal_operator(const TrilinosWrappers::BlockSparseMatrix &block_matrix)