Reference documentation for deal.II version GIT relicensing-487-ge9eb5ab491 2024-04-25 07: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\}}\)
Loading...
Searching...
No Matches
trilinos_tpetra_block_vector.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_trilinos_tpetra_block_vector_h
16#define dealii_trilinos_tpetra_block_vector_h
17
18#include <deal.II/base/config.h>
19
20#ifdef DEAL_II_TRILINOS_WITH_TPETRA
21
26
28
29// forward declaration
30# ifndef DOXYGEN
31template <typename Number>
32class BlockVectorBase;
33
34namespace LinearAlgebra
35{
36 // forward declaration
37 namespace TpetraWrappers
38 {
39 template <typename Number, typename MemorySpace>
40 class BlockVector;
41
42 template <typename Number, typename MemorySpace>
44 } // namespace TpetraWrappers
45} // namespace LinearAlgebra
46# endif // DOXYGEN
47
48namespace LinearAlgebra
49{
54 namespace TpetraWrappers
55 {
74 template <typename Number, typename MemorySpace = ::MemorySpace::Host>
76 TpetraWrappers::Vector<Number, MemorySpace>>
77 {
78 public:
82 using BaseClass =
84
89
94 using pointer = typename BaseClass::pointer;
99 using iterator = typename BaseClass::iterator;
101
105 BlockVector() = default;
106
113 BlockVector(const std::vector<IndexSet> &parallel_partitioning,
114 const MPI_Comm communicator = MPI_COMM_WORLD);
115
121 BlockVector(const std::vector<IndexSet> &parallel_partitioning,
122 const std::vector<IndexSet> &ghost_values,
123 const MPI_Comm communicator,
124 const bool vector_writable = false);
125
131
137 explicit BlockVector(const size_type num_blocks);
138
142 ~BlockVector() override = default;
143
149 operator=(const Number s);
150
163
172 void
173 reinit(const std::vector<IndexSet> &parallel_partitioning,
174 const MPI_Comm communicator = MPI_COMM_WORLD,
175 const bool omit_zeroing_entries = false);
176
194 void
195 reinit(const std::vector<IndexSet> &partitioning,
196 const std::vector<IndexSet> &ghost_values,
197 const MPI_Comm communicator = MPI_COMM_WORLD,
198 const bool vector_writable = false);
199
214 void
216 const bool omit_zeroing_entries = false);
217
224 void
225 reinit(const size_type num_blocks);
226
233 bool
235
239 void
240 print(std::ostream &out,
241 const unsigned int precision = 3,
242 const bool scientific = true,
243 const bool across = true) const;
244 };
245 } // namespace TpetraWrappers
246
249} // namespace LinearAlgebra
250
252
253#endif // DEAL_II_TRILINOS_WITH_TPETRA
254
255#endif // dealii_trilinos_tpetra_block_vector_h
::internal::BlockVectorIterators::Iterator< BlockVectorBase, false > iterator
const value_type * const_pointer
typename BlockType::const_reference const_reference
types::global_dof_index size_type
typename BlockType::value_type value_type
::internal::BlockVectorIterators::Iterator< BlockVectorBase, true > const_iterator
typename BlockType::reference reference
BlockVector< Number, MemorySpace > & operator=(const Number s)
BlockVector< Number, MemorySpace > & operator=(const BlockVector< Number, MemorySpace > &v)
BlockVector(const BlockVector< Number, MemorySpace > &v)
BlockVector(const size_type num_blocks)
void reinit(const BlockVector< Number, MemorySpace > &V, const bool omit_zeroing_entries=false)
void reinit(const std::vector< IndexSet > &partitioning, const std::vector< IndexSet > &ghost_values, const MPI_Comm communicator=MPI_COMM_WORLD, const bool vector_writable=false)
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
void reinit(const size_type num_blocks)
typename BaseClass::const_reference const_reference
BlockVector(const std::vector< IndexSet > &parallel_partitioning, const std::vector< IndexSet > &ghost_values, const MPI_Comm communicator, const bool vector_writable=false)
BlockVector(const std::vector< IndexSet > &parallel_partitioning, const MPI_Comm communicator=MPI_COMM_WORLD)
void reinit(const std::vector< IndexSet > &parallel_partitioning, const MPI_Comm communicator=MPI_COMM_WORLD, const bool omit_zeroing_entries=false)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503