Yes because the i,j are global indices into the entire array.
> On Jan 8, 2019, at 4:59 PM, Fande Kong wrote:
>
>
>
> On Tue, Jan 8, 2019 at 3:40 PM Smith, Barry F. wrote:
>
>
> > On Jan 8, 2019, at 4:35 PM, Jed Brown wrote:
> >
> > "Smith, Barry F. via petsc-users" writes:
> >
> >
Fande Kong writes:
> Thanks Barry and Jed,
>
> I think I understood now.
>
> One more question. We usually have a code pattern in some PETSc DMDA
> examples as follows:
>
> DMDAVecGetArrayRead(da,localU,&uarray);
> DMDAVecGetArray(da,F,&f);
>
> DMDAGetCorners(da,&xs,&ys,NULL,&xm,&ym,NULL);
>
> fo
> On Jan 8, 2019, at 4:35 PM, Jed Brown wrote:
>
> "Smith, Barry F. via petsc-users" writes:
>
>>> On Jan 8, 2019, at 4:11 PM, Fande Kong via petsc-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> I was wondering how to convert a regular (2D DMDA) grid coordinate (i,j) to
>>> a global index tha
"Smith, Barry F. via petsc-users" writes:
>> On Jan 8, 2019, at 4:11 PM, Fande Kong via petsc-users
>> wrote:
>>
>> Hi All,
>>
>> I was wondering how to convert a regular (2D DMDA) grid coordinate (i,j) to
>> a global index that is used for global matrices and vectors. Do we have any
>> API
> On Jan 8, 2019, at 4:11 PM, Fande Kong via petsc-users
> wrote:
>
> Hi All,
>
> I was wondering how to convert a regular (2D DMDA) grid coordinate (i,j) to a
> global index that is used for global matrices and vectors. Do we have any API
> on this?
You can convert the global i,j to