C THIS PROGRAM IS A SAMPLE DRIVER FOR NON-PERIODIC MAPPING              001
C FROM A ONE-DIMENSIONAL SPACE INTO A ONE-DIMENSIONAL SPACE.            002
C IT COVERS USAGE OF PACKAGE MODULES CURV1, CURVN1, CURVS,              003
C CURV2, CURVD, CURV2D, AND CURVI.                                      004
C                                                                       005
C GIVEN DATA VALUES FOR THE STANDARD NORMAL DISTRIBUTION                006
C WHICH ARE ACCURATE TO 4 DECIMAL PLACES AT 0., .2, .4, ...,            007
C 2., IT INTERPOLATES VALUES AT 0., .02, .04, ..., 1.98, 2.00.          008
C                                                                       009
C                                                                       010
C ------------------------------------------------------------          011
C                                                                       012
C                                                                       013
C DIMENSIONING                                                          014
C                                                                       015
C                                                                       016
      INTEGER N,ISLPSW,IERR                                             017
      REAL    X(11),Y(11),SLP1,SLPN,YP(11),TEMP(11),SIGMA               018
      REAL    XPLT(101),YPLT(101)                                       019
C                                                                       020
C                                                                       021
C ------------------------------------------------------------          022
C                                                                       023
C                                                                       024
C READ DATA ARRAYS                                                      025
C                                                                       026
C                                                                       027
C GDATA2 IS A FORTRAN SUBROUTINE WHICH RETURNS N, THE NUMBER            028
C OF DATA POINTS, X, AN ARRAY OF THE N INCREASING ABSCISSAE             029
C OF THE DATA POINTS, AND Y, AN ARRAY OF THE N CORRESPONDING            030
C ORDINATES OF THE DATA POINTS.                                         031
C                                                                       032
      CALL GDATA2(N,X,Y)                                                033
C                                                                       034
C                                                                       035
C ------------------------------------------------------------          036
C                                                                       037
C                                                                       038
C PHASE 1 - SET UP PARAMETERS                                           039
C                                                                       040
C                                                                       041
C WE INVOKE AN INTERPOLATORY SPLINE UNDER TENSION WITH END-             042
C POINT SLOPES GIVEN.                                                   043
C                                                                       044
C OBTAIN BOUNDARY DERIVATIVES                                           045
C                                                                       046
      CALL GDER2(SLP1,SLPN)                                             047
C                                                                       048
C SET SCALAR PARAMETERS AND CALL SUBROUTINE                             049
C                                                                       050
      ISLPSW = 0                                                        051
      SIGMA = 1.                                                        052
C                                                                       053
      CALL CURV1(N,X,Y,SLP1,SLPN,ISLPSW,YP,TEMP,SIGMA,IERR)             054
C                                                                       055
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          056
C                                                                       057
      IF (IERR .NE. 0) GO TO 900                                        058
C                                                                       059
C                                                                       060
C ------------------------------------------------------------          061
C                                                                       062
C                                                                       063
C PHASE 2 - ACTUAL INTERPOLATION                                        064
C                                                                       065
C                                                                       066
C WE INTERPOLATE FUNCTIONAL VALUES FOR *NUMPTS* EQUALLY                 067
C SPACED ABSCISSAE BETWEEN *A* AND *B*.                                 068
C                                                                       069
      NUMPTS = 101                                                      070
      A = 0.                                                            071
      B = 2.                                                            072
      DELTA = (B-A)/FLOAT(NUMPTS-1)                                     073
      DO 1 I = 1,NUMPTS                                                 074
         XPLT(I) = A+FLOAT(I-1)*DELTA                                   075
         YPLT(I) = CURV2(XPLT(I),N,X,Y,YP,SIGMA)                        076
    1    CONTINUE                                                       077
C                                                                       078
C                                                                       079
C ------------------------------------------------------------          080
C                                                                       081
C                                                                       082
C WRITE AND PLOT RESULTS                                                083
C                                                                       084
C                                                                       085
C SUBROUTINE WDATA2 PRINTS PAIRS XPLT(I), YPLT(I) FOR                   086
C I = 1,...,NUMPTS.  SUBROUTINE PDATA2 PRODUCES A PLOT OF               087
C POINTS (XPLT(I),YPLT(I)), I = 1,...,NUMPTS.                           088
C                                                                       089
C                                                                       090
      CALL WDATA2(NUMPTS,XPLT,YPLT)                                     091
      CALL PDATA2(N,X,Y,NUMPTS,XPLT,YPLT)                               092
C                                                                       093
      STOP                                                              094
C                                                                       095
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                096
C                                                                       097
  900 CALL EMESS(IERR)                                                  098
      STOP                                                              099
      END                                                               100
C THIS PROGRAM IS A SAMPLE DRIVER FOR PERIODIC MAPPING FROM             001
C A ONE-DIMENSIONAL SPACE INTO A ONE-DIMENSIONAL SPACE.  IT             002
C COVERS USAGE OF PACKAGE MODULES CURVP1, CURVNP1, CURVPS,              003
C CURVP2, CURVPD, AND CURVPI.                                           004
C                                                                       005
C SIN+1./(COS(X)+2.)                                                    006
C                                                                       007
C                                                                       008
C -----------------------------------------------------------           009
C                                                                       010
C                                                                       011
C DIMENSIONING                                                          012
C                                                                       013
C                                                                       014
      INTEGER N,IERR                                                    015
      REAL X(12),Y(12),P,SLP1,SLPN,YP(12),TEMP(24),SIGMA                016
      REAL XPLT(101),YPLT(101)                                          017
C                                                                       018
C                                                                       019
C -----------------------------------------------------------           020
C                                                                       021
C                                                                       022
C READ DATA ARRAYS                                                      023
C                                                                       024
C                                                                       025
C GDATA2 IS A FORTRAN SUBROUTINE WHICH RETURNS N, THE NUMBER            026
C OF DATA POINTS, X, AN ARRAY OF THE N INCREASING ABSCISSAE             027
C OF THE DATA POINTS, AND Y, AN ARRAY OF THE N CORRESPONDING            028
C ORDINATES OF THE DATA POINTS.                                         029
C                                                                       030
      CALL GDATA2(N,X,Y)                                                031
C                                                                       032
C                                                                       033
C -----------------------------------------------------------           034
C                                                                       035
C                                                                       036
C PHASE 1 - SET UP PARAMETERS                                           037
C                                                                       038
C                                                                       039
C WE INVOKE A PERIODIC INTERPOLATORY SPLINE UNDER TENSION               040
C                                                                       041
      SIGMA = 1.                                                        042
      P = 8.*ATAN(1.)                                                   043
      CALL CURVP1(N,X,Y,P,YP,TEMP,SIGMA,IERR)                           044
C                                                                       045
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          046
C                                                                       047
      IF (IERR .NE. 0) GO TO 900                                        048
C                                                                       049
C                                                                       050
C -----------------------------------------------------------           051
C                                                                       052
C                                                                       053
C PHASE 2 - ACTUAL INTERPOLATION                                        054
C                                                                       055
C                                                                       056
C WE INTERPOLATE FUNCTIONAL VALUES FOR *NUMPTS* EQUALLY                 057
C SPACED ABSCISSAE BETWEEN *A* AND *B*.                                 058
C                                                                       059
      NUMPTS = 101                                                      060
      A = 0.                                                            061
      B = P                                                             062
      DELTA = (B-A)/FLOAT(NUMPTS-1)                                     063
      DO 1 I = 1,NUMPTS                                                 064
         XPLT(I) = A+FLOAT(I-1)*DELTA                                   065
         YPLT(I) = CURVP2(XPLT(I),N,X,Y,P,YP,SIGMA)                     066
    1 CONTINUE                                                          067
C                                                                       068
C                                                                       069
C -----------------------------------------------------------           070
C                                                                       071
C                                                                       072
C WRITE AND PLOT RESULTS                                                073
C                                                                       074
C                                                                       075
C SUBROUTINE WDATA2 PRINTS PAIRS XPLT(I), YPLT(I) FOR                   076
C I = 1,...,NUMPTS.  SUBROUTINE PDATA2 PRODUCES A PLOT OF               077
C POINTS (XPLT(I),YPLT(I)), I = 1,...,NUMPTS.                           078
C                                                                       079
C                                                                       080
      CALL WDATA2(NUMPTS,XPLT,YPLT)                                     081
      CALL PDATA2(N,X,Y,NUMPTS,XPLT,YPLT)                               082
C                                                                       083
      STOP                                                              084
C                                                                       085
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                086
C                                                                       087
  900 CALL EMESS(IERR)                                                  088
      STOP                                                              089
      END                                                               090
