Lines Matching refs:MtM
45 PetscErrorCode MatMultMtM_SeqAIJ(Mat MtM, Vec xx, Vec yy) in MatMultMtM_SeqAIJ() argument
50 PetscCall(MatShellGetContext(MtM, &matshellctx)); in MatMultMtM_SeqAIJ()
57 PetscErrorCode MatMultAddMtM_SeqAIJ(Mat MtM, Vec xx, Vec yy, Vec zz) in MatMultAddMtM_SeqAIJ() argument
62 PetscCall(MatShellGetContext(MtM, &matshellctx)); in MatMultAddMtM_SeqAIJ()
163 Mat PM_p = NULL, MtM, D = NULL; in gridToParticles() local
191 PetscCall(MatTransposeMatMult(M_p, M_p, MAT_INITIAL_MATRIX, 4, &MtM)); in gridToParticles()
192 PetscCall(KSPSetOperators(ksp, MtM, MtM)); in gridToParticles()
194 PetscCall(MatViewFromOptions(MtM, NULL, "-ftop2_MtM_mat_view")); in gridToParticles()
196 …reateShell(PetscObjectComm((PetscObject)dm), N, N, PETSC_DECIDE, PETSC_DECIDE, matshellctx, &MtM)); in gridToParticles()
199 PetscCall(MatShellSetOperation(MtM, MATOP_MULT, (PetscErrorCodeFn *)MatMultMtM_SeqAIJ)); in gridToParticles()
200 … PetscCall(MatShellSetOperation(MtM, MATOP_MULT_ADD, (PetscErrorCodeFn *)MatMultAddMtM_SeqAIJ)); in gridToParticles()
219 PetscCall(MatDestroy(&MtM)); in gridToParticles()
230 PetscCall(KSPSetOperators(ksp, MtM, D)); in gridToParticles()
234 PetscCall(MatViewFromOptions(MtM, NULL, "-ftop2_MtM_mat_view")); in gridToParticles()
258 PetscCall(MatDestroy(&MtM)); in gridToParticles()