* 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
/**
* 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
/**
* 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
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);
// 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;
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));
}
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*/)