      subroutine plate(dd,dxbok,dybok,h,alfa,itryb,e,xni,ro,t,xkz)

      implicit real*8(a-h,o-z)
      dimension k1(12,12),k2(12,12),k3(12,12),k4(12,12)
      dimension dd(12,24)
      
c      rectangular element of the thin plate
c
c      numbering of nodes
c
c      ^ y
c      |
c      2-------4
c      |       |
c      1-------3--->x
c
      data k1/
     x    60, 30, 0,30, 15, 0,-60,30, 0,-30,15, 0,
     x      30, 20, 0,15, 10, 0,-30,10, 0,-15, 5, 0,
     x      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     x      30, 15, 0,60, 30, 0,-30,15, 0,-60,30, 0,
     x      15, 10, 0,30, 20, 0,-15, 5, 0,-30,10, 0,
     x      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     x      -60,-30,0,-30,-15,0,60, -30,0,30, -15,0,
     x      30, 10, 0,15, 5, 0,-30,20, 0,-15,10, 0,
     x      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     x      -30,-15,0,-60,-30,0,30, -15,0,60, -30,0,
     x      15, 5, 0,30, 10, 0,-15,10, 0,-30,20, 0,
     x      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/


      data k2/
     x  60 ,0, -30, -60, 0, -30 ,30  ,0, -15, -30, 0, -15 ,
     x  0  ,0,  0,   0 , 0,  0  , 0  ,0,  0,   0 , 0,  0  ,
     x -30 ,0, 20,  30 , 0, 10  ,-15 ,0, 10,  15 , 0,  5  ,
     x -60 ,0, 30,  60 , 0, 30  ,-30 ,0, 15,  30 , 0, 15  ,
     x  0  ,0,  0,   0 , 0,  0  , 0  ,0,  0,   0 , 0,  0  ,
     x -30 ,0, 10,  30 , 0, 20  ,-15 ,0,  5,  15 , 0, 10  ,
     x 30  ,0, -15, -30, 0, -15 ,60  ,0, -30, -60, 0, -30 ,
     x  0  ,0,  0,   0 , 0,  0  , 0  ,0,  0,   0 , 0,  0  ,
     x -15 ,0, 10,  15 , 0,  5  ,-30 ,0, 20,  30 , 0, 10  ,
     x -30 ,0, 15,  30 , 0, 15  ,-60 ,0, 30,  60 , 0, 30  ,
     x  0  ,0,  0,   0 , 0,  0  , 0  ,0,  0,   0 , 0,  0  ,
     x -15 ,0,  5,  15 , 0, 10  ,-30 ,0, 10,  30 , 0, 20  /

      data k3/
     x      30, 15, -15,-30,-15, 0, -30, 0, 15, 30, 0, 0, 
     x      15, 0, -15,-15, 0, 0, 0, 0, 0, 0, 0, 0, 
     x      -15,-15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 
     x      -30,-15, 0, 30, 15, 15, 30, 0, 0, -30, 0, -15,
     x      -15, 0, 0, 15, 0, 15, 0, 0, 0, 0, 0, 0, 
     x      0, 0, 0, 15, 15, 0, 0, 0, 0, -15, 0, 0, 
     x      -30, 0, 15, 30, 0, 0, 30, -15,-15,-30,15, 0, 
     x      0, 0, 0, 0, 0, 0, -15, 0, 15, 15, 0, 0, 
     x      15, 0, 0, 0, 0, 0, -15,15, 0, 0, 0, 0, 
     x      30, 0, 0, -30, 0, -15,-30,15, 0, 30, -15,15, 
     x      0, 0, 0, 0, 0, 0, 15, 0, 0, -15, 0, -15,
     x      0, 0, 0, -15, 0, 0, 0, 0, 0, 15, -15, 0/


      data k4/
     x      84, 6,-6,-84,-6,-6,-84, 6, 6,84, -6, 6,
     x      6, 8, 0,-6, -8, 0,-6, -2, 0, 6, 2, 0,
     x      -6, 0, 8, 6, 0,-2, 6, 0,-8,-6, 0, 2,
     x      -84,-6, 6,84, 6, 6,84, -6,-6,-84, 6,-6,
     x      -6, -8, 0, 6, 8, 0, 6, 2, 0,-6, -2, 0,
     x      -6, 0,-2, 6, 0, 8, 6, 0, 2,-6, 0,-8,
     x      -84,-6, 6,84, 6, 6,84, -6,-6,-84, 6,-6,
     x      6, -2, 0,-6, 2, 0,-6, 8, 0, 6, -8, 0,
     x      6, 0,-8,-6, 0, 2,-6, 0, 8, 6, 0,-2,
     x      84, 6,-6,-84,-6,-6,-84, 6, 6,84, -6, 6,
     x      -6, 2, 0, 6, -2, 0, 6, -8, 0,-6, 8, 0,
     x      6, 0, 2,-6, 0,-8,-6, 0,-2, 6, 0, 8/