C THIS PROGRAM IS A SAMPLE DRIVER FOR NON-PERIODIC MAPPING              001
C FROM A ONE-DIMENSINAL SPACE INTO A TWO-DIMENSIONAL SPACE.             002
C IT COVERS USAGE OF PACKAGE MODULES KURV1, KURVN1, KURV2,              003
C KURVD, AND ARKUR.                                                     004
C                                                                       005
C SECTION OF GLASS                                                      006
C                                                                       007
C                                                                       008
C -----------------------------------------------------------           009
C                                                                       010
C                                                                       011
C DIMENSIONING                                                          012
C                                                                       013
C                                                                       014
      INTEGER N,ISLPSW,IERR                                             015
      REAL    X(14),Y(14),SLP1,SPLN,XP(14),YP(14),TEMP(14),             016
     *        S(14),SIGMA                                               017
      REAL    XPLT(100),YPLT(100),XTPLT(100),YTPLT(100),                018
     *        XTTPLT(100),YTTPLT(100)                                   019
C                                                                       020
C                                                                       021
C -----------------------------------------------------------           022
C                                                                       023
C                                                                       024
C READ DATA ARRAYS                                                      025
C                                                                       026
C                                                                       027
C GDATA2 IS A FORTRAN SUBROUTINE WHICH RETURNS N, THE NUMBER            028
C OF DATA POINTS, X, AN ARRAY OF THE N ABSCISSAE OF THE DATA            029
C POINTS, AND Y, AN ARRAY OF THE N CORRESPONDING ORDINATES              030
C OF THE DATA POINTS.  ADJACENT X-Y PAIRS MUST BE DISTINCT.             031
C                                                                       032
      CALL GDATA2(N,X,Y)                                                033
C                                                                       034
C                                                                       035
C -----------------------------------------------------------           036
C                                                                       037
C                                                                       038
C PHASE 1 - SET UP PARAMETERS                                           039
C                                                                       040
C                                                                       041
C WE INVOKE A SPLINE UNDER TENSION WITH ENDPOINT SLOPES                 042
C APPROXIMATED TO FORM A CURVE.                                         043
C                                                                       044
C SET SCALAR PARAMETERS AND CALL SUBROUTINE                             045
C                                                                       046
      ISLPSW = 3                                                        047
      SIGMA = 1.                                                        048
C                                                                       049
      CALL KURV1(N,X,Y,SLP1,SLPN,ISLPSW,XP,YP,TEMP,S,SIGMA,             050
     *           IERR)                                                  051
C                                                                       052
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          053
C                                                                       054
      IF (IERR .NE. 0) GO TO 900                                        055
C                                                                       056
C                                                                       057
C -----------------------------------------------------------           058
C                                                                       059
C                                                                       060
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                061
C                                                                       062
C                                                                       063
C WE MAP NUMPTS EQUALLY SPACED POINTS BETWEEN 0. AND 1.                 064
C ONTO THE PLANAR CURVE DETERMINED IN PHASE 1.                          065
C                                                                       066
      NUMPTS = 100                                                      067
      A = 0.                                                            068
      B = 1.                                                            069
      DELTA = (B-A)/FLOAT(NUMPTS-1)                                     070
      DO 1 I = 1,NUMPTS                                                 071
         CALL KURVD(A+FLOAT(I)*DELTA,XPLT(I),YPLT(I),                   072
     *              XTPLT(I),YTPLT(I),XTTPLT(I),YTTPLT(I),              073
     *              N,X,Y,XP,YP,S,SIGMA)                                074
    1    CONTINUE                                                       075
C                                                                       076
C                                                                       077
C -----------------------------------------------------------           078
C                                                                       079
C                                                                       080
C WRITE AND PLOT RESULTS                                                081
C                                                                       082
C                                                                       083
C SUBROUTINE WDATA2 PRINTS PAIRS XPLT(I), YPLT(I) FOR                   084
C I = 1,...,NUMPTS.  SUBROUTINE PDATA2 PRODUCES A PLOT OF               085
C POINTS (XPLT(I),YPLT(I)), I = 1,...,NUMPTS.                           086
C                                                                       087
C                                                                       088
      CALL WDATA2(NUMPTS,XPLT,YPLT)                                     089
      CALL PDATA2(N,X,Y,NUMPTS,XPLT,YPLT,XTPLT,YTPLT,XTTPLT,            090
     *            YTTPLT)                                               091
C                                                                       092
      STOP                                                              093
C                                                                       094
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                095
C                                                                       096
  900 CALL EMESS(IERR)                                                  097
      STOP                                                              098
      END                                                               099
C THIS PROGRAM IS A SAMPLE DRIVER FOR PERIODIC MAPPING FROM             001
C A ONE-DIMENSIONAL SPACE INTO A TWO-DIMENSIONAL SPACE.  IT             002
C COVERS USAGE OF PACKAGE MODULES KURVP1, KURVP2, KURVPD,               003
C ARKURP, AND AREAKP.                                                   004
C                                                                       005
C                                                                       006
C                                                                       007
C ------------------------------------------------------------          008
C                                                                       009
C                                                                       010
C DIMENSIONING                                                          011
C                                                                       012
C                                                                       013
      INTEGER N,IERR                                                    014
      REAL    X(120),Y(120),XP(120),YP(120),TEMP(240),S(120)            015
      REAL    SIGMA,XPLT(300),YPLT(300)                                 016
C                                                                       017
C                                                                       018
C -----------------------------------------------------------           019
C                                                                       020
C                                                                       021
C READ DATA ARRAYS                                                      022
C                                                                       023
C                                                                       024
C GDATA2 IS A FORTRAN SUBROUTINE WHICH RETURNS N, THE NUMBER            025
C OF DATA POINTS, X, AN ARRAY OF THE N INCREASING ABSCISSAE             026
C OF THE DATA POINTS, AND Y, AN ARRAY OF THE N CORRESPONDING            027
C ORDINATES OF THE DATA POINTS.                                         028
C                                                                       029
      CALL GDATA2(N,X,Y)                                                030
C                                                                       031
C                                                                       032
C ------------------------------------------------------------          033
C                                                                       034
C                                                                       035
C PHASE 1 - SET UP PARAMETERS                                           036
C                                                                       037
C                                                                       038
C WE INVOKE A PERIODIC SPLINE UNDER TENSION                             039
C                                                                       040
C SET SCALAR PARAMETERS AND CALL SUBROUTINE                             041
C                                                                       042
C                                                                       043
      SIGMA = 1.                                                        044
C                                                                       045
      CALL KURVP1(N,X,Y,XP,YP,TEMP,S,SIGMA,IERR)                        046
C                                                                       047
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          048
C                                                                       049
      IF (IERR .NE. 0) GO TO 900                                        050
C                                                                       051
C                                                                       052
C ------------------------------------------------------------          053
C                                                                       054
C                                                                       055
C PHASE 2 - ACTUAL INTERPOLATION                                        056
C                                                                       057
C                                                                       058
C WE INTERPOLATE FUNCTIONAL VALUES FOR *NUMPTS* EQUALLY                 059
C SPACED POINTS BETWEEN 0. AND 1.                                       060
C                                                                       061
      NUMPTS = 300                                                      062
      A = 0.                                                            063
      B = 1.                                                            064
      DELTA = (B-A)/FLOAT(NUMPTS-1)                                     065
      DO 1 I = 1,NUMPTS                                                 066
         CALL KURVP2(A+FLOAT(I-1)*DELTA,XPLT(I),YPLT(I),                067
     *              N,X,Y,XP,YP,S,SIGMA)                                068
    1    CONTINUE                                                       069
C                                                                       070
C                                                                       071
C -----------------------------------------------------------           072
C                                                                       073
C                                                                       074
C WRITE AND PLOT RESULTS                                                075
C                                                                       076
C                                                                       077
C SUBROUTINE WDATA2 PRINTS PAIRS XPLT(I), YPLT(I) FOR                   078
C I = 1,...,NUMPTS.  SUBROUTINE PDATA2 PRODUCES A PLOT OF               079
C POINTS (XPLT(I),YPLT(I)), I = 1,...,NUMPTS.                           080
C                                                                       081
C                                                                       082
      CALL WDATA2(NUMPTS,XPLT,YPLT)                                     083
      CALL PDATA2(N,X,Y,NUMPTS,XPLT,YPLT)                               084
C                                                                       085
      STOP                                                              086
C                                                                       087
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                088
C                                                                       089
  900 CALL EMESS(IERR)                                                  090
      STOP                                                              091
      END                                                               092
