      SUBROUTINE BCONDT(A,F,MXNOD,NNODX,NNODXC,NNODES,NNODM,
     +     TGAMIN,TGAMOU,IDIAG)

      INTEGER MXNOD,NNODX,NNODXC,NNODES,NNODM,IDIAG
      DOUBLE PRECISION A(MXNOD,*),F(*)
      DOUBLE PRECISION TGAMIN,TGAMOU

      INTEGER NX
      DOUBLE PRECISION BIG
      PARAMETER(BIG=1.0D12)


      DO 10 I=1,NNODX
         A(I,IDIAG)=BIG
         F(I)=BIG*TGAMIN
 10   CONTINUE


      NX=(NNODX-1)/2+1

      DO 20 I=NNODX,NNODM,3*NX-1
         A(I,IDIAG)=BIG
         F(I)=BIG*TGAMIN
 20   CONTINUE

      DO 25 I=NNODX+NX,NNODM-NNODX,3*NX-1
         A(I,IDIAG)=BIG
         F(I)=BIG*TGAMIN
 25   CONTINUE


      DO 30 I=NNODES,(NNODES-NNODXC+1),-1
         A(I,IDIAG)=BIG
         F(I)=BIG*TGAMOU
 30   CONTINUE

      RETURN
      END
