Lines Matching refs:phi
269 Vec phi, locPhi, rho, f; in ComputeFieldAtParticles_Primal() local
316 PetscCall(DMGetGlobalVector(dm, &phi)); in ComputeFieldAtParticles_Primal()
317 PetscCall(PetscObjectSetName((PetscObject)phi, "potential")); in ComputeFieldAtParticles_Primal()
318 PetscCall(VecSet(phi, 0.0)); in ComputeFieldAtParticles_Primal()
319 PetscCall(SNESSolve(snes, rho, phi)); in ComputeFieldAtParticles_Primal()
321 PetscCall(VecViewFromOptions(phi, NULL, "-phi_view")); in ComputeFieldAtParticles_Primal()
324 PetscCall(DMGlobalToLocalBegin(dm, phi, INSERT_VALUES, locPhi)); in ComputeFieldAtParticles_Primal()
325 PetscCall(DMGlobalToLocalEnd(dm, phi, INSERT_VALUES, locPhi)); in ComputeFieldAtParticles_Primal()
326 PetscCall(DMRestoreGlobalVector(dm, &phi)); in ComputeFieldAtParticles_Primal()
378 Vec phi, locPhi, rho, f, temp_rho; in ComputeFieldAtParticles_Mixed() local
433 PetscCall(DMGetGlobalVector(dm, &phi)); in ComputeFieldAtParticles_Mixed()
434 PetscCall(PetscObjectSetName((PetscObject)phi, "potential")); in ComputeFieldAtParticles_Mixed()
435 PetscCall(VecSet(phi, 0.0)); in ComputeFieldAtParticles_Mixed()
436 PetscCall(SNESSolve(snes, NULL, phi)); in ComputeFieldAtParticles_Mixed()
438 PetscCall(VecViewFromOptions(phi, NULL, "-phi_view")); in ComputeFieldAtParticles_Mixed()
441 PetscCall(DMGlobalToLocalBegin(dm, phi, INSERT_VALUES, locPhi)); in ComputeFieldAtParticles_Mixed()
442 PetscCall(DMGlobalToLocalEnd(dm, phi, INSERT_VALUES, locPhi)); in ComputeFieldAtParticles_Mixed()
443 PetscCall(DMRestoreGlobalVector(dm, &phi)); in ComputeFieldAtParticles_Mixed()
691 Vec phi; in RHSObjectiveF() local
699 PetscCall(DMGetGlobalVector(dm, &phi)); in RHSObjectiveF()
700 PetscCall(VecViewFromOptions(phi, NULL, "-phi_view_dg")); in RHSObjectiveF()
701 PetscCall(PetscObjectSetName((PetscObject)phi, "potential")); in RHSObjectiveF()
703 PetscCall(VecGetSize(phi, &phi_size)); in RHSObjectiveF()
704 PetscCall(VecGetArrayRead(phi, &phi_vals)); in RHSObjectiveF()
733 PetscCall(VecRestoreArrayRead(phi, &phi_vals)); in RHSObjectiveF()
734 PetscCall(DMRestoreGlobalVector(dm, &phi)); in RHSObjectiveF()