[Nek5000-users] size of arrays and declaration of variables
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Tue Jun 3 02:52:19 CDT 2014
Hi Nek team,
I have a question concerning the size of arrays. I took the routine convab for example.
TA, such as T, BQ or VTRANS, have a size of lt=lx1*ly1*lz1*lelt.
So why in the call of col2 or subcol3 the parameter n, which should be the size of the arrays cited above, is actually ntot=nx1*ny1*nz1*nelfld(ifield) ?
1) I guess that there is a reason for that, but I don’t understand this mismatch of size of arrays. Moreover, ntot refers to the number of nodes on a CPU and LT refers to the total number of node in the full domain, right?
2) I’m not expert in F77 but could you confirm me that there is no difference between the declaration: TA (LX1,LY1,LZ1,LELT) and TA(LT) with LT=LX1*LY1*LZ1*LELT ? I mean, an argument such as TA(1,1,1,1) will pass the whole array of TA ?
Thank you !
subroutine convab
C---------------------------------------------------------------
C
C Eulerian scheme, add convection term to forcing function
C at current time step.
C
C---------------------------------------------------------------
include 'SIZE'
include 'SOLN'
include 'MASS'
include ‘TSTEP'
COMMON /SCRUZ/ TA (LX1,LY1,LZ1,LELT)
C
NEL = NELFLD(IFIELD)
NTOT1 = NX1*NY1*NZ1*NEL
CALL CONVOP (TA,T(1,1,1,1,IFIELD-1))
CALL COL2 (TA,VTRANS(1,1,1,1,IFIELD),NTOT1)
CALL SUBCOL3 (BQ(1,1,1,1,IFIELD-1),BM1,TA,NTOT1)
Best regards,
Emmanuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20140603/98526849/attachment.html>
More information about the Nek5000-users
mailing list