      subroutine gapelectr(sigma,d,temp,predef,time,ciname,
     &   slname,msname,coords,node,npred,kstep,kinc)
c
      include 'ABA_PARAM.INC'
c
      parameter(half=0.5d0,zero=0.d0,five=5.d0,ten=10.d0,forty=40.d0) 
      parameter(one=1.d0, eight=8.d0, sixteen=16.d0) 
      character*8 ciname,slname,msname
c
      dimension sigma(3),temp(2),predef(2,*),time(2),coords(2,3)

      avgtemp=half*(temp(1) +temp(2))
      if(avgtemp.le.zero) then
        sigma(1)=five 
        sigma(2)=zero
        sigma(3)=zero
c
      elseif(avgtemp.ge.forty) then
        sigma(1)=ten
        sigma(2)=zero
        sigma(3)=zero
      else
        sigma(1)=(avgtemp/eight) +five 
        sigma(2)=one/sixteen
        sigma(3)=one/sixteen
      endif
      return
      end
