c      SUBROUTINE EXTFUN (EXT,X,N,F,EXTPAR)
c      INTEGER EXT
c      INTEGER N
c      DOUBLE PRECISION X(N),F
c      INTEGER EXTPAR(2)
cC
c      IF (EXT .EQ. 1) THEN
c        CALL EXF001(X,N,F)
c        EXTPAR(1)=0
c        EXTPAR(2)=0
c        RETURN
c      ENDIF
c      RETURN
c      END
C
C
C
      SUBROUTINE EXTGRA (EXT,X,N,DF,EXTPAR)
      INTEGER EXT
      INTEGER N
      DOUBLE PRECISION X(N),DF(N)
      INTEGER EXTPAR(2)
C
      IF (EXT .EQ. 1) THEN
        CALL EXG001(X,N,DF)
        EXTPAR(1)=0
        EXTPAR(2)=0
        RETURN
      ENDIF
      RETURN
      END
C
C
C
      SUBROUTINE EXTHES (EXT,X,N,DDF,EXTPAR)
      INTEGER EXT
      INTEGER N
      DOUBLE PRECISION X(N),DDF(N,N)
      INTEGER EXTPAR(2)
C
      IF (EXT .EQ. 1) THEN
        CALL EXH001(X,N,DDF)
        EXTPAR(1)=0
        EXTPAR(2)=0
        RETURN
      ENDIF
      RETURN
      END
C
C***************************************
C
C  EXAMPLE FORMAT FOR EXTERNAL FUNCTIONS
C
C***************************************
C
      SUBROUTINE EXF001 (X,N,F)
      INTEGER N
      DOUBLE PRECISION X(N),F
C
      F=0.0D0*X(N)
      RETURN
      END
C
C
C
      SUBROUTINE EXG001 (X,N,DF)
      INTEGER N
      DOUBLE PRECISION X(N),DF(N)
C
      INTEGER I
C
      DO 10 I=1,N
        DF(I)=0.0D0*X(I)
 10   CONTINUE
      RETURN
      END
C
C
C
      SUBROUTINE EXH001 (X,N,DDF)
      INTEGER N
      DOUBLE PRECISION X(N),DDF(N,N)
C
      INTEGER I,J
C
      DO 10 I=1,N
        DO 20 J=1,N
          DDF(I,J)=0.0D0*X(I)
 20     CONTINUE
 10   CONTINUE
      RETURN
      END
C
