<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Tony,<div class=""><br class=""></div><div class="">Can you share a snippet of the output? Also, can you try getting the BoxValues after HYPRE_SStructMatrixAssemble is called?</div><div class=""><br class=""><div class="">
<div class="">Akash</div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Feb 25, 2021, at 9:48 PM, Alberti, Anthony L <<a href="mailto:anthony.alberti@oregonstate.edu" class="">anthony.alberti@oregonstate.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class="">Hi folks,<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class="">I’m interested in retrieving the values written to the matrix for the system of equations built in source/Grid/GridSolvers/HYPRE/UG/gr_hypreCreateMatrix.F90. After<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">BoxVal</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>is filled and then assigned to<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">gr_hypreMatA</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class="">(via the call to<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">HYPRE_SStructMatrixSetBoxValues</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class="">) I’ve added a snippet of code that attempts to retrieve the values just written to<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">gr_hypreMatA</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>and writes to the screen a comparison of<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">BoxVal</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>and an array of reals called<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">test</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>– see the snippet below. However, when I run this the values for<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">BoxVal</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">test</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>are not even close. Does anyone have an idea on how to alter this snippet so<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">test</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span></span><span style="font-size: 10.5pt; font-family: Menlo;" class="">BoxVal</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>are the same?<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Menlo;" class="">allocate(test(nentries*product(datasize(1:NDIM)))) !nentries * total number of grid cells per block )<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Menlo;" class="">call HYPRE_SStructMatrixGetBoxValues(gr_hypreMatA, mypart, gr_hypreLower(lb,1:NDIM), &<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Menlo;" class=""> gr_hypreUpper(lb,1:NDIM), var, nentries, stencil_indices(1:nentries), test(:), ierr)<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Menlo;" class="">do i=1,nentries*product(datasize(1:NDIM))<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Menlo;" class=""> WRITE(*,fmt='(I4.0, 6X, E15.9, 6X, E15.9)') i, BoxVal(i), test(i)<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Menlo;" class="">end do<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Menlo;" class="">call exit(0)<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class="">Thanks in advance,<o:p class=""></o:p></span></div><div class=""><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Tony<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class="">-----------------------------------------------------------<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Arial, sans-serif; background-color: white;" class="">Tony Alberti</span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><br class=""><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">Postdoctoral Scholar</span><br class=""><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">School of Nuclear Science and Engineering</span><br class=""></span><span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class=""><a href="https://ne.oregonstate.edu/tony-alberti" target="_blank" class=""><span style="color: rgb(17, 85, 204); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">https://ne.oregonstate.edu/tony-alberti</span></a></span></div></div></div></div></div></blockquote></div><br class=""></div></body></html>