13#ifndef dealii_tpetra_trilinos_block_sparse_matrix_h
14#define dealii_tpetra_trilinos_block_sparse_matrix_h
19#ifdef DEAL_II_TRILINOS_WITH_TPETRA
36#ifdef DEAL_II_TRILINOS_WITH_TPETRA
40template <
typename number>
50 namespace TpetraWrappers
75 template <
typename Number,
typename MemorySpace = ::MemorySpace::Host>
160 template <
typename BlockSparsityPatternType>
162 reinit(
const std::vector<IndexSet> &input_maps,
163 const BlockSparsityPatternType &block_sparsity_pattern,
164 const MPI_Comm communicator = MPI_COMM_WORLD,
165 const bool exchange_data =
false);
172 template <
typename BlockSparsityPatternType>
174 reinit(
const BlockSparsityPatternType &block_sparsity_pattern);
184 const std::vector<IndexSet> ¶llel_partitioning,
185 const ::BlockSparseMatrix<double> &dealii_block_sparse_matrix,
186 const MPI_Comm communicator = MPI_COMM_WORLD,
187 const double drop_tolerance = 1e-13);
197 reinit(const ::BlockSparseMatrix<double> &deal_ii_sparse_matrix,
198 const double drop_tolerance = 1e-13);
242 std::vector<IndexSet>
250 std::vector<IndexSet>
259 template <
typename VectorType1,
typename VectorType2>
261 vmult(VectorType1 &dst,
const VectorType2 &src)
const;
268 template <
typename VectorType1,
typename VectorType2>
270 Tvmult(VectorType1 &dst,
const VectorType2 &src)
const;
284 template <
typename VectorType1,
285 typename VectorType2,
286 typename VectorType3>
289 const VectorType2 &x,
290 const VectorType3 &b)
const;
302 template <
typename VectorType1,
typename VectorType2>
304 vmult(VectorType1 &dst,
305 const VectorType2 &src,
307 const std::bool_constant<true>,
308 const std::bool_constant<true>)
const;
314 template <
typename VectorType1,
typename VectorType2>
316 vmult(VectorType1 &dst,
317 const VectorType2 &src,
319 const std::bool_constant<false>,
320 const std::bool_constant<true>)
const;
326 template <
typename VectorType1,
typename VectorType2>
328 vmult(VectorType1 &dst,
329 const VectorType2 &src,
331 const std::bool_constant<true>,
332 const std::bool_constant<false>)
const;
339 template <
typename VectorType1,
typename VectorType2>
341 vmult(VectorType1 &dst,
342 const VectorType2 &src,
344 const std::bool_constant<false>,
345 const std::bool_constant<false>)
const;
353 namespace TpetraWrappers
355 template <
typename Number,
typename MemorySpace>
356 template <
typename VectorType1,
typename VectorType2>
359 const VectorType2 &src)
const
370 template <
typename Number,
typename MemorySpace>
371 template <
typename VectorType1,
typename VectorType2>
374 const VectorType2 &src)
const
385 template <
typename Number,
typename MemorySpace>
386 template <
typename VectorType1,
typename VectorType2>
390 const VectorType2 &src,
392 std::bool_constant<true>,
393 std::bool_constant<true>)
const
396 BaseClass::Tvmult_block_block(dst, src);
398 BaseClass::vmult_block_block(dst, src);
403 template <
typename Number,
typename MemorySpace>
404 template <
typename VectorType1,
typename VectorType2>
408 const VectorType2 &src,
410 std::bool_constant<false>,
411 std::bool_constant<true>)
const
414 BaseClass::Tvmult_nonblock_block(dst, src);
416 BaseClass::vmult_nonblock_block(dst, src);
421 template <
typename Number,
typename MemorySpace>
422 template <
typename VectorType1,
typename VectorType2>
426 const VectorType2 &src,
428 std::bool_constant<true>,
429 std::bool_constant<false>)
const
432 BaseClass::Tvmult_block_nonblock(dst, src);
434 BaseClass::vmult_block_nonblock(dst, src);
439 template <
typename Number,
typename MemorySpace>
440 template <
typename VectorType1,
typename VectorType2>
444 const VectorType2 &src,
446 std::bool_constant<false>,
447 std::bool_constant<false>)
const
450 BaseClass::Tvmult_nonblock_nonblock(dst, src);
452 BaseClass::vmult_nonblock_nonblock(dst, src);
const value_type & const_reference
unsigned int n_block_rows() const
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, true > > const_iterator
types::global_dof_index size_type
typename BlockType::value_type value_type
const value_type * const_pointer
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, false > > iterator
typename BaseClass::value_type value_type
void reinit(const std::vector< IndexSet > ¶llel_partitioning, const ::BlockSparseMatrix< double > &dealii_block_sparse_matrix, const MPI_Comm communicator=MPI_COMM_WORLD, const double drop_tolerance=1e-13)
void Tvmult(VectorType1 &dst, const VectorType2 &src) const
BlockSparseMatrix< Number, MemorySpace > & operator=(const BlockSparseMatrix< Number, MemorySpace > &)=default
BlockSparseMatrix()=default
void vmult(VectorType1 &dst, const VectorType2 &src) const
std::vector< IndexSet > locally_owned_domain_indices() const
std::vector< IndexSet > locally_owned_range_indices() const
typename BaseClass::const_iterator const_iterator
void reinit(const ::BlockSparseMatrix< double > &deal_ii_sparse_matrix, const double drop_tolerance=1e-13)
typename BaseClass::const_pointer const_pointer
Number residual(VectorType1 &dst, const VectorType2 &x, const VectorType3 &b) const
bool is_compressed() const
std::uint64_t n_nonzero_elements() const
typename BaseClass::pointer pointer
~BlockSparseMatrix() override
typename BaseClass::BlockType BlockType
void reinit(const BlockSparsityPatternType &block_sparsity_pattern)
typename BaseClass::const_reference const_reference
typename BaseClass::iterator iterator
BlockSparseMatrix< Number, MemorySpace > & operator=(const Number d)
typename BaseClass::size_type size_type
void reinit(const size_type n_block_rows, const size_type n_block_columns)
typename BaseClass::reference reference
MPI_Comm get_mpi_communicator() const
void reinit(const std::vector< IndexSet > &input_maps, const BlockSparsityPatternType &block_sparsity_pattern, const MPI_Comm communicator=MPI_COMM_WORLD, const bool exchange_data=false)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE