Sijie, Generally to use hypre from PETSc you just use PETSc matrices and vectors in your code and set the desired hypre solver with PC; you don't need to deal with hypre matrices and vectors directly at all.
Barry > On Feb 6, 2022, at 12:34 AM, Sijie Tang <sijietang1...@gmail.com> wrote: > > I make a mistake there is no hypre_ParCSRVector, that should be > hypre_ParVector. > > Sijie > >> On Feb 5, 2022, at 21:53, Sijie Tang <sijietang1...@gmail.com >> <mailto:sijietang1...@gmail.com>> wrote: >> >> 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 >