[petsc-dev] [petsc-users] matrix-matrix addition

2010-09-27 Thread Jed Brown
On Mon, Sep 27, 2010 at 23:28, Shri wrote: > ? ? ?I've modified MatAXPY_SeqAIJ as follows when DIFFERENT_NONZERO_STRUCTURE > flag is true (i) create a new matrix and do preallocation for it. For > determining the number of nonzeros per row in the new matrix, i've used the > number of nonzeros i

[petsc-dev] [petsc-users] matrix-matrix addition

2010-09-27 Thread Barry Smith
On Sep 27, 2010, at 4:28 PM, Shri wrote: > Barry, > I've modified MatAXPY_SeqAIJ as follows when DIFFERENT_NONZERO_STRUCTURE > flag is true (i) create a new matrix and do preallocation for it. For > determining the number of nonzeros per row in the new matrix, i've used the > number of no

[petsc-dev] [petsc-users] matrix-matrix addition

2010-09-27 Thread Shri
- Boyce Griffith wrote: > > > On 9/27/10 5:28 PM, Shri wrote: > > Barry, > >I've modified MatAXPY_SeqAIJ as follows when > > DIFFERENT_NONZERO_STRUCTURE flag is true (i) create a new matrix and do > > preallocation for it. For determining the number of nonzeros per row in the > >

[petsc-dev] [petsc-users] matrix-matrix addition

2010-09-27 Thread Boyce Griffith
On 9/27/10 5:36 PM, Boyce Griffith wrote: > > > On 9/27/10 5:28 PM, Shri wrote: >> Barry, >> I've modified MatAXPY_SeqAIJ as follows when >> DIFFERENT_NONZERO_STRUCTURE flag is true (i) create a new matrix and >> do preallocation for it. For determining the number of nonzeros per >> row in the ne

[petsc-dev] [petsc-users] matrix-matrix addition

2010-09-27 Thread Boyce Griffith
On 9/27/10 5:28 PM, Shri wrote: > Barry, >I've modified MatAXPY_SeqAIJ as follows when > DIFFERENT_NONZERO_STRUCTURE flag is true (i) create a new matrix and do > preallocation for it. For determining the number of nonzeros per row in the > new matrix, i've used the number of nonzeros

[petsc-dev] DAGetMatrix

2010-09-27 Thread Lisandro Dalcin
DAGetMatrix(da,&mat,"shell") or DAGetMatrix(da,&mat,"python") or any other matrix type the DA does not know generate an error. Could this be changed to returning a matrix with the proper local&global sizes and type set ? -- Lisandro Dalcin --- CIMEC (INTEC/CONICET-UNL) Predio CONICET-

[petsc-dev] [petsc-users] matrix-matrix addition

2010-09-27 Thread Shri
Barry, I've modified MatAXPY_SeqAIJ as follows when DIFFERENT_NONZERO_STRUCTURE flag is true (i) create a new matrix and do preallocation for it. For determining the number of nonzeros per row in the new matrix, i've used the number of nonzeros in the original two matrices. This is the pie

[petsc-dev] [petsc-users] matrix-matrix addition

2010-09-27 Thread Boyce Griffith
ed. > > Yes, sounds like it could work and definitely better than my suggestion. > >Shri, can you try this? > > Barry > >> >> Jed > > > -- next part -- An embedded and charset-unspecified text was scrubbed... Name: MatAXPY_SeqAIJ.c URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20100927/f0bb0be9/attachment.c>