Lines Matching refs:matshellctx

21   MatShellCtx *matshellctx;  in MatMultMtM_SeqAIJ()  local
24 PetscCall(MatShellGetContext(MtM, &matshellctx)); in MatMultMtM_SeqAIJ()
25 PetscCheck(matshellctx, PETSC_COMM_WORLD, PETSC_ERR_ARG_OUTOFRANGE, "No context"); in MatMultMtM_SeqAIJ()
26 PetscCall(MatMult(matshellctx->Mp, xx, matshellctx->ff)); in MatMultMtM_SeqAIJ()
27 PetscCall(MatMult(matshellctx->MpTrans, matshellctx->ff, yy)); in MatMultMtM_SeqAIJ()
33 MatShellCtx *matshellctx; in MatMultAddMtM_SeqAIJ() local
36 PetscCall(MatShellGetContext(MtM, &matshellctx)); in MatMultAddMtM_SeqAIJ()
37 PetscCheck(matshellctx, PETSC_COMM_WORLD, PETSC_ERR_ARG_OUTOFRANGE, "No context"); in MatMultAddMtM_SeqAIJ()
38 PetscCall(MatMult(matshellctx->Mp, xx, matshellctx->ff)); in MatMultAddMtM_SeqAIJ()
39 PetscCall(MatMultAdd(matshellctx->MpTrans, matshellctx->ff, yy, zz)); in MatMultAddMtM_SeqAIJ()
68 MatShellCtx *matshellctx; in gridToParticles() local
85 PetscCall(PetscNew(&matshellctx)); in gridToParticles()
86 …reateShell(PetscObjectComm((PetscObject)dm), N, N, PETSC_DECIDE, PETSC_DECIDE, matshellctx, &MtM)); in gridToParticles()
87 PetscCall(MatTranspose(M_p, MAT_INITIAL_MATRIX, &matshellctx->MpTrans)); in gridToParticles()
88 matshellctx->Mp = M_p; in gridToParticles()
91 PetscCall(MatCreateVecs(M_p, &matshellctx->uu, &matshellctx->ff)); in gridToParticles()
97 PetscCall(MatGetRow(matshellctx->MpTrans, i, &nzl, &cols, &vals)); in gridToParticles()
108 PetscCall(MatViewFromOptions(matshellctx->MpTrans, NULL, "-ftop2_MpTranspose_mat_view")); in gridToParticles()
125 PetscCall(KSPSolve(ksp, rhs, matshellctx->uu)); in gridToParticles()
126 PetscCall(MatMult(M_p, matshellctx->uu, ff)); in gridToParticles()
127 PetscCall(MatDestroy(&matshellctx->MpTrans)); in gridToParticles()
128 PetscCall(VecDestroy(&matshellctx->ff)); in gridToParticles()
129 PetscCall(VecDestroy(&matshellctx->uu)); in gridToParticles()
132 PetscCall(PetscFree(matshellctx)); in gridToParticles()