Home
last modified time | relevance | path

Searched refs:M_p (Results 1 – 11 of 11) sorted by relevance

/petsc/src/dm/impls/swarm/tutorials/
H A Dex1f90.F9014 Mat :: M_p, M
63 PetscCallA(DMCreateMassMatrix(sw, dm, M_p, ierr))
66 PetscCallA(MatMultTranspose(M_p, f, rho, ierr))
84 PetscCallA(KSPSetOperators(ksp, M_p, M_p, ierr))
88 PetscCallA(MatDestroy(M_p, ierr))
/petsc/src/dm/impls/swarm/tests/
H A Dex7.c59 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()
[all …]
H A Dex6.c268 Mat M_p; in ComputeFieldAtParticles_Primal() local
285 PetscCall(DMCreateMassMatrix(sw, dm, &M_p)); in ComputeFieldAtParticles_Primal()
295 PetscCall(MatMultTranspose(M_p, f, rho)); in ComputeFieldAtParticles_Primal()
296 PetscCall(MatViewFromOptions(M_p, NULL, "-mp_view")); in ComputeFieldAtParticles_Primal()
299 PetscCall(MatDestroy(&M_p)); in ComputeFieldAtParticles_Primal()
377 Mat M_p; in ComputeFieldAtParticles_Mixed() local
400 PetscCall(DMCreateMassMatrix(sw, potential_dm, &M_p)); in ComputeFieldAtParticles_Mixed()
405 PetscCall(MatViewFromOptions(M_p, NULL, "-mp_view")); in ComputeFieldAtParticles_Mixed()
410 PetscCall(MatMultTranspose(M_p, f, temp_rho)); in ComputeFieldAtParticles_Mixed()
412 PetscCall(MatDestroy(&M_p)); in ComputeFieldAtParticles_Mixed()
H A Dex2.c553 Mat M_p; /* Particle mass matrix */ in TestFieldGradientProjection() local
567 PetscCall(DMCreateMassMatrix(sw, dm, &M_p)); in TestFieldGradientProjection()
568 PetscCall(MatViewFromOptions(M_p, NULL, "-M_p_view")); in TestFieldGradientProjection()
574 PetscCall(MatMultTranspose(M_p, f, rhs)); in TestFieldGradientProjection()
601 PetscCall(MatDestroy(&M_p)); in TestFieldGradientProjection()
/petsc/src/ts/tests/
H A Dex30.c108 Mat M_p; in createMp() local
129 PetscCall(DMCreateMassMatrix(sw, dm, &M_p)); in createMp()
132 *Mp_out = M_p; in createMp()
136 …t DM dm, DM sw, const PetscInt a_tid, const PetscInt dim, const PetscReal a_wp[], Vec rho, Mat M_p) in particlesToGrid() argument
151 PetscCall(MatMultTranspose(M_p, ff, rho)); in particlesToGrid()
159 PetscErrorCode gridToParticles(const DM dm, DM sw, const Vec rhs, Vec work_ferhs, Mat M_p, Mat Mass) in gridToParticles() argument
181 PetscCall(MatGetLocalSize(M_p, &M, &N)); in gridToParticles()
189 PetscCall(MatCreateVecs(M_p, &matshellctx->uu, &matshellctx->ff)); in gridToParticles()
191 PetscCall(MatTransposeMatMult(M_p, M_p, MAT_INITIAL_MATRIX, 4, &MtM)); in gridToParticles()
193 PetscCall(PetscInfo(M_p, "createMtM KSP with explicit Mp'Mp\n")); in gridToParticles()
[all …]
/petsc/src/ksp/ksp/utils/dm/
H A Ddmproject.c428 Mat M_f, M_p; // TODO Should cache these in DMSwarmProjectField_Conservative_PLEX() local
434 PetscCall(DMCreateMassMatrix(sw, dm, &M_p)); in DMSwarmProjectField_Conservative_PLEX()
436 PetscCall(MatMultTranspose(M_p, u_p, rhs)); in DMSwarmProjectField_Conservative_PLEX()
450 PetscCall(MatDestroy(&M_p)); in DMSwarmProjectField_Conservative_PLEX()
461 Mat M_f, M_p, PM_p; in DMSwarmProjectParticles_Conservative_PLEX() local
468 PetscCall(DMCreateMassMatrix(sw, dm, &M_p)); in DMSwarmProjectParticles_Conservative_PLEX()
483 PM_p = M_p; in DMSwarmProjectParticles_Conservative_PLEX()
486 PetscCall(KSPSetOperators(ksp, M_p, PM_p)); in DMSwarmProjectParticles_Conservative_PLEX()
492 PetscCall(MatDestroy(&M_p)); in DMSwarmProjectParticles_Conservative_PLEX()
1173 Mat M_p, rM_p, rPM_p; in DMSwarmRemap_PFAK_Internal() local
[all …]
/petsc/src/snes/tests/
H A Dex15.c474 Mat M_p; in main() local
481 PetscCall(DMCreateMassMatrix(sw, potential_dm, &M_p)); in main()
482 PetscCall(MatViewFromOptions(M_p, NULL, "-mp_view")); in main()
487 PetscCall(MatMultTranspose(M_p, f, temp_rho)); in main()
489 PetscCall(MatDestroy(&M_p)); in main()
/petsc/src/ts/tutorials/hamiltonian/
H A Dex4.c918 Mat M_p, D_p; in ComputeMomentFields() local
933 PetscCall(DMCreateMassMatrix(sw, ctx->dmN, &M_p)); in ComputeMomentFields()
961 PetscCall(MatMultTranspose(M_p, f, nrhs)); in ComputeMomentFields()
964 PetscCall(MatMultTranspose(M_p, tmpMom, prhs)); in ComputeMomentFields()
968 PetscCall(MatMultTranspose(M_p, tmpMom, erhs)); in ComputeMomentFields()
975 PetscCall(MatMultTransposeAdd(M_p, tmpMom, pflux, pflux)); in ComputeMomentFields()
979 PetscCall(MatMultTransposeAdd(M_p, tmpMom, eflux, eflux)); in ComputeMomentFields()
986 PetscCall(MatDestroy(&M_p)); in ComputeMomentFields()
2184 static PetscErrorCode ComputeFieldAtParticles_Primal(SNES snes, DM sw, Mat M_p, PetscReal E[]) in ComputeFieldAtParticles_Primal() argument
2211 PetscCall(MatViewFromOptions(M_p, NULL, "-mp_view")); in ComputeFieldAtParticles_Primal()
[all …]
H A Dex2.c1560 static PetscErrorCode ComputeFieldAtParticles_Primal(SNES snes, DM sw, Mat M_p, PetscReal E[]) in ComputeFieldAtParticles_Primal() argument
1587 PetscCall(MatViewFromOptions(M_p, NULL, "-mp_view")); in ComputeFieldAtParticles_Primal()
1591 PetscCall(MatMultTranspose(M_p, f, rhoRhs)); in ComputeFieldAtParticles_Primal()
1701 static PetscErrorCode ComputeFieldAtParticles_Mixed(SNES snes, DM sw, Mat M_p, PetscReal E[]) in ComputeFieldAtParticles_Mixed() argument
1729 PetscCall(MatViewFromOptions(M_p, NULL, "-mp_view")); in ComputeFieldAtParticles_Mixed()
1733 PetscCall(MatMultTranspose(M_p, f, rhoRhs)); in ComputeFieldAtParticles_Mixed()
1830 Mat M_p; in ComputeFieldAtParticles() local
1844 PetscCall(DMCreateMassMatrix(sw, ctx->dmPot, &M_p)); in ComputeFieldAtParticles()
1856 PetscCall(ComputeFieldAtParticles_Primal(snes, sw, M_p, E)); in ComputeFieldAtParticles()
1859 PetscCall(ComputeFieldAtParticles_Mixed(snes, sw, M_p, E)); in ComputeFieldAtParticles()
[all …]
H A Dex3.c976 static PetscErrorCode ComputeFieldAtParticles_Primal(SNES snes, DM sw, Mat M_p, PetscReal E[]) in ComputeFieldAtParticles_Primal() argument
1003 PetscCall(MatViewFromOptions(M_p, NULL, "-mp_view")); in ComputeFieldAtParticles_Primal()
1007 PetscCall(MatMultTranspose(M_p, f, rhoRhs)); in ComputeFieldAtParticles_Primal()
1120 Mat M_p; in ComputeFieldAtParticles() local
1134 PetscCall(DMCreateMassMatrix(sw, user->dmPot, &M_p)); in ComputeFieldAtParticles()
1141 PetscCall(ComputeFieldAtParticles_Primal(snes, sw, M_p, E)); in ComputeFieldAtParticles()
1143 PetscCall(MatDestroy(&M_p)); in ComputeFieldAtParticles()
/petsc/doc/tutorials/physics/
H A Dguide_to_stokes.md194 …the Schur complement is spectrally equivalent to the pressure mass matrix $M_p$. We can make a mat…