Dear All,
I am trying to use a shift-invert transformation in step-36. I did minimal changes in the solve function adding the following code that describes what spectral transformation I need to do:
SolverControl solver_control (dof_handler.n_dofs(), 1e-9);
SLEPcWrappers::SolverKrylovSchur eigensolver(solver_control);
eigensolver.set_which_eigenpairs (EPS_SMALLEST_REAL);
eigensolver.set_problem_type (EPS_GHEP);
double eigen_shift = 1.0e-4;
SLEPcWrappers::TransformationShiftInvert::AdditionalData additional_data(eigen_shift);
SLEPcWrappers::TransformationShiftInvert shift (MPI_COMM_WORLD, additional_data);
eigensolver.set_transformation (shift);
eigensolver.solve(stiffness_matrix,
mass_matrix,
eigenvalues,
eigenfunctions,
eigenfunctions.size());
and it gives me the following error:
[0]PETSC ERROR: Shift-and-invert requires a target 'which' (see EPSSetWhichEigenpairs), for instance -st_type sinvert -eps_target 0 -eps_target_magnitude
Any help to resolve this error is greatly appreciated. I also attached the full code of modified step-36.
Thank you,
Anton.