[Nek5000-users] reshape array

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Aug 15 04:25:30 CDT 2018


You don't need to do that. Just use the desired "shape" in your subroutine.

On August 15, 2018 11:16:15 AM GMT+02:00, nek5000-users at lists.mcs.anl.gov wrote:
>Hi all,
>
>All average streamwise velocity are stored in this array
>
>"common /avg/ uavg(lx1,ly1,lz1,lelv)"
>
>but I want this array to be reshaped into
>
>"common /abcd/ abcd(lx1*ly1*lz1,lelv)"
>
>The following didn't work:
>
>
>common /avg/   uavg(lx1,ly1,lz1,lelv)
>common /abcd/  abcd(lx1*ly1*lz1,lelv)
>
>
>abcd=reshape(uavg,(/ lx1*ly1*lz1,lelv /))
>
>
>This is how array reshaping works in fortran. Unfortunately, didn't
>work in nek. Anyone knows why?
>
>Many thanks in advance for your replies.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180815/e0b8ff1a/attachment.html>


More information about the Nek5000-users mailing list