[petsc-users] Hypre in Petsc

Jed Brown jed at jedbrown.org
Tue Jan 25 23:34:23 CST 2022


"multigrid as a solver" generally means stationary (Richardson) iterations: -ksp_type richardson -pc_type hypre

This might not converge, and you'll almost certainly see faster convergence if you use it with a Krylov method. -ksp_type cg -pc_type hypre if your problem is SPD.

sijie tang <sjtang1223 at gmail.com> writes:

> Hi,
>
> I have a question about, I want to use AMG as a solver in PETSc, but from the user manual, I find that AMG only can be used as a preconditioner. Am I  right?
>
> So I want to use the boomerAMG in HYPRE as the solver, Can I use the function like VecHYPRE_IJVectorCreate (Petsc function) in these links? 
>
> https://petsc.org/release/src/vec/vec/impls/hypre/vhyp.c <https://petsc.org/release/src/vec/vec/impls/hypre/vhyp.c>.  (It Creates hypre ijvector from Petsc vector)
> https://petsc.org/main/src/mat/impls/hypre/mhypre.c.html <https://petsc.org/main/src/mat/impls/hypre/mhypre.c.html>   (It Creates hypre ijmatrix from Petsc matrix)
>
>
> But there is a another question: how to transfer the vector/matrix structure from hypre back petsc ?
>
> I don’t find any function for that work, Do you know what function can work, or do I implement this function by myself?
>
>
>
> Thanks,
> Sijie


More information about the petsc-users mailing list