"Jin, Shuangshuang" <[email protected]> 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.

Attachment: pgpzS96re_Y5N.pgp
Description: PGP signature

Reply via email to