Lines Matching refs:shell
36 DM_Shell *shell = (DM_Shell *)dm->data; in DMGlobalToLocalBeginDefaultShell() local
39 …PetscCheck(shell->gtol, ((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot be used without… in DMGlobalToLocalBeginDefaultShell()
40 PetscCall(VecScatterBegin(shell->gtol, g, l, mode, SCATTER_FORWARD)); in DMGlobalToLocalBeginDefaultShell()
60 DM_Shell *shell = (DM_Shell *)dm->data; in DMGlobalToLocalEndDefaultShell() local
63 …PetscCheck(shell->gtol, ((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot be used without… in DMGlobalToLocalEndDefaultShell()
64 PetscCall(VecScatterEnd(shell->gtol, g, l, mode, SCATTER_FORWARD)); in DMGlobalToLocalEndDefaultShell()
87 DM_Shell *shell = (DM_Shell *)dm->data; in DMLocalToGlobalBeginDefaultShell() local
90 …PetscCheck(shell->ltog, ((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot be used without… in DMLocalToGlobalBeginDefaultShell()
91 PetscCall(VecScatterBegin(shell->ltog, l, g, mode, SCATTER_FORWARD)); in DMLocalToGlobalBeginDefaultShell()
111 DM_Shell *shell = (DM_Shell *)dm->data; in DMLocalToGlobalEndDefaultShell() local
114 …PetscCheck(shell->ltog, ((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot be used without… in DMLocalToGlobalEndDefaultShell()
115 PetscCall(VecScatterEnd(shell->ltog, l, g, mode, SCATTER_FORWARD)); in DMLocalToGlobalEndDefaultShell()
140 DM_Shell *shell = (DM_Shell *)dm->data; in DMLocalToLocalBeginDefaultShell() local
143 …PetscCheck(shell->ltol, ((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot be used without… in DMLocalToLocalBeginDefaultShell()
144 PetscCall(VecScatterBegin(shell->ltol, g, l, mode, SCATTER_FORWARD)); in DMLocalToLocalBeginDefaultShell()
166 DM_Shell *shell = (DM_Shell *)dm->data; in DMLocalToLocalEndDefaultShell() local
169 …PetscCheck(shell->ltol, ((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot be used without… in DMLocalToLocalEndDefaultShell()
170 PetscCall(VecScatterEnd(shell->ltol, g, l, mode, SCATTER_FORWARD)); in DMLocalToLocalEndDefaultShell()
176 DM_Shell *shell = (DM_Shell *)dm->data; in DMCreateMatrix_Shell() local
182 if (!shell->A) { in DMCreateMatrix_Shell()
185 …PetscCheck(shell->Xglobal, PetscObjectComm((PetscObject)dm), PETSC_ERR_USER, "Must call DMShellSet… in DMCreateMatrix_Shell()
187 PetscCall(VecGetSize(shell->Xglobal, &M)); in DMCreateMatrix_Shell()
188 PetscCall(VecGetLocalSize(shell->Xglobal, &m)); in DMCreateMatrix_Shell()
189 PetscCall(MatCreate(PetscObjectComm((PetscObject)dm), &shell->A)); in DMCreateMatrix_Shell()
190 PetscCall(MatSetSizes(shell->A, m, m, M, M)); in DMCreateMatrix_Shell()
191 PetscCall(MatSetType(shell->A, dm->mattype)); in DMCreateMatrix_Shell()
192 PetscCall(MatSetUp(shell->A)); in DMCreateMatrix_Shell()
194 A = shell->A; in DMCreateMatrix_Shell()
202 DM_Shell *shell = (DM_Shell *)dm->data; in DMCreateGlobalVector_Shell() local
209 X = shell->Xglobal; in DMCreateGlobalVector_Shell()
220 DM_Shell *shell = (DM_Shell *)dm->data; in DMCreateLocalVector_Shell() local
227 X = shell->Xlocal; in DMCreateLocalVector_Shell()
251 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellSetDestroyContext() local
258 shell->destroyctx = destroyctx; in DMShellSetDestroyContext()
277 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellSetContext() local
284 shell->ctx = ctx; in DMShellSetContext()
311 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellGetContext() local
318 *(void **)ctx = shell->ctx; in DMShellGetContext()
340 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellSetMatrix() local
349 if (J == shell->A) PetscFunctionReturn(PETSC_SUCCESS); in DMShellSetMatrix()
352 PetscCall(MatDestroy(&shell->A)); in DMShellSetMatrix()
354 PetscCall(MatDuplicate(J, MAT_SHARE_NONZERO_PATTERN, &shell->A)); in DMShellSetMatrix()
355 PetscCall(MatSetDM(shell->A, NULL)); in DMShellSetMatrix()
356 } else shell->A = J; in DMShellSetMatrix()
396 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellSetGlobalVector() local
418 PetscCall(VecDestroy(&shell->Xglobal)); in DMShellSetGlobalVector()
419 shell->Xglobal = X; in DMShellSetGlobalVector()
440 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellGetGlobalVector() local
448 *X = shell->Xglobal; in DMShellGetGlobalVector()
488 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellSetLocalVector() local
510 PetscCall(VecDestroy(&shell->Xlocal)); in DMShellSetLocalVector()
511 shell->Xlocal = X; in DMShellSetLocalVector()
634 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellSetGlobalToLocalVecScatter() local
640 PetscCall(VecScatterDestroy(&shell->gtol)); in DMShellSetGlobalToLocalVecScatter()
641 shell->gtol = gtol; in DMShellSetGlobalToLocalVecScatter()
660 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellSetLocalToGlobalVecScatter() local
666 PetscCall(VecScatterDestroy(&shell->ltog)); in DMShellSetLocalToGlobalVecScatter()
667 shell->ltog = ltog; in DMShellSetLocalToGlobalVecScatter()
686 DM_Shell *shell = (DM_Shell *)dm->data; in DMShellSetLocalToLocalVecScatter() local
692 PetscCall(VecScatterDestroy(&shell->ltol)); in DMShellSetLocalToLocalVecScatter()
693 shell->ltol = ltol; in DMShellSetLocalToLocalVecScatter()
1086 DM_Shell *shell = (DM_Shell *)dm->data; in DMDestroy_Shell() local
1089 if (shell->destroyctx) PetscCallBack("Destroy Context", (*shell->destroyctx)(&shell->ctx)); in DMDestroy_Shell()
1090 PetscCall(MatDestroy(&shell->A)); in DMDestroy_Shell()
1091 PetscCall(VecDestroy(&shell->Xglobal)); in DMDestroy_Shell()
1092 PetscCall(VecDestroy(&shell->Xlocal)); in DMDestroy_Shell()
1093 PetscCall(VecScatterDestroy(&shell->gtol)); in DMDestroy_Shell()
1094 PetscCall(VecScatterDestroy(&shell->ltog)); in DMDestroy_Shell()
1095 PetscCall(VecScatterDestroy(&shell->ltol)); in DMDestroy_Shell()
1097 PetscCall(PetscFree(shell)); in DMDestroy_Shell()
1103 DM_Shell *shell = (DM_Shell *)dm->data; in DMView_Shell() local
1106 if (shell->Xglobal) PetscCall(VecView(shell->Xglobal, v)); in DMView_Shell()
1112 DM_Shell *shell = (DM_Shell *)dm->data; in DMLoad_Shell() local
1115 PetscCall(VecCreate(PetscObjectComm((PetscObject)dm), &shell->Xglobal)); in DMLoad_Shell()
1116 PetscCall(VecLoad(shell->Xglobal, v)); in DMLoad_Shell()
1130 DM_Shell *shell; in DMCreate_Shell() local
1133 PetscCall(PetscNew(&shell)); in DMCreate_Shell()
1134 dm->data = shell; in DMCreate_Shell()