From d166dc8cca6b62d19e1ef94c34eaf885c11a12d0 Mon Sep 17 00:00:00 2001 From: "Toby D. Young" Date: Tue, 23 Apr 2013 11:25:31 +0000 Subject: [PATCH] A more descriptive documentation for the TransformationBase classes. git-svn-id: https://svn.dealii.org/trunk@29371 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/lac/slepc_solver.h | 1 - .../lac/slepc_spectral_transformation.h | 22 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/deal.II/include/deal.II/lac/slepc_solver.h b/deal.II/include/deal.II/lac/slepc_solver.h index d28d46c028..595843a5d0 100644 --- a/deal.II/include/deal.II/lac/slepc_solver.h +++ b/deal.II/include/deal.II/lac/slepc_solver.h @@ -57,7 +57,6 @@ DEAL_II_NAMESPACE_OPEN * @endcode * for the generalized eigenvalue problem $Ax=B\lambda x$, where the * variable const unsigned int size_of_spectrum tells - * SLEPc the number of eigenvector/eigenvalue pairs to solve * for. Additional options and solver parameters can be passed to the * SLEPc solvers before calling solve(). For example, if diff --git a/deal.II/include/deal.II/lac/slepc_spectral_transformation.h b/deal.II/include/deal.II/lac/slepc_spectral_transformation.h index 4b8683408b..c33a99bb9b 100644 --- a/deal.II/include/deal.II/lac/slepc_spectral_transformation.h +++ b/deal.II/include/deal.II/lac/slepc_spectral_transformation.h @@ -36,8 +36,28 @@ namespace SLEPcWrappers * solvers which are selected based on flags passed to the spectral * transformation. * + * SLEPcWrappers::TransformationXXX, where + * XXX is your favourite transformation type, can then + * be implemented in application codes in the following way for + * XXX=INVERT with the solver object + * eigensolver: + * @code + * // Set a transformation, this one shifts the eigenspectrum by 3.142.. + * SLEPcWrappers::TransformationShift::AdditionalData additional_data (3.142); + * SLEPcWrappers::TransformationShift shift (additional_data); + * eigensolver.set_transformation (shift); + * @endcode + * and later calling the solve() function as usual: + * @code + * SolverControl solver_control (1000, 1e-9); + * SolverArnoldi system (solver_control, mpi_communicator); + * eigensolver.solve (A, B, lambda, x, size_of_spectrum); + * @endcode + * + * @note These options can also be set at the commandline. + * * @ingroup SLEPcWrappers - * @author Toby D. Young 2009 + * @author Toby D. Young 2009, 2013 **/ class TransformationBase { -- 2.39.5