C THIS PROGRAM IS A SAMPLE DRIVER FOR NON-PERIODIC MAPPING FROM         001
C A ONE-DIMENSIONAL SPACE INTO A THREE-DIMENSIONAL SPACE.               002
C IT COVERS USAGE OF PACKAGE MODULES QURV1, QURVN1, QURV2,              003
C QURVD, AND ARQUR.                                                     004
C                                                                       005
C HELIX                                                                 006
C                                                                       007
C                                                                       008
C ------------------------------------------------------------          009
C                                                                       010
C                                                                       011
C DIMENSIONING                                                          012
C                                                                       013
C                                                                       014
      INTEGER N,ISLPSW,IERR                                             015
      REAL    X(13),Y(13),Z(13),SLP1X,SLP1Y,SLP1Z,SLPNX,                016
     *        SLPNY,SLPNZ,XP(13),YP(13),ZP(13),TEMP(13),                017
     *        S(13),SIGMA                                               018
      REAL    XPLT(101),YPLT(101),ZPLT(101)                             019
C                                                                       020
C                                                                       021
C -----------------------------------------------------------           022
C                                                                       023
C                                                                       024
C READ DATA ARRAYS                                                      025
C                                                                       026
C                                                                       027
C GDATA3 IS A FORTRAN SUBROUTINE WHICH RETURNS N, THE NUMBER            028
C OF DATA POINTS, AND ARRAYS X, Y, Z WHOSE CORRESPONDING                029
C COMPONENTS CONSTITUTE THE COORDINATES OF THE DATA POINTS.             030
C ADJACENT X-Y-Z TRIPLES MUST BE DISTINCT.                              031
C                                                                       032
      CALL GDATA3(N,X,Y,Z)                                              033
C                                                                       034
C                                                                       035
C ------------------------------------------------------------          036
C                                                                       037
C                                                                       038
C PHASE 1 - SET UP PARAMETERS                                           039
C                                                                       040
C                                                                       041
C WE INVOKE A SPLINE UNDER TENSION WITH ENDPOINT SLOPES                 042
C GIVEN                                                                 043
C                                                                       044
C OBTAIN BOUNDARY DERIVATIVES                                           045
C                                                                       046
      CALL GDER6(SLP1X,SLP1Y,SLP1Z,SLPNX,SLPNY,SLPNZ)                   047
C                                                                       048
C SET SCALAR PARAMETERS AND CALL SUBROUTINE                             049
C                                                                       050
      ISLPSW = 0                                                        051
      SIGMA = 1.                                                        052
C                                                                       053
      CALL QURV1(N,X,Y,Z,SLP1X,SLP1Y,SLP1Z,SLPNX,SLPNY,                 054
     *           SLPNZ,ISLPSW,XP,YP,ZP,TEMP,S,SIGMA,IERR)               055
C                                                                       056
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          057
C                                                                       058
      IF (IERR .NE. 0) GO TO 900                                        059
C                                                                       060
C                                                                       061
C ------------------------------------------------------------          062
C                                                                       063
C                                                                       064
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                065
C                                                                       066
C                                                                       067
C WE MAP NUMPTS EQUALLY SPACED POINTS BETWEEN 0. AND 1.                 068
C ONTO THE PLANAR CURVE DETERMINED IN PHASE 1.                          069
C                                                                       070
      NUMPTS = 101                                                      071
      A = 0.                                                            072
      B = 1.                                                            073
      DELTA = (B-A)/FLOAT(NUMPTS-1)                                     074
      DO 1 I = 1,NUMPTS                                                 075
         CALL QURV2(A+FLOAT(I)*DELTA,XPLT(I),YPLT(I),                   076
     *              ZPLT(I),N,X,Y,Z,XP,YP,ZP,S,SIGMA)                   077
    1    CONTINUE                                                       078
C                                                                       079
C                                                                       080
C -----------------------------------------------------------           081
C                                                                       082
C                                                                       083
C WRITE AND PLOT RESULTS                                                084
C                                                                       085
C                                                                       086
C SUBROUTINE WDATA3 PRINTS TRIPLES XPLT(I), YPLT(I), ZPLT(I)            087
C FOR I = 1,...,NUMPTS.  SUBROUTINE PDATA3 PRODUCES A PLOT              088
C OF POINTS (XPLT(I),YPLT(I),ZPLT(I)), I = 1,...,NUMPTS.                089
C                                                                       090
C                                                                       091
      CALL WDATA3(NUMPTS,XPLT,YPLT,ZPLT)                                092
      CALL PDATA3(NUMPTS,XPLT,YPLT,ZPLT)                                093
C                                                                       094
      STOP                                                              095
C                                                                       096
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                097
C                                                                       098
  900 CALL EMESS(IERR)                                                  099
      STOP                                                              100
      END                                                               101
C THIS PROGRAM IS A SAMPLE DRIVER FOR PERIODIC MAPPING FROM             001
C A ONE-DIMENSIONAL SPACE INTO A 3-DIMENSIONAL SPACE.  IT               002
C COVERS USAGE OF PACKAGE MODULES QURVP1, QURVP2, QURVPD,               003
C AND ARQURP.                                                           004
C                                                                       005
C HELIX                                                                 006
C                                                                       007
C                                                                       008
C ------------------------------------------------------------          009
C                                                                       010
C                                                                       011
C DIMENSIONING                                                          012
C                                                                       013
C                                                                       014
      INTEGER N,ISLPSW,IERR                                             015
      REAL    X(13),Y(13),Z(13),SLP1X,SLP1Y,SLP1Z,SLPNX,                016
     *        SLPNY,SLPNZ,XP(13),YP(13),ZP(13),TEMP(13),                017
     *        S(13),SIGMA                                               018
      REAL    XPLT(101),YPLT(101),ZPLT(101)                             019
C                                                                       020
C                                                                       021
C -----------------------------------------------------------           022
C                                                                       023
C                                                                       024
C READ DATA ARRAYS                                                      025
C                                                                       026
C                                                                       027
C GDATA3 IS A FORTRAN SUBROUTINE WHICH RETURNS N, THE NUMBER            028
C OF DATA POINTS, AND ARRAYS X, Y, Z WHOSE CORRESPONDING                029
C COMPONENTS CONSTITUTE THE COORDINATES OF THE DATA POINTS.             030
C ADJACENT X-Y-Z TRIPLES MUST BE DISTINCT.                              031
C                                                                       032
      CALL GDATA3(N,X,Y,Z)                                              033
C                                                                       034
C                                                                       035
C ------------------------------------------------------------          036
C                                                                       037
C                                                                       038
C PHASE 1 - SET UP PARAMETERS                                           039
C                                                                       040
C                                                                       041
C WE INVOKE A SPLINE UNDER TENSION                                      042
C                                                                       043
      SIGMA = 1.                                                        044
C                                                                       045
      CALL QURVP1(N,X,Y,Z,XP,YP,ZP,TEMP,S,SIGMA,IERR)                   046
C                                                                       047
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          048
C                                                                       049
      IF (IERR .NE. 0) GO TO 900                                        050
C                                                                       051
C                                                                       052
C ------------------------------------------------------------          053
C                                                                       054
C                                                                       055
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                056
C                                                                       057
C                                                                       058
C WE MAP NUMPTS EQUALLY SPACED POINTS BETWEEN 0. AND 1.                 059
C ONTO THE PLANAR CURVE DETERMINED IN PHASE 1.                          060
C                                                                       061
      NUMPTS = 101                                                      062
      A = 0.                                                            063
      B = 1.                                                            064
      DELTA = (B-A)/FLOAT(NUMPTS-1)                                     065
      DO 1 I = 1,NUMPTS                                                 066
         CALL QURV2(A+FLOAT(I-1)*DELTA,XPLT(I),YPLT(I),                 067
     *              ZPLT(I),N,X,Y,Z,XP,YP,ZP,S,SIGMA)                   068
    1    CONTINUE                                                       069
C                                                                       070
C                                                                       071
C -----------------------------------------------------------           072
C                                                                       073
C                                                                       074
C WRITE AND PLOT RESULTS                                                075
C                                                                       076
C                                                                       077
C SUBROUTINE WDATA3 PRINTS TRIPLES XPLT(I), YPLT(I), ZPLT(I)            078
C FOR I = 1,...,NUMPTS.  SUBROUTINE PDATA3 PRODUCES A PLOT              079
C OF POINTS (XPLT(I),YPLT(I),ZPLT(I)), I = 1,...,NUMPTS.                080
C                                                                       081
C                                                                       082
      CALL WDATA3(NUMPTS,XPLT,YPLT,ZPLT)                                083
      CALL PDATA3(N,X,Y,Z,NUMPTS,XPLT,YPLT,ZPLT)                        084
C                                                                       085
      STOP                                                              086
C                                                                       087
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                088
C                                                                       089
  900 CALL EMESS(IERR)                                                  090
      STOP                                                              091
      END                                                               092
