fork(1) download
  1. program vertical
  2.  
  3. implicit none
  4. integer::i,j,m,p,q,r,s,neq,k, nod=2, nodof,ndof=4,t,nels,iel
  5. integer, allocatable::nf(:,:),kdiag(:),loads(:),g(:),num(:),g_g(:,:)
  6. !open(20,file='cubes.dat')
  7. q=2
  8. r=5
  9. allocate(nf(q,r))
  10. nf=1
  11.  
  12. m=0
  13.  
  14. write (*,*) 'Hello' ,nf(1,1),nf(1,2),nf(1,3),nf(1,4),nf(1,5)
  15. write (*,*) 'Hello' ,nf(2,1),nf(2,2),nf(2,3),nf(2,4),nf(2,5)
  16. nf(1,1)=0
  17. nf(1,4)=0
  18. p=UBOUND(nf,dim=1)
  19. s=UBOUND(nf,dim=2)
  20. do j=1,UBOUND (nf,2)
  21. do i=1,UBOUND(nf,1)
  22. if(nf(i,j)/=0) then
  23. m=m+1
  24. nf(i,j)=m
  25. endif
  26. end do
  27. end do
  28. write (*,*) 'nf ', nf(:,5)
  29. neq=MAXVAL(nf)
  30.  
  31. !write (*,*) 'Hello' ,nf(1,1),nf(1,2),nf(1,3),nf(1,4),nf(1,5)
  32. !write (*,*) 'Hello' ,nf(2,1),nf(2,2),nf(2,3),nf(2,4),nf(2,5)
  33. write(*,*) 'Hello',neq
  34. allocate(kdiag(neq))
  35. allocate(loads(0:neq),num(2),g(ndof),g_g(4,4))
  36. kdiag=0
  37. loads=7
  38. write(*,*) 'Hello' , kdiag(6)
  39. write(*,*) 'Hello' , loads(1),loads(2),loads(3),loads(4),loads(7),loads(8)
  40.  
  41. !allocate(num(nod))
  42. nels=4
  43. Do iel=1,nels
  44.  
  45. num=(/iel,iel+1/)
  46.  
  47. !allocate(num(nod))
  48. nod=UBOUND(num,1)
  49.  
  50. nodof=UBOUND(nf,1)
  51. !nodof=2
  52. elements_1: DO i=1,nod
  53. k=i*nodof
  54. g(k-nodof+1:k)=nf(:,num(i))
  55. ! write (*,*) 'nf (i) and nf(2)', nf(:,num(i)), nf(:,2)
  56. ! write(*,*) 'nod, k, nodof' ,nod,k,nodof
  57. ! write(*,*) 'Num',num(1),num(2)
  58. ! write(*,*) 'hello, g(_:g_)=' ,k-nodof+1,k,g(k-nodof+1),g(k)
  59. END DO elements_1
  60. g_g(:,iel)=g
  61. CALL fkdiag(kdiag,g)
  62. END DO
  63. write (*,*) 'Hello' ,g_g(1,1),g_g(1,2),g_g(1,3),g_g(1,4)
  64. write (*,*) 'Hello' ,g_g(2,1),g_g(2,2),g_g(2,3),g_g(2,4)
  65. write (*,*) 'Hello' ,g_g(3,1),g_g(3,2),g_g(3,3),g_g(3,4)
  66. write (*,*) 'Hello' ,g_g(4,1),g_g(4,2),g_g(4,3),g_g(4,4)
  67.  
  68. close(20)
  69. end program vertical
  70.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.f95:21:1:

  do i=1,UBOUND(nf,1)
 1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:22:1:

  if(nf(i,j)/=0) then
 1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:23:1:

  m=m+1
 1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:24:1:

  nf(i,j)=m
 1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:25:1:

  endif
 1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:26:1:

  end do
 1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:52:12:

 elements_1: DO i=1,nod
            1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:53:2:

   k=i*nodof
  1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:54:2:

    g(k-nodof+1:k)=nf(:,num(i))
  1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:59:2:

   END DO elements_1
  1
Warning: Nonconforming tab character at (1) [-Wtabs]
prog.f95:4:51:

 integer::i,j,m,p,q,r,s,neq,k, nod=2, nodof,ndof=4,t,nels,iel
                                                   1
Warning: Unused variable ‘t’ declared at (1) [-Wunused-variable]
/home/JRxaYk/ccZhbjus.o: In function `MAIN__':
prog.f95:(.text+0x1337): undefined reference to `fkdiag_'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty