[petsc-users] Assembling a symmetric block into a matrix
Matthew Knepley
knepley at gmail.com
Wed Jan 9 11:40:03 CST 2013
On Wed, Jan 9, 2013 at 11:39 AM, Eduardo <erocha.ssa at gmail.com> wrote:
> 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?
>
Yes.
Matt
> 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
> >
> >
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130109/10f94c2b/attachment.html>
More information about the petsc-users
mailing list