Lines Matching full:rho
269 Vec phi, locPhi, rho, f; in ComputeFieldAtParticles_Primal() local
290 /* Create the charges rho */ in ComputeFieldAtParticles_Primal()
291 PetscCall(DMGetGlobalVector(dm, &rho)); in ComputeFieldAtParticles_Primal()
292 PetscCall(PetscObjectSetName((PetscObject)rho, "rho")); in ComputeFieldAtParticles_Primal()
295 PetscCall(MatMultTranspose(M_p, f, rho)); in ComputeFieldAtParticles_Primal()
305 /* Remove constant from rho */ in ComputeFieldAtParticles_Primal()
306 PetscCall(VecGetSize(rho, &n)); in ComputeFieldAtParticles_Primal()
307 PetscCall(VecSum(rho, &sum)); in ComputeFieldAtParticles_Primal()
308 PetscCall(VecShift(rho, -sum / n)); in ComputeFieldAtParticles_Primal()
309 PetscCall(VecSum(rho, &sum)); in ComputeFieldAtParticles_Primal()
311 /* Nondimensionalize rho */ in ComputeFieldAtParticles_Primal()
312 PetscCall(VecScale(rho, phi_0)); in ComputeFieldAtParticles_Primal()
314 PetscCall(VecViewFromOptions(rho, NULL, "-poisson_rho_view")); in ComputeFieldAtParticles_Primal()
319 PetscCall(SNESSolve(snes, rho, phi)); in ComputeFieldAtParticles_Primal()
320 PetscCall(DMRestoreGlobalVector(dm, &rho)); in ComputeFieldAtParticles_Primal()
378 Vec phi, locPhi, rho, f, temp_rho; in ComputeFieldAtParticles_Mixed() local
390 /* Create the charges rho */ in ComputeFieldAtParticles_Mixed()
392 PetscCall(DMGetGlobalVector(dm, &rho)); in ComputeFieldAtParticles_Mixed()
393 PetscCall(PetscObjectSetName((PetscObject)rho, "rho")); in ComputeFieldAtParticles_Mixed()
413 PetscCall(PetscObjectSetName((PetscObject)rho, "rho")); in ComputeFieldAtParticles_Mixed()
414 PetscCall(VecViewFromOptions(rho, NULL, "-poisson_rho_view")); in ComputeFieldAtParticles_Mixed()
415 PetscCall(VecISCopy(rho, potential_IS, SCATTER_FORWARD, temp_rho)); in ComputeFieldAtParticles_Mixed()
424 /*Remove constant from rho*/ in ComputeFieldAtParticles_Mixed()
425 PetscCall(VecGetSize(rho, &n)); in ComputeFieldAtParticles_Mixed()
426 PetscCall(VecSum(rho, &sum)); in ComputeFieldAtParticles_Mixed()
427 PetscCall(VecShift(rho, -sum / n)); in ComputeFieldAtParticles_Mixed()
428 PetscCall(VecSum(rho, &sum)); in ComputeFieldAtParticles_Mixed()
430 /* Nondimensionalize rho */ in ComputeFieldAtParticles_Mixed()
431 PetscCall(VecScale(rho, phi_0)); in ComputeFieldAtParticles_Mixed()
437 PetscCall(DMRestoreGlobalVector(dm, &rho)); in ComputeFieldAtParticles_Mixed()