[petsc-users] Distributed sparse matrix in in COO format

Matthew Knepley knepley at gmail.com
Fri Oct 14 05:20:04 CDT 2011


On Fri, Oct 14, 2011 at 1:57 AM, Hafedh BEN-HADJ-ALI <
hafedh.ben-hadj-ali at total.com> wrote:

> Hi,****
>
> ** **
>
> I’m a new user of PETSC and I would like to test different linear solvers
> on some normal equations derived from a least squares problem.****
>
> ** **
>
> I have already a routine that build a sparse distributed (parallel ) matrix
> in coordinate COO format and would like to not change this part of matrix
> formation since it is a little bit complicated. ****
>
> What is the simplest way to link with PETSC routines ? Is it possible to
> use the distributed matrix blocks in the COO format ? Is there any
> conversion routine to put the COO format in CSR format ? Is it possible to
> use “MatCreateMPIAIJWithArrays” in that case or is there any more
> appropriate format ?
>

The easiest, although not most efficient way to do this is to call
MatSetValues() for each (i,j,v) in the COO structure. Try this
first and time it.

  Thanks,

     Matt


>
>
> Regards,****
>
> HB****
>



-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111014/21951c71/attachment.htm>


More information about the petsc-users mailing list