[Nek5000-users] Rank mismatch in array reference in qvol

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Mon Jan 16 08:53:12 CST 2017


Dear Sandeep,

You need to declare ucbx(lx1,ly1,lz1,lelt), etc.

Paul

________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
Sent: Monday, January 16, 2017 5:33 AM
To: nek5000-users at lists.mcs.anl.gov
Subject: [Nek5000-users] Rank mismatch in array reference in qvol

Hello All,
I would like to solve

dA/dt = Laplacian A +  U cross (curl A)

'A' is a combination of three scalar arrays, T, PS1 and PS2.
I modified the following to switch off the advection for 'A' in the .rea file
 2.0000000E+00     p23 NPSCAL
 T     IFFLOW
 T     IFHEAT
 T     IFTRAN
 T F F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields)
 F F T T T F F F F F F F IFTMSH (IF mesh for this field is T mesh)

Followed by  fluid, T, PS1, and PS2 bcs.

In userchk:
      parameter (lt=lx1*ly1*lz1*lelt)
      common /myvort/ b1(lt,3),work1(lt),work2(lt)
      common /vpot/ ucbx(lt),ucby(lt),ucbz(lt)

      m = nx1*ny1*nz1*nelv
      call comp_vort3(b1,work1,work2,t(1,1,1,1,1), t(1,1,1,1,2),t(1,1,1,1,3))
      call vcross(ucbx,ucby,ucbz,vx,vy,vz,b1(1,1),b1(1,2),b1(1,3),m)

In userq(ix,iy,iz,ieg)
      parameter (lt=lx1*ly1*lz1*lelt)
      common /vpot/ ucbx(lt),ucby(lt),ucbz(lt)
      integer e,f,eg
      e = gllel(eg)
      if (ifield.eq.2) then
         qvol = ucbx(ix,iy,iz,ieg)
      elseif (ifield.eq.3) then
         qvol = ucby(ix,iy,iz,ieg)
      elseif (ifield.eq.4) then
         qvol = ucbz(ix,iy,iz,ieg)
      endif

When I compile i get and error
         qvol = ucbx(ix,iy,iz,ieg)
                    1
Error: Rank mismatch in array reference at (1) (4/1)
/home/sandeep_reddy/work/Dynamo/GP/vectpot2/conj_ht.f:187.20:

         qvol = ucby(ix,iy,iz,ieg)
                    1
Error: Rank mismatch in array reference at (1) (4/1)
/home/sandeep_reddy/work/Dynamo/GP/vectpot2/conj_ht.f:190.20:

         qvol = ucbz(ix,iy,iz,ieg)
                    1
Error: Rank mismatch in array reference at (1) (4/1)

Could someone kindly help me with this?
Thanking you.

Your sincerely,
Sandeep




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20170116/742d4cd5/attachment.html>


More information about the Nek5000-users mailing list