Searched refs:rhoRhs (Results 1 – 3 of 3) sorted by relevance
| /petsc/src/ts/tutorials/hamiltonian/ |
| H A D | ex2.c | 1567 Vec rhoRhs; // Weak charge density, \int phi_i rho in ComputeFieldAtParticles_Primal() local 1581 PetscCall(DMGetGlobalVector(dm, &rhoRhs)); in ComputeFieldAtParticles_Primal() 1582 PetscCall(PetscObjectSetName((PetscObject)rhoRhs, "Weak charge density")); in ComputeFieldAtParticles_Primal() 1591 PetscCall(MatMultTranspose(M_p, f, rhoRhs)); in ComputeFieldAtParticles_Primal() 1606 PetscCall(VecGetLocalSize(rhoRhs, &n)); in ComputeFieldAtParticles_Primal() 1607 PetscCall(VecGetArrayWrite(rhoRhs, &a)); in ComputeFieldAtParticles_Primal() 1614 PetscCall(VecRestoreArrayWrite(rhoRhs, &a)); in ComputeFieldAtParticles_Primal() 1621 PetscCall(KSPSolve(ksp, rhoRhs, rho)); in ComputeFieldAtParticles_Primal() 1623 PetscCall(VecScale(rhoRhs, -1.0)); in ComputeFieldAtParticles_Primal() 1625 PetscCall(VecViewFromOptions(rhoRhs, NULL, "-rho_view")); in ComputeFieldAtParticles_Primal() [all …]
|
| H A D | ex3.c | 983 Vec rhoRhs; // Weak charge density, \int phi_i rho in ComputeFieldAtParticles_Primal() local 997 PetscCall(DMGetGlobalVector(dm, &rhoRhs)); in ComputeFieldAtParticles_Primal() 998 PetscCall(PetscObjectSetName((PetscObject)rhoRhs, "Weak charge density")); in ComputeFieldAtParticles_Primal() 1007 PetscCall(MatMultTranspose(M_p, f, rhoRhs)); in ComputeFieldAtParticles_Primal() 1021 PetscCall(VecGetLocalSize(rhoRhs, &n)); in ComputeFieldAtParticles_Primal() 1022 PetscCall(VecGetArrayWrite(rhoRhs, &a)); in ComputeFieldAtParticles_Primal() 1029 PetscCall(VecRestoreArrayWrite(rhoRhs, &a)); in ComputeFieldAtParticles_Primal() 1036 PetscCall(KSPSolve(ksp, rhoRhs, rho)); in ComputeFieldAtParticles_Primal() 1038 PetscCall(VecScale(rhoRhs, -1.0)); in ComputeFieldAtParticles_Primal() 1040 PetscCall(VecViewFromOptions(rhoRhs, NULL, "-rho_view")); in ComputeFieldAtParticles_Primal() [all …]
|
| H A D | ex4.c | 2191 Vec rhoRhs; // Weak charge density, \int phi_i rho in ComputeFieldAtParticles_Primal() local 2205 PetscCall(DMGetGlobalVector(dm, &rhoRhs)); in ComputeFieldAtParticles_Primal() 2206 PetscCall(PetscObjectSetName((PetscObject)rhoRhs, "Weak charge density")); in ComputeFieldAtParticles_Primal() 2215 PetscCall(MatMultTranspose(M_p, f, rhoRhs)); in ComputeFieldAtParticles_Primal() 2222 PetscCall(KSPSolve(ksp, rhoRhs, rho)); in ComputeFieldAtParticles_Primal() 2224 PetscCall(VecScale(rhoRhs, -1.0)); in ComputeFieldAtParticles_Primal() 2226 PetscCall(VecViewFromOptions(rhoRhs, NULL, "-rho_view")); in ComputeFieldAtParticles_Primal() 2232 PetscCall(SNESSolve(snes, rhoRhs, phi)); in ComputeFieldAtParticles_Primal() 2233 PetscCall(DMRestoreGlobalVector(dm, &rhoRhs)); in ComputeFieldAtParticles_Primal() 2312 …Vec rhoRhs, rhoRhsFull; // Weak charge density, \int phi_i rho, and embedding in mixed pr… in ComputeFieldAtParticles_Mixed() local [all …]
|