c...........................................

      ddx =e*t**3/12./(1.-xni**2)
      ddy =ddx
      dd1 =ddx*xni
      ddxy=ddx*(1.-xni)/2.

      p2=(dxbok/dybok)**2
      
c       write(*,*)'dxdy=',dxbok,dybok
      
      do 10 i=1,12
         do 10 j=1,12
 10         dd(i,j)=(ddx*k1(i,j)/p2+ddy*k2(i,j)*p2+dd1*k3(i,j)+
     x           ddxy*k4(i,j))/15./dxbok/dybok


      do 11 i=1,12
         do 13 j=2,12,3
            dd(i,j)=dd(i,j)*dxbok
 13         dd(j,i)=dd(j,i)*dxbok
         do 14 j=3,12,3
            dd(i,j)=dd(i,j)*dybok
 14         dd(j,i)=dd(j,i)*dybok
 11   continue

c      elastic foundation
      do 73 i=1,12,3
73      dd(i,i)=dd(i,i)+xkz*dxbok*dybok/4.


c......................

      if(itryb.eq.2)return

c     computation of entire matrix [A|B] ...................

      xmnoz=h*alfa**2/2.d0
      do 16 i=1,12
         do 16 j=13,24
 16         dd(i,j)=dd(i,j-12)*xmnoz

      xmnoz=(1.d0-alfa/2.d0)*alfa*h
      do 17 i=1,12
         do 17 j=1,12
 17         dd(i,j)=dd(i,j)*xmnoz



c     addition of mass matrix ...........................
c     [-1/h*...|+1/h*...]

      xmasa=dxbok*dybok*t*ro/4./h/108.

      do 71 ii=1,4
         do 71 jj=1,4
            if(ii.eq.jj)mnoz=48
            if(iabs(ii-jj).eq.1)mnoz=24
            if(iabs(ii-jj).eq.2)mnoz=12
            if(iabs(ii-jj).eq.3)mnoz=24
            dd(3*ii-2,   3*jj-2)=dd(3*ii-2,   3*jj-2)-xmasa*mnoz
            dd(3*ii-2,12+3*jj-2)=dd(3*ii-2,12+3*jj-2)+xmasa*mnoz
 71   continue

      xmasa=dxbok*dybok*t**3*ro/4./h/108.

      do 72 ii=1,4
         do 72 jj=1,4
            if(ii.eq.jj)mnoz=4
            if(iabs(ii-jj).eq.1)mnoz=2
            if(iabs(ii-jj).eq.2)mnoz=1
            if(iabs(ii-jj).eq.3)mnoz=2

            dd(3*ii-1,   3*jj-1)=dd(3*ii-1,   3*jj-1)-xmasa*mnoz
            dd(3*ii  ,   3*jj  )=dd(3*ii  ,   3*jj  )-xmasa*mnoz

            dd(3*ii-1,12+3*jj-1)=dd(3*ii-1,12+3*jj-1)+xmasa*mnoz
            dd(3*ii  ,12+3*jj  )=dd(3*ii  ,12+3*jj  )+xmasa*mnoz
 72   continue

      end

