Lines Matching refs:M_p
59 PetscErrorCode gridToParticles(const DM dm, DM sw, PetscReal *moments, Vec rhs, Mat M_p) in gridToParticles() argument
76 PetscCall(MatGetLocalSize(M_p, &M, &N)); 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()
104 …PetscCall(PetscInfo(M_p, "createMtMKSP Have %" PetscInt_FMT " eqs, nzl = %" PetscInt_FMT "\n", N, … in gridToParticles()
107 PetscCall(MatViewFromOptions(M_p, NULL, "-ftop2_Mp_mat_view")); in gridToParticles()
118 PetscCall(KSPSetOperators(ksp, M_p, PM_p)); in gridToParticles()
120 PetscCall(KSPSetOperators(ksp, M_p, M_p)); in gridToParticles()
126 PetscCall(MatMult(M_p, matshellctx->uu, ff)); in gridToParticles()
166 Mat M_p; in particlesToGrid() local
187 PetscCall(DMCreateMassMatrix(sw, dm, &M_p)); in particlesToGrid()
192 PetscCall(MatMultTranspose(M_p, ff, rho)); in particlesToGrid()
198 *Mp_out = M_p; in particlesToGrid()