Dear Prof. Bangerth,

Thank you for your reply. I was able to setup the slepc eigenvalue solver. 
The issue is that it is taking a lot of time to calculate the smallest 
eigenvalue for just 10000 degrees of freedom. Largest eigenvalue is 
calculated pretty fast. I tried many solvers in slepc - Krylov Schur, JD, 
Arnoldi iteration, Lanczos etc. However, I am facing the same issue. Also, 
the KrylovSchur solver is giving me following error after taking a lot of 
time - *The number of converged eigenvectors is 0 but 1 were requested. *Could 
you please help me with this. I also tried to do shift-invert operation 
(wondering if that would help) and got the following error - 

[0]PETSC ERROR: --------------------- Error Message 
--------------------------------------------------------------
[0]PETSC ERROR: Shift-and-invert requires a target 'which' (see 
EPSSetWhichEigenpairs), for instance -st_type sinvert -eps_target 0 
-eps_target_magnitude
[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html 
for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.13.1, May 02, 2020 
[0]PETSC ERROR: ./cook_membrane on a arch-linux-c-debug named 
animesh-Inspiron-7572 by animesh Sun Jan 24 18:14:28 2021
[0]PETSC ERROR: Configure options --download-mumps --download-scalapack 
--download-ptscotch=0 --with-shared-libraries
[0]PETSC ERROR: #1 EPSCheckCompatibleST() line 112 in 
/home/animesh/Documents/slepc-3.13.4/src/eps/interface/epssetup.c
[0]PETSC ERROR: #2 EPSSetUp() line 303 in 
/home/animesh/Documents/slepc-3.13.4/src/eps/interface/epssetup.c
[0]PETSC ERROR: #3 EPSSolve() line 136 in 
/home/animesh/Documents/slepc-3.13.4/src/eps/interface/epssolve.c




Code snippet - 

  std::cout<<"Calculating the smallest eigenvalue at  
"<<time.current()<<std::endl;
      

        SolverControl           
eigen_solver_control(dof_handler_ref.n_dofs(), 1e-9);
        SLEPcWrappers::SolverLanczos 
eigensolver(eigen_solver_control,mpi_communicator);
        eigensolver.set_which_eigenpairs(EPS_SMALLEST_MAGNITUDE);
        eigensolver.set_problem_type(EPS_GHEP);

        eigensolver.solve(tangent_matrix,
                          eigenvalues,
                          eigenfunctions);
        for (unsigned int i = 0; i < eigenfunctions.size(); ++i)
          eigenfunctions[i] /= eigenfunctions[i].linfty_norm();
         mineigenvalue = *min_element 
(eigenvalues.begin(),eigenvalues.end());

On Tuesday, January 19, 2021 at 1:25:53 AM UTC-6 Wolfgang Bangerth wrote:

> On 1/18/21 1:29 PM, Animesh Rastogi IIT Gandhinagar wrote:
> > 
> > How should I initialize the "index set" that is required for this 
> function? In 
> > step-17 
> > <
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fcurrent%2Fdoxygen%2Fdeal.II%2Fstep_17.html&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C2c8127fe83f34bdd8e4308d8bbefc22d%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637465985723412724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wri%2BF49jx4BqWdoLNTpAT3ZrLf%2FNj69MqkKbc%2FtkUsg%3D&reserved=0>,
>  
>
> > it uses the locally_owned_dofs to initialize the index set, however, 
> that 
> > program was for multiple machines which is not the case with me.
>
> If you have only one processor, then the locally_owned_dofs are simply all 
> DoFs. You can use the same function you use to get the locally_owned_dofs 
> set 
> on every processor in the parallel context, but an easier way is to call
> complete_index_set(dof_handler.n_dofs())
>
> Best
> W.
>
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d6b1aa0c-e432-4ee8-902e-8f5cd1c00df8n%40googlegroups.com.

Reply via email to