Reference documentation for deal.II version GIT 8ad845fa53 2023-12-10 20:50: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\}}\)
slepc_spectral_transformation.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2009 - 2023 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef dealii_slepc_spectral_transformation_h
18 # define dealii_slepc_spectral_transformation_h
19 
20 
21 # include <deal.II/base/config.h>
22 
23 # ifdef DEAL_II_WITH_SLEPC
24 
25 # include <deal.II/lac/exceptions.h>
27 
28 # include <petscksp.h>
29 
30 # include <slepceps.h>
31 
32 # include <memory>
33 
35 
36 // Forward declaration
37 # ifndef DOXYGEN
38 namespace PETScWrappers
39 {
40  // forward declarations
41  class SolverBase;
42 } // namespace PETScWrappers
43 # endif
44 
45 namespace SLEPcWrappers
46 {
47  // forward declaration
48  class SolverBase;
49 
77  {
78  protected:
82  explicit TransformationBase(const MPI_Comm mpi_communicator);
83 
84  public:
88  virtual ~TransformationBase();
89 
98  void
99  set_matrix_mode(const STMatMode mode);
100 
105  void
106  set_solver(const PETScWrappers::SolverBase &solver);
107 
108  protected:
112  ST st;
113 
114  // Make the solver class a friend, since it needs to set spectral
115  // transformation object.
116  friend class SolverBase;
117  };
118 
125  {
126  public:
131  {
135  explicit AdditionalData(const double shift_parameter = 0);
136 
140  const double shift_parameter;
141  };
142 
143 
147  explicit TransformationShift(const MPI_Comm mpi_communicator,
148  const AdditionalData &data = AdditionalData());
149 
150 
151  protected:
156  };
157 
165  {
166  public:
171  {
175  explicit AdditionalData(const double shift_parameter = 0);
176 
180  const double shift_parameter;
181  };
182 
183 
187  explicit TransformationShiftInvert(
188  const MPI_Comm mpi_communicator,
189  const AdditionalData &data = AdditionalData());
190 
191  protected:
196 
197  // Make the solver class a friend, since it may need to set target
198  // equal the provided shift value.
199  friend class SolverBase;
200  };
201 
213  : public TransformationBase
214  {
215  public:
220  {
224  explicit AdditionalData(const double shift_parameter = 0);
225 
229  const double shift_parameter;
230  };
231 
232 
237  const MPI_Comm mpi_communicator,
238  const AdditionalData &data = AdditionalData());
239 
240  protected:
245  };
246 
253  {
254  public:
259  {
263  explicit AdditionalData(const double shift_parameter = 0,
264  const double antishift_parameter = 0);
265 
269  const double shift_parameter;
270 
274  const double antishift_parameter;
275  };
276 
277 
281  explicit TransformationCayley(
282  const MPI_Comm mpi_communicator,
283  const AdditionalData &data = AdditionalData());
284 
285  protected:
290  };
291 
292 } // namespace SLEPcWrappers
293 
295 
296 # endif // DEAL_II_WITH_SLEPC
297 
298 /*-------------------- slepc_spectral_transformation.h ------------------*/
299 
300 #endif
301 
302 /*-------------------- slepc_spectral_transformation.h ------------------*/
TransformationBase(const MPI_Comm mpi_communicator)
void set_solver(const PETScWrappers::SolverBase &solver)
TransformationCayley(const MPI_Comm mpi_communicator, const AdditionalData &data=AdditionalData())
TransformationShiftInvert(const MPI_Comm mpi_communicator, const AdditionalData &data=AdditionalData())
TransformationShift(const MPI_Comm mpi_communicator, const AdditionalData &data=AdditionalData())
#define DEAL_II_DEPRECATED
Definition: config.h:178
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
AdditionalData(const double shift_parameter=0, const double antishift_parameter=0)