Lines Matching refs:da
16 PetscErrorCode PrintVecWithGhosts(DM da, Vec v) in PrintVecWithGhosts() argument
24 com = PetscObjectComm((PetscObject)da); in PrintVecWithGhosts()
26 PetscCall(DMDAGetLocalInfo(da, &info)); in PrintVecWithGhosts()
28 PetscCall(DMDAVecGetArray(da, v, &p)); in PrintVecWithGhosts()
33 PetscCall(DMDAVecRestoreArray(da, v, &p)); in PrintVecWithGhosts()
40 PetscErrorCode VecSetOwned(DM da, Vec v, PetscScalar value) in VecSetOwned() argument
45 PetscCall(DMDAGetCorners(da, &xs, &ys, 0, &xm, &ym, 0)); in VecSetOwned()
46 PetscCall(DMDAVecGetArray(da, v, &p)); in VecSetOwned()
50 PetscCall(DMDAVecRestoreArray(da, v, &p)); in VecSetOwned()
57 DM da; in main() local
65 …reate2d(PETSC_COMM_WORLD, bx, by, stype, M, N, PETSC_DECIDE, PETSC_DECIDE, 1, 1, NULL, NULL, &da)); in main()
66 PetscCall(DMSetFromOptions(da)); in main()
67 PetscCall(DMSetUp(da)); in main()
68 PetscCall(DMCreateLocalVector(da, &local)); in main()
72 PetscCall(PrintVecWithGhosts(da, local)); in main()
77 PetscCall(VecSetOwned(da, local, value)); in main()
81 PetscCall(PrintVecWithGhosts(da, local)); in main()
85 PetscCall(DMLocalToLocalBegin(da, local, INSERT_VALUES, local)); in main()
86 PetscCall(DMLocalToLocalEnd(da, local, INSERT_VALUES, local)); in main()
90 PetscCall(PrintVecWithGhosts(da, local)); in main()
95 PetscCall(DMDestroy(&da)); in main()