Dear all,<div> I have a question of the access of the DM in PETSc.</div><div>1) I used </div><div> DMDACreate2d(..., &da), where 'da' is a DM parameter;</div><div><br></div><div>2) and a DMDASetUniformCoordinates(da, ...) was used to set up a coordinate system on 'da'. </div>
<div><br></div><div>3) Then I used </div><div> DMDAGetCoordinateDA(da, &cda);</div><div> DMDAGetGhostedCoordinates(da, &gc);</div><div> DMDAVecGetArray(cda, gc, &coors); </div><div> So that I can access the coordinate values of each points in 'da'. </div>
<div><br></div><div>4) My question is,</div><div> 4.1) in spite of 'coors', is there any other values stored in 'da' for every points of it;</div><div> 4.2) I want to store other parameters associating with 'da', what should I do for that? for example, since 'da' has a coordinate, I treat it as a uniform mesh. In addition to coordinate values, I hope I can store u and v (x/y-direction velocity magnitude) in each node of this coordinate. I thought about use DMDACreate2d to create other two distributed matrices. However, I'm not sure that these three DM (including 'da') has the same allocation in parallel computational nodes. Like, 'da' is assigned x = 0~4 to rank-0 and x = 5~10 to rank-1; while DM for 'u' is arranged x = 0~5 to rank-0 and x = 6~10 to rank-1.</div>
<div><br></div><div>Thanks,</div><div>Alan</div>