Lines Matching refs:next
56 struct DMCompositeLink *next, *prev; in DMDestroy_Composite() local
60 next = com->next; in DMDestroy_Composite()
61 while (next) { in DMDestroy_Composite()
62 prev = next; in DMDestroy_Composite()
63 next = next->next; in DMDestroy_Composite()
82 struct DMCompositeLink *lnk = com->next; in DMView_Composite()
88 for (i = 0; lnk; lnk = lnk->next, i++) { in DMView_Composite()
104 struct DMCompositeLink *next = com->next; in DMSetUp_Composite() local
121 while (next) { in DMSetUp_Composite()
122 next->rstart = nprev; in DMSetUp_Composite()
123 nprev += next->n; in DMSetUp_Composite()
124 next->grstart = com->rstart + next->rstart; in DMSetUp_Composite()
125 PetscCall(PetscMalloc1(size, &next->grstarts)); in DMSetUp_Composite()
126 …PetscCallMPI(MPI_Allgather(&next->grstart, 1, MPIU_INT, next->grstarts, 1, MPIU_INT, PetscObjectCo… in DMSetUp_Composite()
127 next = next->next; in DMSetUp_Composite()
185 struct DMCompositeLink *next; in DMCompositeGetAccess() local
195 next = com->next; in DMCompositeGetAccess()
201 while (next) { in DMCompositeGetAccess()
205 PetscCall(DMGetGlobalVector(next->dm, vec)); in DMCompositeGetAccess()
209 PetscCall(VecPlaceArray(*vec, array + next->rstart)); in DMCompositeGetAccess()
215 PetscCall(VecPlaceArray(*vec, array + next->rstart)); in DMCompositeGetAccess()
219 next = next->next; in DMCompositeGetAccess()
263 for (i = 0, wnum = 0, link = com->next; link && wnum < nwanted; i++, link = link->next) { in DMCompositeGetAccessArray()
326 for (i = 0, wnum = 0, link = com->next; link && wnum < nwanted; i++, link = link->next) { in DMCompositeGetLocalAccessArray()
371 struct DMCompositeLink *next; in DMCompositeRestoreAccess() local
381 next = com->next; in DMCompositeRestoreAccess()
387 while (next) { in DMCompositeRestoreAccess()
393 PetscCall(DMRestoreGlobalVector(next->dm, vec)); in DMCompositeRestoreAccess()
395 next = next->next; in DMCompositeRestoreAccess()
433 for (i = 0, wnum = 0, link = com->next; link && wnum < nwanted; i++, link = link->next) { in DMCompositeRestoreAccessArray()
482 for (i = 0, wnum = 0, link = com->next; link && wnum < nwanted; i++, link = link->next) { in DMCompositeRestoreLocalAccessArray()
517 struct DMCompositeLink *next; in DMCompositeScatter() local
531 for (cnt = 3, next = com->next; next; cnt++, next = next->next) { in DMCompositeScatter()
538 PetscCall(DMGetGlobalVector(next->dm, &global)); in DMCompositeScatter()
540 PetscCall(VecPlaceArray(global, array + next->rstart)); in DMCompositeScatter()
541 PetscCall(DMGlobalToLocalBegin(next->dm, global, INSERT_VALUES, local)); in DMCompositeScatter()
542 PetscCall(DMGlobalToLocalEnd(next->dm, global, INSERT_VALUES, local)); in DMCompositeScatter()
545 PetscCall(DMRestoreGlobalVector(next->dm, &global)); in DMCompositeScatter()
573 struct DMCompositeLink *next; in DMCompositeScatterArray() local
586 for (i = 0, next = com->next; next; next = next->next, i++) { in DMCompositeScatterArray()
591 PetscCall(DMGetGlobalVector(next->dm, &global)); in DMCompositeScatterArray()
593 PetscCall(VecPlaceArray(global, (PetscScalar *)array + next->rstart)); in DMCompositeScatterArray()
594 PetscCall(DMGlobalToLocalBegin(next->dm, global, INSERT_VALUES, lvecs[i])); in DMCompositeScatterArray()
595 PetscCall(DMGlobalToLocalEnd(next->dm, global, INSERT_VALUES, lvecs[i])); in DMCompositeScatterArray()
598 PetscCall(DMRestoreGlobalVector(next->dm, &global)); in DMCompositeScatterArray()
627 struct DMCompositeLink *next; in DMCompositeGather() local
641 for (cnt = 3, next = com->next; next; cnt++, next = next->next) { in DMCompositeGather()
648 PetscCall(DMGetGlobalVector(next->dm, &global)); in DMCompositeGather()
650 PetscCall(VecPlaceArray(global, array + next->rstart)); in DMCompositeGather()
651 PetscCall(DMLocalToGlobalBegin(next->dm, local, imode, global)); in DMCompositeGather()
652 PetscCall(DMLocalToGlobalEnd(next->dm, local, imode, global)); in DMCompositeGather()
655 PetscCall(DMRestoreGlobalVector(next->dm, &global)); in DMCompositeGather()
684 struct DMCompositeLink *next; in DMCompositeGatherArray() local
697 for (next = com->next, i = 0; next; next = next->next, i++) { in DMCompositeGatherArray()
702 PetscCall(DMGetGlobalVector(next->dm, &global)); in DMCompositeGatherArray()
704 PetscCall(VecPlaceArray(global, array + next->rstart)); in DMCompositeGatherArray()
705 PetscCall(DMLocalToGlobalBegin(next->dm, lvecs[i], imode, global)); in DMCompositeGatherArray()
706 PetscCall(DMLocalToGlobalEnd(next->dm, lvecs[i], imode, global)); in DMCompositeGatherArray()
709 PetscCall(DMRestoreGlobalVector(next->dm, &global)); in DMCompositeGatherArray()
733 struct DMCompositeLink *mine, *next; in DMCompositeAddDM() local
743 next = com->next; in DMCompositeAddDM()
759 mine->next = NULL; in DMCompositeAddDM()
764 if (!next) com->next = mine; in DMCompositeAddDM()
766 while (next->next) next = next->next; in DMCompositeAddDM()
767 next->next = mine; in DMCompositeAddDM()
780 struct DMCompositeLink *next; in VecView_DMComposite() local
788 next = com->next; in VecView_DMComposite()
798 while (next) { in VecView_DMComposite()
804 PetscCall(DMGetGlobalVector(next->dm, &vec)); in VecView_DMComposite()
806 PetscCall(VecPlaceArray(vec, (PetscScalar *)array + next->rstart)); in VecView_DMComposite()
811 PetscCall(DMRestoreGlobalVector(next->dm, &vec)); in VecView_DMComposite()
814 next = next->next; in VecView_DMComposite()
878 struct DMCompositeLink *next; in DMCompositeGetISLocalToGlobalMappings() local
889 next = com->next; in DMCompositeGetISLocalToGlobalMappings()
894 while (next) { in DMCompositeGetISLocalToGlobalMappings()
901 PetscCall(DMGetLocalToGlobalMapping(next->dm, <og)); in DMCompositeGetISLocalToGlobalMappings()
907 PetscCall(DMGetGlobalVector(next->dm, &global)); in DMCompositeGetISLocalToGlobalMappings()
917 idx[i] = subi - next->grstarts[rank]; in DMCompositeGetISLocalToGlobalMappings()
926 idx[i] = subi - suboff[lo] + next->grstarts[lo]; in DMCompositeGetISLocalToGlobalMappings()
930 PetscCall(DMRestoreGlobalVector(next->dm, &global)); in DMCompositeGetISLocalToGlobalMappings()
931 next = next->next; in DMCompositeGetISLocalToGlobalMappings()
980 …for (cnt = 0, start = 0, link = com->next; link; start += link->nlocal, cnt++, link = link->next) { in DMCompositeGetLocalISs()
1021 struct DMCompositeLink *next; in DMCompositeGetGlobalISs() local
1032 next = com->next; in DMCompositeGetGlobalISs()
1036 while (next) { in DMCompositeGetGlobalISs()
1039 …PetscCall(ISCreateStride(PetscObjectComm((PetscObject)dm), next->n, next->grstart, 1, &(*is)[cnt])… in DMCompositeGetGlobalISs()
1059 next = next->next; in DMCompositeGetGlobalISs()
1148 struct DMCompositeLink *next; in DMCompositeGetLocalVectors() local
1156 next = com->next; in DMCompositeGetLocalVectors()
1159 while (next) { in DMCompositeGetLocalVectors()
1162 if (vec) PetscCall(DMGetLocalVector(next->dm, vec)); in DMCompositeGetLocalVectors()
1163 next = next->next; in DMCompositeGetLocalVectors()
1189 struct DMCompositeLink *next; in DMCompositeRestoreLocalVectors() local
1197 next = com->next; in DMCompositeRestoreLocalVectors()
1200 while (next) { in DMCompositeRestoreLocalVectors()
1203 if (vec) PetscCall(DMRestoreLocalVector(next->dm, vec)); in DMCompositeRestoreLocalVectors()
1204 next = next->next; in DMCompositeRestoreLocalVectors()
1233 struct DMCompositeLink *next; in DMCompositeGetEntries() local
1241 next = com->next; in DMCompositeGetEntries()
1244 while (next) { in DMCompositeGetEntries()
1247 if (dmn) *dmn = next->dm; in DMCompositeGetEntries()
1248 next = next->next; in DMCompositeGetEntries()
1273 struct DMCompositeLink *next; in DMCompositeGetEntriesArray() local
1283 for (next = com->next, i = 0; next; next = next->next, i++) dms[i] = next->dm; in DMCompositeGetEntriesArray()
1379 struct DMCompositeLink *next; in DMRefine_Composite() local
1387 next = com->next; in DMRefine_Composite()
1391 while (next) { in DMRefine_Composite()
1392 PetscCall(DMRefine(next->dm, comm, &dm)); in DMRefine_Composite()
1395 next = next->next; in DMRefine_Composite()
1402 struct DMCompositeLink *next; in DMCoarsen_Composite() local
1410 next = com->next; in DMCoarsen_Composite()
1414 while (next) { in DMCoarsen_Composite()
1415 PetscCall(DMCoarsen(next->dm, comm, &dm)); in DMCoarsen_Composite()
1418 next = next->next; in DMCoarsen_Composite()
1454 …for (nextc = comcoarse->next, nextf = comfine->next, i = 0; nextc; nextc = nextc->next, nextf = ne… in DMCreateInterpolation_Composite()
1504 struct DMCompositeLink *next = com->next; in DMCreateColoring_Composite() local
1509 while (next) { in DMCreateColoring_Composite()
1512 PetscCall(DMCreateColoring(next->dm, IS_COLORING_GLOBAL, &lcoloring)); in DMCreateColoring_Composite()
1516 next = next->next; in DMCreateColoring_Composite()
1525 struct DMCompositeLink *next; in DMGlobalToLocalBegin_Composite() local
1542 next = com->next; in DMGlobalToLocalBegin_Composite()
1543 while (next) { in DMGlobalToLocalBegin_Composite()
1547 PetscCall(DMGetGlobalVector(next->dm, &global)); in DMGlobalToLocalBegin_Composite()
1550 PetscCall(DMGetLocalVector(next->dm, &local)); in DMGlobalToLocalBegin_Composite()
1552 PetscCall(DMGlobalToLocalBegin(next->dm, global, mode, local)); in DMGlobalToLocalBegin_Composite()
1553 PetscCall(DMGlobalToLocalEnd(next->dm, global, mode, local)); in DMGlobalToLocalBegin_Composite()
1556 PetscCall(DMRestoreGlobalVector(next->dm, &global)); in DMGlobalToLocalBegin_Composite()
1557 PetscCall(DMRestoreLocalVector(next->dm, &local)); in DMGlobalToLocalBegin_Composite()
1559 larrayhead += next->nlocal; in DMGlobalToLocalBegin_Composite()
1560 garrayhead += next->n; in DMGlobalToLocalBegin_Composite()
1561 next = next->next; in DMGlobalToLocalBegin_Composite()
1579 struct DMCompositeLink *next; in DMLocalToGlobalBegin_Composite() local
1597 next = com->next; in DMLocalToGlobalBegin_Composite()
1598 while (next) { in DMLocalToGlobalBegin_Composite()
1601 PetscCall(DMGetLocalVector(next->dm, &local)); in DMLocalToGlobalBegin_Composite()
1603 PetscCall(DMGetGlobalVector(next->dm, &global)); in DMLocalToGlobalBegin_Composite()
1605 PetscCall(DMLocalToGlobalBegin(next->dm, local, mode, global)); in DMLocalToGlobalBegin_Composite()
1606 PetscCall(DMLocalToGlobalEnd(next->dm, local, mode, global)); in DMLocalToGlobalBegin_Composite()
1609 PetscCall(DMRestoreGlobalVector(next->dm, &global)); in DMLocalToGlobalBegin_Composite()
1610 PetscCall(DMRestoreLocalVector(next->dm, &local)); in DMLocalToGlobalBegin_Composite()
1612 garrayhead += next->n; in DMLocalToGlobalBegin_Composite()
1613 larrayhead += next->nlocal; in DMLocalToGlobalBegin_Composite()
1614 next = next->next; in DMLocalToGlobalBegin_Composite()
1633 struct DMCompositeLink *next; in DMLocalToLocalBegin_Composite() local
1651 next = com->next; in DMLocalToLocalBegin_Composite()
1652 while (next) { in DMLocalToLocalBegin_Composite()
1655 PetscCall(DMGetLocalVector(next->dm, &local1)); in DMLocalToLocalBegin_Composite()
1657 PetscCall(DMGetLocalVector(next->dm, &local2)); in DMLocalToLocalBegin_Composite()
1659 PetscCall(DMLocalToLocalBegin(next->dm, local1, mode, local2)); in DMLocalToLocalBegin_Composite()
1660 PetscCall(DMLocalToLocalEnd(next->dm, local1, mode, local2)); in DMLocalToLocalBegin_Composite()
1662 PetscCall(DMRestoreLocalVector(next->dm, &local2)); in DMLocalToLocalBegin_Composite()
1664 PetscCall(DMRestoreLocalVector(next->dm, &local1)); in DMLocalToLocalBegin_Composite()
1666 array1head += next->nlocal; in DMLocalToLocalBegin_Composite()
1667 array2head += next->nlocal; in DMLocalToLocalBegin_Composite()
1668 next = next->next; in DMLocalToLocalBegin_Composite()
1702 com->next = NULL; in DMCreate_Composite()