Hi,
I got an error when using DMSTAG_UP for DMStagVec array indexing in a 2D
DMStag Mesh.
I used the following code for accessing the getting the index for local vector
data stored at the left and up locations (edge).
PetscInt idFup[4], dFleft[4];
for (ii = 0; ii < 4; ii++)
DMStagGetLocationSlot(ctx->dmF, LEFT, ii, &idFleft[ii]);
for (ii = 0; ii < 4; ii++)
DMStagGetLocationSlot(ctx->dmF, RIGHT, ii, &idFright[ii]);
And I used the following sample code for getting the data:
a = UArr[ey][ex][idFright[ii]])
However, after the calculation, I found there are weird fluctuations at the
boundary of the mesh blocks assigned to each processor as shown in the Figure
below.(The yellow lines, 5 processors were used in this case.) There seemed to
be a communication error when using DMSTAG_UP. And I also found the value of
idFright[ii] was much larger than the index for the locations of left, right,
or elements. It's on a level of 400+, while the other was only like 1 to 10.
Was there any I did wrong when setting up the 2D DMStag?
Thank you and best regards.
Sijie Zhang
[cid:94a295bd-6851-489d-83d8-44d2a6d80314]