Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Matthew Knepley
On Fri, Apr 7, 2017 at 11:23 AM, Barletta, Ivano wrote: > So, as far as I understand, the only benefit of PETSc with symmetric > matrices > is only when Matrix values are set, by reducing the overhead of > MatSetValue calls? > It halves the storage. There is a slight

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Barry Smith
> On Apr 7, 2017, at 11:23 AM, Barletta, Ivano wrote: > > So, as far as I understand, the only benefit of PETSc with symmetric matrices > is only when Matrix values are set, by reducing the overhead of MatSetValue > calls? The benefits of using SBAIJ matrices are 1

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Barry Smith
If you want to set all values in the matrix and have the SBAIJ matrix ignore those below the diagonal you can use MatSetOption(mat,MAT_IGNORE_LOWER_TRIANGULAR,PETSC_TRUE); or the options database -mat_ignore_lower_triangular This is useful when you have a symmetric matrix but you want

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Barletta, Ivano
So, as far as I understand, the only benefit of PETSc with symmetric matrices is only when Matrix values are set, by reducing the overhead of MatSetValue calls? Thanks, Ivano 2017-04-07 17:19 GMT+02:00 Barry Smith : > > > On Apr 7, 2017, at 6:40 AM, Florian Lindner

Re: [petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Barry Smith
> On Apr 7, 2017, at 6:40 AM, Florian Lindner wrote: > > Hello, > > two questions about symmetric (MATSBAIJ) matrices. > > + Entries set with MatSetValue below the main diagonal are ignored. Is that > by design? Yes > I rather expected setting A_ij to > have the

[petsc-users] Symmetric matrix: Setting entries below diagonal

2017-04-07 Thread Florian Lindner
Hello, two questions about symmetric (MATSBAIJ) matrices. + Entries set with MatSetValue below the main diagonal are ignored. Is that by design? I rather expected setting A_ij to have the same effect as setting A_ji. + Has MatSetOption to MAT_SYMMETRIC and MAT_SYMMETRIC_ETERNAL any gain on