[petsc-users] (no subject)
Matthew Knepley
knepley at gmail.com
Mon Sep 12 20:30:49 CDT 2016
On Mon, Sep 12, 2016 at 8:24 PM, Ji Zhang <gotofd at gmail.com> wrote:
> Dear all,
>
> I'm using petsc4py and now face some problems.
> I have a number of small petsc dense matrices mij, and I want to construct
> them to a big matrix M like this:
>
> [ m11 m12 m13 ]
> M = | m21 m22 m23 | ,
> [ m31 m32 m33 ]
> How could I do it effectively?
>
> Now I'm using the code below:
>
> # get indexes of matrix mij
> index1_begin, index1_end = getindex_i( )
> index2_begin, index2_end = getindex_j( )
> M[index1_begin:index1_end, index2_begin:index2_end] = mij[:, :]
> which report such error messages:
>
> petsc4py.PETSc.Error: error code 56
> [0] MatGetValues() line 1818 in /home/zhangji/PycharmProjects/
> petsc-petsc-31a1859eaff6/src/mat/interface/matrix.c
> [0] MatGetValues_MPIDense() line 154 in /home/zhangji/PycharmProjects/
> petsc-petsc-31a1859eaff6/src/mat/impls/dense/mpi/mpidense.c
>
Make M a sequential dense matrix.
Matt
> [0] No support for this operation for this object type
> [0] Only local values currently supported
>
> Thanks.
>
>
> 2016-09-13
> Best,
> Regards,
> Zhang Ji
> Beijing Computational Science Research Center
> E-mail: gotofd at gmail.com
>
>
>
--
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/20160912/aa2d0013/attachment.html>
More information about the petsc-users
mailing list