C                                                                       001
C THIS PROGRAM IS A SAMPLE DRIVER FOR NON-PERIODIC MAPPINGS             002
C FROM A TWO-DIMENSIONAL SPACE INTO A ONE-DIMENSIONAL SPACE.            003
C IT COVERS USAGE OF PACKAGE MODULES SURF1, SURFN1, BSURF1,             004
C XSURF1, YSURF1, NSURF1, SURFS, SURF2, SURFD, SURFI, BSURF2,           005
C XSURF2, YSURF2, NSURF2, BSURF3, XSURF3, YSURF3, AND NSURF3.           006
C                                                                       007
C BIVARIATE NORMAL                                                      008
C                                                                       009
C                                                                       010
C ------------------------------------------------------------          011
C                                                                       012
C                                                                       013
C DIMENSIONING                                                          014
C                                                                       015
C                                                                       016
      INTEGER M,N,IZ,ISLPSW,IERR                                        017
      INTEGER IZPLT                                                     018
      REAL    X(11),Y(6),Z(11,6),ZX1(6),ZXM(6),ZY1(11),                 019
     *        ZYN(11),ZXY11,ZXYM1,ZXY1N,ZXYMN,ZP(198),                  020
     *        TEMP(100),SIGMA                                           021
      REAL    XPLT(21),YPLT(21),ZPLT(21,21)                             022
C                                                                       023
C                                                                       024
C -----------------------------------------------------------           025
C                                                                       026
C                                                                       027
C SET SCALAR PARAMETERS                                                 028
C                                                                       029
      ISLPSW = 0                                                        030
      IZ = 11                                                           031
      IZPLT = 21                                                        032
      SIGMA = 1.                                                        033
C                                                                       034
C READ DATA ARRAYS                                                      035
C                                                                       036
C                                                                       037
C GDATS3 IS A FORTRAN SUBROUTINE WHICH, GIVEN IZ, THE ROW               038
C DIMENSION OF Z, RETURNS M, THE NUMBER OF X-VALUES IN THE              039
C GRID, N, THE NUMBER OF Y-VALUES IN THE GRID, X, THE ARRAY             040
C OF X-VALUES, Y, THE ARRAY OF Y-VALUES, AND Z, THE ARRAY               041
C OF FUNCTIONAL VALUES AT THE GRID POINTS.  THE ARRAYS X,               042
C Y, AND Z ARE ALSO PRINTED.                                            043
C                                                                       044
C                                                                       045
      CALL GDATS3(IZ,M,N,X,Y,Z)                                         046
C                                                                       047
C                                                                       048
C READ DERIVATIVES                                                      049
C                                                                       050
C                                                                       051
      CALL GDERS8(M,N,X,Y,ZX1,ZXM,ZY1,ZYN,ZXY11,ZXYM1,ZXY1N,            052
     *            ZXYMN)                                                053
C                                                                       054
C                                                                       055
C ------------------------------------------------------------          056
C                                                                       057
C                                                                       058
C PHASE 1 - SET UP PARAMETERS                                           059
C                                                                       060
C WE INVOKE A TENSOR PRODUCT OF SPLINES UNDER TENSION WITH              061
C BOUNDARY DERIVATIVES SPECIFIED.                                       062
C                                                                       063
C                                                                       064
      CALL SURF1(M,N,X,Y,Z,IZ,ZX1,ZXM,ZY1,ZYN,ZXY11,ZXYM1,              065
     *           ZXY1N,ZXYMN,ISLPSW,ZP,TEMP,SIGMA,IERR)                 066
C                                                                       067
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          068
C                                                                       069
      IF (IERR .NE. 0) GO TO 900                                        070
C                                                                       071
C                                                                       072
C ------------------------------------------------------------          073
C                                                                       074
C                                                                       075
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                076
C                                                                       077
C WE MAP (X,Y), X = -1.,-0.9,-0.8,...,1.0, Y = -1.0,-0.9,               078
C -0.8,...,1.0 ONTO THE SURFACE DETERMINED IN PHASE 1.                  079
C                                                                       080
      NUMX = 21                                                         081
      NUMY = 21                                                         082
      X0 = -1.0                                                         083
      Y0 = -1.0                                                         084
      DELX = 2./FLOAT(NUMX-1)                                           085
      DELY = 2./FLOAT(NUMY-1)                                           086
      DO 1 I = 1,NUMX                                                   087
         XPLT(I) = X0+DELX*FLOAT(I-1)                                   088
         DO 1 J = 1,NUMY                                                089
            YPLT(J) = Y0+DELY*FLOAT(J-1)                                090
            ZPLT(I,J) = SURF2(XPLT(I),YPLT(J),M,N,X,Y,Z,IZ,             091
     *                        ZP,SIGMA)                                 092
    1    CONTINUE                                                       093
C                                                                       094
C                                                                       095
C -----------------------------------------------------------           096
C                                                                       097
C                                                                       098
C WRITE AND PLOT RESULTS                                                099
C                                                                       100
C                                                                       101
C SUBROUTINE WDATS3 PRINTS TRIPLES XPLT(I), YPLT(I), ZPLT(I,J)          102
C FOR I = 1,...,NUMX AND J = 1,..,NUMY.  PDATS3 PLOTS THE               103
C SAME DATA.                                                            104
C                                                                       105
C                                                                       106
      CALL WDATS3(NUMX,NUMY,IZPLT,XPLT,YPLT,ZPLT)                       107
C                                                                       108
      CALL PDATS3(NUMX,NUMY,IZPLT,XPLT,YPLT,ZPLT)                       109
C                                                                       110
      STOP                                                              111
C                                                                       112
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                113
C                                                                       114
  900 CALL EMESS(IERR)                                                  115
      STOP                                                              116
      END                                                               117
C                                                                       001
C THIS PROGRAM IS A SAMPLE DRIVER FOR PERIODIC MAPPING                  002
C FROM A TWO-DIMENSIONAL SPACE INTO A ONE-DIMENSIONAL SPACE.            003
C IT PRODUCES A SURFACE OF THE FORM Z = F(R,THETA) AND                  004
C COVERS USAGE OF PACKAGE MODULES SURFA1 AND SURFA2.                    005
C                                                                       006
C Z = R**2+75.*EXP(-(R*COS(THETA)-2.)**2-(R*SIN(THETA)-3.)**2           007
C                                        /3.)                           008
C                                                                       009
C                                                                       010
C ------------------------------------------------------------          011
C                                                                       012
C                                                                       013
C DIMENSIONING                                                          014
C                                                                       015
C                                                                       016
      INTEGER M,N,IZ,ISLPSW,ISTAR,IERR                                  017
      INTEGER NUMR,NUMT,IZPLT                                           018
      REAL    R(11),T(24),Z(11,24),ZR1(24),ZRM(24),TEMP(120),           019
     *        ZP(792)                                                   020
      REAL    RPLT(21),TPLT(49),ZPLT(21,49)                             021
C                                                                       022
C                                                                       023
C -----------------------------------------------------------           024
C                                                                       025
C                                                                       026
C SET SCALAR PARAMETERS                                                 027
C                                                                       028
      IZ = 11                                                           029
      ISLPSW = 0                                                        030
      SIGMA = 1.                                                        031
      P = 360.                                                          032
      IZPLT = 21                                                        033
      NUMR = 21                                                         034
      NUMT = 49                                                         035
C                                                                       036
C READ DATA ARRAYS                                                      037
C                                                                       038
C                                                                       039
      CALL GDATP3(IZ,M,N,R,T,Z)                                         040 
C                                                                       041
C                                                                       042
C GET DERIVATIVES                                                       043
C                                                                       044
C                                                                       045
      CALL GDERP2(M,N,ZR1,ZRM)                                          046
C                                                                       047
C                                                                       048
C                                                                       049
C                                                                       050
C ------------------------------------------------------------          051
C                                                                       052
C                                                                       053
C PHASE 1 - SET UP PARAMETERS                                           054
C                                                                       055
C WE INVOKE A TENSOR PRODUCT OF SPLINES UNDER TENSION                   056
C                                                                       057
C                                                                       058
      CALL SURFA1(M,N,R,T,P,Z,IZ,ZR1,ZRM,ISLPSW,ZP,TEMP,                059
     *            SIGMA,ISTAR,IERR)                                     060
C                                                                       061
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          062
C                                                                       063
      IF (IERR .NE. 0) GO TO 900                                        064
C                                                                       065
C                                                                       066
C ------------------------------------------------------------          067
C                                                                       068
C                                                                       069
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                070
C                                                                       071
C WE MAP (R,T), R = 1.,1.2,...,5., T = 0.,7.5,...,360.                  072
C ONTO THE SURFACE DETERMINED IN PHASE 1.                               073
C                                                                       074
      AR = 1.                                                           075
      BR = 5.                                                           076
      AT = 0.                                                           077
      BT = 360.                                                         078
      DELR = (BR-AR)/FLOAT(NUMR-1)                                      079
      DELT = (BT-AT)/FLOAT(NUMT-1)                                      080
      DO 1 J = 1,NUMT                                                   081
         TPLT(J) = AT+DELT*FLOAT(J-1)                                   082
         DO 1 I = 1,NUMR                                                083
            RPLT(I) = AR+DELR*FLOAT(I-1)                                084
            ZPLT(I,J) = SURFA2(RPLT(I),TPLT(J),M,N,R,T,P,Z,             085
     *                        IZ,ZP,ISTAR,SIGMA)                        086
    1    CONTINUE                                                       087
