[petsc-users] Questions on dense and sparse matrix block

Barry Smith bsmith at mcs.anl.gov
Wed Jan 22 15:42:57 CST 2014


   Linear solvers based on ILU will behave very differently when extra zeros are kept in the matrix; they generally converge much faster because the ILU behaves more like an LU (especially in 1d).   So first run one 1 process with dense and sparse formats and -pc_type lu;  do they behave differently? (they pretty much shouldn’t). 

  Next run the sparse format version with -ksp_monitor_true_residual and see how the solver is converging compared to the dense format version.

   Barry

On Jan 22, 2014, at 2:11 PM, Danyang Su <danyang.su at gmail.com> wrote:

> Dear All,
> 
> I have a reactive transport problem that use block matrices. Each block can be dense with a lot of zero entries or sparse without zero entries. The model has been tested for a 1D reactive transport problem. When dense block is used, it works well and time step can be increased gradually to reach a maximum time step, but when sparse block is used, the time step remains at a small value. I checked the entries for both dense blocks and sparse blocks (A), they have the same non-zero entries. With the same RHS (b), the solution (X) is a little different, but seems acceptable. The first matrix with both dense blocks and sparse blocks has been attached. The matrix is exported in matrix market exchange format (.mtp).
> 
> I wonder if this is caused by the outer newton iteration or the solver as this is not a general problem. This problem only occurs in some cases.
> 
> Does anyone run into this problem before?
> 
> Thanks and regards,
> 
> Danyang
> <a_reactran_rt_1_dense.mtp><a_reactran_rt_1_dense.PNG><b_reactran_rt_1_dense.txt><x_reactran_rt_1_dense.txt><a_reactran_rt_1_sparse.mtp><a_reactran_rt_1_sparse.PNG><b_reactran_rt_1_sparse.txt><x_reactran_rt_1_sparse.txt>



More information about the petsc-users mailing list