回 帖 发 新 帖 刷新版面

主题:求助  cvf编译出错

程序在windows下编译完全没错  用的是cvf 66版本,但在linux下编译会出现下面的错误(服务器的fortran版本不知,我新手):

Error: Expected another dimension in array declaration at (1)
 In file elmt01.f:69

       double precision trans1(3,3),trans2(6,6),batamid(3,3),qmatmid(6,3
                                                                       1

求帮助   其他数组都ok  为啥这几个不行

部分程序如下  :

 

subroutine elmt01 (d,ul,xl,ix,tl,s,r,ndf,ndm,nst,isw)

      implicit   none

      integer ndf,ndm,nst,isw,i,k
      integer ix(*)
   double precision d(*),ul(ndf,8,*),xl(ndm,*),tl(*),s(nst,nst)
      double precision ue(56),ve(56),r(nst)

     
      include 'bdata.h'
      include 'cdata.h'
      include 'counts.h'
      include 'eldata.h'
      include 'elplot.h'
      include 'eltran.h'
      include 'hdata.h'
      include 'iofile.h'
      include 'prstrs.h'
      include 'tdata.h'
      include 'pointer.h'
      include 'comblk.h'  
 

c     Compute the element tangent array 's' and the residual 'r'
     
      nst=56
        do i=1,7
     do k=1,8
        ue(7*(k-1)+i)=ul(i,k,1)
             ve(7*(k-1)+i)=ul(i,k,4)
     enddo
   enddo


      if(isw.eq.3 .or. isw.eq.6) then

        call element01(ue,ve,xl,s,r)

      else
         
      endif
      return
      end

     
      
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c....... The subroutine is to form the element matrix                    c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c....... The subroutine is to form the element matrix                    c
 subroutine element01(ue,ve,xe,Ke,Re)
      double precision pe(3,8),xe(3,8),s,t,u,ue(56),ve(56),Re(56)
 double precision qmat(6,3),alfamat(3,3),shp(4,8),pve(3,8)
 double precision cmat(6,6),kapmat(3,3),grdmat(9,9),bata(3,3)
 double precision xjaci(3,3),xjacm(3,3),djacb,interval,Kppv(24,24)
      double precision Kuu(24,24),Kpu(24,24),Kup(24,24),Kphi(8,8)
 double precision Kphip(8,24),Kpp(24,24),Kpps(24,24),Ke(56,56)
      double precision Kup_r(24,24),Kpps_r(24,24),Ke_r(56,56) !to form residual
 double precision alfamatr(3,3),Ke2(56,56),Ke_r2(56,56),ba,dt
 double precision Bu(6,24),Nu(3,24),Bphi(3,8),Bp(9,24),wg(3,8)
 double precision vor,Kele(24,24),Tran(3,3),Evor(3,8),Kelea(8,24)
 double precision trans1(3,3),trans2(6,6),batamid(3,3),qmatmid(6,3)
 double precision qmat1(6,3),qmat2(6,3),trans3(9,9),theta
      integer i,j,nel,ndm,ig,ii,jj,m,n,ki,pj

        nel=8
   ndm=3
 
  vor=0.0
  dt=0.2
       ba=1
 
c....... create applied vortex field  
 do i=1,8
  Evor(1,i)=-vor*xe(2,i)
       Evor(2,i)=vor*xe(1,i)
  Evor(3,i)=0
 enddo

 

回复列表 (共2个回复)

沙发

应该是固定格式超过行数限制了。
把这一句改成续行就可以了。

建议以后写代码,用自由格式

板凳

我试试哈 都没学过fortran 老师叫我直接用了 谢谢你

我来回复

您尚未登录,请登录后再回复。点此登录或注册