C                                                                       088
C                                                                       089
C -----------------------------------------------------------           090
C                                                                       091
C                                                                       092
C WRITE AND PLOT RESULTS                                                093
C                                                                       094
C                                                                       095
      CALL WDATP3(NUMR,NUMT,IZPLT,RPLT,TPLT,ZPLT)                       096
C                                                                       097
      CALL PDATP3(M,N,R,T,NUMR,NUMT,IZPLT,RPLT,TPLT,ZPLT)               098
C                                                                       099
      STOP                                                              100
C                                                                       101
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                102
C                                                                       103
  900 CALL EMESS(IERR)                                                  104
      STOP                                                              105
      END                                                               106
C                                                                       001
C THIS PROGRAM IS A SAMPLE DRIVER FOR NON-PERIODIC MAPPING              002
C FROM A TWO-DIMENSIONAL SPACE WITH A POLE AT (0,0) INTO A              003
C ONE-DIMENSIONAL SPACE.  IT PRODUCES A SURFACE OF THE FORM             004
C Z = F(R,THETA) AND COVERS USAGE OF PACKAGE MODULES SURFW1             005
C AND SURFW2.                                                           006
C                                                                       007
C F(R,T) = R*R+75.*EXP(-(R*COS(T)-2.)**2-(R*SIN(T)-3.)**2/3.)           008
C                                                                       009
C                                                                       010
C                                                                       011
C ------------------------------------------------------------          012
C                                                                       013
C                                                                       014
C DIMENSIONING                                                          015
C                                                                       016
C                                                                       017
      INTEGER M,N,IZ,ISLPSW,ISTAR,IERR                                  018
      INTEGER NUMR,NUMT,IZPLT                                           019
      REAL    R(11),T(21),Z(11,21),ZR10,ZR190,ZRM(21),ZT1(11),          020
     *        ZTN(11),ZRTM1,ZRTMN,TEMP(63),ZP(693)                      021
      REAL    RPLT(21),TPLT(41),ZPLT(21,41)                             022
C                                                                       023
C                                                                       024
C -----------------------------------------------------------           025
C                                                                       026
C                                                                       027
C SET SCALAR PARAMETERS                                                 028
C                                                                       029
      IZ = 11                                                           030
      ISLPSW = 0                                                        031
      SIGMA = 1.                                                        032
      IZPLT = 21                                                        033
      NUMR = 21                                                         034
      NUMT = 41                                                         035
C                                                                       036
C READ DATA ARRAYS                                                      037
C                                                                       038
C                                                                       039
      CALL GDATP3(IZ,M,N,R,T,Z)                                         040 
C                                                                       041
C                                                                       042
C GET DERIVATIVES                                                       043
C                                                                       044
C                                                                       045
      CALL GDERP7(M,N,ZR10,ZR190,ZRM,ZT1,ZTN,ZRTM1,ZRTMN)               046
C                                                                       047
C                                                                       048
C                                                                       049
C                                                                       050
C ------------------------------------------------------------          051
C                                                                       052
C PHASE 1 - SET UP PARAMETERS                                           053
C                                                                       054
C                                                                       055
C WE INVOKE A TENSOR PRODUCT OF SPLINES UNDER TENSION                   056
C                                                                       057
C                                                                       058
      CALL SURFW1(M,N,R,T,Z,IZ,ZR10,ZR190,ZRM,ZT1,ZTN,                  059
     *            ZRTM1,ZRTMN,ISLPSW,ZP,TEMP,SIGMA,ISTAR,               060
     *            IERR)                                                 061
C                                                                       062
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          063
C                                                                       064
      IF (IERR .NE. 0) GO TO 900                                        065
C                                                                       066
C                                                                       067
C ------------------------------------------------------------          068
C                                                                       069
C                                                                       070
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                071
C                                                                       072
C WE MAP (R,T), R = 0.,.25,...,5., T = 30.,35.,...,230. ONTO            073
C THE SURFACE DETERMINED IN PHASE 1.                                    074
C                                                                       075
      AR = 0.                                                           076
      BR = 5.                                                           077
      AT = 30.                                                          078
      BT = 230.                                                         079
      DELR = (BR-AR)/FLOAT(NUMR-1)                                      080
      DELT = (BT-AT)/FLOAT(NUMT-1)                                      081
      DO 1 J = 1,NUMT                                                   082
         TPLT(J) = AT+DELT*FLOAT(J-1)                                   083
         DO 1 I = 1,NUMR                                                084
            RPLT(I) = AR+DELR*FLOAT(I-1)                                085
            ZPLT(I,J) = SURFW2(RPLT(I),TPLT(J),M,N,R,T,Z,               086
     *                        IZ,ZP,ISTAR,SIGMA)                        087
    1    CONTINUE                                                       088
C                                                                       089
C                                                                       090
C -----------------------------------------------------------           091
C                                                                       092
C                                                                       093
C WRITE AND PLOT RESULTS                                                094
C                                                                       095
C                                                                       096
      CALL WDATP3(NUMR,NUMT,IZPLT,RPLT,TPLT,ZPLT)                       097
C                                                                       098
      CALL PDATP3(M,N,R,T,NUMR,NUMT,IZPLT,RPLT,TPLT,ZPLT)               099
C                                                                       100
      STOP                                                              101
C                                                                       102
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                103
C                                                                       104
  900 CALL EMESS(IERR)                                                  105
      STOP                                                              106
      END                                                               107
C                                                                       001
C THIS PROGRAM IS A SAMPLE DRIVER FOR A PERIODIC MAPPING                002
C FROM A TWO-DIMENSIONAL SPACE WITH A POLE AT (0,0) INTO A              003
C ONE-DIMENSIONAL SPACE.  IT PRODUCES A SURFACE OF THE FORM             004
C Z = F(R,THETA) AND COVERS USAGE OF PACKAGE MODULES SURFD1             005
C AND SURFD2.                                                           006
C                                                                       007
C Z = R**2 + 75.*EXP(-(R*COS(THETA)-2.)**2                              008
C                    -(R*SIN(THETA)-3.)**2/3.)                          009
C                                                                       010
C                                                                       011
C ------------------------------------------------------------          012
C                                                                       013
C                                                                       014
C DIMENSIONING                                                          015
C                                                                       016
C                                                                       017
      INTEGER M,N,IZ,ISLPSW,ISTAR,IERR                                  018
      INTEGER NUMR,NUMT,IZPLT                                           019
      REAL    R(11),T(24),Z(11,24),ZR10,ZR190,ZRM(24),                  020
     *        TEMP(120),ZP(792)                                         021
      REAL    RPLT(21),TPLT(49),ZPLT(21,49)                             022
C                                                                       023
C                                                                       024
C -----------------------------------------------------------           025
C                                                                       026
C                                                                       027
C SET SCALAR PARAMETERS                                                 028
C                                                                       029
      IZ = 11                                                           030
      ISLPSW = 0                                                        031
      SIGMA = 1.                                                        032
      P = 360.                                                          033
      IZPLT = 21                                                        034
      NUMR = 21                                                         035
      NUMT = 49                                                         036
C                                                                       037
C READ DATA ARRAYS                                                      038
C                                                                       039
C                                                                       040
      CALL GDATP3(IZ,M,N,R,T,Z)                                         041
C                                                                       042
C                                                                       043
C GET DERIVATIVES                                                       044
C                                                                       045
C                                                                       046
      CALL GDERP3(M,N,ZR10,ZR190,ZRM)                                   047
C                                                                       048
C                                                                       049
C                                                                       050
C                                                                       051
C ------------------------------------------------------------          052
C                                                                       053
C                                                                       054
C PHASE 1 - SET UP PARAMETERS                                           055
C                                                                       056
C WE INVOKE A TENSOR PRODUCT OF SPLINES UNDER TENSION                   057
C                                                                       058
C                                                                       059
      CALL SURFD1(M,N,R,T,Z,IZ,ZR10,ZR190,ZRM,ISLPSW,                   060
     *            ZP,TEMP,SIGMA,ISTAR,IERR)                             061
C                                                                       062
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          063
C                                                                       064
      IF (IERR .NE. 0) GO TO 900                                        065
