deal.II version GIT relicensing-6809-ge913b9bb34 2026-09-25 17:20:01+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: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2024 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_trilinos_tpetra_block_vector_h
14#define dealii_trilinos_tpetra_block_vector_h
15
16#include <deal.II/base/config.h>
17
18#ifdef DEAL_II_TRILINOS_WITH_TPETRA
19
23
24#endif // DEAL_II_TRILINOS_WITH_TPETRA
25
27
28#ifdef DEAL_II_TRILINOS_WITH_TPETRA
29namespace LinearAlgebra
30{
35 namespace TpetraWrappers
36 {
55 template <typename Number, typename MemorySpace = ::MemorySpace::Host>
57 TpetraWrappers::Vector<Number, MemorySpace>>
58 {
59 public:
63 using BaseClass =
65
70
75 using pointer = typename BaseClass::pointer;
80 using iterator = typename BaseClass::iterator;
82
86 BlockVector() = default;
87
94 BlockVector(const std::vector<IndexSet> &parallel_partitioning,
95 const MPI_Comm communicator = MPI_COMM_WORLD);
96
102 BlockVector(const std::vector<IndexSet> &parallel_partitioning,
103 const std::vector<IndexSet> &ghost_values,
104 const MPI_Comm communicator,
105 const bool vector_writable = false);
106
112
118 explicit BlockVector(const size_type num_blocks);
119
123 ~BlockVector() override = default;
124
130 operator=(const Number s);
131
144
153 void
154 reinit(const std::vector<IndexSet> &parallel_partitioning,
155 const MPI_Comm communicator = MPI_COMM_WORLD,
156 const bool omit_zeroing_entries = false);
157
175 void
176 reinit(const std::vector<IndexSet> &partitioning,
177 const std::vector<IndexSet> &ghost_values,
178 const MPI_Comm communicator = MPI_COMM_WORLD,
179 const bool vector_writable = false);
180
195 void
197 const bool omit_zeroing_entries = false);
198
205 void
206 reinit(const size_type num_blocks);
207
214 bool
216
220 void
221 print(std::ostream &out,
222 const unsigned int precision = 3,
223 const bool scientific = true,
224 const bool across = true) const;
225 };
226 } // namespace TpetraWrappers
227
230} // namespace LinearAlgebra
231
236template <typename Number, typename MemorySpace>
238 LinearAlgebra::TpetraWrappers::BlockVector<Number, MemorySpace>>
239 : std::false_type
240{};
241
242#endif // DEAL_II_TRILINOS_WITH_TPETRA
243
245
246#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:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39