[FLASH-USERS] Retrieving values in HYPRE matrix

Akash Dhruv akashdhruv at email.gwu.edu
Thu Feb 25 22:08:59 EST 2021


Hi Tony,

Can you share a snippet of the output? Also, can you try getting the BoxValues after HYPRE_SStructMatrixAssemble is called?

Akash



> On Feb 25, 2021, at 9:48 PM, Alberti, Anthony L <anthony.alberti at oregonstate.edu> wrote:
> 
> Hi folks,
>  
> 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 BoxVal is filled and then assigned to gr_hypreMatA(via the call to HYPRE_SStructMatrixSetBoxValues) I’ve added a snippet of code that attempts to retrieve the values just written to gr_hypreMatA and writes to the screen a comparison of BoxVal and an array of reals called test – see the snippet below. However, when I run this the values for BoxVal and test are not even close. Does anyone have an idea on how to alter this snippet so test and BoxVal are the same?
>  
> allocate(test(nentries*product(datasize(1:NDIM)))) !nentries * total number of grid cells per block )
> call HYPRE_SStructMatrixGetBoxValues(gr_hypreMatA, mypart, gr_hypreLower(lb,1:NDIM), &
>      gr_hypreUpper(lb,1:NDIM), var, nentries, stencil_indices(1:nentries), test(:), ierr)
> do i=1,nentries*product(datasize(1:NDIM))
>    WRITE(*,fmt='(I4.0, 6X, E15.9, 6X, E15.9)') i, BoxVal(i), test(i)
> end do
> call exit(0)
>  
> Thanks in advance,
> Tony
>  
>  
>  
> -----------------------------------------------------------
> Tony Alberti
> Postdoctoral Scholar
> School of Nuclear Science and Engineering
> https://ne.oregonstate.edu/tony-alberti <https://ne.oregonstate.edu/tony-alberti>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210225/ba311890/attachment.htm>


More information about the flash-users mailing list