Hi Jean,

It turns out that I did not configure dealii with ARPACK. So I followed the 
readme instructions and installed and compiled ARPACK as suggested. I also 
tried to run the examples in the ARPACK directory and they are running 
without any errors. However, when I tried to reconfigure deallii using the 
selfcompiled version, it says the following error. 

Could not find the arpack library!

  Please ensure that a suitable arpack library is installed on your 
computer.

  If the library is not at a default location, either provide some hints for
  autodetection,

      $ ARPACK_DIR="..." cmake <...>
      $ cmake -DARPACK_DIR="..." <...>

  or set the relevant variables by hand in ccmake.

I used the following cmake command to configure dealii again  -

cmake -DDEAL_II_WITH_PETSC=ON 
-DPETSC_DIR=/home/animesh/Documents/petsc-3.13.5 
-DPETSC_ARCH=arch-linux-c-debug -DDEAL_II_WITH_METIS=ON 
-DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_ARPACK=ON 
-DARPACK_DIR=/home/animesh/Documents/ARPACK ..

I checked that the path of the directory of ARPACK that I am giving here is 
correct.

I followed the instructions in this page - 
https://www.dealii.org/current/external-libs/arpack.html. 
Also, I couldn't figure out what it means when it says "For compilation of 
ARPACK we emphasize adding the compiler flag -fPIC". What is -fPIC and 
where should I use this flag?

Could you please help me with this and the question about identity matrix 
asked in the previous mail of this thread?

Thanks a lot!

Animesh
On Thursday, September 24, 2020 at 11:56:24 AM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Jean,
>
> Thanks a lot for your response. I am trying as you suggested. I have added 
> the following code inside the linear solver so that I can get the 
> eigenvalues at every newton step.
>
> std::vector<std::complex<double>>   eigenvalues;
>       std::vector<Vector<double> >        eigenvectors;
>       SparseMatrix<double> identity (IdentityMatrix(u_dof));
>       SparseDirectUMFPACK inverse;
>       inverse.initialize (tangent_matrix.block(u_dof,u_dof));
>       const int eigensolver_its = static_cast<unsigned int>(
>                                 tangent_matrix.block(u_dof, u_dof).m()
>                                 * parameters.max_iterations_lin);
>       SolverControl solver_control(eigensolver_its, 1e-9);
>       ArpackSolver::ArpackSolver eigensolver(solver_control);
>       eigensolver.solve(tangent_matrix.block(u_dof,u_dof), identity, 
> inverse, eigenvalues, eigenvectors);
>
> However, I am getting the follwing error while compiling. 
>
> error: ‘ArpackSolver’ has not been declared
>
> I have included the header file #include <deal.II/lac/arpack_solver.h>. 
>
> Also, could you please let me know if I have declared the identity matrix 
> correctly? I am replacing the mass matrix B with the Identity matrix to 
> compute the eigenvalues and eigenvectors.
>
> Thanks!
>
> Animesh
> On Thursday, September 24, 2020 at 1:10:35 AM UTC+5:30 Jean-Paul Pelteret 
> wrote:
>
>> Hi Animesh,
>>
>> Although in that code-gallery example the system is assembled into a 
>> BlockSparseMatrix<double>, the system actually has only one block. So you 
>> can retrieve the underlying SparseMatrix<double> (and Vector<double> for 
>> the RHS) via
>> tangent_matrix.block(u_dof, u_dof);
>> system_rhs.block(u_dof);
>> and use them with one of the standard eigensolvers (maybe ArpackSolver 
>> <https://dealii.org/developer/doxygen/deal.II/classArpackSolver.html>, 
>> since you want both the eigenvalues and eigenvectors).
>>
>> I hope that this helps you!
>>
>> Best,
>> Jean-Paul
>>
>> On 23 Sep 2020, at 20:53, Animesh Rastogi IIT Gandhinagar <
>> animesh...@alumni.iitgn.ac.in> wrote:
>>
>> Hi All, 
>>
>> I am trying to play with the code of Quassi Static Finite Strain 
>> Compressibility 
>> <https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html>.
>>  
>> I want to calculate the eigenvalues and eigenvectors of the System Tangent 
>> Matrix (BlockSparseMatrix<double> 
>> <https://dealii.org/developer/doxygen/deal.II/classBlockSparseMatrix.html> 
>> tangent_matrix) that we get at every time step after the Newton method has 
>> converged. However, I could not find any function to calculate the 
>> eigenvalues and eigenvectors of the BlockSparse Matrix. Could someone 
>> please help me with this?
>>
>> Thanks!
>>
>> AR
>>
>> -- 
>> 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+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/987eb63a-333e-43b3-a9e0-fbcbae2d567en%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/dealii/987eb63a-333e-43b3-a9e0-fbcbae2d567en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>

-- 
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/1a8c00c6-6679-425b-8a01-5a5c3a97d429n%40googlegroups.com.

Reply via email to