*
* $Id$
*
* $Log$
* Revision 1.1  1996/04/01 15:02:17  mclareni
* Initial revision
*
*
#include "gen/pilot.h"
      SUBROUTINE EPDTAB(M,HL,UWANT,MKR,KODE)
C
C     WRITE DETAILS OF POINT INTO APPROPRIATE TABLE OR SIGNAL ERROR.
      DIMENSION NT3(780),UT3(780),NT4(780),HT4(780,4),KT4(780),
     1NT5(390,2),HL(4)
      COMMON  C5     , C95    , NT3    , UT3    , NT4    , HT4
      COMMON  KT4    , NT5    , NE3    , NE4    , NE5    , NC
      COMMON  NR     , KODBAS
      DO 11 J=1,4
      IF(C5-HL(J))7,7,5
    5 HL(J)=0.0
       GO TO 11
    7 IF(HL(J)-C95)11,11,10
   10 HL(J)=1.0
   11 CONTINUE
       GO TO (15,37,31,26,40,42,44),MKR
   15 DO 17 J=1,4
      IF(HL(J)-1.0)30,17,30
   17 CONTINUE
       IF(NE5)20,21,20
   20 IF(M-NT5(NE5,2)-1)21,25,21
   21 NE5=NE5+1
      IF(NE5-390)23,23,22
   22 WRITE(6,103)
      STOP
C---------
   23 NT5(NE5,1)=M
   25 NT5(NE5,2)=M
   26 RETURN
   30 KODE=KODBAS
   31 NE4=NE4+1
      IF(NE4-780)32,32,22
   32 NT4(NE4)=M
      KT4(NE4)=ABS(KODE)
      DO 35 J=1,4
   35 HT4(NE4,J)=HL(J)
      RETURN
   37 NE3=NE3+1
      IF(NE3-780)38,38,22
   38 NT3(NE3)=M
      UT3(NE3)=UWANT
      RETURN
   40 WRITE(6,100)M
      STOP
C---------
   42 WRITE(6,101)M
      STOP
C---------
   44 WRITE(6,102)M
      STOP
C---------
  100 FORMAT('0 POINT',I5,' NEAR BOUNDARY WITH DERIVATIVE-TYPE',
     1 ' BOUNDARY CONDITIONS IS SUSPECT'/
     2 ' BOUNDARY SHOULD BE COINCIDENT WITH MESH LINE')
  101 FORMAT('0 THERE APPEAR TO BE TWO BOUNDARIES NEAR POINT',I5,'WITH'
     1 ,' DERIVATIVE-TYPE BOUNDARY CONDITIONS'/' THIS IS INADMISSIBLE')
  102 FORMAT('0 POINT',I5,' NEAR BOUNDARY WITH DERIVATIVE-TYPE BOUNDAR'
     1 ,'Y CONDITIONS',/' IS TOO CLOSE TO ANOTHER BOUNDARY')
  103 FORMAT('0 THE TABLE OF BOUNDARY, IRREGULAR OR REGULAR POINTS IS'
     1 ,'FULL. RERUN WITH COARSER MESH')
      END
