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

Eduardo erocha.ssa at gmail.com
Wed Jan 9 11:39:19 CST 2013


So, does the v block (the logically two-dimensional input array of
values) still have memory positions for the lower-triangular? I mean
do I still have to allocate a full v block even if the
lower-triangular is never touched?
Thanks a lot,
Eduardo

On Wed, Jan 9, 2013 at 3:24 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> 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
>
>


More information about the petsc-users mailing list