C                                                                       066
C                                                                       067
C ------------------------------------------------------------          068
C                                                                       069
C                                                                       070
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                071
C                                                                       072
C WE MAP (R,T), R = 0.,.5,...,5., T = 0.,7.5,...,360. ONTO              073
C THE SURFACE DETERMINED IN PHASE 1.                                    074
C                                                                       075
      AR = 0.                                                           076
      BR = 5.                                                           077
      AT = 0.                                                           078
      BT = 360.                                                         079
      DELR = (BR-AR)/FLOAT(NUMR-1)                                      080
      DELT = (BT-AT)/FLOAT(NUMT-1)                                      081
      DO 1 J = 1,NUMT                                                   082
         TPLT(J) = AT+DELT*FLOAT(J-1)                                   083
         DO 1 I = 1,NUMR                                                084
            RPLT(I) = AR+DELR*FLOAT(I-1)                                085
            ZPLT(I,J) = SURFD2(RPLT(I),TPLT(J),M,N,R,T,                 086
     *                        Z,IZ,ZP,ISTAR,SIGMA)                      087
    1    CONTINUE                                                       088
C                                                                       089
C                                                                       090
C -----------------------------------------------------------           091
C                                                                       092
C                                                                       093
C WRITE AND PLOT RESULTS                                                094
C                                                                       095
C                                                                       096
      CALL WDATP3(NUMR,NUMT,IZPLT,RPLT,TPLT,ZPLT)                       097
C                                                                       098
      CALL PDATP3(M,N,R,T,NUMR,NUMT,IZPLT,RPLT,TPLT,ZPLT)               099
C                                                                       100
      STOP                                                              101
C                                                                       102
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                103
C                                                                       104
  900 CALL EMESS(IERR)                                                  105
      STOP                                                              106
      END                                                               107
C                                                                       001
C THIS PROGRAM IS A SAMPLE DRIVER FOR A MAPPING FROM A TWO-             002
C DIMENSIONAL SPACE INTO A ONE-DIMENSIONAL SPACE WHICH IS               003
C PERIODIC IN R AND THETA.  IT PRODUCES A SURFACE OF THE                004
C FORM Z = F(R,THETA) AND COVERS USAGE OF PACKAGE MODULES               005
C SURFT1 AND SURFT2.                                                    006
C                                                                       007
C Z = 1./(1.5+SIN(3.*THETA))+2./(COS(R)+2.)                             008
C                                                                       009
C                                                                       010
C ------------------------------------------------------------          011
C                                                                       012
C                                                                       013
C DIMENSIONING                                                          014
C                                                                       015
C                                                                       016
      INTEGER M,N,IZ,ISTAR,IERR                                         017
      INTEGER NUMR,NUMT,IZPLT                                           018
      REAL    PR,PT,R(9),T(12),Z(9,12),TEMP(60),ZP(324)                 019
      REAL    RPLT(19),TPLT(25),ZPLT(19,25)                             020
C                                                                       021
C                                                                       022
C -----------------------------------------------------------           023
C                                                                       024
C                                                                       025
C SET SCALAR PARAMETERS                                                 026
C                                                                       027
      IZ = 9                                                            028
      SIGMA = 1.                                                        029
      PR = 360.                                                         030
      PT = 120.                                                         031
      IZPLT = 19                                                        032
      NUMR = 19                                                         033
      NUMT = 25                                                         034
C                                                                       035
C READ DATA ARRAYS                                                      036
C                                                                       037
C                                                                       038
      CALL GDATP3(IZ,M,N,R,T,Z)                                         039
C                                                                       040
C                                                                       041
C                                                                       042
C                                                                       043
C ------------------------------------------------------------          044
C                                                                       045
C                                                                       046
C PHASE 1 - SET UP PARAMETERS                                           047
C                                                                       048
C WE INVOKE A TENSOR PRODUCT OF SPLINES UNDER TENSION                   049
C                                                                       050
C                                                                       051
      CALL SURFT1(M,N,R,T,PR,PT,Z,IZ,ZP,TEMP,SIGMA,ISTAR,               052
     *            IERR)                                                 053
C                                                                       054
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          055
C                                                                       056
      IF (IERR .NE. 0) GO TO 900                                        057
C                                                                       058
C                                                                       059
C ------------------------------------------------------------          060
C                                                                       061
C                                                                       062
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                063
C                                                                       064
C WE MAP (R,T), R = 0.,20.,...,360., T = 0.,5.,...,120.                 065
C ONTO THE SURFACE DETERMINED IN PHASE 1.                               066
C                                                                       067
      AR = 0.                                                           068
      BR = 360.                                                         069
      AT = 0.                                                           070
      BT = 120.                                                         071
      DELR = (BR-AR)/FLOAT(NUMR-1)                                      072
      DELT = (BT-AT)/FLOAT(NUMT-1)                                      073
      DO 1 J = 1,NUMT                                                   074
         TPLT(J) = AT+DELT*FLOAT(J-1)                                   075
         DO 1 I = 1,NUMR                                                076
            RPLT(I) = AR+DELR*FLOAT(I-1)                                077
            ZPLT(I,J) = SURFT2(RPLT(I),TPLT(J),M,N,R,T,                 078
     *                        PR,PT,Z,IZ,ZP,ISTAR,SIGMA)                079
    1    CONTINUE                                                       080
C                                                                       081
C                                                                       082
C -----------------------------------------------------------           083
C                                                                       084
C                                                                       085
C WRITE AND PLOT RESULTS                                                086
C                                                                       087
C                                                                       088
      CALL WDATP3(NUMR,NUMT,IZPLT,RPLT,TPLT,ZPLT)                       089
C                                                                       090
      CALL PDATP3(M,N,R,T,NUMR,NUMT,IZPLT,RPLT,TPLT,ZPLT)               091
C                                                                       092
      STOP                                                              093
C                                                                       094
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                095
C                                                                       096
  900 CALL EMESS(IERR)                                                  097
      STOP                                                              098
      END                                                               099
C                                                                       001
C THIS PROGRAM IS A SAMPLE DRIVER FOR A MAPPING FROM A TWO-             002
C DIMENSIONAL SPACE INTO A ONE-DIMENSIONAL SPACE.  IT PRO-              003
C DUCES A SURFACE WHICH IS NON-PERIODIC, HAS TWO POLES, AND             004
C HAS THE FORM R = F(PHI,THETA).  IT COVERS USAGE OF PACK-              005
C AGE MODULES SURFL1 AND SURFL2.                                        006
C                                                                       007
C R = SUM OF GAUSSIANS                                                  008
C                                                                       009
C                                                                       010
C ------------------------------------------------------------          011
C                                                                       012
C                                                                       013
C DIMENSIONING                                                          014
C                                                                       015
C                                                                       016
      INTEGER M,N,IR,ISLPSW,ISTAR,IERR                                  017
      INTEGER NUMP,NUMT,IRPLT                                           018
      REAL    PHI(13),T(12),R(13,12),RP10,RP190,RPM0,                   019
     *        RPM90,RT1(13),RTN(13),SIGMA,TEMP(39),RP(468)              020
      REAL    PPLT(25),TPLT(23),RPLT(25,23)                             021
C                                                                       022
C                                                                       023
C -----------------------------------------------------------           024
C                                                                       025
C                                                                       026
C SET SCALAR PARAMETERS                                                 027
C                                                                       028
      IR = 13                                                           029
      ISLPSW = 0                                                        030
      SIGMA = 1.                                                        031
      IRPLT = 25                                                        032
      NUMP = 25                                                         033
      NUMT = 23                                                         034
C                                                                       035
C READ DATA ARRAYS                                                      036
C                                                                       037
C                                                                       038
      CALL GDATP3(IR,M,N,PHI,T,R)                                       039
C                                                                       040
C GET DERIVATIVES                                                       041
C                                                                       042
      CALL GDER6(M,N,RP10,RP190,RPM0,RPM90,RT1,RTN)                     043
C                                                                       044
C                                                                       045
C                                                                       046
C                                                                       047
C ------------------------------------------------------------          048
C                                                                       049
C                                                                       050
C PHASE 1 - SET UP PARAMETERS                                           051
C                                                                       052
C WE INVOKE A TENSOR PRODUCT OF SPLINES UNDER TENSION                   053
C                                                                       054
C                                                                       055
      CALL SURFL1(M,N,PHI,T,R,IR,ISLPSW,RP10,RP190,RPM0,                056
     *            RPM90,RT1,RTN,RP,TEMP,SIGMA,ISTAR,IERR)               057
C                                                                       058
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          059
C                                                                       060
      IF (IERR .NE. 0) GO TO 900                                        061
