[petsc-users] CG on Mixed dense sparse shell matrix [SEC=UNCLASSIFIED]

ross.c.brodie at ga.gov.au ross.c.brodie at ga.gov.au
Mon Dec 9 18:14:23 CST 2013


Hello PETSc Users

I have previously successfully tackled the problem of solving 

 (J'DJ + aL'DL + cK'EK) x = b 

where real J,  L, K were sparse matrices and D and E diagonal matrices and a and c real scalars using PETSc by using a shell matrix approach, i.e., never actually explicitly forming J'DJ etc but but supplying the function to KSP (PCG) to compute the products using PETSc functions with a vector on the fly. 

This did the trick for sparse J.  I am pretty sure this can be done with a dense J, in PETSc as well just a lot slower.  J could be the order of 10e5 x 10e6.

I have considered using libElemental for the dense part (to make use of the grid cyclic layout)  and PETSc for the sparse part of the PCG matvec product but I am not sure it is wise to mix packages.

I also note that the recent release of PETSc includes an interface to Elemental via the MATELEMENTAL matrix type.  Would this be a good choice?

On a different note could you clarify the terminology for the sequential vector VECSEQ. Does it mean:  (i) It is an independent uniprocessor object such that the data storage is not distributed and if you change an element on one process the change is NOT reflected on other processes, or (ii) does it mean the data storage is not distributed but it is not necessarily uniprocessor independent (ie such that each processor carries around redundant copies of the same data and changes on one process ARE reflected on other processes)  depending on whether or not it is constructed using PETSC_COMM_SELF or PETSC_COMM_WORLD.  Does it ever make sense to construct a VECSEQ with anything other than PETSC_COMM_SELF?  I suspect it is (i) but want to make sure?

Ross








Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
-------------------------------------------------------------------------------------------------------------------------



More information about the petsc-users mailing list