[petsc-users] Assembling a symmetric block into a matrix

Jed Brown jedbrown at mcs.anl.gov
Wed Jan 9 11:24:19 CST 2013


When using SBAIJ, you only set the upper-triangular part. If you want to be
able to set all entries anyway, run with -mat_ignore_lower_triangular or
call MatSetOption(mat,MAT_IGNORE_LOWER_TRIANGULAR,PETSC_TRUE). There is no
automatic way to symmetrize, but you're welcome to compute half and
symmetrize before calling MatSetValues().


On Wed, Jan 9, 2013 at 11:18 AM, Eduardo <erocha.ssa at gmail.com> wrote:

> Hi all,
>
> Is there any way to assemble a block that is symmetric to a matrix
> (also symmetric)? I mean, as far as I know, the MatSetValues assumes a
> full block, i.e the parameter v in:
>
>   PetscErrorCode  MatSetValues(Mat mat,PetscInt m,const PetscInt
> idxm[],PetscInt n,const PetscInt idxn[],const PetscScalar
> v[],InsertMode addv)
>
> is a full block (local matrix) that is assembled into the global matrix
> mat.
>
> Thanks in advance,
> Eduardo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130109/235ca639/attachment.html>


More information about the petsc-users mailing list