C                                                                       062
C                                                                       063
C ------------------------------------------------------------          064
C                                                                       065
C                                                                       066
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                067
C                                                                       068
C WE MAP (P,T), P = -90.,-82.5,...,90., T = 0.,5.,...,110.              069
C ONTO THE SURFACE DETERMINED IN PHASE 1.                               070
C                                                                       071
      AP = -90.                                                         072
      BP = 90.                                                          073
      AT = -70.                                                         074
      BT = 40.                                                          075
      DELP = (BP-AP)/FLOAT(NUMP-1)                                      076
      DELT = (BT-AT)/FLOAT(NUMT-1)                                      077
      DO 1 J = 1,NUMT                                                   078
         TPLT(J) = AT+DELT*FLOAT(J-1)                                   079
         DO 1 I = 1,NUMP                                                080
            PPLT(I) = AP+DELP*FLOAT(I-1)                                081
            RPLT(I,J) = SURFL2(PPLT(I),TPLT(J),M,N,                     082
     *                         PHI,T,R,IR,RP,ISTAR,SIGMA)               083
    1    CONTINUE                                                       084
C                                                                       085
C                                                                       086
C -----------------------------------------------------------           087
C                                                                       088
C                                                                       089
C WRITE AND PLOT RESULTS                                                090
C                                                                       091
C                                                                       092
      CALL WDAT3(M,N,PHI,T,R,IR,NUMP,NUMT,IRPLT,PPLT,TPLT,              093
     *           RPLT)                                                  094
C                                                                       095
      CALL PDATP3(M,N,PHI,T,NUMP,NUMT,IRPLT,PPLT,TPLT,                  096
     *            RPLT)                                                 097
C                                                                       098
      STOP                                                              099
C                                                                       100
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                101
C                                                                       102
  900 CALL EMESS(IERR)                                                  103
      STOP                                                              104
      END                                                               105
C                                                                       001
C THIS PROGRAM IS A SAMPLE DRIVER FOR A MAPPING FROM A TWO-             002
C DIMENSIONAL SPACE INTO A ONE-DIMENSIONAL SPACE.  IT PRO-              003
C DUCES A SURFACE WHICH IS PERIODIC, HAS TWO POLES, AND HAS             004
C THE FORM R = F(PHI,THETA).  IT COVERS USAGE OF PACKAGE MOD-           005
C ULES SURFS1 AND SURFS2.                                               006
C                                                                       007
C R = SUM OF GAUSSIANS                                                  008
C                                                                       009
C                                                                       010
C ------------------------------------------------------------          011
C                                                                       012
C                                                                       013
C DIMENSIONING                                                          014
C                                                                       015
C                                                                       016
      INTEGER M,N,IR,ISLPSW,ISTAR,IERR                                  017
      INTEGER NUMP,NUMT,IRPLT                                           018
      REAL    PHI(13),T(24),R(13,24),RP10,RP190,RPM0,                   019
     *        RPM90,SIGMA,TEMP(120),RP(936)                             020
      REAL    PPLT(25),TPLT(49),RPLT(25,49)                             021
C                                                                       022
C                                                                       023
C -----------------------------------------------------------           024
C                                                                       025
C                                                                       026
C SET SCALAR PARAMETERS                                                 027
C                                                                       028
      IR = 13                                                           029
      ISLPSW = 0                                                        030
      SIGMA = 1.                                                        031
      IRPLT = 25                                                        032
      NUMP = 25                                                         033
      NUMT = 49                                                         034
C                                                                       035
C READ DATA ARRAYS                                                      036
C                                                                       037
C                                                                       038
      CALL GDATP3(IR,M,N,PHI,T,R)                                       039
C                                                                       040
C GET DERIVATIVES                                                       041
C                                                                       042
      CALL GDER4(RP10,RP190,RPM0,RPM90)                                 043
C                                                                       044
C                                                                       045
C                                                                       046
C                                                                       047
C ------------------------------------------------------------          048
C                                                                       049
C                                                                       050
C PHASE 1 - SET UP PARAMETERS                                           051
C                                                                       052
C WE INVOKE A TENSOR PRODUCT OF SPLINES UNDER TENSION                   053
C                                                                       054
C                                                                       055
      CALL SURFS1(M,N,PHI,T,R,IR,RP10,RP190,RPM0,RPM90                  056
     *            ISLPSW,RP,TEMP,SIGMA,ISTAR,IERR)                      057
C                                                                       058
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          059
C                                                                       060
      IF (IERR .NE. 0) GO TO 900                                        061
C                                                                       062
C                                                                       063
C ------------------------------------------------------------          064
C                                                                       065
C                                                                       066
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                067
C                                                                       068
C WE MAP (P,T), P = -90.,-82.5,...,90., T = -90.,-82.5,...,270.         069
C ONTO THE SURFACE DETERMINED IN PHASE 1.                               070
C                                                                       071
      AP = -90.                                                         072
      BP = 90.                                                          073
      AT = -90.                                                         074
      BT = 270.                                                         075
      DELP = (BP-AP)/FLOAT(NUMP-1)                                      076
      DELT = (BT-AT)/FLOAT(NUMT-1)                                      077
      DO 1 J = 1,NUMT                                                   078
         TPLT(J) = AT+DELT*FLOAT(J-1)                                   079
         DO 1 I = 1,NUMP                                                080
            PPLT(I) = AP+DELP*FLOAT(I-1)                                081
            RPLT(I,J) = SURFS2(PPLT(I),TPLT(J),M,N,                     082
     *                         PHI,T,R,IR,RP,ISTAR,SIGMA)               083
    1    CONTINUE                                                       084
C                                                                       085
C                                                                       086
C -----------------------------------------------------------           087
C                                                                       088
C                                                                       089
C WRITE AND PLOT RESULTS                                                090
C                                                                       091
C                                                                       092
      CALL WDAT3(M,N,PHI,T,R,IR,NUMP,NUMT,IRPLT,PPLT,TPLT,              093
     *           RPLT)                                                  094
C                                                                       095
      CALL PDATP3(M,13,PHI,T,NUMP,25,IRPLT,PPLT,TPLT,                   096
     *            RPLT)                                                 097
C                                                                       098
      STOP                                                              099
C                                                                       100
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                101
C                                                                       102
  900 CALL EMESS(IERR)                                                  103
      STOP                                                              104
      END                                                               105
C                                                                       001
C THIS PROGRAM IS A SAMPLE DRIVER FOR NON-PERIODIC MAPPING              002
C FROM A THREE-DIMENSIONAL SPACE INTO A ONE-DIMENSIONAL                 003
C SPACE.  IT COVERS USAGE OF PACKAGE MODULES VAL3B1 AND                 004
C VAL3BD.                                                               005
C                                                                       006
C SUM OF GAUSSIANS                                                      007
C                                                                       008
C                                                                       009
C ------------------------------------------------------------          010
C                                                                       011
C                                                                       012
C DIMENSIONING                                                          013
C                                                                       014
C                                                                       015
      INTEGER NX,NY,NZ,NW1,NW2,IZ,IERR                                  016
      INTEGER IXPLT,IYPLT                                               017
      REAL    X(11),Y(15),Z(21),W(11,15,21),C(3465),VX(5,11),           018
     *        VY(5,15),VZ(5,21),TEMP(33),SIGMA                          019
      REAL    XPLT(100),YPLT(100),ZPLT(100),WPLT(100,100,60),           020
     *        WX(100,100,60),WY(100,100,60),WZ(100,100,60),             021
     *        WXX(100,100,60),WXY(100,100,60),WYY(100,100,60),          022
     *        WYZ(100,100,60),WZZ(100,100,60),WXZ(100,100,60)           023
C                                                                       024
C                                                                       025
C -----------------------------------------------------------           026
C                                                                       027
C                                                                       028
C SET SCALAR PARAMETERS                                                 029
C                                                                       030
      NW1 = 11                                                          031
      NW2 = 15                                                          032
      IXPLT = 100                                                       033
      IYPLT = 100                                                       034
      NUMX = 100                                                        035
      NUMY = 100                                                        036
      NUMZ = 60                                                         037
      SIGMA = 1.                                                        038
C                                                                       039
C READ DATA ARRAYS                                                      040
C                                                                       041
C                                                                       042
C                                                                       043
C                                                                       044
      CALL GDATV4(NW1,NW2,NX,NY,NZ,X,Y,Z,W)                             045
C                                                                       046
C                                                                       047
C ------------------------------------------------------------          048
C                                                                       049
C                                                                       050
C PHASE 1 - SET UP PARAMETERS                                           051
C                                                                       052
C                                                                       053
C                                                                       054
      CALL VAL3B1(NX,NY,NZ,X,Y,Z,W,NW1,NW2,C,VX,VY,VZ,TEMP,             055
     *            SIGMA,IERR)                                           056
C                                                                       057
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          058
C                                                                       059
      IF (IERR .NE. 0) GO TO 900                                        060
