      SUBROUTINE SQUAD4 (SFUN,LDER,XI,ETA)
      DOUBLE PRECISION SFUN(4), LDER(2,4), XI, ETA
      DOUBLE PRECISION ONE, FOUR
      PARAMETER (ONE=1.D0, FOUR=4.D0)
      SFUN(1) = (ONE-XI)*(ONE-ETA)/FOUR
      SFUN(2) = (ONE+XI)*(ONE-ETA)/FOUR
      SFUN(3) = (ONE+XI)*(ONE+ETA)/FOUR
      SFUN(4) = (ONE-XI)*(ONE+ETA)/FOUR
      LDER(1,1) = (ETA-ONE)/FOUR
      LDER(2,1) = (XI-ONE)/FOUR
      LDER(1,2) = (-ETA+ONE)/FOUR
      LDER(2,2) = (-XI-ONE)/FOUR
      LDER(1,3) = (ETA+ONE)/FOUR
      LDER(2,3) = (XI+ONE)/FOUR
      LDER(1,4) = (-ETA-ONE)/FOUR
      LDER(2,4) = (-XI+ONE)/FOUR
      RETURN
      END
