16 #ifndef dealii_trilinos_block_sparse_matrix_h
17 #define dealii_trilinos_block_sparse_matrix_h
20 #include <deal.II/base/config.h>
22 #ifdef DEAL_II_WITH_TRILINOS
24 # include <deal.II/base/template_constraints.h>
26 # include <deal.II/lac/block_matrix_base.h>
27 # include <deal.II/lac/exceptions.h>
28 # include <deal.II/lac/full_matrix.h>
29 # include <deal.II/lac/trilinos_parallel_block_vector.h>
30 # include <deal.II/lac/trilinos_sparse_matrix.h>
34 DEAL_II_NAMESPACE_OPEN
38 template <
typename number>
88 using pointer = BaseClass::pointer;
89 using const_pointer = BaseClass::const_pointer;
90 using reference = BaseClass::reference;
91 using const_reference = BaseClass::const_reference;
92 using size_type = BaseClass::size_type;
154 template <
typename BlockSparsityPatternType>
156 reinit(
const std::vector<Epetra_Map> & input_maps,
157 const BlockSparsityPatternType &block_sparsity_pattern,
158 const bool exchange_data =
false);
165 template <
typename BlockSparsityPatternType>
167 reinit(
const std::vector<IndexSet> & input_maps,
168 const BlockSparsityPatternType &block_sparsity_pattern,
169 const MPI_Comm & communicator = MPI_COMM_WORLD,
170 const bool exchange_data =
false);
177 template <
typename BlockSparsityPatternType>
179 reinit(
const BlockSparsityPatternType &block_sparsity_pattern);
191 reinit(
const std::vector<Epetra_Map> & input_maps,
192 const ::BlockSparseMatrix<double> &deal_ii_sparse_matrix,
193 const double drop_tolerance = 1e-13);
203 reinit(const ::BlockSparseMatrix<double> &deal_ii_sparse_matrix,
204 const double drop_tolerance = 1e-13);
252 std::vector<Epetra_Map>
265 std::vector<Epetra_Map>
273 std::vector<IndexSet>
281 std::vector<IndexSet>
290 template <
typename VectorType1,
typename VectorType2>
292 vmult(VectorType1 &dst,
const VectorType2 &src)
const;
299 template <
typename VectorType1,
typename VectorType2>
301 Tvmult(VectorType1 &dst,
const VectorType2 &src)
const;
375 <<
"The blocks [" << arg1 <<
',' << arg2 <<
"] and [" << arg3
376 <<
',' << arg4 <<
"] have differing row numbers.");
386 <<
"The blocks [" << arg1 <<
',' << arg2 <<
"] and [" << arg3
387 <<
',' << arg4 <<
"] have differing column numbers.");
394 template <
typename VectorType1,
typename VectorType2>
396 vmult(VectorType1 & dst,
397 const VectorType2 &src,
399 const std::integral_constant<bool, true>,
400 const std::integral_constant<bool, true>)
const;
406 template <
typename VectorType1,
typename VectorType2>
408 vmult(VectorType1 & dst,
409 const VectorType2 &src,
411 const std::integral_constant<bool, false>,
412 const std::integral_constant<bool, true>)
const;
418 template <
typename VectorType1,
typename VectorType2>
420 vmult(VectorType1 & dst,
421 const VectorType2 &src,
423 const std::integral_constant<bool, true>,
424 const std::integral_constant<bool, false>)
const;
431 template <
typename VectorType1,
typename VectorType2>
433 vmult(VectorType1 & dst,
434 const VectorType2 &src,
436 const std::integral_constant<bool, false>,
437 const std::integral_constant<bool, false>)
const;
455 this->
block(r, c) = d;
465 bool compressed =
true;
468 if (
block(row, col).is_compressed() ==
false)
479 template <
typename VectorType1,
typename VectorType2>
492 template <
typename VectorType1,
typename VectorType2>
505 template <
typename VectorType1,
typename VectorType2>
508 const VectorType2 &src,
510 std::integral_constant<bool, true>,
511 std::integral_constant<bool, true>)
const
521 template <
typename VectorType1,
typename VectorType2>
524 const VectorType2 &src,
526 std::integral_constant<bool, false>,
527 std::integral_constant<bool, true>)
const
537 template <
typename VectorType1,
typename VectorType2>
540 const VectorType2 &src,
542 std::integral_constant<bool, true>,
543 std::integral_constant<bool, false>)
const
553 template <
typename VectorType1,
typename VectorType2>
556 const VectorType2 &src,
558 std::integral_constant<bool, false>,
559 std::integral_constant<bool, false>)
const
569 inline std::vector<IndexSet>
575 std::vector<IndexSet> domain_indices;
577 domain_indices.push_back(
578 this->sub_objects[0][c]->locally_owned_domain_indices());
580 return domain_indices;
585 inline std::vector<IndexSet>
591 std::vector<IndexSet> range_indices;
593 range_indices.push_back(
594 this->sub_objects[r][0]->locally_owned_range_indices());
596 return range_indices;
603 namespace BlockLinearOperatorImplementation
620 template <
typename PayloadBlockType>
638 template <
typename... Args>
645 "TrilinosBlockPayload can only accept a payload of type TrilinosPayload.");
656 DEAL_II_NAMESPACE_CLOSE
658 #endif // DEAL_II_WITH_TRILINOS
660 #endif // dealii_trilinos_block_sparse_matrix_h