Dear Prof. Bangerth,

Thank you for your reply. I tried as you suggested. However, I am getting 
the following error - 

/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.cc:873:20:
 
error: ‘BlockSparseMatrix’ in namespace ‘dealii::PETScWrappers’ does not 
name a type
     PETScWrappers::BlockSparseMatrix         tangent_matrix;


For vectors, the documentation 
<https://www.dealii.org/8.4.1/doxygen/deal.II/classPETScWrappers_1_1BlockVector.html>
 
says that "This class is deprecated, use PETScWrappers::MPI::BlockVector 
<https://www.dealii.org/8.4.1/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1BlockVector.html>".
 
So I used as suggested in the documentation and am getting the following 
error related to that.

/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.cc:1288:37:
 
error: no matching function for call to 
‘dealii::PETScWrappers::MPI::BlockVector::reinit(std::vector<unsigned 
int>&)’
     system_rhs.reinit(dofs_per_block);

Also, I wish to use a Direct solver by PETSc and could not find any related 
to the PETSc block vector. In my current code, I am using SparseDirectUMFPACK. 
Do I need to convert my entire code to be using non-blocked vectors and 
matrices to use the Direct Solver by PETSc? (Although the system is 
"blocked", it only has one block that contains the displacement degree of 
freedom).

Thanks!

Animesh
On Friday, January 15, 2021 at 2:51:30 PM UTC-6 Wolfgang Bangerth wrote:

> On 1/15/21 10:46 AM, Animesh Rastogi IIT Gandhinagar wrote:
> > 
> > I am using a modified version of Code Gallery Quasi Static 
> Compressibility 
> > <
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2Fcode_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C3f03e1b7a92342c0331e08d8b97d7f35%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637463295948040000%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wukJxVr%2BMJ0%2BGymh3b5cYRkeUH%2BFCzH2qsBBiujG2h8%3D&reserved=0>
>  
>
> > program to compute eigenvalues and eigenvectors of my system matrix. I 
> have 
> > used ARPACK solver, however, I did not get the expected results. Bruno 
> > suggested me to go for PETSc/Slepsc solver to compute the eigenvalues. 
> For 
> > this, I would need to convert the dealii data structures to the PETSc 
> data 
> > structures using PETSc wrappers.
>
> All objects that relate to the linear system you are solving (or to the 
> eigenvalue problem you are solving). So, matrices and vectors.
>
>
> > I looked at the Step-17 and Step-36 for this. However, I am unable to 
> > understand how I can change my current dealii data structures to the one 
> using 
> > PETSc wrappers. I am also confused regarding what all variables do I 
> need to 
> > convert using PETScWrappers. Also, for the system matrix, do I need to 
> use 
> > PETScWrappers::MPI::BlockSparseMatrix or 
> PETScWrappers::BlockSparseMatrix.
>
> That depends on whether you want to run your problem on multiple machines 
> using MPI. If you've been using ARPACK, then I suspect that you're not 
> using 
> MPI. So then PETScWrappers::BlockSparseMatrix.
>
>
> > This finite strain code already assembles the system matrix in parallel 
> using 
> > multi-threading. What changes do I need to do in the assembly if I go on 
> to 
> > use PETSc data structures.
>
> None, really. The functions filling matrices should work on PETSc data 
> structures just fine.
>
> 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/9ddc7abf-1252-48c9-bab1-94d71f50416en%40googlegroups.com.

Reply via email to