<div dir="ltr">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().<div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jan 9, 2013 at 11:18 AM, Eduardo <span dir="ltr"><<a href="mailto:erocha.ssa@gmail.com" target="_blank">erocha.ssa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
Is there any way to assemble a block that is symmetric to a matrix<br>
(also symmetric)? I mean, as far as I know, the MatSetValues assumes a<br>
full block, i.e the parameter v in:<br>
<br>
PetscErrorCode MatSetValues(Mat mat,PetscInt m,const PetscInt<br>
idxm[],PetscInt n,const PetscInt idxn[],const PetscScalar<br>
v[],InsertMode addv)<br>
<br>
is a full block (local matrix) that is assembled into the global matrix mat.<br>
<br>
Thanks in advance,<br>
Eduardo<br>
</blockquote></div><br></div></div>