Home
last modified time | relevance | path

Searched refs:vecLocal (Results 1 – 7 of 7) sorted by relevance

/petsc/src/dm/impls/stag/tests/
H A Dex1.c78 Vec vecLocal, vecGlobal; in TestFields() local
82 PetscCall(DMCreateLocalVector(dmstag, &vecLocal)); in TestFields()
84 PetscCall(VecSet(vecLocal, 1.0)); in TestFields()
85 PetscCall(DMLocalToGlobalBegin(dmstag, vecLocal, INSERT_VALUES, vecGlobal)); in TestFields()
86 PetscCall(DMLocalToGlobalEnd(dmstag, vecLocal, INSERT_VALUES, vecGlobal)); in TestFields()
88 PetscCall(DMGlobalToLocalBegin(dmstag, vecGlobal, INSERT_VALUES, vecLocal)); in TestFields()
89 PetscCall(DMGlobalToLocalEnd(dmstag, vecGlobal, INSERT_VALUES, vecLocal)); in TestFields()
92 PetscCall(VecDestroy(&vecLocal)); in TestFields()
H A Dex13.c102 Vec vecLocal, vecGlobal, vecGlobalCheck; in Test1() local
107 PetscCall(DMCreateLocalVector(dm, &vecLocal)); in Test1()
111 PetscCall(VecSetRandom(vecLocal, rctx)); /* garbage */ in Test1()
114 PetscCall(DMGlobalToLocal(dm, vecGlobal, INSERT_VALUES, vecLocal)); in Test1()
115 PetscCall(DMLocalToGlobal(dm, vecLocal, INSERT_VALUES, vecGlobalCheck)); in Test1()
118 PetscCall(VecDestroy(&vecLocal)); in Test1()
137 Vec vecLocal, vecLocalCheck, vecGlobal; in Test2_1d() local
143 PetscCall(DMCreateLocalVector(dm, &vecLocal)); in Test2_1d()
144 PetscCall(VecSet(vecLocal, -1.0)); in Test2_1d()
147 PetscCall(DMStagVecGetArray(dm, vecLocal, &arr)); in Test2_1d()
[all …]
H A Dex2.c35 Vec vecLocal, vecGlobal; in Test_3d_4x4x4_3x3x3() local
60 PetscCall(DMCreateLocalVector(dmstag, &vecLocal)); in Test_3d_4x4x4_3x3x3()
61 PetscCall(VecSet(vecLocal, -1.0)); in Test_3d_4x4x4_3x3x3()
62 PetscCall(DMGlobalToLocalBegin(dmstag, vecGlobal, INSERT_VALUES, vecLocal)); in Test_3d_4x4x4_3x3x3()
63 PetscCall(DMGlobalToLocalEnd(dmstag, vecGlobal, INSERT_VALUES, vecLocal)); in Test_3d_4x4x4_3x3x3()
74 PetscCall(VecGetSize(vecLocal, &entriesGhost)); /* entriesGhost happens to always be 216 here */ in Test_3d_4x4x4_3x3x3()
323 PetscCall(VecGetArrayRead(vecLocal, &arrLocal)); in Test_3d_4x4x4_3x3x3()
334 PetscCall(VecRestoreArrayRead(vecLocal, &arrLocal)); in Test_3d_4x4x4_3x3x3()
338 PetscCall(VecDestroy(&vecLocal)); in Test_3d_4x4x4_3x3x3()
/petsc/src/dm/impls/stag/
H A Dstagda.c186 Vec vecLocal; in DMStagMigrateVecDMDA() local
199 PetscCall(DMGetLocalVector(dm, &vecLocal)); in DMStagMigrateVecDMDA()
200 PetscCall(DMGlobalToLocalBegin(dm, vec, INSERT_VALUES, vecLocal)); in DMStagMigrateVecDMDA()
201 PetscCall(DMGlobalToLocalEnd(dm, vec, INSERT_VALUES, vecLocal)); in DMStagMigrateVecDMDA()
213 PetscCall(DMStagVecGetValuesStencil(dm, vecLocal, 1, &pos, &arrTo[i][d])); in DMStagMigrateVecDMDA()
223 PetscCall(DMStagVecGetValuesStencil(dm, vecLocal, 1, &pos, &arrTo[i][0])); in DMStagMigrateVecDMDA()
240 PetscCall(DMStagVecGetValuesStencil(dm, vecLocal, 1, &pos, &arrTo[j][i][d])); in DMStagMigrateVecDMDA()
253 PetscCall(DMStagVecGetValuesStencil(dm, vecLocal, 1, &pos, &arrTo[j][i][0])); in DMStagMigrateVecDMDA()
273 PetscCall(DMStagVecGetValuesStencil(dm, vecLocal, 1, &pos, &arrTo[k][j][i][d])); in DMStagMigrateVecDMDA()
289 PetscCall(DMStagVecGetValuesStencil(dm, vecLocal, 1, &pos, &arrTo[k][j][i][0])); in DMStagMigrateVecDMDA()
[all …]
H A Dstagutils.c812 Vec vecToLocal, vecLocal; in DMStagMigrateVec() local
835 PetscCall(DMGetLocalVector(dm, &vecLocal)); in DMStagMigrateVec()
837 PetscCall(DMGlobalToLocalBegin(dm, vec, INSERT_VALUES, vecLocal)); in DMStagMigrateVec()
838 PetscCall(DMGlobalToLocalEnd(dm, vec, INSERT_VALUES, vecLocal)); in DMStagMigrateVec()
839 PetscCall(VecGetArrayRead(vecLocal, &arr)); in DMStagMigrateVec()
897 PetscCall(VecRestoreArrayRead(vecLocal, &arr)); in DMStagMigrateVec()
899 PetscCall(DMRestoreLocalVector(dm, &vecLocal)); in DMStagMigrateVec()
/petsc/src/dm/impls/forest/tests/
H A Dex2.c82 Vec vecLocal; in IdentifyBadPoints() local
87 PetscCall(DMCreateLocalVector(dm, &vecLocal)); in IdentifyBadPoints()
88 PetscCall(DMGlobalToLocalBegin(dm, vec, INSERT_VALUES, vecLocal)); in IdentifyBadPoints()
89 PetscCall(DMGlobalToLocalEnd(dm, vec, INSERT_VALUES, vecLocal)); in IdentifyBadPoints()
101 PetscCall(VecGetValuesSection(vecLocal, section, p, &values)); in IdentifyBadPoints()
129 PetscCall(VecDestroy(&vecLocal)); in IdentifyBadPoints()
/petsc/doc/faq/
H A Dindex.md643 Vec vecLocal;
652 PetscCall(VecCreateSeq(PETSC_COMM_SELF, n, &vecLocal));
668 PetscCall(VecScatterCreate(vecGlobal, isGlobal, vecLocal, isLocal, &ctx));
671 PetscCall(VecScatterBegin(ctx, vecGlobal, vecLocal, INSERT_VALUES, SCATTER_FORWARD));
672 PetscCall(VecScatterEnd(ctx, vecGlobal, vecLocal, INSERT_VALUES, SCATTER_FORWARD));
675 PetscCall(VecGetArray(vecLocal, &arr));
677 PetscCall(VecRestoreArray(vecLocal, &arr));
683 PetscCall(VecDestroy(&vecLocal));