C                                                                       061
C                                                                       062
C ------------------------------------------------------------          063
C                                                                       064
C                                                                       065
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                066
C                                                                       067
C WE FIND THE VALUE OF THE DENSITY AT (X,Y,Z) ON A                      068
C GRID WITH 100 EQUISPACED VALUES OF X AND Y AND                        069
C 60 EQUISPACED VALUES OF Z.                                            070
C                                                                       071
      AX = 0.                                                           072
      BX = 1.                                                           073
      AY = 0.                                                           074
      BY = 1.                                                           075
      AZ = 0.                                                           076
      BZ = 1.                                                           077
      DELX = (BX-AX)/FLOAT(NUMX-1)                                      078
      DELY = (BY-AY)/FLOAT(NUMY-1)                                      079
      DELZ = (BZ-AZ)/FLOAT(NUMZ-1)                                      080
      DO 1 K = 1,NUMZ                                                   081
         ZPLT(K) = AZ+DELZ*FLOAT(K-1)                                   082
         DO 1 J = 1,NUMY                                                083
            YPLT(J) = AY+DELY*FLOAT(J-1)                                084
            DO 1 I = 1,NUMX                                             085
               XPLT(I) = AX+DELX*FLOAT(I-1)                             086
               CALL VAL3BD(XPLT(I),YPLT(J),ZPLT(K),                     087
     *                     WPLT(I,J,K),WX(I,J,K),WY(I,J,K),             088
     *                     WZ(I,J,K),WXX(I,J,K),WXY(I,J,K),             089
     *                     WYY(I,J,K),WYZ(I,J,K),WZZ(I,J,K),            090
     *                     WXZ(I,J,K),NX,NY,NZ,X,Y,Z,C,VX,              091
     *                     VY,VZ,SIGMA)                                 092
    1    CONTINUE                                                       093
C                                                                       094
C                                                                       095
C -----------------------------------------------------------           096
C                                                                       097
C                                                                       098
C WRITE AND PLOT RESULTS                                                099
C                                                                       100
C                                                                       101
C SUBROUTINE WDATV4 PRINTS FUNCTIONAL VALUES AND DERIVATIVES            102
C FOUND BY VAL3BD.                                                      103
C                                                                       104
C                                                                       105
      CALL WDATV4(NUMX,NUMY,NUMZ,IXPLT,IYPLT,XPLT,YPLT,ZPLT,            106
     *            WPLT,WX,WY,WZ,WXX,WXY,WYY,WYZ,WZZ,WXZ)                107
C                                                                       108
      CALL PDATV4(NUMX,NUMY,NUMZ,IXPLT,IYPLT,XPLT,YPLT,ZPLT,            109
     *            WPLT,WX,WY,WZ,WXX,WXY,WYY,WYZ,WZZ,WXZ)                110
C                                                                       111
      STOP                                                              112
C                                                                       113
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                114
C                                                                       115
  900 CALL EMESS(IERR)                                                  116
      STOP                                                              117
      END                                                               118
C THIS PROGRAM IS A SAMPLE DRIVER FOR NON-PERIODIC MAPPING              001
C FROM A TWO-DIMENSIONAL SPACE INTO A THREE-DIMENSIONAL                 002
C SPACE.  IT COVERS USAGE OF PACKAGE MODULES ZURFN1 AND                 003
C ZURF2D.                                                               004
C                                                                       005
C APHRODITE OF MELOS                                                    006
C                                                                       007
C                                                                       008
C ------------------------------------------------------------          009
C                                                                       010
C                                                                       011
C DIMENSIONING                                                          012
C                                                                       013
C                                                                       014
      INTEGER M,N,IX,IY,IZ,IERR                                         015
      INTEGER IXPLT,IYPLT,IZPLT                                         016
      REAL    X(15,200),Y(15,200),Z(15,200),XP(9000),YP(9000),          017
     *        ZP(9000),S(15),T(200),TEMP(1400),SIGMA                    018
      REAL    SPLT(21),TPLT(15),XPLT(30,50),YPLT(30,50),                019
     *        ZPLT(30,50),XS(30,50),YS(30,50),ZS(30,50),                020
     *        XT(30,50),YT(30,50),ZT(30,50),XSS(30,50),                 021
     *        YSS(30,50),ZSS(30,50),SXT(30,50),YST(30,50),              022
     *        ZST(30,50),XTT(30,50),YTT(30,50),ZTT(30,50)               023
C                                                                       024
C                                                                       025
C -----------------------------------------------------------           026
C                                                                       027
C                                                                       028
C SET SCALAR PARAMETERS                                                 029
C                                                                       030
      IX = 15                                                           031
      IY = 15                                                           032
      IZ = 15                                                           033
      IXPLT = 21                                                        034
      IYPLT = 21                                                        035
      IZPLT = 21                                                        036
      SIGMA = 1.                                                        037
C                                                                       038
C READ DATA ARRAYS                                                      039
C                                                                       040
C                                                                       041
C                                                                       042
C                                                                       043
      CALL GDATZ3(IX,IY,IZ,M,N,X,Y,Z)                                   044
C                                                                       045
C                                                                       046
C ------------------------------------------------------------          047
C                                                                       048
C                                                                       049
C PHASE 1 - SET UP PARAMETERS                                           050
C                                                                       051
C WE INVOKE THREE TENSOR PRODUCTS OF SPLINES UNDER TENSION              052
C                                                                       053
C                                                                       054
      CALL ZURFN1(M,N,X,Y,Z,IX,IY,IZ,XP,YP,ZP,S,T,TEMP,                 055
     *            SIGMA,IERR)                                           056
C                                                                       057
C CHECK ERROR FLAG - IERR = 0 IS NORMAL RETURN                          058
C                                                                       059
      IF (IERR .NE. 0) GO TO 900                                        060
C                                                                       061
C                                                                       062
C ------------------------------------------------------------          063
C                                                                       064
C                                                                       065
C PHASE 2 - ACTUAL COMPUTATION OF POINTS                                066
C                                                                       067
C FOR 30 EQUISPACED VALUES OF S BETWEEN .5 AND 1., AND 50               068
C EQUISPACED VALUES OF T BETWEEN 0. AND 1., WE MAP (S,T)                069
C ONTO THE SURFACE DETERMINED IN PHASE 1 AND GET FIRST AND              070
C SECOND PARTIAL DERIVATIVES OF THE X, Y, AND Z COORDINATES             071
C OF THE SURFACE WITH RESPECT TO S AND T.                               072
C                                                                       073
      NUMS = 30                                                         074
      NUMT = 50                                                         075
      AS = .5                                                           076
      BS = 1.                                                           077
      AT = 0.                                                           078
      BT = 1.                                                           079
      DELX = (BS-AS)/FLOAT(NUMS-1)                                      080
      DELY = (BT-AT)/FLOAT(NUMT-1)                                      081
      DO 1 I = 1,NUMS                                                   082
         SPLT(I) = AS+DELX*FLOAT(I-1)                                   083
         DO 1 J = 1,NUMT                                                084
            TPLT(J) = AT+DELY*FLOAT(J-1)                                085
            CALL ZURF2D(SPLT(I),TPLT(J),XPLT(I,J),YPLT(I,J),            086
     *                  ZPLT(I,J),XS(I,J),YS(I,J),ZS(I,J),              087
     *                  XT(I,J),YT(I,J),ZT(I,J),XSS(I,J),               088
     *                  YSS(I,J),ZSS(I,J),XST(I,J),YST(I,J),            089
     *                  ZST(I,J),XTT(I,J),YTT(I,J),ZTT(I,J),            090
     *                  M,N,X,Y,Z,IX,IY,IZ,XP,YP,ZP,S,T,                091
     *                  SIGMA)                                          092
    1    CONTINUE                                                       093
C                                                                       094
C                                                                       095
C -----------------------------------------------------------           096
C                                                                       097
C                                                                       098
C WRITE AND PLOT RESULTS                                                099
C                                                                       100
C                                                                       101
C SUBROUTINE WDATZ3 PRINTS COORDINATES AND DERIVATIVES                  102
C FOUND BY ZURF2D.                                                      103
C                                                                       104
C                                                                       105
      CALL WDATZ3(NUMS,NUMT,IXPLT,IYPLT,IZPLT,SPLT,TPLT,                106
     *            XPLT,YPLT,ZPLT,XS,YS,ZS,XT,YT,ZT,XSS,YSS,             107
     *            ZSS,XST,YST,ZST,XTT,YTT,ZTT)                          108
C                                                                       109
      CALL PDATZ3(NUMS,NUMT,IXPLT,IYPLT,IZPLT,SPLT,TPLT,                110
     *            XPLT,YPLT,ZPLT,XS,YS,ZS,XT,YT,ZT,XSS,YSS,             111
     *            ZSS,XST,YST,ZST,XTT,YTT,ZTT)                          112
C                                                                       113
      STOP                                                              114
C                                                                       115
C ERROR DETECTED.  CALL EMESS TO PRINT MESSAGE AND STOP.                116
C                                                                       117
  900 CALL EMESS(IERR)                                                  118
      STOP                                                              119
      END                                                               120
