Lines Matching refs:ksp
60 KSP ksp; in RunWithDM() local
192 PetscCall(KSPCreate(rp->comm, &ksp)); in RunWithDM()
195 PetscCall(KSPGetPC(ksp, &pc)); in RunWithDM()
207 PetscCall(KSPSetType(ksp, KSPCG)); in RunWithDM()
208 PetscCall(KSPSetNormType(ksp, KSP_NORM_NATURAL)); in RunWithDM()
209 PetscCall(KSPSetTolerances(ksp, 1e-10, PETSC_DEFAULT, PETSC_DEFAULT, PETSC_DEFAULT)); in RunWithDM()
211 PetscCall(KSPSetOperators(ksp, mat_O, mat_O)); in RunWithDM()
214 PetscCall(KSPSetTolerances(ksp, 1e-10, PETSC_DEFAULT, PETSC_DEFAULT, 1)); in RunWithDM()
216 PetscCall(KSPSolve(ksp, rhs, X)); in RunWithDM()
221 PetscCall(KSPSetTolerances(ksp, 1e-10, PETSC_DEFAULT, PETSC_DEFAULT, rp->ksp_max_it_clip[0])); in RunWithDM()
223 PetscCall(KSPSetTolerances(ksp, 1e-10, PETSC_DEFAULT, PETSC_DEFAULT, rp->ksp_max_it_clip[1])); in RunWithDM()
225 PetscCall(KSPSetFromOptions(ksp)); in RunWithDM()
229 PetscCall(PetscBarrier((PetscObject)ksp)); in RunWithDM()
236 PetscCall(KSPSolve(ksp, rhs, X)); in RunWithDM()
248 PetscCall(KSPGetType(ksp, &ksp_type)); in RunWithDM()
249 PetscCall(KSPGetConvergedReason(ksp, &reason)); in RunWithDM()
250 PetscCall(KSPGetIterationNumber(ksp, &its)); in RunWithDM()
251 PetscCall(KSPGetResidualNorm(ksp, &rnorm)); in RunWithDM()
311 PetscCall(KSPDestroy(&ksp)); in RunWithDM()