<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div> Sijie,<div class=""><br class=""></div><div class=""> 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.</div><div class=""><br class=""></div><div class=""> Barry</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 6, 2022, at 12:34 AM, Sijie Tang <<a href="mailto:sijietang1995@gmail.com" class="">sijietang1995@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I make a mistake there is no hypre_ParCSRVector, that should be <span style="caret-color: rgb(0, 0, 0);" class="">hypre_ParVector.</span><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class="">Sijie<br class=""></span></font><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 5, 2022, at 21:53, Sijie Tang <<a href="mailto:sijietang1995@gmail.com" class="">sijietang1995@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi developer,<div class=""><br class=""></div><div class="">I have many questions about he Matrix and Vector Format Convert between PETSc and HYPRE, could you give me some answers or hints?<br class=""><div class=""><br class=""></div><div class=""><ol style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); text-decoration-thickness: initial;" class=""><li class=""><span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">Can I convert MATHYPRE (in PETSc) to hypre_ParCSRMatrix ( HYPRE ) use function <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">MatHYPREGetParCSR()<span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class=""> (in PETSc) ? </span></span></span></li><li class="">for 2, or I should use MatHYPRE_IJMatrixCreate and <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">MatHYPRE_IJMatrixCopy </span>to get <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">hypre_IJMatrix</span>, then hypre_IJMatrix convert to <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">hypre_ParCSRMatrix ?</span></li><li class="">for the vector, I don't find any function can convert vector in PETSc to <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">hypre_ParCSRVector, Is there any function can do this work ?</span></li><li class=""><span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">But I find I can use VecHYPRE_IJVectorCreate and <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">VecHYPRE_IJVectorCopy to get <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">hypre_IJVector, then <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">hypre_IJVector convert to </span><span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">hypre_ParCSRVector?</span></span></span></span></li><li class=""><span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class=""><span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class=""><span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class=""><span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">Is there any function can convert the format back? like <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">hypre_ParCSRMatrix convert to MATHYPRE, and <span style="margin: 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; color: inherit;" class="">hypre_ParCSRVector convert to PETSc's vector?</span></span></span></span></span></span></li></ol><div class=""><br class=""></div></div></div><div class="">Thanks,</div><div class="">Sijie</div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>