<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Menlo;
panose-1:2 11 6 9 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Arial",sans-serif;
color:windowtext;
font-weight:normal;
font-style:normal;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">Hi folks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">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><span style="font-size:10.5pt;font-family:Menlo">BoxVal</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> is filled and then assigned to
</span><span style="font-size:10.5pt;font-family:Menlo">gr_hypreMatA</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> (via the call to
</span><span style="font-size:10.5pt;font-family:Menlo">HYPRE_SStructMatrixSetBoxValues</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif">) I’ve added a snippet of code that attempts to retrieve the values just written to
</span><span style="font-size:10.5pt;font-family:Menlo">gr_hypreMatA</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> and writes to the screen a comparison of
</span><span style="font-size:10.5pt;font-family:Menlo">BoxVal</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> and an array of reals called
</span><span style="font-size:10.5pt;font-family:Menlo">test</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> – see the snippet below. However, when I run this the values for
</span><span style="font-size:10.5pt;font-family:Menlo">BoxVal</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> and
</span><span style="font-size:10.5pt;font-family:Menlo">test</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> are not even close. Does anyone have an idea on how to alter this snippet so
</span><span style="font-size:10.5pt;font-family:Menlo">test</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> and
</span><span style="font-size:10.5pt;font-family:Menlo">BoxVal</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> are the same?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">allocate(test(nentries*product(datasize(1:NDIM)))) !nentries * total number of grid cells per block )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">call HYPRE_SStructMatrixGetBoxValues(gr_hypreMatA, mypart, gr_hypreLower(lb,1:NDIM), &
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo"> gr_hypreUpper(lb,1:NDIM), var, nentries, stencil_indices(1:nentries), test(:), ierr)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">do i=1,nentries*product(datasize(1:NDIM))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo"> WRITE(*,fmt='(I4.0, 6X, E15.9, 6X, E15.9)') i, BoxVal(i), test(i)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">end do<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Menlo">call exit(0)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">Thanks in advance,<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal">Tony<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">-----------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black;background:white">Tony Alberti</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><br>
<span style="background:white">Postdoctoral Scholar</span><br>
<span style="background:white">School of Nuclear Science and Engineering</span><br>
</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><a href="https://ne.oregonstate.edu/tony-alberti" target="_blank"><span style="color:#1155CC;background:white">https://ne.oregonstate.edu/tony-alberti</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>