version GIT relicensing-7341-gcb9dbcaa45 2026-12-04 11:10: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
psblas_precondition.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) 2008 - 2023 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_psblas_precondition_h
14#define dealii_psblas_precondition_h
15
18
19
20#ifdef DEAL_II_WITH_AMG4PSBLAS
21
22# include <amg_cbind.h>
23#endif
24
26
27#ifdef DEAL_II_WITH_AMG4PSBLAS
28namespace PSCToolkitWrappers
29{
30
42 {
43 public:
48
55 {
56 explicit AdditionalData(const char *cycle_type = "VCYCLE",
57 const unsigned int n_cycles = 1,
58 const double aggregation_threshold = 1e-2,
59 const char *aggregation_type = "SOC1",
60 const unsigned int aggregation_size = 8,
61 const char *smoother_type = "FBGS",
62 const unsigned int smoother_sweeps = 2,
63 const char *aggr_prol = "SMOOTHED",
64 const char *aggr_filter = "FILTER",
65 const char *parallel_aggr_algorithm = "DECOUPLED",
66 const char *coarse_type = "BJAC",
67 const char *coarse_mat_type = "DIST",
68 const bool output_details = false)
82 {}
83
84
89 const char *cycle_type;
90
91 /*
92 * Number of multilevel cycles to be performed.
93 */
94 unsigned int n_cycles;
95
100
105 const char *aggregation_type;
106
113 unsigned int aggregation_size;
114
118 const char *smoother_type;
119
127 unsigned int smoother_sweeps;
128
133 const char *aggr_prol;
134
139 const char *aggr_filter;
140
146
151 const char *coarse_type;
152
157 const char *coarse_mat_type;
158
164 };
165
173
178
183 void
184 initialize(const SparseMatrix &matrix,
185 const AdditionalData &additional_data = AdditionalData());
186
191 void
192 clear();
193
199 amg_c_dprec *
201
205 void
206 vmult(Vector &dst, const Vector &src) const;
207
213 void
214 Tvmult(Vector &dst, const Vector &src) const;
215
216
217 friend class SolverBase;
218
219 private:
225
229 std::shared_ptr<psb_c_descriptor> psblas_descriptor;
230 };
231
232} // namespace PSCToolkitWrappers
233
234#endif
235
237
238#endif
void Tvmult(Vector &dst, const Vector &src) const
void vmult(Vector &dst, const Vector &src) const
std::shared_ptr< psb_c_descriptor > psblas_descriptor
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
unsigned int global_dof_index
Definition types.h:92
AdditionalData(const char *cycle_type="VCYCLE", const unsigned int n_cycles=1, const double aggregation_threshold=1e-2, const char *aggregation_type="SOC1", const unsigned int aggregation_size=8, const char *smoother_type="FBGS", const unsigned int smoother_sweeps=2, const char *aggr_prol="SMOOTHED", const char *aggr_filter="FILTER", const char *parallel_aggr_algorithm="DECOUPLED", const char *coarse_type="BJAC", const char *coarse_mat_type="DIST", const bool output_details=false)