[petsc-users] The Matrix and Vector Format Convert between PETSc and HYPRE

Sijie Tang sijietang1995 at gmail.com
Sat Feb 5 22:53:56 CST 2022


Hi developer,

I have many questions about he Matrix and Vector Format Convert between PETSc and HYPRE, could you give me some answers or hints?

Can I convert MATHYPRE (in PETSc) to hypre_ParCSRMatrix ( HYPRE ) use function MatHYPREGetParCSR() (in PETSc) ? 
for 2, or I should use MatHYPRE_IJMatrixCreate  and MatHYPRE_IJMatrixCopy to get hypre_IJMatrix, then hypre_IJMatrix convert to hypre_ParCSRMatrix ?
for the vector, I don't find any function can convert vector in PETSc to hypre_ParCSRVector, Is there any function can do this work ?
But I find I can use VecHYPRE_IJVectorCreate and VecHYPRE_IJVectorCopy to get hypre_IJVector, then hypre_IJVector convert to hypre_ParCSRVector?
Is there any function can convert the format back? like hypre_ParCSRMatrix convert to MATHYPRE, and hypre_ParCSRVector convert to PETSc's vector?

Thanks,
Sijie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220205/8c097084/attachment-0001.html>


More information about the petsc-users mailing list