Reference documentation for deal.II version 9.6.0
\(\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
petsc_matrix_free.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2012 - 2023 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_petsc_matrix_free_h
16#define dealii_petsc_matrix_free_h
17
18
19#include <deal.II/base/config.h>
20
21#ifdef DEAL_II_WITH_PETSC
26
27
28
29namespace PETScWrappers
30{
58 class MatrixFree : public MatrixBase
59 {
60 public:
64 MatrixFree();
65
80 MatrixFree(const MPI_Comm communicator,
81 const unsigned int m,
82 const unsigned int n,
83 const unsigned int local_rows,
84 const unsigned int local_columns);
85
97 MatrixFree(const MPI_Comm communicator,
98 const unsigned int m,
99 const unsigned int n,
100 const std::vector<unsigned int> &local_rows_per_process,
101 const std::vector<unsigned int> &local_columns_per_process,
102 const unsigned int this_process);
103
109 MatrixFree(const unsigned int m,
110 const unsigned int n,
111 const unsigned int local_rows,
112 const unsigned int local_columns);
113
119 MatrixFree(const unsigned int m,
120 const unsigned int n,
121 const std::vector<unsigned int> &local_rows_per_process,
122 const std::vector<unsigned int> &local_columns_per_process,
123 const unsigned int this_process);
124
130 void
131 reinit(const MPI_Comm communicator,
132 const unsigned int m,
133 const unsigned int n,
134 const unsigned int local_rows,
135 const unsigned int local_columns);
136
142 void
143 reinit(const MPI_Comm communicator,
144 const unsigned int m,
145 const unsigned int n,
146 const std::vector<unsigned int> &local_rows_per_process,
147 const std::vector<unsigned int> &local_columns_per_process,
148 const unsigned int this_process);
149
154 void
155 reinit(const unsigned int m,
156 const unsigned int n,
157 const unsigned int local_rows,
158 const unsigned int local_columns);
159
164 void
165 reinit(const unsigned int m,
166 const unsigned int n,
167 const std::vector<unsigned int> &local_rows_per_process,
168 const std::vector<unsigned int> &local_columns_per_process,
169 const unsigned int this_process);
170
175 void
176 clear();
177
189 virtual void
190 vmult(VectorBase &dst, const VectorBase &src) const = 0;
191
204 virtual void
205 Tvmult(VectorBase &dst, const VectorBase &src) const = 0;
206
218 virtual void
219 vmult_add(VectorBase &dst, const VectorBase &src) const = 0;
220
233 virtual void
234 Tvmult_add(VectorBase &dst, const VectorBase &src) const = 0;
235
244 virtual void
245 vmult(Vec &dst, const Vec &src) const;
246
247 private:
259 static int
260 matrix_free_mult(Mat A, Vec src, Vec dst);
261
267 void
268 do_reinit(const MPI_Comm comm,
269 const unsigned int m,
270 const unsigned int n,
271 const unsigned int local_rows,
272 const unsigned int local_columns);
273 };
274
275
276
277} // namespace PETScWrappers
278
280
281#endif // DEAL_II_WITH_PETSC
282
283#endif
virtual void Tvmult(VectorBase &dst, const VectorBase &src) const =0
void reinit(const MPI_Comm communicator, const unsigned int m, const unsigned int n, const unsigned int local_rows, const unsigned int local_columns)
virtual void vmult_add(VectorBase &dst, const VectorBase &src) const =0
static int matrix_free_mult(Mat A, Vec src, Vec dst)
void do_reinit(const MPI_Comm comm, const unsigned int m, const unsigned int n, const unsigned int local_rows, const unsigned int local_columns)
virtual void Tvmult_add(VectorBase &dst, const VectorBase &src) const =0
virtual void vmult(VectorBase &dst, const VectorBase &src) const =0
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
*braid_SplitCommworld & comm