* PACKAGE DCHEB  !" 力学 チェビシェフ関数展開
*
*"  [HIS] 92/09/16(takepiro)
*
**********************************************************************
      PROGRAM CHBTST
*
*   [PARAM] 
#ifdef SYS_IBMS
      INCLUDE   (ZCDIM)                      !" 格子点数，波数
#else
#include        "zcdim.F"                    !" 格子点数，波数
#endif
*
      INTEGER    KMAXD
*
*   [MODIFY] 
      REAL       CDDATA ( NMDIM, KMAX )      !" 動径格子点データ
*
*   [INPUT] 
      REAL       CDATA ( NMDIM, KMAX )       !" 動径チェビシェフデータ
      CHARACTER  HGRAD*4                     !" 微分フラグ
      CHARACTER  HFUNC*4                     !" 符号フラグ
*
*   [INTERNAL WORK] 
      REAL       WORK  ( NMDIM, KMAX )
      REAL       DR2MTX ( KMAX, KMAX )
      REAL       CHBTOP( KMAX ),  CHBBTM( KMAX )
      REAL       TOPBC( KMAX ),  BTMBC( KMAX )
      INTEGER    NM, K
*
      DO 100 K = 1, KMAX 
         CHBTOP( K ) = 1. 
         CHBBTM( K ) = ( -1 )**(K-1)
 100  CONTINUE 
*
      DO 1100 K = 1, KMAX 
         DO 1100 NM = 1, NMDIM
            CALL RESET ( CDATA, NMDIM*KMAX )
            CDATA ( NM, K ) = 1.0
*
            CALL CHBDER
     O              ( WORK  ,
     I                CDATA , 1. , 
     M                NMDIM , KMAX    )
*
            CALL CHBDER
     O              ( CDDATA, 
     I                WORK  , 1. , 
     M                NMDIM , KMAX    )
*
            DO 1100 L = 1, KMAX
               DR2MTX( L, K ) = CDDATA( NM, L )
 1100 CONTINUE 
*
      CALL RESET( TOPBC, KMAX )
      CALL RESET( BTMBC, KMAX )
*
      DO 1200 K = 1, KMAX
         DO 1200 L = 1, KMAX
            TOPBC ( K ) = TOPBC( K ) + CHBTOP( L ) * DR2MTX( L, K )
            BTMBC ( K ) = BTMBC( K ) + CHBBTM( L ) * DR2MTX( L, K )
 1200 CONTINUE 
*
      WRITE ( 6, * ) ( TOPBC( K ), K =1,KMAX )
      WRITE ( 6, * ) ( BTMBC( K ), K =1,KMAX )
*
      STOP
      END

