]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
handle SLEPc descriptions.
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 14 May 2013 09:16:39 +0000 (09:16 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 14 May 2013 09:16:39 +0000 (09:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@29506 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/slepc_solver.h
deal.II/source/lac/slepc_solver.cc

index c3e39aad7628856e1f35930a7df20dae54990447..d363702a981ddc7c611ed28e43b2819c39a25576 100644 (file)
@@ -76,14 +76,14 @@ DEAL_II_NAMESPACE_OPEN
  * calling sequence requires calling several of SolverBase functions
  * rather than just one. This freedom is intended for use of the
  * SLEPcWrappers that require a greater handle on the eigenvalue
- * problem solver context. See also the API of:
+ * problem solver context. See also the API of, for example:
  @code
   template <typename OutputVector>
   void
   SolverBase::solve (const PETScWrappers::MatrixBase &A,
                      const PETScWrappers::MatrixBase &B,
-                     std::vector<double>             &kr,
-                     std::vector<OutputVector>       &vr,
+                     std::vector<double>             &eigenvalues,
+                     std::vector<OutputVector>       &eigenvectors,
                      const unsigned int               n_eigenpairs)
   { ... }
  @endcode
@@ -157,7 +157,8 @@ namespace SLEPcWrappers
 
     /**
      * Same as above, but here a composite method for solving the
-     * system $A x=\lambda B x$.
+     * system $A x=\lambda B x$, for real matrices, vectors, and
+     * values $A, B, x, \lambda$.
      */
     template <typename OutputVector>
     void
@@ -169,8 +170,8 @@ namespace SLEPcWrappers
 
     /**
      * Same as above, but here a composite method for solving the
-     * system $A x=\lambda B x$ with real and imaginary parts to the
-     * eigenvalues/eigenvectors.
+     * system $A x=\lambda B x$ with real matrices $A, B$ and
+     * imaginary eigenpairs $x, \lamda$.
      */
     template <typename OutputVector>
     void
@@ -384,8 +385,8 @@ namespace SLEPcWrappers
     static
     int
     convergence_test (EPS          eps,
-                      PetscScalar  kr,
-                      PetscScalar  ki,
+                      PetscScalar  real_eigenvalue,
+                      PetscScalar  imag_eigenvalue,
                       PetscReal    residual_norm,
                       PetscReal   *estimated_error,
                       void        *solver_control);
index 2821895dbd2e5116b237fd835dcc16af4152fa61..4640a0e50c7abb5c56fbb420d48b75d44a35fb24 100644 (file)
@@ -186,8 +186,7 @@ namespace SLEPcWrappers
 
     // get number of converged eigenstates
     ierr = EPSGetConverged (solver_data->eps,
-                            reinterpret_cast<PetscInt *>(n_converged)
-                           );
+                            reinterpret_cast<PetscInt *>(n_converged));
     AssertThrow (ierr == 0, ExcSLEPcError(ierr));
 
     int n_iterations     = 0;
@@ -220,14 +219,15 @@ namespace SLEPcWrappers
 
   void
   SolverBase::get_eigenpair (const unsigned int         index,
-                             double                    &kr,
-                             PETScWrappers::VectorBase &vr)
+                             double                    &eigenvalues,
+                             PETScWrappers::VectorBase &eigenvectors)
   {
     AssertThrow (solver_data.get() != 0, ExcSLEPcWrappersUsageError());
 
     // get converged eigenpair
     int ierr = EPSGetEigenpair (solver_data->eps, index,
-                                &kr, PETSC_NULL, vr, PETSC_NULL);
+                                &eigenvalues, PETSC_NULL, 
+                               eigenvectors, PETSC_NULL);
     AssertThrow (ierr == 0, ExcSLEPcError(ierr));
   }
 
@@ -299,8 +299,8 @@ namespace SLEPcWrappers
 
   int
   SolverBase::convergence_test (EPS          /*eps             */,
-                                PetscScalar  /*kr              */,
-                                PetscScalar  /*ki              */,
+                                PetscScalar  /*real_eigenvalue */,
+                                PetscScalar  /*imag_eigenvalue */,
                                 PetscReal    /*residual_norm   */,
                                 PetscReal   */*estimated_error */,
                                 void        */*solver_control_x*/)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.