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;

I now remember that we removed the non-MPI class at some point.


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);

Look up the documentation of that class and what arguments the reinit() and constructor functions take:
https://www.dealii.org/current/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1BlockVector.html


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).

Correct. PETSc does not know the concept of "block" vectors and matrices. So if you want to use a direct solver via PETSc, then you have to put everything into non-blocked objects.

The point of blocks is to facilitate block-based solvers such as Schur complements etc. If you don't intend to build solvers this way, there is no benefit to using block matrices and vectors. Just because you have multiple solution components doesn't mean that you *have* to split your linear algebra objects into blocks.

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@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/27f0df5f-c586-6ff7-0d08-73e1f3cef5f7%40colostate.edu.

Reply via email to