Reference documentation for deal.II version 9.2.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\}}\)
slepc_spectral_transformation.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2009 - 2019 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 {
75  {
76  protected:
80  TransformationBase(const MPI_Comm &mpi_communicator);
81 
82  public:
86  virtual ~TransformationBase();
87 
96  void
97  set_matrix_mode(const STMatMode mode);
98 
103  void
104  set_solver(const PETScWrappers::SolverBase &solver);
105 
106  protected:
110  ST st;
111 
112  // Make the solver class a friend, since it needs to set spectral
113  // transformation object.
114  friend class SolverBase;
115  };
116 
124  {
125  public:
130  {
134  AdditionalData(const double shift_parameter = 0);
135 
139  const double shift_parameter;
140  };
141 
142 
146  TransformationShift(const MPI_Comm & mpi_communicator,
147  const AdditionalData &data = AdditionalData());
148 
149 
150  protected:
155  };
156 
165  {
166  public:
171  {
175  AdditionalData(const double shift_parameter = 0);
176 
180  const double shift_parameter;
181  };
182 
183 
187  TransformationShiftInvert(const MPI_Comm & mpi_communicator,
188  const AdditionalData &data = AdditionalData());
189 
190  protected:
195 
196  // Make the solver class a friend, since it may need to set target
197  // equal the provided shift value.
198  friend class SolverBase;
199  };
200 
210  {
211  public:
216  {
220  AdditionalData(const double shift_parameter = 0);
221 
225  const double shift_parameter;
226  };
227 
228 
233  const MPI_Comm & mpi_communicator,
234  const AdditionalData &data = AdditionalData());
235 
236  protected:
241  };
242 
250  {
251  public:
256  {
260  AdditionalData(const double shift_parameter = 0,
261  const double antishift_parameter = 0);
262 
266  const double shift_parameter;
267 
271  const double antishift_parameter;
272  };
273 
274 
278  TransformationCayley(const MPI_Comm & mpi_communicator,
279  const AdditionalData &data = AdditionalData());
280 
281  protected:
286  };
287 
288 } // namespace SLEPcWrappers
289 
291 
292 # endif // DEAL_II_WITH_SLEPC
293 
294 /*-------------------- slepc_spectral_transformation.h ------------------*/
295 
296 #endif
297 
298 /*-------------------- slepc_spectral_transformation.h ------------------*/
SLEPcWrappers::TransformationShiftInvert::TransformationShiftInvert
TransformationShiftInvert(const MPI_Comm &mpi_communicator, const AdditionalData &data=AdditionalData())
Definition: slepc_spectral_transformation.cc:88
SLEPcWrappers::TransformationShiftInvert
Definition: slepc_spectral_transformation.h:164
PETScWrappers::SolverBase
Definition: petsc_solver.h:113
SLEPcWrappers::TransformationSpectrumFolding::AdditionalData::AdditionalData
AdditionalData(const double shift_parameter=0)
Definition: slepc_spectral_transformation.cc:103
PETScWrappers
Definition: petsc_block_sparse_matrix.h:36
SLEPcWrappers::TransformationCayley::additional_data
const AdditionalData additional_data
Definition: slepc_spectral_transformation.h:285
SLEPcWrappers::TransformationShift::additional_data
const AdditionalData additional_data
Definition: slepc_spectral_transformation.h:154
SLEPcWrappers::TransformationCayley::AdditionalData::antishift_parameter
const double antishift_parameter
Definition: slepc_spectral_transformation.h:271
SLEPcWrappers::TransformationShiftInvert::AdditionalData
Definition: slepc_spectral_transformation.h:170
SLEPcWrappers::TransformationShift::AdditionalData::AdditionalData
AdditionalData(const double shift_parameter=0)
Definition: slepc_spectral_transformation.cc:64
SLEPcWrappers::TransformationSpectrumFolding
Definition: slepc_spectral_transformation.h:209
SLEPcWrappers::TransformationSpectrumFolding::additional_data
const AdditionalData additional_data
Definition: slepc_spectral_transformation.h:240
MPI_Comm
SLEPcWrappers::TransformationCayley::AdditionalData::AdditionalData
AdditionalData(const double shift_parameter=0, const double antishift_parameter=0)
Definition: slepc_spectral_transformation.cc:132
exceptions.h
SLEPcWrappers::TransformationShift::TransformationShift
TransformationShift(const MPI_Comm &mpi_communicator, const AdditionalData &data=AdditionalData())
Definition: slepc_spectral_transformation.cc:69
SLEPcWrappers::TransformationBase::set_solver
void set_solver(const PETScWrappers::SolverBase &solver)
Definition: slepc_spectral_transformation.cc:56
SLEPcWrappers::TransformationBase::set_matrix_mode
void set_matrix_mode(const STMatMode mode)
Definition: slepc_spectral_transformation.cc:49
SolverBase
Definition: solver.h:333
SLEPcWrappers::TransformationShiftInvert::additional_data
const AdditionalData additional_data
Definition: slepc_spectral_transformation.h:194
SLEPcWrappers::TransformationBase
Definition: slepc_spectral_transformation.h:74
SLEPcWrappers::TransformationCayley
Definition: slepc_spectral_transformation.h:249
SLEPcWrappers::TransformationBase::~TransformationBase
virtual ~TransformationBase()
Definition: slepc_spectral_transformation.cc:38
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
SLEPcWrappers::TransformationShift::AdditionalData
Definition: slepc_spectral_transformation.h:129
SLEPcWrappers::TransformationCayley::TransformationCayley
TransformationCayley(const MPI_Comm &mpi_communicator, const AdditionalData &data=AdditionalData())
Definition: slepc_spectral_transformation.cc:139
SLEPcWrappers
Definition: slepc_solver.h:137
SLEPcWrappers::TransformationShiftInvert::AdditionalData::AdditionalData
AdditionalData(const double shift_parameter=0)
Definition: slepc_spectral_transformation.cc:83
SLEPcWrappers::TransformationSpectrumFolding::TransformationSpectrumFolding
TransformationSpectrumFolding(const MPI_Comm &mpi_communicator, const AdditionalData &data=AdditionalData())
Definition: slepc_spectral_transformation.cc:108
SLEPcWrappers::TransformationSpectrumFolding::AdditionalData::shift_parameter
const double shift_parameter
Definition: slepc_spectral_transformation.h:225
SLEPcWrappers::TransformationBase::TransformationBase
TransformationBase(const MPI_Comm &mpi_communicator)
Definition: slepc_spectral_transformation.cc:32
SLEPcWrappers::TransformationSpectrumFolding::AdditionalData
Definition: slepc_spectral_transformation.h:215
SLEPcWrappers::TransformationShiftInvert::AdditionalData::shift_parameter
const double shift_parameter
Definition: slepc_spectral_transformation.h:180
config.h
SLEPcWrappers::SolverBase
Definition: slepc_solver.h:146
SLEPcWrappers::TransformationShift
Definition: slepc_spectral_transformation.h:123
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
SLEPcWrappers::TransformationCayley::AdditionalData
Definition: slepc_spectral_transformation.h:255
petsc_solver.h
SLEPcWrappers::TransformationCayley::AdditionalData::shift_parameter
const double shift_parameter
Definition: slepc_spectral_transformation.h:266
SLEPcWrappers::TransformationBase::st
ST st
Definition: slepc_spectral_transformation.h:110
SLEPcWrappers::TransformationShift::AdditionalData::shift_parameter
const double shift_parameter
Definition: slepc_spectral_transformation.h:139