[petsc-users] ELEMENTAL Matrix

Jed Brown jedbrown at mcs.anl.gov
Wed Jun 26 17:49:34 CDT 2013


"Jin, Shuangshuang" <Shuangshuang.Jin at pnnl.gov> writes:

> Hello, can anyone tell me how does a MATELEMENTAL type matrix store its values in PETSC across different processors?
>
> For example, if I have a 4X4 ELEMENTAL matrix, when I use 1 processor, all of the element are stored on p0.
>
> p0 p0 p0 p0
> p0 p0 p0 p0
> p0 p0 p0 p0
> p0 p0 p0 p0
>
> What about 2 processor, is it something as below?
>
> p0 p0 p1 p1
> p0 p0 p1 p1
> p0 p0 p1 p1
> p0 p0 p1 p1
>
> And 4 processor?
>
> p0 p2  p0 p2
> p1 p3 p1 p3
> p0 p2 p0 p2
> p1 p3 p1 p3

Elemental uses element-cyclic numbering internally, defined by the
process Grid, which you can change using -mat_elemental_grid_height.
The be compatible with PETSc vector ordering, we interpret the Elemental
matrix indices via a permutation.  You should use MatGetOwnershipIS to
find out which rows and columns are owned locally.  Note that in
general, these will not have anything to do with the parts of the vector
that are owned locally, but the indexing that you use when calling
MatSetValues is the same as with any other PETSc matrix.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130626/60dccaed/attachment.pgp>


More information about the petsc-users mailing list