├── .gitignore
├── plotlib
├── version.inc
├── lines
├── plt.ftnchek
├── util-ops.f
├── win32
│ ├── Readme-win32
│ └── Xdefs.h
├── misc
│ ├── README
│ ├── makesplitlib
│ └── Readme.absoft
├── sym
│ ├── CMakeLists.txt
│ ├── symb.fnt
│ ├── Makefile
│ └── Readme
├── colorstuff
│ └── rgbtest.c
├── examples
│ ├── masks.inc
│ ├── colors.inc
│ ├── CMakeLists.txt
│ ├── Readme-examples
│ ├── zoomtest.f
│ ├── volts_old.f
│ ├── squares.f
│ ├── gridtest.f
│ ├── defmap.f
│ ├── squares2.f
│ ├── symbols.f
│ ├── Makefile
│ └── volts.f
├── masks.inc
├── colors.inc
├── SYMB.INC
├── CMakeLists.txt
├── Readme.colors
├── config.make.QP
├── config.make.DP
├── config.make.g77
├── config.make
└── config.make.SP
├── orrs
├── osmap.dat
├── osmapDP.dat
├── con.0350
├── osplot.txt
├── con.0260
├── osmaps_ns.lst
├── osmaps_gu.lst
├── src
│ ├── OSPRES.INC
│ ├── getarg0.f
│ ├── ORRS.INC
│ ├── as2bi.f
│ ├── bi2as.f
│ ├── efu.f
│ ├── mconv.f
│ ├── osweep.f
│ ├── fscorr.f
│ ├── fsrun.f
│ ├── otest.f
│ ├── ncorr.f
│ ├── CMakeLists.txt
│ ├── pfplot.f
│ └── bi2bi.f
├── OSMAP1.INC
├── src1
│ └── ORRS.INC
├── CMakeLists.txt
├── osnew
│ ├── aimax.f
│ ├── ai.03
│ ├── ai.04
│ ├── ai.05
│ ├── ai.06
│ ├── ai.08
│ ├── ai.12
│ ├── ai.20
│ └── ai.35
├── u.gpl
├── a.gpl
├── bin
│ ├── Makefile_DP
│ └── Makefile
└── README
├── src
├── getarg.f
├── BLPAR.INC
├── p.ftnchek
├── XDES.INC
├── frplot0.f
├── x.ftnchek
├── PXPLOT.INC
├── PPLOT.INC
├── CIRCLE.INC
├── gui.f
├── PINDEX.INC
├── frplot.f
├── CMakeLists.txt
├── XBL.INC
├── xutils.f
└── ntcalc.f
├── README.md
├── runs
├── cp_500_080.lnv
├── cp_250_040.203
├── cp_100_040.387
├── cp_060_050.387
├── e387.dat
├── polref_100.387
├── dae51.dat
├── dae11.dat
├── dae21.dat
├── dae31.dat
├── lnv109a.dat
├── la203.dat
└── la203t.dat
├── osrc
├── getosfile.c
└── CMakeLists.txt
├── CTestConfig.cmake
├── xfoil-config.cmake.in
├── README
└── CMakeLists.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | pod-build
3 |
--------------------------------------------------------------------------------
/plotlib/version.inc:
--------------------------------------------------------------------------------
1 | C Version 4.47 12 Nov 07
2 |
3 |
--------------------------------------------------------------------------------
/orrs/osmap.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RobotLocomotion/xfoil/HEAD/orrs/osmap.dat
--------------------------------------------------------------------------------
/orrs/osmapDP.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RobotLocomotion/xfoil/HEAD/orrs/osmapDP.dat
--------------------------------------------------------------------------------
/src/getarg.f:
--------------------------------------------------------------------------------
1 |
2 | SUBROUTINE GETARG(K,ARG)
3 | CHARACTER*(*) ARG
4 | C
5 | CALL GETARG_(K,ARG)
6 | C
7 | RETURN
8 | END
9 |
10 |
--------------------------------------------------------------------------------
/plotlib/lines:
--------------------------------------------------------------------------------
1 | 600 gw_subs.f
2 | 300 plt_3D.f
3 | 1000 plt_base.f
4 | 600 plt_color.f
5 | 730 plt_font.f
6 | 1420 plt_old.f
7 | 900 plt_util.f
8 | 600 ps_subs.f
9 | 720 set_subs.f
10 | 20 util-ops.f
11 | 6890 TOTAL
12 |
--------------------------------------------------------------------------------
/src/BLPAR.INC:
--------------------------------------------------------------------------------
1 |
2 | COMMON /BLPAR/
3 | & SCCON,
4 | & GACON,
5 | & GBCON,
6 | & GCCON,
7 | & DLCON,
8 | & CTRCON,
9 | & CTRCEX,
10 | & DUXCON,
11 | & CTCON,
12 | & CFFAC
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Fork of XFOIL
2 | =============
3 |
4 | *Subsonic Airfoil Development System*
5 |
6 |
7 |
8 | ```
9 | $ mkdir build && cd build
10 | $ cmake ..
11 | $ make install
12 | ```
13 |
--------------------------------------------------------------------------------
/src/p.ftnchek:
--------------------------------------------------------------------------------
1 | ftnchek -common=1 -novice=2 -argument=1 -notruncation \
2 | -include=../plotlib \
3 | pplot.f polplt.f sort.f iopol.f userio.f \
4 | ../plotlib/plt_base.f \
5 | ../plotlib/plt_font.f \
6 | ../plotlib/plt_color.f \
7 | ../plotlib/plt_util.f
8 |
--------------------------------------------------------------------------------
/orrs/con.0350:
--------------------------------------------------------------------------------
1 | 0.1 -0.05 2 T
2 | 0. -1 3 T
3 | -0.005 -0.01 1 F
4 | -0.01 -0.01 2 T
5 | 999. 0 0 F
6 | 0.4 -0.1 3 T
7 | 0.15 -0.1 2 T
8 | 0.09 -0.01 1 F
9 | 0.05 -1 2 T
10 | 0.02 -0.01 1 T
11 | 0.005 -1 1 T
12 | 0.002 -0.001 1 T
13 | 999. 0 0 F
14 |
15 |
16 |
--------------------------------------------------------------------------------
/orrs/osplot.txt:
--------------------------------------------------------------------------------
1 | 0.1 -0.05 2 T
2 | 0. -1 3 T
3 | -0.005 -0.01 1 F
4 | -0.01 -0.01 2 T
5 | 999. 0 0 F
6 | 0.4 -0.1 3 T
7 | 0.15 -0.1 2 T
8 | 0.09 -0.01 1 F
9 | 0.05 -1 2 T
10 | 0.02 -0.01 1 T
11 | 0.005 -1 1 T
12 | 0.002 -0.001 1 T
13 | 999. 0 0 F
14 |
15 |
16 |
--------------------------------------------------------------------------------
/orrs/con.0260:
--------------------------------------------------------------------------------
1 | 0.1 -0.05 2 T
2 | 0.04 -0.01 1 F
3 | 0.01 -1 1 T
4 | 0. -1 3 T
5 | -0.001 -0.001 1 T
6 | 999. 0 0 F
7 | 0.4 -0.1 3 T
8 | 0.15 -0.1 2 T
9 | 0.09 -0.01 1 F
10 | 0.05 -1 2 T
11 | 0.02 -0.01 1 T
12 | 0.005 -1 1 T
13 | 0.002 -0.001 1 T
14 | 999. 0 0 F
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plotlib/plt.ftnchek:
--------------------------------------------------------------------------------
1 | # Command file for running ftnchek to "lint" the XPLOT11 fortran source
2 | #
3 | ftnchek -common=2 -novice=5 \
4 | plt_base.f plt_font.f plt_util.f plt_color.f \
5 | plt_old.f plt_3D.f\
6 | set_subs.f gw_subs.f ps_subs.f
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/orrs/osmaps_ns.lst:
--------------------------------------------------------------------------------
1 | osm.0220
2 | osm.0230
3 | osm.0240
4 | osm.0250
5 | osm.0260
6 | osm.0270
7 | osm.0280
8 | osm.0300
9 | osm.0320
10 | osm.0350
11 | osm.0400
12 | osm_ns.0500
13 | osm_ns.0600
14 | osm_ns.0800
15 | osm_ns.1000
16 | osm_ns.1200
17 | osm_ns.1500
18 | osm_ns.2000
19 |
--------------------------------------------------------------------------------
/src/XDES.INC:
--------------------------------------------------------------------------------
1 | C INCLUDE file for XFOIL design routines...
2 | C
3 | C---- Statement functions used to offset and scale all plots with blowups
4 | XMOD(XTMP) = XSF * (XTMP - XOFF)
5 | YMOD(YTMP) = YSF * (YTMP - YOFF)
6 | C
7 | YMODP(YTMP) = YSFP * (YTMP - YOFF)
8 | C
9 |
--------------------------------------------------------------------------------
/orrs/osmaps_gu.lst:
--------------------------------------------------------------------------------
1 | osm.0220
2 | osm.0230
3 | osm.0240
4 | osm.0250
5 | osm.0260
6 | osm.0270
7 | osm.0280
8 | osm.0300
9 | osm.0320
10 | osm.0350
11 | osm_gu.0400
12 | osm_gu.0500
13 | osm_gu.0600
14 | osm_gu.0800
15 | osm_gu.1000
16 | osm_gu.1200
17 | osm_gu.1500
18 | osm_gu.2000
19 |
--------------------------------------------------------------------------------
/src/frplot0.f:
--------------------------------------------------------------------------------
1 |
2 | SUBROUTINE FRPLOT(N,S,X,HK,TH,UE,VE,XTR,FREF,
3 | & XOFF,XSF, YOFF,YSF, CHF)
4 | DIMENSION S(N), X(N), HK(N), TH(N), UE(N), VE(N)
5 | C------------------------------------------------------------
6 | C Dummy FRPLOT routine
7 | C------------------------------------------------------------
8 | N = 0
9 | C
10 | RETURN
11 | END
12 |
--------------------------------------------------------------------------------
/plotlib/util-ops.f:
--------------------------------------------------------------------------------
1 | C--- Replacement functions for Fortran's that lack RSHIFT,LSHIFT,AND
2 | C Version 4.46 11/28/01
3 |
4 | INTEGER FUNCTION RSHIFT(I1,N)
5 | RSHIFT = ISHFT(I1,-N)
6 | RETURN
7 | END
8 |
9 | INTEGER FUNCTION LSHIFT(I1,N)
10 | LSHIFT = ISHFT(I1,N)
11 | RETURN
12 | END
13 |
14 | INTEGER FUNCTION AND(I1,I2)
15 | AND = IAND(I1,I2)
16 | RETURN
17 | END
18 |
--------------------------------------------------------------------------------
/orrs/src/OSPRES.INC:
--------------------------------------------------------------------------------
1 | PARAMETER (NMAX=2001,NRMAX=3)
2 | COMPLEX A,B,C,R, F0,F1, VT
3 | COMPLEX ALPHA
4 | C
5 | COMMON/OSP_CPX/
6 | & A(2,2,NMAX),B(2,2,NMAX),C(2,2,NMAX),R(2,NRMAX,NMAX),
7 | & F0(NMAX),F1(NMAX), VT(NMAX),
8 | & ALPHA
9 | COMMON/OSP_REL/
10 | & Y(NMAX),U(NMAX),
11 | & RLX,DFMAX,DFRMS, RESMAX,RESRMS
12 | COMMON/OSP_INT/
13 | & N, NRHS, ITER, ITMAX, IBC,ISOL
14 |
--------------------------------------------------------------------------------
/orrs/OSMAP1.INC:
--------------------------------------------------------------------------------
1 | PARAMETER (NR = 28,
2 | NW = 41,
3 | NH = 18 )
4 | REAL RL(NR), WL(NW), HL(NH)
5 | INTEGER IR1(NH), IR2(NH), IW1(NH), IW2(NH)
6 | REAL A(NR,NW,NH,2),
7 | AR(NR,NW,NH,2),
8 | AW(NR,NW,NH,2),
9 | AH(NR,NW,NH,2),
10 | ARW(NR,NW,NH,2),
11 | ARH(NR,NW,NH,2),
12 | AWH(NR,NW,NH,2),
13 | ARWH(NR,NW,NH,2)
14 | REAL RL01(90)
15 | EQUIVALENCE (RL( 1,RL01(1) )
16 |
--------------------------------------------------------------------------------
/src/x.ftnchek:
--------------------------------------------------------------------------------
1 | ftnchek -common=1 -novice=4 -arguments=all -notruncation \
2 | -include=../plotlib \
3 | -include=../osrc \
4 | xfoil.f xpanel.f xoper.f xtcam.f xgdes.f xqdes.f xmdes.f \
5 | xsolve.f xbl.f xblsys.f xpol.f xplots.f pntops.f xgeom.f \
6 | xutils.f modify.f blplot.f polplt.f aread.f naca.f spline.f \
7 | plutil.f iopol.f gui.f sort.f dplot.f profil.f userio.f \
8 | frplot.f ntcalc.f \
9 | ../osrc/osmap.f \
10 | ../plotlib/plt_base.f \
11 | ../plotlib/plt_font.f \
12 | ../plotlib/plt_color.f \
13 | ../plotlib/plt_util.f
14 |
--------------------------------------------------------------------------------
/orrs/src/getarg0.f:
--------------------------------------------------------------------------------
1 |
2 | SUBROUTINE GETARG0(IARG,ARG)
3 | C------------------------------------------------
4 | C Same as GETARG, but...
5 | C
6 | C ...in the case of Intel Fortran, this one
7 | C doesn't barf if there's no Unix argument
8 | C (just returns blank string instead)
9 | C------------------------------------------------
10 | CHARACTER*(*) ARG
11 | C
12 | NARG = IARGC()
13 | IF(NARG.GE.IARG) THEN
14 | CALL GETARG(IARG,ARG)
15 | ELSE
16 | ARG = ' '
17 | ENDIF
18 | C
19 | RETURN
20 | END ! GETARG0
21 |
--------------------------------------------------------------------------------
/orrs/src/ORRS.INC:
--------------------------------------------------------------------------------
1 | PARAMETER (NMAX=2001,NRMAX=3)
2 | COMPLEX A,B,C,R, F0,F1,F2,F3
3 | COMPLEX FNORM,IRE, ALPHA,DALPHA, OMEGA,DOMEGA, ALINIT,OMINIT
4 | COMPLEX FAC, FACSQ, FAC_AL, FAC_OM, FAC_RE
5 | C
6 | COMMON/OS_CPX/
7 | & A(4,4,NMAX),B(4,4,NMAX),C(4,4,NMAX),R(4,NRMAX,NMAX),
8 | & F0(NMAX),F1(NMAX),F2(NMAX),F3(NMAX),FNORM,
9 | & IRE,ALPHA,DALPHA, OMEGA,DOMEGA, ALINIT,OMINIT,
10 | & FAC, FACSQ, FAC_AL, FAC_OM, FAC_RE
11 | COMMON/OS_REL/
12 | & Y(NMAX),U(NMAX),UD(NMAX),
13 | & RLX,DFMAX,DFRMS, RESMAX,RESRMS
14 | COMMON/OS_INT/
15 | & LST, LRE, N, NRHS, ITER, ITMAX, IBC,ISOL
16 |
--------------------------------------------------------------------------------
/orrs/src1/ORRS.INC:
--------------------------------------------------------------------------------
1 | PARAMETER (NMAX=2001,NRMAX=3)
2 | COMPLEX A,B,C,R, F0,F1,F2,F3
3 | COMPLEX FNORM,IRE, ALPHA,DALPHA, OMEGA,DOMEGA, ALINIT,OMINIT
4 | COMPLEX FAC, FACSQ, FAC_AL, FAC_OM, FAC_RE
5 | C
6 | COMMON/OS_CPX/
7 | & A(4,4,NMAX),B(4,4,NMAX),C(4,4,NMAX),R(4,NRMAX,NMAX),
8 | & F0(NMAX),F1(NMAX),F2(NMAX),F3(NMAX),FNORM,
9 | & IRE,ALPHA,DALPHA, OMEGA,DOMEGA, ALINIT,OMINIT,
10 | & FAC, FACSQ, FAC_AL, FAC_OM, FAC_RE
11 | COMMON/OS_REL/
12 | & Y(NMAX),U(NMAX),UD(NMAX),
13 | & RLX,DFMAX,DFRMS, RESMAX,RESRMS
14 | COMMON/OS_INT/
15 | & LST, LRE, N, NRHS, ITER, ITMAX, IBC,ISOL
16 |
--------------------------------------------------------------------------------
/plotlib/win32/Readme-win32:
--------------------------------------------------------------------------------
1 |
2 | Make the plotlib under Windoze:
3 |
4 | You need Visual C and either the Compaq Visual Fortran compiler or the Intel
5 | Fortran compiler. You should check the options in Makefile.NT to ensure that
6 | they match your system. The supplied files match the Intel Fortran compiler.
7 |
8 | Compile and link with command in DOS window:
9 | C:\Xfoil\plotlib: cd win32
10 | C:\Xfoil\plotlib\win32: nmake /f Makefile.NT
11 |
12 | This places all the .obj files in the win32 directory and copies libPltxx.lib
13 | to the parent plotlib directory.
14 |
15 | Alternatively you could load all the files into a Visual Studio project and
16 | create the library that way.
17 |
--------------------------------------------------------------------------------
/runs/cp_500_080.lnv:
--------------------------------------------------------------------------------
1 | 1.000 0.055 | CL=1.234 (a=8 deg nominal) Re=500000
2 | 0.950 0.050
3 | 0.900 0.020
4 | 0.850 0.000
5 | 0.800 -.045
6 | 0.750 -.105
7 | 0.700 -.150
8 | 0.650 -.222
9 | 0.600 -.309
10 | 0.550 -.418
11 | 0.500 -.567
12 | 0.450 -.743
13 | 0.425 -.860
14 | 0.400 -1.216
15 | 0.375 -1.775
16 | 0.350 -1.784
17 | 0.325 -1.784
18 | 0.300 -1.870
19 | 0.275 -1.944
20 | 0.250 -2.022
21 | 0.225 -2.072
22 | 0.200 -2.111
23 | 0.150 -2.126
24 | 0.100 -2.063
25 | 0.075 -2.005
26 | 0.050 -1.946
27 | 0.025 -1.805
28 | 0.012 -1.171
29 | 0.000 0.202
30 | 0.012 0.750
31 | 0.025 0.486
32 | 0.050 0.414
33 | 0.075 0.400
34 | 0.100 0.408
35 | 0.150 0.400
36 | 0.200 0.395
37 | 0.300 0.336
38 | 0.400 0.371
39 | 0.500 0.357
40 | 0.600 0.332
41 | 0.700 0.250
42 | 0.800 0.211
43 | 0.900 0.152
44 | 0.950 0.077
45 |
--------------------------------------------------------------------------------
/runs/cp_250_040.203:
--------------------------------------------------------------------------------
1 | 1.000 0.088 | CL=1.08 (a=4 deg nominal) Re=250000
2 | 0.950 -.051
3 | 0.900 -.102
4 | 0.850 -.196
5 | 0.800 -.293
6 | 0.750 -.386
7 | 0.700 -.458
8 | 0.675 -.481
9 | 0.650 -.719
10 | 0.625 -1.098
11 | 0.600 -1.098
12 | 0.575 -1.098
13 | 0.550 -1.098
14 | 0.525 -1.098
15 | 0.500 -1.123
16 | 0.475 -1.146
17 | 0.450 -1.195
18 | 0.425 -1.244
19 | 0.400 -1.291
20 | 0.375 -1.344
21 | 0.350 -1.344
22 | 0.325 -1.363
23 | 0.300 -1.388
24 | 0.250 -1.388
25 | 0.200 -1.363
26 | 0.150 -1.342
27 | 0.100 -1.246
28 | 0.075 -1.195
29 | 0.050 -1.144
30 | 0.025 -1.007
31 | 0.012 -.811
32 | 0.000 0.760
33 | 0.012 0.430
34 | 0.025 0.140
35 | 0.050 0.189
36 | 0.075 0.189
37 | 0.100 0.189
38 | 0.150 0.189
39 | 0.200 0.160
40 | 0.300 0.163
41 | 0.400 0.140
42 | 0.500 0.139
43 | 0.600 0.189
44 | 0.700 0.212
45 | 0.800 0.212
46 | 0.850 0.237
47 | 0.900 0.330
48 | 0.950 0.430
49 |
--------------------------------------------------------------------------------
/osrc/getosfile.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | /* Handle various system requirements for trailing underscores, or other
6 | fortran-to-C interface shenanigans thru defines for routine names
7 | The provided set gives the option of setting a compile flag -DUNDERSCORE
8 | to include underscores on C routine name symbols */
9 |
10 | #ifdef UNDERSCORE
11 |
12 | #define GETOSFILE getosfile_
13 |
14 | #endif
15 |
16 | void
17 | GETOSFILE(osfile,len)
18 | char *osfile;
19 | int *len;
20 | {
21 | char *bufp;
22 | int l;
23 |
24 | /* get environment variable OSMAP for location of OS map data file */
25 | bufp = getenv("OSMAP");
26 |
27 | /* printf("bufp: %s\n",bufp);
28 | printf("osfile: %s\n",osfile); */
29 |
30 | if(bufp){
31 | strcpy(osfile,bufp);
32 | l = strlen(bufp);
33 | }
34 | else {
35 | l = 0;
36 | }
37 |
38 | *len = l;
39 |
40 | /* printf("len %d\n",*len); */
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/plotlib/misc/README:
--------------------------------------------------------------------------------
1 | This directory contains random, outdated but potentially useful info or
2 | Makefiles.
3 |
4 | You may need to read through these and change things substantially to get them working on your machine. They may be of some help.
5 |
6 | makesplitlib Script for making a libPlt.a with each routine in a separate
7 | object file. This may be necessary if you want to change
8 | particular subroutines within the plotlib with your own
9 | versions and get them to link. The current library archives
10 | all the routines within a source file into one linkable entity.
11 |
12 | Makefile.linux.shared This makefile was used to make a shared object (ELF)
13 | library for Linux. If you know what this means I don't
14 | really need to tell you more.
15 |
16 | Readme.absoft Discusses the quirks of the Absoft Fortran compiler(s). The
17 | Linux versions were the ones specifically addressed here.
18 |
--------------------------------------------------------------------------------
/src/PXPLOT.INC:
--------------------------------------------------------------------------------
1 | C
2 | PARAMETER (NAX = 80, NX=132, NXB=250, NFX=500)
3 | IMPLICIT REAL(M)
4 | CHARACTER*8 CODE
5 | CHARACTER*32 NAME
6 | LOGICAL LREF, LFORCE, LMACH, LISES, LCLFIX, LALFIX, LPLOT
7 | INTEGER MATYP,RETYP
8 | C
9 | COMMON/COMI/
10 | & IDEV, IDEVRP, IPSLU, N, NAPLT, NA, MATYP, RETYP,
11 | & LREF, LFORCE, LMACH, LISES, LCLFIX, LALFIX, LPLOT,
12 | & IAPLT(NAX), NF,
13 | & II(2,NAX), IIB,
14 | & ILE(2,NAX),ITE(2,NAX),
15 | & ITRAN(2,NAX),
16 | & CODE,
17 | & NAME
18 |
19 | C
20 | COMMON/COMR/
21 | & SIZE, SCRNFR,
22 | & CLMIN, CLMAX, CDMIN, CDMAX, CMMIN, CMMAX,
23 | & MACH, REYN, ACRIT, GAM,GM1,CPSTAR(NAX),
24 | & MA(NAX),ALFA(NAX),CL(NAX),CD(NAX),CDI(NAX),CM(NAX),
25 | & APLT(NAX),
26 | & XTR(2,NAX),
27 | & XF(NFX),MF(NFX),
28 | & XB(NXB), YB(NXB),
29 | & X(NX,2,NAX),CP(NX,2,NAX),
30 | & THET(NX,2,NAX),DSTR(NX,2,NAX),CF(NX,2,NAX),CTAU(NX,2,NAX),
31 | & VERSION
32 |
33 | C
34 |
--------------------------------------------------------------------------------
/orrs/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # Orr-Sommerfeld Computation and Database Package
4 | #
5 | # Copyright (C) 2000 Mark Drela
6 | #
7 | # This program is free software; you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation; either version 2 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program; if not, write to the Free Software
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | add_subdirectory(src)
24 |
--------------------------------------------------------------------------------
/orrs/osnew/aimax.f:
--------------------------------------------------------------------------------
1 |
2 | PARAMETER (NHX=8, NRX=40)
3 | DIMENSION H(NHX), R(0:NRX)
4 | CHARACTER*5 HNAME(NHX)
5 | LOGICAL OK
6 | C
7 | DATA H / 3.0, 3.5, 4.0, 5.0, 6.0, 8.0, 12.0, 20.0 /
8 | DATA HNAME / 'ai.03' ,
9 | & 'ai.35' ,
10 | & 'ai.04' ,
11 | & 'ai.05' ,
12 | & 'ai.06' ,
13 | & 'ai.08' ,
14 | & 'ai.12' ,
15 | & 'ai.20' /
16 | C
17 | FSP = 0.08
18 | C
19 | DO IR=0, NRX
20 | R(IR) = 10.0 ** (FLOAT(IR)/10.0)
21 | ENDDO
22 | C
23 | DO IH = 1, NHX
24 | C
25 | OPEN(1,FILE=HNAME(IH),STATUS='unknown')
26 | WRITE(1,1000) '#', H(IH)
27 | 1000 FORMAT(A, F10.5)
28 | C
29 | DO IR=1, NRX
30 | CALL OSHAI(R(IR),FSP,H(IH), AI,
31 | & AI_R, AI_F, AI_H,
32 | & AIF_R,AIF_F,AIF_H , OK)
33 | C
34 | WRITE(1,1200) LOG10(R(IR)), -AI
35 | 1200 FORMAT(1X,F10.5, F12.6)
36 | C
37 | ENDDO
38 | CLOSE(1)
39 | ENDDO
40 | C
41 | STOP
42 | END
43 |
44 |
--------------------------------------------------------------------------------
/runs/cp_100_040.387:
--------------------------------------------------------------------------------
1 | # Langley Cp data
2 | 0.950 0.0451 | CL=0.778 (a=4 deg nominal) Re=100000
3 | 0.900 -.0008
4 | 0.850 -.0410
5 | 0.800 -.1223
6 | 0.750 -.3670
7 | 0.700 -.6230
8 | 0.650 -.6383
9 | 0.600 -.6343
10 | 0.550 -.6327
11 | 0.500 -.6351
12 | 0.450 -.6557
13 | 0.400 -.6849
14 | 0.350 -.7470
15 | 0.300 -.8061
16 | 0.250 -.8481
17 | 0.200 -.8876
18 | 0.150 -.9254
19 | 0.100 -.9656
20 | 0.075 -.9831
21 | 0.060 -.9826
22 | 0.050 -.9700
23 | 0.040 -.9659
24 | 0.030 -.9529
25 | 0.025 -.9409
26 | 0.020 -.9137
27 | 0.015 -.8654
28 | 0.010 -.8129
29 | 0.005 -.6744
30 | 0.0 0.6121
31 | 0.950 0.1352
32 | 0.900 0.1558
33 | 0.850 0.1623
34 | 0.800 0.1692
35 | 0.750 0.1688
36 | 0.700 0.1743
37 | 0.650 0.1755
38 | 0.600 0.1795
39 | 0.550 0.1787
40 | 0.500 0.1851
41 | 0.450 0.1902
42 | 0.400 0.1894
43 | 0.350 0.1963
44 | 0.300 0.1978
45 | 0.250 0.1970
46 | 0.200 0.2121
47 | 0.150 0.2204
48 | 0.100 0.2585
49 | 0.075 0.2879
50 | 0.060 0.3143
51 | 0.050 0.3489
52 | 0.040 0.3891
53 | 0.031 0.4545
54 | 0.025 0.4966
55 | 0.020 0.5466
56 | 0.015 0.6190
57 | 0.010 0.7428
58 | 0.005 0.9269
59 |
--------------------------------------------------------------------------------
/orrs/osnew/ai.03:
--------------------------------------------------------------------------------
1 | # 3.00000
2 | 0.10000 0.000000
3 | 0.20000 0.000000
4 | 0.30000 0.000000
5 | 0.40000 0.000000
6 | 0.50000 0.000000
7 | 0.60000 0.000000
8 | 0.70000 0.000000
9 | 0.80000 0.000000
10 | 0.90000 0.000000
11 | 1.00000 -0.017903
12 | 1.10000 -0.031943
13 | 1.20000 -0.024618
14 | 1.30000 -0.017929
15 | 1.40000 -0.011872
16 | 1.50000 -0.006436
17 | 1.60000 -0.001662
18 | 1.70000 0.002402
19 | 1.80000 0.005668
20 | 1.90000 0.008060
21 | 2.00000 0.009500
22 | 2.10000 0.009971
23 | 2.20000 0.009600
24 | 2.30000 0.008722
25 | 2.40000 0.007926
26 | 2.50000 0.007605
27 | 2.60000 0.007698
28 | 2.70000 0.007942
29 | 2.80000 0.008139
30 | 2.90000 0.008243
31 | 3.00000 0.008300
32 | 3.10000 0.008342
33 | 3.20000 0.008377
34 | 3.30000 0.008403
35 | 3.40000 0.008423
36 | 3.50000 0.008437
37 | 3.60000 0.008447
38 | 3.70000 0.008453
39 | 3.80000 0.008458
40 | 3.90000 0.008455
41 | 4.00000 0.008462
42 |
--------------------------------------------------------------------------------
/orrs/osnew/ai.04:
--------------------------------------------------------------------------------
1 | # 4.00000
2 | 0.10000 0.000000
3 | 0.20000 0.000000
4 | 0.30000 -0.045616
5 | 0.40000 -0.072157
6 | 0.50000 -0.076096
7 | 0.60000 -0.063066
8 | 0.70000 -0.050873
9 | 0.80000 -0.039507
10 | 0.90000 -0.028902
11 | 1.00000 -0.019070
12 | 1.10000 -0.009993
13 | 1.20000 -0.001709
14 | 1.30000 0.005759
15 | 1.40000 0.012335
16 | 1.50000 0.017959
17 | 1.60000 0.022557
18 | 1.70000 0.026117
19 | 1.80000 0.028692
20 | 1.90000 0.030455
21 | 2.00000 0.031688
22 | 2.10000 0.032671
23 | 2.20000 0.033585
24 | 2.30000 0.034462
25 | 2.40000 0.035256
26 | 2.50000 0.035934
27 | 2.60000 0.036497
28 | 2.70000 0.036966
29 | 2.80000 0.037363
30 | 2.90000 0.037699
31 | 3.00000 0.037984
32 | 3.10000 0.038227
33 | 3.20000 0.038435
34 | 3.30000 0.038613
35 | 3.40000 0.038765
36 | 3.50000 0.038897
37 | 3.60000 0.039010
38 | 3.70000 0.039108
39 | 3.80000 0.039194
40 | 3.90000 0.039259
41 | 4.00000 0.039333
42 |
--------------------------------------------------------------------------------
/orrs/osnew/ai.05:
--------------------------------------------------------------------------------
1 | # 5.00000
2 | 0.10000 0.000000
3 | 0.20000 0.000000
4 | 0.30000 -0.035565
5 | 0.40000 -0.056631
6 | 0.50000 -0.059176
7 | 0.60000 -0.047099
8 | 0.70000 -0.035374
9 | 0.80000 -0.024148
10 | 0.90000 -0.013455
11 | 1.00000 -0.003423
12 | 1.10000 0.005877
13 | 1.20000 0.014292
14 | 1.30000 0.021737
15 | 1.40000 0.028082
16 | 1.50000 0.033325
17 | 1.60000 0.037506
18 | 1.70000 0.040818
19 | 1.80000 0.043490
20 | 1.90000 0.045754
21 | 2.00000 0.047733
22 | 2.10000 0.049483
23 | 2.20000 0.050991
24 | 2.30000 0.052270
25 | 2.40000 0.053338
26 | 2.50000 0.054237
27 | 2.60000 0.054992
28 | 2.70000 0.055638
29 | 2.80000 0.056182
30 | 2.90000 0.056645
31 | 3.00000 0.057036
32 | 3.10000 0.057377
33 | 3.20000 0.057658
34 | 3.30000 0.057886
35 | 3.40000 0.058088
36 | 3.50000 0.058270
37 | 3.60000 0.058424
38 | 3.70000 0.058558
39 | 3.80000 0.058674
40 | 3.90000 0.058761
41 | 4.00000 0.029657
42 |
--------------------------------------------------------------------------------
/orrs/osnew/ai.06:
--------------------------------------------------------------------------------
1 | # 6.00000
2 | 0.10000 0.000000
3 | 0.20000 0.000000
4 | 0.30000 -0.026478
5 | 0.40000 -0.042037
6 | 0.50000 -0.042541
7 | 0.60000 -0.030784
8 | 0.70000 -0.019257
9 | 0.80000 -0.008244
10 | 0.90000 0.002164
11 | 1.00000 0.011745
12 | 1.10000 0.020394
13 | 1.20000 0.027935
14 | 1.30000 0.034371
15 | 1.40000 0.039707
16 | 1.50000 0.044126
17 | 1.60000 0.047792
18 | 1.70000 0.050916
19 | 1.80000 0.053598
20 | 1.90000 0.055923
21 | 2.00000 0.057898
22 | 2.10000 0.059567
23 | 2.20000 0.060952
24 | 2.30000 0.062112
25 | 2.40000 0.063076
26 | 2.50000 0.063888
27 | 2.60000 0.064563
28 | 2.70000 0.065131
29 | 2.80000 0.065604
30 | 2.90000 0.066007
31 | 3.00000 0.066343
32 | 3.10000 0.066629
33 | 3.20000 0.066873
34 | 3.30000 0.067092
35 | 3.40000 0.067271
36 | 3.50000 0.067425
37 | 3.60000 0.067554
38 | 3.70000 0.067667
39 | 3.80000 0.067763
40 | 3.90000 0.067829
41 | 4.00000 0.034194
42 |
--------------------------------------------------------------------------------
/orrs/osnew/ai.08:
--------------------------------------------------------------------------------
1 | # 8.00000
2 | 0.10000 0.000000
3 | 0.20000 0.000000
4 | 0.30000 -0.013930
5 | 0.40000 -0.021765
6 | 0.50000 -0.019454
7 | 0.60000 -0.008320
8 | 0.70000 0.002531
9 | 0.80000 0.012597
10 | 0.90000 0.021788
11 | 1.00000 0.029866
12 | 1.10000 0.036913
13 | 1.20000 0.042906
14 | 1.30000 0.048076
15 | 1.40000 0.052465
16 | 1.50000 0.056267
17 | 1.60000 0.059480
18 | 1.70000 0.062228
19 | 1.80000 0.064506
20 | 1.90000 0.066423
21 | 2.00000 0.067988
22 | 2.10000 0.069302
23 | 2.20000 0.070369
24 | 2.30000 0.071270
25 | 2.40000 0.071997
26 | 2.50000 0.072614
27 | 2.60000 0.073109
28 | 2.70000 0.073536
29 | 2.80000 0.073875
30 | 2.90000 0.074172
31 | 3.00000 0.074406
32 | 3.10000 0.074619
33 | 3.20000 0.074777
34 | 3.30000 0.074925
35 | 3.40000 0.075036
36 | 3.50000 0.075146
37 | 3.60000 0.075224
38 | 3.70000 0.075306
39 | 3.80000 0.075361
40 | 3.90000 0.075398
41 | 4.00000 0.038600
42 |
--------------------------------------------------------------------------------
/orrs/osnew/ai.12:
--------------------------------------------------------------------------------
1 | # 12.00000
2 | 0.10000 0.000000
3 | 0.20000 0.000000
4 | 0.30000 -0.002317
5 | 0.40000 -0.003857
6 | 0.50000 -0.000153
7 | 0.60000 0.009575
8 | 0.70000 0.018930
9 | 0.80000 0.027575
10 | 0.90000 0.035517
11 | 1.00000 0.042607
12 | 1.10000 0.048967
13 | 1.20000 0.054418
14 | 1.30000 0.059196
15 | 1.40000 0.063140
16 | 1.50000 0.066545
17 | 1.60000 0.069289
18 | 1.70000 0.071645
19 | 1.80000 0.073514
20 | 1.90000 0.075111
21 | 2.00000 0.076364
22 | 2.10000 0.077431
23 | 2.20000 0.078263
24 | 2.30000 0.078972
25 | 2.40000 0.079522
26 | 2.50000 0.079991
27 | 2.60000 0.080354
28 | 2.70000 0.080664
29 | 2.80000 0.080900
30 | 2.90000 0.081107
31 | 3.00000 0.081264
32 | 3.10000 0.081403
33 | 3.20000 0.081507
34 | 3.30000 0.081605
35 | 3.40000 0.081678
36 | 3.50000 0.081751
37 | 3.60000 0.081790
38 | 3.70000 0.081848
39 | 3.80000 0.081865
40 | 3.90000 0.081891
41 | 4.00000 0.042113
42 |
--------------------------------------------------------------------------------
/orrs/osnew/ai.20:
--------------------------------------------------------------------------------
1 | # 20.00000
2 | 0.10000 0.000000
3 | 0.20000 0.000000
4 | 0.30000 0.001427
5 | 0.40000 0.000535
6 | 0.50000 0.003635
7 | 0.60000 0.012194
8 | 0.70000 0.020498
9 | 0.80000 0.028287
10 | 0.90000 0.035403
11 | 1.00000 0.041808
12 | 1.10000 0.047433
13 | 1.20000 0.052327
14 | 1.30000 0.056500
15 | 1.40000 0.060038
16 | 1.50000 0.062994
17 | 1.60000 0.065447
18 | 1.70000 0.067473
19 | 1.80000 0.069122
20 | 1.90000 0.070478
21 | 2.00000 0.071559
22 | 2.10000 0.072453
23 | 2.20000 0.073148
24 | 2.30000 0.073732
25 | 2.40000 0.074172
26 | 2.50000 0.074553
27 | 2.60000 0.074827
28 | 2.70000 0.075076
29 | 2.80000 0.075243
30 | 2.90000 0.075408
31 | 3.00000 0.075506
32 | 3.10000 0.075617
33 | 3.20000 0.075673
34 | 3.30000 0.075749
35 | 3.40000 0.075778
36 | 3.50000 0.075832
37 | 3.60000 0.075844
38 | 3.70000 0.075884
39 | 3.80000 0.075871
40 | 3.90000 0.075910
41 | 4.00000 0.037105
42 |
--------------------------------------------------------------------------------
/orrs/osnew/ai.35:
--------------------------------------------------------------------------------
1 | # 3.50000
2 | 0.10000 0.000000
3 | 0.20000 0.000000
4 | 0.30000 -0.052114
5 | 0.40000 -0.081982
6 | 0.50000 -0.086619
7 | 0.60000 -0.073012
8 | 0.70000 -0.060654
9 | 0.80000 -0.049327
10 | 0.90000 -0.038870
11 | 1.00000 -0.029234
12 | 1.10000 -0.020363
13 | 1.20000 -0.012245
14 | 1.30000 -0.004857
15 | 1.40000 0.001771
16 | 1.50000 0.007606
17 | 1.60000 0.012576
18 | 1.70000 0.016625
19 | 1.80000 0.019700
20 | 1.90000 0.021815
21 | 2.00000 0.023084
22 | 2.10000 0.023744
23 | 2.20000 0.024142
24 | 2.30000 0.024545
25 | 2.40000 0.025041
26 | 2.50000 0.025572
27 | 2.60000 0.026053
28 | 2.70000 0.026446
29 | 2.80000 0.026765
30 | 2.90000 0.027028
31 | 3.00000 0.027250
32 | 3.10000 0.027438
33 | 3.20000 0.027596
34 | 3.30000 0.027732
35 | 3.40000 0.027847
36 | 3.50000 0.027944
37 | 3.60000 0.028027
38 | 3.70000 0.028098
39 | 3.80000 0.028160
40 | 3.90000 0.028206
41 | 4.00000 0.028260
42 |
--------------------------------------------------------------------------------
/runs/cp_060_050.387:
--------------------------------------------------------------------------------
1 | 0.950 -0.0370 | CL=0.838 (a=5 deg nominal) Re=60000
2 | 0.900 -0.1214
3 | 0.850 -0.2418
4 | 0.800 -0.4137
5 | 0.750 -0.5977
6 | 0.700 -0.6307
7 | 0.650 -0.6126
8 | 0.600 -0.6075
9 | 0.550 -0.5985
10 | 0.500 -0.5990
11 | 0.450 -0.6124
12 | 0.400 -0.6330
13 | 0.350 -0.6652
14 | 0.300 -0.7310
15 | 0.250 -0.8065
16 | 0.200 -0.8648
17 | 0.150 -0.9291
18 | 0.100 -1.0042
19 | 0.075 -1.0262
20 | 0.060 -1.0360
21 | 0.050 -1.0463
22 | 0.040 -1.0469
23 | 0.030 -1.0311
24 | 0.025 -1.0353
25 | 0.020 -1.0571
26 | 0.015 -1.0064
27 | 0.010 -0.9906
28 | 0.005 -0.8359
29 | 0.0 0.4274
30 | 0.950 0.1178
31 | 0.900 0.1461
32 | 0.850 0.1603
33 | 0.800 0.1754
34 | 0.750 0.1786
35 | 0.700 0.1837
36 | 0.650 0.1912
37 | 0.600 0.1977
38 | 0.550 0.1983
39 | 0.500 0.2044
40 | 0.450 0.2144
41 | 0.400 0.2156
42 | 0.350 0.2243
43 | 0.300 0.2354
44 | 0.250 0.2380
45 | 0.200 0.2570
46 | 0.150 0.2817
47 | 0.100 0.3200
48 | 0.075 0.3595
49 | 0.060 0.3932
50 | 0.050 0.4291
51 | 0.040 0.4701
52 | 0.031 0.5370
53 | 0.025 0.5845
54 | 0.020 0.6551
55 | 0.015 0.7133
56 | 0.010 0.8403
57 | 0.005 0.9710
58 |
--------------------------------------------------------------------------------
/orrs/src/as2bi.f:
--------------------------------------------------------------------------------
1 | PROGRAM AS2BI
2 | C-------------------------------------------------------
3 | C Converts a set of ASCII OS data files
4 | C into the equivalent binary OS data files.
5 | C The files to be converted are listed
6 | C in a text file given as the argument.
7 | C The ASCII files are assumed to end with "dat".
8 | C The binary files are assumed to end with "bin".
9 | C-------------------------------------------------------
10 | PARAMETER (NMAX=257,NRX=101,NWX=91,NHX=21)
11 | REAL ETA(NMAX,NHX), U(NMAX,NHX), S(NMAX,NHX)
12 | REAL AR(NRX,NWX,NHX), AI(NRX,NWX,NHX)
13 | REAL RTL(NRX,NHX)
14 | REAL WSL(NWX,NHX)
15 | REAL HH(NHX)
16 | INTEGER N(NHX), NRP(NHX), NWP(NHX)
17 | CHARACTER*80 ARGP
18 | C
19 | CALL GETARG(1,ARGP)
20 | C
21 | CALL READOS(ARGP,1,
22 | & N,NMAX,ETA,U,S,
23 | & NRP,NWP,NHP,
24 | & RTL,WSL,HH , AR,AI,
25 | & NRX,NWX,NHX)
26 | C
27 | CALL WRITOS(ARGP,0,
28 | & N,NMAX,ETA,U,S,
29 | & NRP,NWP,NHP,
30 | & RTL,WSL,HH , AR,AI,
31 | & NRX,NWX,NHX)
32 | C
33 | STOP
34 | END
35 |
36 |
--------------------------------------------------------------------------------
/orrs/src/bi2as.f:
--------------------------------------------------------------------------------
1 | PROGRAM BI2AS
2 | C-------------------------------------------------------
3 | C Converts a set of binary OS data files
4 | C into the equivalent ASCII OS data files.
5 | C The files to be converted are listed
6 | C in a text file given as the argument.
7 | C The binary files are assumed to end with "bin".
8 | C The ASCII files are assumed to end with "dat".
9 | C-------------------------------------------------------
10 | PARAMETER (NMAX=257,NRX=101,NWX=91,NHX=21)
11 | REAL ETA(NMAX,NHX), U(NMAX,NHX), S(NMAX,NHX)
12 | REAL AR(NRX,NWX,NHX), AI(NRX,NWX,NHX)
13 | REAL RTL(NRX,NHX)
14 | REAL WSL(NWX,NHX)
15 | REAL HH(NHX)
16 | INTEGER N(NHX), NRP(NHX), NWP(NHX)
17 | CHARACTER*80 ARGP
18 | C
19 | CALL GETARG(1,ARGP)
20 | C
21 | CALL READOS(ARGP,0,
22 | & N,NMAX,ETA,U,S,
23 | & NRP,NWP,NHP,
24 | & RTL,WSL,HH , AR,AI,
25 | & NRX,NWX,NHX)
26 | C
27 | CALL WRITOS(ARGP,1,
28 | & N,NMAX,ETA,U,S,
29 | & NRP,NWP,NHP,
30 | & RTL,WSL,HH , AR,AI,
31 | & NRX,NWX,NHX)
32 | C
33 | STOP
34 | END
35 |
36 |
37 |
--------------------------------------------------------------------------------
/CTestConfig.cmake:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # XFOIL
4 | #
5 | # Copyright (C) 2000 Mark Drela
6 | #
7 | # This program is free software; you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation; either version 2 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program; if not, write to the Free Software
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | set(CTEST_PROJECT_NAME xfoil)
24 | set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
25 | set(CTEST_DROP_METHOD https)
26 | set(CTEST_DROP_SITE drake-cdash.csail.mit.edu)
27 | set(CTEST_DROP_LOCATION /submit.php?project=${CTEST_PROJECT_NAME})
28 | set(CTEST_DROP_SITE_CDASH ON)
29 |
--------------------------------------------------------------------------------
/osrc/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # XFOIL
4 | #
5 | # Copyright (C) 2000 Mark Drela
6 | #
7 | # This program is free software; you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation; either version 2 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program; if not, write to the Free Software
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | set(GETOSFILE_SRCS getosfile.c)
24 | add_library(getosfile OBJECT ${GETOSFILE_SRCS})
25 | target_compile_definitions(getosfile PRIVATE UNDERSCORE)
26 |
27 | set(OSMAP_SRCS osmap.f)
28 | add_library(osmap OBJECT ${OSMAP_SRCS})
29 | target_compile_definitions(osmap PRIVATE "OSFILE_DIR=${ORRS_DIR}")
30 |
--------------------------------------------------------------------------------
/orrs/src/efu.f:
--------------------------------------------------------------------------------
1 |
2 | PROGRAM EFU
3 | PARAMETER(NX=2001)
4 | DIMENSION Y(NX), S(NX), U(NX), F(NX)
5 | C
6 | PI = 4.0*ATAN(1.0)
7 | C
8 | YWALL = -4.8
9 |
10 | YMAX = 40.0
11 | C
12 | N = NX
13 | C
14 | DO I=1, N
15 | Y(I) = YMAX*FLOAT(I-1)/FLOAT(N-1)
16 | ENDDO
17 | C
18 | DO I = 1, N
19 | S(I) = EXP(-(Y(I)+YWALL)**2)
20 | ENDDO
21 | C
22 | I = 1
23 | U(I) = 0.
24 | F(I) = 0.
25 | DO I = 2, N
26 | DY = Y(I) - Y(I-1)
27 | U(I) = U(I-1) + 0.5*(S(I)+S(I-1))*DY
28 | F(I) = F(I-1) + 0.5*(U(I)+U(I-1))*DY
29 | ENDDO
30 | SMAX = 1.0
31 | C
32 | UE = U(N)
33 | DO I = 1, N
34 | F(I) = F(I)/UE
35 | U(I) = U(I)/UE
36 | S(I) = S(I)/UE
37 | ENDDO
38 | SMAX = SMAX/UE
39 | C
40 | DSUM = 0.
41 | TSUM = 0.
42 | ESUM = 0.
43 | DO I = 2, N
44 | DY = Y(I) - Y(I-1)
45 | UA = (U(I) + U(I-1))*0.5
46 | DSUM = DSUM + (1.0 - UA ) *DY
47 | TSUM = TSUM + (1.0 - UA )*UA*DY
48 | ESUM = ESUM + (1.0 - UA**2)*UA*DY
49 | ENDDO
50 | C
51 | WRITE(*,*) N, DSUM/TSUM, 1.0/(SMAX*TSUM)
52 | DO I = 1, N
53 | WRITE(*,*) Y(I)/TSUM, U(I), S(I)*TSUM
54 | ENDDO
55 | C
56 | STOP
57 | END
58 |
--------------------------------------------------------------------------------
/xfoil-config.cmake.in:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # XFOIL
4 | #
5 | # Copyright (C) 2000 Mark Drela
6 | #
7 | # This program is free software; you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation; either version 2 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program; if not, write to the Free Software
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | @PACKAGE_INIT@
24 |
25 | set(XFOIL_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
26 | set(XFOIL_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
27 | set(XFOIL_VERSION "@PROJECT_VERSION@")
28 |
29 | set(XFOIL_FOUND TRUE)
30 | set(XFOIL_EXECUTABLE "@PACKAGE_CMAKE_INSTALL_BINDIR@/$")
31 |
32 | include("${CMAKE_CURRENT_LIST_DIR}/xfoil-targets.cmake")
33 |
--------------------------------------------------------------------------------
/plotlib/sym/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # Xplot11 Graphics Package
4 | #
5 | # Copyright (C) 1996 Harold Youngren, Mark Drela
6 | #
7 | # This library is free software; you can redistribute it and/or
8 | # modify it under the terms of the GNU Library General Public
9 | # License as published by the Free Software Foundation; either
10 | # version 2 of the License, or (at your option) any later version.
11 | #
12 | # This library is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | # Library General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Library General Public
18 | # License along with this library; if not, write to the Free
19 | # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | add_executable(symgen symgen.f)
24 | target_link_libraries(symgen plt)
25 |
26 | if(BUILD_TESTING)
27 | add_executable(plt_font_test test.f)
28 | set_target_properties(plt_font_test PROPERTIES OUTPUT_NAME test)
29 | target_link_libraries(plt_font_test plt)
30 | add_test(NAME plt_font_test COMMAND plt_font_test)
31 | endif()
32 |
--------------------------------------------------------------------------------
/orrs/src/mconv.f:
--------------------------------------------------------------------------------
1 | PROGRAM MAPGEN
2 | PARAMETER (NMAX=257,NRX=81,NWX=81)
3 | REAL ETA(NMAX), F(NMAX), U(NMAX), S(NMAX)
4 | LOGICAL*1 FNAME(32)
5 | REAL AR(NRX,NWX), AI(NRX,NWX), X(NRX,NWX), Y(NRX,NWX)
6 | REAL RT(NRX),RTL(NRX), WS(NWX),WSL(NWX)
7 | CHARACTER*1 ANS
8 | C
9 | READ(19) N, H
10 | READ(19) (ETA(I),I=1, N)
11 | READ(19) (U(I) ,I=1, N)
12 | READ(19) (S(I) ,I=1, N)
13 | READ(19) NRP, NWP
14 | READ(19) (RTL(IR),IR=1,NRP)
15 | READ(19) (WSL(IW),IW=1,NWP)
16 | C
17 | DO 10 IW=NWP, 1, -1
18 | DO 101 IR=1, NRP
19 | READ(19,END=11) AR(IR,IW), AI(IR,IW)
20 | 101 CONTINUE
21 | 10 CONTINUE
22 | 11 CONTINUE
23 | C
24 | C
25 | GEO = (ETA(3)-ETA(2)) / (ETA(2)-ETA(1))
26 | ETAE = ETA(N)
27 | C
28 | CCC CALL FS(3,2,BU,H,N,ETAE,GEO,ETA,F,U,S)
29 | C
30 | WRITE(6,*) 'GEO =', GEO, ' ETAE =', ETAE
31 | WRITE(6,*) 'H =', H , ' N =', N
32 | C
33 | WRITE(29) N, H
34 | WRITE(29) (ETA(I),I=1, N)
35 | WRITE(29) (U(I) ,I=1, N)
36 | WRITE(29) (S(I) ,I=1, N)
37 | WRITE(29) NRP, NWP
38 | WRITE(29) (RTL(IR),IR=1,NRP)
39 | WRITE(29) (WSL(IW),IW=1,NWP)
40 | C
41 | DO 20 IW=1, NWP
42 | WRITE(29) (AR(IR,IW),IR=1,NRP)
43 | WRITE(29) (AI(IR,IW),IR=1,NRP)
44 | 20 CONTINUE
45 | C
46 | STOP
47 | END
48 |
49 |
--------------------------------------------------------------------------------
/plotlib/colorstuff/rgbtest.c:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include "rgbtbl.h"
7 |
8 | main(argc,argv)
9 | char **argv;
10 | int argc;
11 | {
12 |
13 | int IC,ic,ncols;
14 | int i,n,ired,igrn,iblu;
15 | char teststr[50], c;
16 |
17 | IC = sizeof(Colordef);
18 | ic = sizeof(colordef);
19 | ncols = ic/IC;
20 |
21 | printf("Colordef %d\n",IC);
22 | printf("colordef %d\n",ic);
23 | printf("#entries %d\n",ncols);
24 |
25 | printf("\nEnter color string: ");
26 |
27 | /*if ((c=fgetc(stdin)) != '\n')
28 | ungetc(c,stdin); */
29 |
30 | fgets(teststr,50,stdin);
31 | printf("strlen = %d\n",strlen(teststr));
32 |
33 | if ((n=strlen(teststr)) != 0) {
34 | while(n > 0 && teststr[--n] == '\n')
35 | teststr[n] = '\0'; }
36 |
37 | /*fscanf(stdin,"%s",teststr);*/
38 | printf("\nTest string = %s\n",teststr);
39 |
40 | for (i=0; i < ncols; i++) {
41 | if(!strcasecmp(colordef[i].name,teststr)) {
42 |
43 | printf("test string %s found at %d\n",teststr,i);
44 | printf("found string %s code %d\n",colordef[i].name,colordef[i].rgb);
45 |
46 | ired = 0x000000ff & (colordef[i].rgb >> 16);
47 | igrn = 0x000000ff & (colordef[i].rgb >> 8);
48 | iblu = 0x000000ff & (colordef[i].rgb);
49 |
50 | printf("red = %d\ngrn = %d\nblu = %d\n",ired,igrn,iblu);
51 | }
52 | }
53 |
54 | }
55 |
56 |
57 |
--------------------------------------------------------------------------------
/orrs/src/osweep.f:
--------------------------------------------------------------------------------
1 | PROGRAM OSWEEP
2 | LOGICAL OK
3 | C
4 | WRITE(*,*) 'Enter Rth1, w1, H1'
5 | READ (*,*) RSP1, WSP1, HSP1
6 | IF(RSP1.EQ.0.0) STOP
7 | C
8 | WRITE(*,*) 'Enter Rth2, w2, H2'
9 | READ (*,*) RSP2, WSP2, HSP2
10 | IF(RSP2.EQ.0.0) STOP
11 | C
12 | RLSP1 = LOG10(RSP1)
13 | RLSP2 = LOG10(RSP2)
14 | C
15 | WLSP1 = LOG10(WSP1)
16 | WLSP2 = LOG10(WSP2)
17 | C
18 | HLSP1 = HSP1
19 | HLSP2 = HSP2
20 | C
21 | C
22 | KK = 1000
23 | C
24 | LU = 1
25 | WRITE(LU,1000)
26 | 1000 FORMAT(
27 | & '# Rtheta w Theta/Ue H ',
28 | & ' ar Theta ai Theta' )
29 | CCC 1234567890123|1234567890123|1234567890123|1234567890123|1234567890123|
30 | DO K = 0, KK
31 | T = FLOAT(K)/FLOAT(KK)
32 | C
33 | RL = RLSP1*(1.0-T) + RLSP2*T
34 | WL = WLSP1*(1.0-T) + WLSP2*T
35 | HL = HLSP1*(1.0-T) + HLSP2*T
36 | C
37 | R = 10.0 ** RL
38 | W = 10.0 ** WL
39 | H = HL
40 | C
41 | CALL OSMAP(R,W,H,
42 | & AR,
43 | & AR_R, AR_W, AR_H,
44 | & ARW_R,ARW_W,ARW_H,
45 | & AI,
46 | & AI_R, AI_W, AI_H,
47 | & AIW_R,AIW_W,AIW_H, OK )
48 | WRITE(1,1200) R, W, H, AR, AI,
49 | & AR_R, AR_W, AR_H,
50 | & AI_R, AI_W, AI_H
51 | 1200 FORMAT(1X, 16E14.6)
52 | ENDDO
53 | STOP
54 | C
55 | END
56 |
--------------------------------------------------------------------------------
/runs/e387.dat:
--------------------------------------------------------------------------------
1 | E387
2 | 1.00000 0.00000
3 | 0.99677 0.00043
4 | 0.98729 0.00180
5 | 0.97198 0.00423
6 | 0.95128 0.00763
7 | 0.92554 0.01184
8 | 0.89510 0.01679
9 | 0.86035 0.02242
10 | 0.82183 0.02866
11 | 0.78007 0.03540
12 | 0.73567 0.04249
13 | 0.68922 0.04975
14 | 0.64136 0.05696
15 | 0.59272 0.06390
16 | 0.54394 0.07020
17 | 0.49549 0.07546
18 | 0.44767 0.07936
19 | 0.40077 0.08173
20 | 0.35505 0.08247
21 | 0.31078 0.08156
22 | 0.26813 0.07908
23 | 0.22742 0.07529
24 | 0.18906 0.07037
25 | 0.15345 0.06448
26 | 0.12094 0.05775
27 | 0.09185 0.05033
28 | 0.06643 0.04238
29 | 0.04493 0.03408
30 | 0.02748 0.02562
31 | 0.01423 0.01726
32 | 0.00519 0.00931
33 | 0.00044 0.00234
34 | 0.00091 -0.00286
35 | 0.00717 -0.00682
36 | 0.01890 -0.01017
37 | 0.03596 -0.01265
38 | 0.05827 -0.01425
39 | 0.08569 -0.01500
40 | 0.11800 -0.01502
41 | 0.15490 -0.01441
42 | 0.19599 -0.01329
43 | 0.24083 -0.01177
44 | 0.28892 -0.00998
45 | 0.33968 -0.00804
46 | 0.39252 -0.00605
47 | 0.44679 -0.00410
48 | 0.50182 -0.00228
49 | 0.55694 -0.00065
50 | 0.61147 0.00074
51 | 0.66472 0.00186
52 | 0.71602 0.00268
53 | 0.76475 0.00320
54 | 0.81027 0.00342
55 | 0.85202 0.00337
56 | 0.88944 0.00307
57 | 0.92205 0.00258
58 | 0.94942 0.00196
59 | 0.97118 0.00132
60 | 0.98705 0.00071
61 | 0.99674 0.00021
62 | 1.00000 0.00000
63 |
--------------------------------------------------------------------------------
/runs/polref_100.387:
--------------------------------------------------------------------------------
1 | # Langley LTPT
2 | 0.0201 0.098 | Eppler 387 polar Re=100000 Langley LTPT
3 | 0.0201 0.101
4 | 0.0168 0.199
5 | 0.0164 0.289
6 | 0.0155 0.289
7 | 0.0173 0.392
8 | 0.0189 0.491
9 | 0.0218 0.589
10 | 0.0216 0.589
11 | 0.0238 0.686
12 | 0.0241 0.786
13 | 0.0241 0.880
14 | 0.0234 0.880
15 | 0.0237 0.880
16 | 0.0230 0.978
17 | 0.0232 0.978
18 | 0.0225 1.029
19 | 0.0219 1.029
20 | 0.0214 1.077
21 | 0.0212 1.077
22 | 0.0212 1.179
23 | 0.0207 1.179
24 | 0.0246 1.190
25 | 0.0285 1.199
26 | 0.0505 1.205
27 | 999. 999.
28 | -2.97 0.098
29 | -2.97 0.101
30 | -2.01 0.199
31 | -1.00 0.289
32 | -1.00 0.289
33 | 0.00 0.392
34 | 1.00 0.491
35 | 2.00 0.589
36 | 2.00 0.589
37 | 3.00 0.686
38 | 4.02 0.786
39 | 5.00 0.880
40 | 5.00 0.880
41 | 5.00 0.880
42 | 6.01 0.978
43 | 6.01 0.978
44 | 6.52 1.029
45 | 6.52 1.029
46 | 7.01 1.077
47 | 7.01 1.077
48 | 8.02 1.179
49 | 8.02 1.179
50 | 8.52 1.190
51 | 9.02 1.199
52 | 11.02 1.205
53 | 12.04 1.194
54 | 999. 999.
55 | -2.97 -0.1002
56 | -2.97 -0.1005
57 | -2.01 -0.0994
58 | -1.00 -0.0955
59 | -1.00 -0.0955
60 | 0.00 -0.0971
61 | 1.00 -0.0972
62 | 2.00 -0.0983
63 | 2.00 -0.0983
64 | 3.00 -0.0983
65 | 4.02 -0.0943
66 | 5.00 -0.0879
67 | 5.00 -0.0879
68 | 5.00 -0.0879
69 | 6.01 -0.0835
70 | 6.01 -0.0835
71 | 6.52 -0.0814
72 | 6.52 -0.0814
73 | 7.01 -0.0786
74 | 7.01 -0.0786
75 | 8.02 -0.0752
76 | 8.02 -0.0752
77 | 8.52 -0.0717
78 | 9.02 -0.0674
79 | 11.02 -0.0549
80 | 12.04 -0.0509
81 | 999. 999.
82 | 999. 999.
83 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 |
2 | General
3 | -------
4 | XFOIL and its plot library should compile on any Unix system
5 | with normal Fortran-77, C, and X-Windows support. So far,
6 | XFOIL has been tested on the following systems:
7 |
8 | DEC-5000
9 | Alpha
10 | SGI
11 | * Sun
12 | * RS/6000
13 | * HP-9000
14 | * Pentium/Linux
15 |
16 |
17 | The systems marked with "*" have peculiar features which require slight
18 | modifications to the Makefiles in the plotlib/ and bin/ directories.
19 | Examine these Makefiles before building the plot library and XFOIL.
20 |
21 |
22 | Build sequence
23 | --------------
24 |
25 | 1) Build Orr-Sommerfeld database in ./orrs
26 |
27 | % cd orrs
28 |
29 | Follow directions in orrs/README
30 |
31 |
32 | 2) Build the plot library in ./plotlib ...
33 |
34 | % cd plotlib
35 | % edit Makefile (set compiler flags for your machine)
36 | % make libPlt.a
37 |
38 |
39 | 3) Build the programs in ./bin ...
40 |
41 | % cd bin
42 | % edit Makefile (set compiler flags for your machine)
43 | % make xfoil
44 | % make pplot
45 | % make pxplot
46 |
47 |
48 | Documentation
49 | -------------
50 | User Guide is in the xfoil.doc file. If impatient, you can just
51 | run XFOIL in the runs/ directory, which contains a few input files:
52 |
53 | % cd runs
54 | % ../bin/xfoil
55 |
56 | The file session.txt contains keyboard inputs for a typical interactive
57 | session. If one is lost when running XFOIL, typing a "?" at any command
58 | prompt, e.g.
59 |
60 | .GDES c> ?
61 |
62 | will always produce a keyboard command menu.
63 |
64 |
--------------------------------------------------------------------------------
/plotlib/misc/makesplitlib:
--------------------------------------------------------------------------------
1 | #!/bin/csh
2 | # Shell script for making split version of the Xplot11 library
3 | # The split version allows one to link to routines of the same name without
4 | # fatal link errors as each module can be extracted as needed.
5 | #
6 | # This makes a subdirectory ../merge in the Xplot11 source directory
7 | # that contains an fsplit version of the source files. It then compiles
8 | # these to make objects, then a library in a crude hack (no makefile).
9 | # The resulting library is placed in this directory as libPlt-split.a for
10 | # the user to do what he wishes.
11 | # HHY 8/30/96
12 |
13 | # Optionally get f77 flags from #1 argument to makesplitlib
14 | # i.e. makesplitlib "-I../foobar -O4 -r8"
15 | #
16 | set f77flags = "-O2"
17 | set f77 = "g77"
18 | set fsplit = "fsplit-gup"
19 |
20 |
21 | if ($1 != "") set f77flags = $1
22 | echo "Using fortran compile flags ($f77flags) (option set by arg 1)"
23 |
24 | echo "Creating ../merge subdirectory"
25 | if !(-e ./merge) mkdir merge
26 |
27 | cd merge
28 |
29 | echo "Starting fsplit of all files in Xplot11 directory"
30 | foreach file (../*.f)
31 | echo "Splitting $file"
32 | $fsplit $file
33 | end
34 |
35 | echo "Compiling all split fortran files..."
36 | foreach file (*.f)
37 | $f77 -c $f77flags -I../ $file
38 | end
39 |
40 | echo "Compiling the C interface file"
41 | cc -c -O -I../ ../Xwin.c
42 |
43 | echo "Making library from objects"
44 | ar -r libPlt-split.a *.o
45 |
46 | echo "Moving library to main Xplot11 directory"
47 | mv libPlt-split.a ..
48 |
49 | exit
50 |
51 |
--------------------------------------------------------------------------------
/src/PPLOT.INC:
--------------------------------------------------------------------------------
1 | C
2 | C PPLOT array limits
3 | C
4 | C NAX number of points in one polar
5 | C NPX number of polars
6 | C NFX number of points in one reference polar
7 | C NDX number of reference polars
8 | C ISX number of airfoil sides
9 | C
10 | C
11 | INCLUDE 'PINDEX.INC'
12 | C
13 | PARAMETER (NAX=500, NPX=20, NFX=128, NDX=20, ISX=10)
14 | CHARACTER*80 FNPOL, FNREF, FNAME
15 | CHARACTER*32 NAME, LABREF, TITLE
16 | CHARACTER*16 CODE, CCLEN
17 | REAL MACH
18 | C
19 | LOGICAL
20 | & LGRID,LPLOT,LCDW,LLIST,LEGND,LCLEN,LAECEN,
21 | & LCDH,LCMDOT,LAUTO
22 | C
23 | COMMON/PPCOM_L/
24 | & LGRID,LPLOT,LCDW,LLIST,LEGND,LCLEN,LAECEN,
25 | & LCDH,LCMDOT,LAUTO
26 | C
27 | COMMON/PPCOM_I/
28 | & IDEV, IDEVRP, IPSLU, ICOL0, NCOLOR,
29 | & NA(NPX), NPOL, ICOL(NPX), ILIN(NPX),
30 | & NF(4,NDX), NDAT, IFCOL(NDX), IFSYM(NDX), NBL(NPX),
31 | & IRETYP(NPX),IMATYP(NPX), NCLEN
32 | C
33 | COMMON/PPCOM_R/
34 | & PLOTAR, CH, CH2,
35 | & SIZE,SCRNFR,
36 | & CPOLPLF(3,IPTOT), VPOLPLF(3,2),
37 | & XCD,XAL,XOC,
38 | & MACH(NPX),REYN(NPX),ACRIT(NPX),PTRAT(NPX),ETAP(NPX),
39 | & XTRIP(ISX,NPX),
40 | & CPOL(NAX,IPTOT,NPX),
41 | & CPOLSD(NAX,ISX,JPTOT,NPX),
42 | & CDLMOD(5,NPX),CDLFIT(5,NPX),VPPARS(6,NPX),DXMREF(NPX),
43 | & XYREF(NFX,2,4,NDX),
44 | & VERSION
45 | C
46 | COMMON/PPCOM_C/
47 | & FNPOL(NPX), NAME(NPX),
48 | & FNREF(NDX), LABREF(NDX), TITLE, CODE, CCLEN, FNAME
49 | C
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/plotlib/examples/masks.inc:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: masks.inc
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This library is free software; you can redistribute it and/or
7 | C modify it under the terms of the GNU Library General Public
8 | C License as published by the Free Software Foundation; either
9 | C version 2 of the License, or (at your option) any later version.
10 | C
11 | C This library is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | C Library General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU Library General Public
17 | C License along with this library; if not, write to the Free
18 | C Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 | C
24 | C
25 | C---- dot-pattern masks for use with PLGRID, NEWPAT, etc.
26 | C
27 | C mask0: _________________________ (solid)
28 | C 1: .........................
29 | C 2: . . . . . . . . . . . . .
30 | C 3: . . . . . . .
31 | C 4: . . . .
32 | C
33 | data mask0, mask1, mask2, mask3, mask4
34 | & / -1 , -21846, -30584, -32640, -32768 /
35 |
36 |
--------------------------------------------------------------------------------
/plotlib/masks.inc:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: masks.inc
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This library is free software; you can redistribute it and/or
7 | C modify it under the terms of the GNU Library General Public
8 | C License as published by the Free Software Foundation; either
9 | C version 2 of the License, or (at your option) any later version.
10 | C
11 | C This library is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | C Library General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU Library General Public
17 | C License along with this library; if not, write to the Free
18 | C Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 | C
24 | C Version 4.46 11/28/01
25 | C
26 | C---- dot-pattern masks for use with PLGRID, NEWPAT, etc.
27 | C
28 | C mask0: _________________________ (solid)
29 | C 1: .........................
30 | C 2: . . . . . . . . . . . . .
31 | C 3: . . . . . . .
32 | C 4: . . . .
33 | C
34 | data mask0, mask1, mask2, mask3, mask4
35 | & / -1 , -21846, -30584, -32640, -32768 /
36 | C
37 | C data mask0, mask1, mask2, mask3, mask4
38 | C & /Z'FFFFFFFF',Z'AAAAAAAA',Z'CCCCCCCC',Z'88888888',Z'21084210'/
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/plotlib/sym/symb.fnt:
--------------------------------------------------------------------------------
1 | 0123456789ABCD
2 | 24848 14880 18080 18016 11616 11680 14880 0 0 0 0 0 0 0 0 0 0 0 0 0
3 | 24848 14880 16480 18064 18032 16416 13216 11632 11664 13280 14880 0 0 0 0 0 0 0 0 0
4 | 24848 14886 18128 11528 14886 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 | 24885 14811 21148 18548 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 | 22175 17521 22121 17575 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 | 24848 14882 18248 14814 11448 14882 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 | 24848 14868 18168 14810 11568 14868 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 | 21669 14848 14810 24848 18069 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 | 24886 14848 11627 24848 18027 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 | 23078 16618 23018 16678 21448 18248 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 | 21866 17830 21830 17866 24882 14814 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 | 21680 18016 11616 18080 11680 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 | 21616 18080 18016 11680 11616 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 | 24848 14859 11559 16917 14884 12717 18159 14859 0 0 0 0 0 0 0 0 0 0 0 0
16 |
--------------------------------------------------------------------------------
/plotlib/win32/Xdefs.h:
--------------------------------------------------------------------------------
1 |
2 | /* Event definitions from Xwindows */
3 | #define XKeyPress 2
4 | #define XKeyRelease 3
5 | #define XButtonPress 4
6 | #define XButtonRelease 5
7 | #define XMotionNotify 6
8 | #define XEnterNotify 7
9 | #define XLeaveNotify 8
10 | #define XFocusIn 9
11 | #define XFocusOut 10
12 | #define XKeymapNotify 11
13 | #define XExpose 12
14 | #define XGraphicsExpose 13
15 | #define XNoExpose 14
16 | #define XCreateNotify 16
17 | #define XDestroyNotify 17
18 | #define XUnmapNotify 18
19 | #define XMapNotify 19
20 | #define XMapRequest 20
21 | #define XReparentNotify 21
22 | #define XConfigureNotify 22
23 | #define XConfigureRequest 23
24 | #define XGravityNotify 24
25 | #define XResizeRequest 25
26 | #define XCirculateNotify 26
27 | #define XCirculateRequest 27
28 | #define XPropertyNotify 28
29 | #define XSelectionClear 29
30 | #define XSelectionRequest 30
31 | #define XSelectionNotify 31
32 | #define XColormapNotify 32
33 | #define XClientMessage 33
34 | #define XMappingNotify 34
35 | #define XLASTEvent 35
36 |
37 | /* Graphics functions (src to dest) from Xwindows */
38 | #define GXclear 0
39 | #define GXand 1
40 | #define GXandReverse 2
41 | #define GXcopy 3
42 | #define GXandInverted 4
43 | #define GXnoop 5
44 | #define GXxor 6
45 | #define GXor 7
46 | #define GXnor 8
47 | #define GXequiv 9
48 | #define GXinvert 10
49 | #define GXorReverse 11
50 | #define GXcopyInverted 12
51 | #define GXorInverted 13
52 | #define GXnand 14
53 | #define GXset 15
54 |
55 | /* Synchronization functions from Xwindows */
56 | #define XFDIOff 0
57 | #define XFDIOn 1
58 | #define XFDINotThere 2
59 |
60 |
61 |
--------------------------------------------------------------------------------
/orrs/u.gpl:
--------------------------------------------------------------------------------
1 | set terminal x11
2 | set output
3 | set noclip points
4 | set clip one
5 | set noclip two
6 | set border
7 | set boxwidth
8 | set dummy x,y
9 | set format x "%g"
10 | set format y "%g"
11 | set format z "%g"
12 | set nogrid
13 | set key
14 | set nolabel
15 | set noarrow
16 | set nologscale
17 | set offsets 0, 0, 0, 0
18 | set nopolar
19 | set angles radians
20 | set noparametric
21 | set view 60, 30, 1, 1
22 | set samples 100, 100
23 | set isosamples 10, 10
24 | set surface
25 | set nocontour
26 | set clabel
27 | set nohidden3d
28 | set cntrparam order 4
29 | set cntrparam linear
30 | set cntrparam levels auto 5
31 | set cntrparam points 5
32 | set size 1,1
33 | set data style points
34 | set function style lines
35 | set xzeroaxis
36 | set yzeroaxis
37 | set tics in
38 | set ticslevel 0.5
39 | set xtics
40 | set ytics
41 | set ztics
42 | set title "" 0,0
43 | set notime
44 | set rrange [-0 : 10]
45 | set trange [-5 : 5]
46 | set urange [-5 : 5]
47 | set vrange [-5 : 5]
48 | set xlabel "" 0,0
49 | set xrange [-2 : 2]
50 | set ylabel "" 0,0
51 | set yrange [-1.38712 : 1.38712]
52 | set zlabel "" 0,0
53 | set zrange [-10 : 10]
54 | set autoscale r
55 | set autoscale t
56 | set autoscale xy
57 | set autoscale z
58 | set zero 1e-08
59 | rsq(u,v,k) = (u+k*pi/St)**2 + v**2
60 | Rsq(u,v,k) = rsq(u,v,k)>50.0?50.0:rsq(u,v,k)
61 | uxk(u,v,k) = (0.5/St * v/rsq(u,v,k))*(1.0 - exp(-Wmax*St*Rsq(u,v,k)))
62 | uyk(u,v,k) = (0.5/St * (-u-k*pi/St)/rsq(u,v,k))*(1.0 - exp(-Wmax*St*Rsq(u,v,k)))
63 | ux(u,v) = uxk(u,v,-6)+uxk(u,v,-5)+uxk(u,v,-4)+uxk(u,v,-3)+uxk(u,v,-2)+uxk(u,v,-1)+uxk(u,v,0)+uxk(u,v,1)+uxk(u,v,2)+uxk(u,v,3)+uxk(u,v,4)+uxk(u,v,5)+uxk(u,v,6)
64 | uy(u,v) = uyk(u,v,-6)+uyk(u,v,-5)+uyk(u,v,-4)+uyk(u,v,-3)+uyk(u,v,-2)+uyk(u,v,-1)+uyk(u,v,0)+uyk(u,v,1)+uyk(u,v,2)+uyk(u,v,3)+uyk(u,v,4)+uyk(u,v,5)+uyk(u,v,6)
65 | St = 0.19
66 | Wmax = 4.45
67 | plot [u=-2:2] ux(u,0.5), uy(u,-0.5)
68 |
--------------------------------------------------------------------------------
/plotlib/sym/Makefile:
--------------------------------------------------------------------------------
1 | #***********************************************************************
2 | # Module: Makefile (Xplot/sym directory)
3 | #
4 | # Copyright (C) 1996 Harold Youngren, Mark Drela
5 | #
6 | # This library is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU Library General Public
8 | # License as published by the Free Software Foundation; either
9 | # version 2 of the License, or (at your option) any later version.
10 | #
11 | # This library is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | # Library General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU Library General Public
17 | # License along with this library; if not, write to the Free
18 | # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | #
20 | # Report problems to: guppy@maine.com
21 | # or drela@mit.edu
22 | #***********************************************************************
23 |
24 | #Makefile for stroke font creation and editing programs
25 |
26 | FC = f77
27 | #FC = g77
28 | FFLAGS = -O1
29 | LIBS = ../libPlt.a -lX11
30 |
31 | PROGS = symgen test
32 |
33 | all: $(PROGS)
34 |
35 | clean:
36 | -/bin/rm *.o
37 | -/bin/rm *.a
38 | -/bin/rm $(PROGS)
39 |
40 |
41 | symgen: symgen.o
42 | $(FC) -o symgen symgen.o $(LIBS)
43 |
44 | symgen.o: symgen.f
45 | $(FC) -c $(FFLAGS) symgen.f
46 |
47 | ../plt_font.o: ../plt_font.f ../CHAR.INC ../SLAN.INC ../MATH.INC ../SYMB.INC
48 | $(FC) -c $(FFLAGS) ../plt_font.f
49 | mv ./plt_font.o ../
50 |
51 |
52 |
53 | test: test.o ../plt_font.o
54 | $(FC) -o test test.o ../plt_font.o $(LIBS)
55 |
56 | test.o: test.f
57 | $(FC) -c $(FFLAGS) test.f
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/orrs/a.gpl:
--------------------------------------------------------------------------------
1 | set terminal x11
2 | set output
3 | set noclip points
4 | set clip one
5 | set noclip two
6 | set border
7 | set boxwidth
8 | set dummy x,y
9 | set format x "%g"
10 | set format y "%g"
11 | set format z "%g"
12 | set nogrid
13 | set key
14 | set nolabel
15 | set noarrow
16 | set nologscale
17 | set offsets 0, 0, 0, 0
18 | set nopolar
19 | set angles radians
20 | set noparametric
21 | set view 60, 30, 1, 1
22 | set samples 100, 100
23 | set isosamples 10, 10
24 | set surface
25 | set nocontour
26 | set clabel
27 | set nohidden3d
28 | set cntrparam order 4
29 | set cntrparam linear
30 | set cntrparam levels auto 5
31 | set cntrparam points 5
32 | set size 1,1
33 | set data style points
34 | set function style lines
35 | set xzeroaxis
36 | set yzeroaxis
37 | set tics in
38 | set ticslevel 0.5
39 | set xtics
40 | set ytics
41 | set ztics
42 | set title "" 0,0
43 | set notime
44 | set rrange [-0 : 10]
45 | set trange [-5 : 5]
46 | set urange [-5 : 5]
47 | set vrange [-5 : 5]
48 | set xlabel "" 0,0
49 | set xrange [-20 : 20]
50 | set ylabel "" 0,0
51 | set yrange [-0.440399 : 0.440399]
52 | set zlabel "" 0,0
53 | set zrange [-10 : 10]
54 | set autoscale r
55 | set autoscale t
56 | set autoscale xy
57 | set autoscale z
58 | set zero 1e-08
59 | rsq(u,v,k) = (u+k*pi/St)**2 + v**2
60 | uxk(u,v,k) = (0.5/St * v/rsq(u,v,k))*(1.0 - exp(-1.69*Rsq(u,v,k)))
61 | uyk(u,v,k) = (0.5/St * (-u-k*pi/St)/rsq(u,v,k))*(1.0 - exp(-1.69*Rsq(u,v,k)))
62 | ux(u,v) = uxk(u,v,-6)+uxk(u,v,-5)+uxk(u,v,-4)+uxk(u,v,-3)+uxk(u,v,-2)+uxk(u,v,-1)+uxk(u,v,0)+uxk(u,v,1)+uxk(u,v,2)+uxk(u,v,3)+uxk(u,v,4)+uxk(u,v,5)+uxk(u,v,6)
63 | uy(u,v) = uyk(u,v,-6)+uyk(u,v,-5)+uyk(u,v,-4)+uyk(u,v,-3)+uyk(u,v,-2)+uyk(u,v,-1)+uyk(u,v,0)+uyk(u,v,1)+uyk(u,v,2)+uyk(u,v,3)+uyk(u,v,4)+uyk(u,v,5)+uyk(u,v,6)
64 | Rsq(u,v,k) = rsq(u,v,k)>50.0?50.0:rsq(u,v,k)
65 | uxx(u,v) = uxk(u,v,-1)+uxk(u,v,0)+uxk(u,v,1)
66 | uyy(u,v) = uyk(u,v,-1)+uyk(u,v,0)+uyk(u,v,1)
67 | L = 16.5
68 | Wmax = 4.45
69 | St = 0.19
70 | plot [u=-20:20] ux(u,20.5), ux(u,-20.5)
71 |
--------------------------------------------------------------------------------
/orrs/src/fscorr.f:
--------------------------------------------------------------------------------
1 | PROGRAM FSCORR
2 | PARAMETER (NHX=200)
3 | REAL H(NHX), M(NHX), LSQ(NHX), FUN(NHX), FCORR(NHX)
4 | REAL X(NHX), Y(NHX), Z(NHX)
5 | C
6 | IDEV = 6
7 | SIZE = 8.0
8 | CH = 0.02
9 | C
10 | HMAX = 10.0
11 | DH = 1.0
12 | C
13 | FMAX = 0.5
14 | DF = 0.1
15 | C
16 | PAR = 0.75
17 | C
18 | HWT = 1.0/HMAX
19 | FWT = PAR/FMAX
20 | C
21 | OPEN(7,FILE='hfun.fs',STATUS='OLD')
22 | DO 10 I=1, NHX
23 | READ(7,*,END=11) H(I),M(I),LSQ(I),FUN(I)
24 | 10 CONTINUE
25 | 11 CONTINUE
26 | N = I-1
27 | CLOSE(7)
28 | C
29 | DO 20 I=1, N
30 | HB = 1.0/(H(I)-1.0)
31 | ccc F = 0.22*(1.0 - (5.0*HB-1.0)**2) + 0.5*HB - 0.05 + 3.0*HB**3
32 | C
33 | F = -0.05 + 2.7*HB - 5.5*HB**2 + 3.0*HB**3
34 | C
35 | HK = H(I)
36 | ccc TFS = (6.54*HK - 14.07 )/HK**2
37 | c
38 | TFS = 4.70*HB - 8.45*HB**2 + 3.41*HB**3
39 | AM = 2.0*F/TFS - 1.0
40 | C
41 | Z(I) = M(I)
42 | C
43 | Y(I) = AM
44 | X(I) = 10.0*HB
45 |
46 | FUN(I) = M(I)
47 | FCORR(I) = AM
48 | C
49 | CC F = 0.5*(BUH + 1.0)*TFS
50 | C
51 | C X(I) = 10.0*HB
52 | CC
53 | C F = 0.395*(1.0 - 5.8*(HB-0.485)**2)
54 | C Y(I) = F
55 | C Z(I) = FUN(I)*4.0/H(I)
56 | CC
57 | C FCORR(I) = 0.25*F*H(I)
58 | C
59 | 20 CONTINUE
60 | C
61 | C
62 | CALL PLOTS(0,-999,IDEV)
63 | CALL FACTOR(SIZE)
64 | C
65 | CALL PLOT(8.0*CH,8.0*CH,-3)
66 | C
67 | CALL PLOTON
68 | C
69 | CALL XAXIS(0.0,0.0,1.0,DH*HWT,0.0,DH,CH,1)
70 | CALL YAXIS(0.0,0.0,PAR,DF*FWT,0.0,DF,CH,1)
71 | C
72 | CALL XYPLOT(N,H,FUN ,0.0,HWT,0.0,FWT,1,0.3*CH,+1)
73 | CALL XYPLOT(N,H,FCORR,0.0,HWT,0.0,FWT,1,0.3*CH, 0)
74 | C
75 | CALL XYPLOT(N,X,Z,0.0,HWT,0.0,FWT,1,0.3*CH,+1)
76 | CALL XYPLOT(N,X,Y,0.0,HWT,0.0,FWT,1,0.3*CH, 0)
77 | C
78 | CALL PLOTOF
79 | C
80 | WRITE(*,*) 'Hit '
81 | READ(*,1000) ANS
82 | 1000 FORMAT(A4)
83 | C
84 | CALL PLOT(0.0,0.0,+999)
85 | STOP
86 | END
87 |
88 |
--------------------------------------------------------------------------------
/plotlib/colors.inc:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: colors.inc
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This library is free software; you can redistribute it and/or
7 | C modify it under the terms of the GNU Library General Public
8 | C License as published by the Free Software Foundation; either
9 | C version 2 of the License, or (at your option) any later version.
10 | C
11 | C This library is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | C Library General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU Library General Public
17 | C License along with this library; if not, write to the Free
18 | C Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 | C
24 | C Version 4.41 7/5/98
25 | C
26 | C******************************************
27 | C Default color definitions for Xplot11
28 | C For use as arguments to NEWCOLOR, e.g.
29 | C
30 | C CALL NEWCOLOR(GREEN)
31 | C
32 | C
33 | C Alternatively, can also use...
34 | C
35 | C CALL NEWCOLORNAME('GREEN')
36 | C
37 | C******************************************
38 | C
39 | Integer BLACK,
40 | & WHITE,
41 | & RED,
42 | & ORANGE,
43 | & YELLOW,
44 | & GREEN,
45 | & CYAN,
46 | & BLUE,
47 | & VIOLET,
48 | & MAGENTA
49 | C
50 | parameter (BLACK = 1)
51 | parameter (WHITE = 2)
52 | parameter (RED = 3)
53 | parameter (ORANGE = 4)
54 | parameter (YELLOW = 5)
55 | parameter (GREEN = 6)
56 | parameter (CYAN = 7)
57 | parameter (BLUE = 8)
58 | parameter (VIOLET = 9)
59 | parameter (MAGENTA = 10)
60 |
--------------------------------------------------------------------------------
/src/CIRCLE.INC:
--------------------------------------------------------------------------------
1 | C
2 | C----- CIRCLE.INC include file for circle-plane operations
3 | C
4 | C n
5 | C ICX number of circle-plane points for complex mapping ( 2 + 1 )
6 | C IMX number of complex mapping coefficients Cn
7 |
8 | PARAMETER (ICX=257)
9 | PARAMETER (IMX=(ICX-1)/4)
10 | C
11 | COMPLEX ZCOLDW, DZTE, CHORDZ, ZLEOLD, ZC, ZC_CN, PIQ, CN, EIW
12 | C
13 | COMMON/CPI01/ NC,MC,MCT
14 | C
15 | COMMON/CPR01/ PI,AGTE,AG0,QIM0,QIMOLD,
16 | & DWC,WC(ICX),SC(ICX),
17 | & SCOLD(ICX),XCOLD(ICX),YCOLD(ICX)
18 | C
19 | COMMON/CPC01/ DZTE, CHORDZ, ZLEOLD, ZCOLDW(ICX),
20 | & ZC(ICX), ZC_CN(ICX,IMX/4),
21 | & PIQ(ICX), CN(0:IMX), EIW(ICX,0:IMX)
22 | C
23 |
24 | C NC number of circle plane points, must be 2**n + 1
25 | C MC number of Fourier harmonics of P(w) + iQ(w)
26 | C MCT number of Fourier harmonics for which dZC/dCN are calculated
27 | C
28 | C PI 3.1415926
29 | C AGTE trailing edge angle/pi
30 | C AG0 angle of airfoil surface at first point
31 | C QIM0 Q(w) offset = Q(0)
32 | C QIMOLD Q(w) offset for old airfoil
33 | C DWC increment of circle-plane coordinate w, DWC = 2 pi/(NC-1)
34 | C WC(.) circle plane coordinate w for Fourier operations
35 | C SC(.) normalized arc length array s(w)
36 | C SCOLD(.) normalized arc length s(w) of old airfoil
37 | C XCOLD(.) x coordinate x(w) of old airfoil
38 | C YCOLD(.) y coordinate y(w) of old airfoil
39 | C
40 | C DZTE trailing edge gap specified in the complex plane
41 | C CHORDZ airfoil chord specified in the complex plane
42 | C ZLEOLD leading edge of old airfoil
43 | C ZCOLDW(.) d(x+iy)/dw of old airfoil
44 | C ZC(.) complex airfoil coordinates derived from P(w) + iQ(w)
45 | C ZC_CN(..) sensitivities dZC/dCN for driving geometry constraints
46 | C PIQ(.) complex harmonic function P(w) + iQ(w)
47 | C CN(.) Fourier coefficients of P(w) + iQ(w)
48 | C EIW(..) complex number exp(inw) array on the unit circle
49 |
--------------------------------------------------------------------------------
/src/gui.f:
--------------------------------------------------------------------------------
1 |
2 |
3 | SUBROUTINE GUIBOX(K, X1,X2,Y1,Y2, COLOR, LABEL)
4 | CHARACTER*(*) COLOR, LABEL
5 | C----------------------------------------------------------
6 | C Plots a GUI-button box with label string.
7 | C Places the box coordinates into the COM_GUI
8 | C arrays associated with the button index K.
9 | C FUNCTION LGUI can then determine if a cursor
10 | C falls within box K.
11 | C----------------------------------------------------------
12 | COMMON /COM_GUI/ XGUI(2,20), YGUI(2,20)
13 | C
14 | IF(K.LT.1 .OR. K.GT.20) RETURN
15 | C
16 | CALL GETORIGIN(XORG,YORG)
17 | CALL GETFACTORS(XSCALE,YSCALE)
18 | C
19 | CALL GETCOLOR(ICOL0)
20 | CALL NEWCOLORNAME(COLOR)
21 | C
22 | C---- set GUI window
23 | XGUI(1,K) = (X1 - XORG)/XSCALE
24 | XGUI(2,K) = (X2 - XORG)/XSCALE
25 | YGUI(1,K) = (Y1 - YORG)/YSCALE
26 | YGUI(2,K) = (Y2 - YORG)/YSCALE
27 | C
28 | C---- plot GUI window
29 | CALL PLOT(XGUI(1,K),YGUI(1,K),3)
30 | CALL PLOT(XGUI(2,K),YGUI(1,K),2)
31 | CALL PLOT(XGUI(2,K),YGUI(2,K),2)
32 | CALL PLOT(XGUI(1,K),YGUI(2,K),2)
33 | CALL PLOT(XGUI(1,K),YGUI(1,K),2)
34 | C
35 | NL = LEN(LABEL)
36 | CHA = MIN( (XGUI(2,K)-XGUI(1,K))/FLOAT(NL+1),
37 | & (YGUI(2,K)-YGUI(1,K))/1.8 )
38 | XCA = 0.5*(XGUI(2,K)+XGUI(1,K)) - 0.5*CHA*FLOAT(NL) + 0.2*CHA
39 | YCA = 0.5*(YGUI(2,K)+YGUI(1,K)) - 0.6*CHA
40 | CALL PLCHAR(XCA,YCA,CHA,LABEL,0.0,NL)
41 | C
42 | CALL NEWCOLOR(ICOL0)
43 | RETURN
44 | END ! GUIBOX
45 |
46 |
47 |
48 | LOGICAL FUNCTION LGUI(K,XC,YC)
49 | C-----------------------------------------------
50 | C Returns T if location XC,YC falls within
51 | C the GUI(K) window defined in GUIBOX.
52 | C-----------------------------------------------
53 | COMMON /COM_GUI/ XGUI(2,20), YGUI(2,20)
54 | C
55 | LGUI = .FALSE.
56 | IF(K.LT.1 .OR. K.GT.20) RETURN
57 | C
58 | LGUI = XC .GT. XGUI(1,K) .AND.
59 | & XC .LE. XGUI(2,K) .AND.
60 | & YC .GT. YGUI(1,K) .AND.
61 | & YC .LE. YGUI(2,K)
62 | C
63 | RETURN
64 | END ! LGUI
65 |
--------------------------------------------------------------------------------
/src/PINDEX.INC:
--------------------------------------------------------------------------------
1 |
2 | C
3 | C---- Pointers for referencing polar force coefficients
4 | C First 4 pointers must be main polar plot variables.
5 | C
6 | PARAMETER (
7 | & IAL = 1, ! alpha
8 | & ICL = 2, ! CL
9 | & ICD = 3, ! CD
10 | & ICM = 4, ! Cm
11 | & ICW = 5, ! CDwave
12 | & ICV = 6, ! CDvisc
13 | & ICP = 7, ! CDpres
14 | & IMA = 8, ! Mach
15 | & IRE = 9, ! Re
16 | & INC = 10, ! Ncrit
17 | & ICH = 11, ! Hinge moment
18 | & IMC = 12, ! Minimum Cp on surface
19 | & ICDH = 13, ! CDh (engine thrust coeff.)
20 | & ICMDOT = 14 ) ! Cm_dot
21 | PARAMETER (IPTOT=14)
22 | C
23 | C
24 | C---------------------
25 | C Pointers for referencing polar airfoil-side quantities
26 | C
27 | PARAMETER (
28 | & JTP = 1, ! trip
29 | & JTN = 2 ) ! transition
30 | PARAMETER (JPTOT=2)
31 |
32 | CHARACTER*10 CPOLNAME(IPTOT)
33 | CHARACTER*5 CPOLSNAME(JPTOT)
34 | CHARACTER*6 CPOLFORM(IPTOT), CPOLSFORM(JPTOT)
35 | C
36 | DATA CPOLNAME /
37 | & 'alpha ',
38 | & 'CL ',
39 | & 'CD ',
40 | & 'CM ',
41 | & 'CDw ',
42 | & 'CDv ',
43 | & 'CDp ',
44 | & 'Mach ',
45 | & 'Re ',
46 | & 'Ncrit ',
47 | & 'Chinge ',
48 | & 'Cpmin ',
49 | & 'CDh ',
50 | & 'Cmdot ' /
51 | DATA CPOLFORM /
52 | & 'F7.3 ', ! alpha
53 | & 'F9.4 ', ! CL
54 | & 'F10.5 ', ! CD
55 | & 'F9.4 ', ! CM
56 | & 'F10.5 ', ! CDw
57 | & 'F10.5 ', ! CDv
58 | & 'F10.5 ', ! CDp
59 | & 'F8.4 ', ! Mach
60 | & 'E11.3 ', ! Re
61 | & 'F7.3 ', ! Ncrit
62 | & 'F10.5 ', ! Chinge
63 | & 'F9.4 ', ! Cpmin
64 | & 'F11.5 ', ! CDh
65 | & 'F9.5 ' / ! Cmdot
66 |
67 | DATA CPOLSNAME /
68 | & 'Xtrip',
69 | & 'Xtr ' /
70 | DATA CPOLSFORM /
71 | & 'F9.4 ', ! Xtrip
72 | & 'F9.4 ' / ! Xtr
73 |
--------------------------------------------------------------------------------
/plotlib/examples/colors.inc:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: colors.inc
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This library is free software; you can redistribute it and/or
7 | C modify it under the terms of the GNU Library General Public
8 | C License as published by the Free Software Foundation; either
9 | C version 2 of the License, or (at your option) any later version.
10 | C
11 | C This library is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | C Library General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU Library General Public
17 | C License along with this library; if not, write to the Free
18 | C Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 | C
24 | C
25 | C******************************************
26 | C Default color definitions for Xplot11
27 | C For use as arguments to NEWCOLOR, e.g.
28 | C
29 | C CALL NEWCOLOR(GREEN)
30 | C
31 | C
32 | C Alternatively, can also use...
33 | C
34 | C CALL NEWCOLORNAME('GREEN')
35 | C
36 | C******************************************
37 | C
38 | Integer BLACK,
39 | & WHITE,
40 | & RED,
41 | & ORANGE,
42 | & YELLOW,
43 | & GREEN,
44 | & CYAN,
45 | & BLUE,
46 | & VIOLET,
47 | & MAGENTA
48 | C
49 | parameter (BLACK = 1)
50 | parameter (WHITE = 2)
51 | parameter (RED = 3)
52 | parameter (ORANGE = 4)
53 | parameter (YELLOW = 5)
54 | parameter (GREEN = 6)
55 | parameter (CYAN = 7)
56 | parameter (BLUE = 8)
57 | parameter (VIOLET = 9)
58 | parameter (MAGENTA = 10)
59 |
--------------------------------------------------------------------------------
/runs/dae51.dat:
--------------------------------------------------------------------------------
1 | DAE 51
2 | # Daedalus propeller airfoil
3 | 1.000000 -0.000051
4 | 0.989166 0.001996
5 | 0.975819 0.004501
6 | 0.957448 0.007991
7 | 0.931599 0.013004
8 | 0.901654 0.018957
9 | 0.870818 0.025167
10 | 0.839998 0.031363
11 | 0.809336 0.037430
12 | 0.778839 0.043301
13 | 0.748503 0.048933
14 | 0.718326 0.054243
15 | 0.688314 0.059175
16 | 0.658443 0.063716
17 | 0.628653 0.067839
18 | 0.598855 0.071530
19 | 0.569004 0.074792
20 | 0.539074 0.077652
21 | 0.509071 0.080095
22 | 0.479015 0.082100
23 | 0.448934 0.083641
24 | 0.418877 0.084690
25 | 0.388863 0.085217
26 | 0.358908 0.085197
27 | 0.329049 0.084600
28 | 0.299321 0.083399
29 | 0.269760 0.081570
30 | 0.240419 0.079081
31 | 0.211388 0.075895
32 | 0.182766 0.071967
33 | 0.154699 0.067243
34 | 0.127404 0.061670
35 | 0.101193 0.055204
36 | 0.076503 0.047832
37 | 0.054060 0.039675
38 | 0.034881 0.031085
39 | 0.020059 0.022737
40 | 0.010052 0.015405
41 | 0.004208 0.009557
42 | 0.001251 0.005050
43 | 0.000113 0.001479
44 | 0.000123 -0.001494
45 | 0.001002 -0.004085
46 | 0.002793 -0.006422
47 | 0.006019 -0.008524
48 | 0.011960 -0.010609
49 | 0.022698 -0.012727
50 | 0.040333 -0.014554
51 | 0.064233 -0.015717
52 | 0.091882 -0.016173
53 | 0.121305 -0.016067
54 | 0.151560 -0.015570
55 | 0.182231 -0.014790
56 | 0.213149 -0.013797
57 | 0.244240 -0.012649
58 | 0.275464 -0.011392
59 | 0.306798 -0.010061
60 | 0.338230 -0.008690
61 | 0.369725 -0.007318
62 | 0.401184 -0.005962
63 | 0.432597 -0.004640
64 | 0.463976 -0.003366
65 | 0.495325 -0.002147
66 | 0.526644 -0.000994
67 | 0.557930 0.000082
68 | 0.589182 0.001071
69 | 0.620390 0.001960
70 | 0.651547 0.002731
71 | 0.682648 0.003367
72 | 0.713694 0.003847
73 | 0.744690 0.004152
74 | 0.775644 0.004269
75 | 0.806546 0.004190
76 | 0.837373 0.003898
77 | 0.868134 0.003359
78 | 0.898985 0.002532
79 | 0.929868 0.001410
80 | 0.956572 0.000219
81 | 0.975393 -0.000742
82 | 0.988983 -0.001472
83 | 1.000000 -0.002051
84 |
--------------------------------------------------------------------------------
/orrs/src/fsrun.f:
--------------------------------------------------------------------------------
1 | PROGRAM FSRUN
2 | PARAMETER (NMAX=256)
3 | DIMENSION ETA(NMAX), F(NMAX), U(NMAX), S(NMAX)
4 | CHARACTER*1 ANS
5 | C
6 | LST = 1
7 | LRE = 1
8 | C
9 | N = 256
10 | ETAE = 30.0
11 | GEO = 1.01
12 | C
13 | IDEV = 6
14 | SIZE = 6.0
15 | IHARD = -999
16 | C
17 | EWT = 1.0/ETAE
18 | UWT = 0.5
19 | CH = 0.02
20 | C
21 | CALL PLOTS(0,IHARD,IDEV)
22 | CALL FACTOR(SIZE)
23 | C
24 | CALL PLOT(0.7,0.1,-3)
25 | C
26 | CALL NEWPEN(1)
27 | C
28 | CALL PLOT(0.0,0.0,3)
29 | CALL PLOT(UWT*1.0,0.0,2)
30 | CALL PLOT(0.0,0.0,3)
31 | CALL PLOT(0.0,EWT*ETAE,2)
32 | C
33 | WRITE(*,*) 'Enter H1, H2, dH'
34 | READ (*,*) H1,H2,DH
35 | C
36 | NH = INT((H2-H1)/DH) + 1
37 | C
38 | open(7,file='hfuns.fs',status='unknown')
39 | c
40 | CALL NEWPEN(3)
41 | DO 10 IH=1, NH
42 | H = H1 + DH*FLOAT(IH-1)
43 | CALL FS(3,2,BU,H,N,ETAE,GEO,ETA,F,U,S,DELTA)
44 | C---------------------
45 | c BU = H
46 | c CALL FS(1,1,BU,H,N,ETAE,GEO,ETA,F,U,S,DELTA)
47 | C---------------------
48 | C
49 | DSI = 0.0
50 | THI = 0.0
51 | TSI = 0.0
52 | CDN = 0.0
53 | DO 103 I=1, N-1
54 | UA = 0.5*(U(I+1) + U(I))
55 | DETA = ETA(I+1) - ETA(I)
56 | C
57 | DSI = DSI + (1.0 - UA) *DETA
58 | THI = THI + (1.0 - UA)*UA*DETA
59 | TSI = TSI + (1.0 - UA*UA)*UA*DETA
60 | C
61 | CDN = CDN + (U(I+1) - U(I))**2 / DETA
62 | 103 CONTINUE
63 | C
64 | HK = DSI/THI
65 | HS = TSI/THI
66 | C
67 | CDN = CDN *THI * 2.0/HS
68 | CFN = S(1)*THI
69 | C
70 | DSI = DSI*DELTA
71 | THI = THI*DELTA
72 | TSI = TSI*DELTA
73 | C
74 | BUF = (CFN - CDN)/(HK-1.0) / THI**2
75 | write(*,*) H, BU, THI**2, 0.5*(BU + 1.0) * THI**2
76 | write(7,*) H, BU, THI**2, 0.5*(BU + 1.0) * THI**2
77 | c
78 | CALL PLOTON
79 | CALL PLOT(UWT*U(1),EWT*ETA(1),3)
80 | DO 105 I=2, N
81 | CALL PLOT(UWT*U(I),EWT*ETA(I),2)
82 | 105 CONTINUE
83 | CALL PLOTOF
84 | 10 CONTINUE
85 | c
86 | close(7)
87 | C
88 | c WRITE(6,*) 'Hit '
89 | c READ (5,8000) ANS
90 | c 8000 FORMAT(A1)
91 | C
92 | CALL PLOT(0.0,0.0,+999)
93 | STOP
94 | END
95 |
96 |
--------------------------------------------------------------------------------
/plotlib/SYMB.INC:
--------------------------------------------------------------------------------
1 | C Version 4.46 11/28/01
2 |
3 | CHARACTER* 14 CHARS
4 | INTEGER NODE(20, 14)
5 |
6 | DIMENSION NODE0(20,10)
7 | DIMENSION NODE1(20, 4)
8 | EQUIVALENCE ( NODE(1, 1) , NODE0(1,1) )
9 | EQUIVALENCE ( NODE(1, 11) , NODE1(1,1) )
10 | DATA NCHARS / 14 /
11 | DATA CHARS( 1: 14) / '0123456789ABCD' /
12 | DATA NODE0 /
13 | & 24848,14880,18080,18016,11616,11680,14880, 0, 0, 0,
14 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
15 | & 24848,14880,16480,18064,18032,16416,13216,11632,11664,13280,
16 | & 14880, 0, 0, 0, 0, 0, 0, 0, 0, 0,
17 | & 24848,14886,18128,11528,14886, 0, 0, 0, 0, 0,
18 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19 | & 24885,14811,21148,18548, 0, 0, 0, 0, 0, 0,
20 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
21 | & 22175,17521,22121,17575, 0, 0, 0, 0, 0, 0,
22 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
23 | & 24848,14882,18248,14814,11448,14882, 0, 0, 0, 0,
24 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
25 | & 24848,14868,18168,14810,11568,14868, 0, 0, 0, 0,
26 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
27 | & 21669,14848,14810,24848,18069, 0, 0, 0, 0, 0,
28 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
29 | & 24886,14848,11627,24848,18027, 0, 0, 0, 0, 0,
30 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31 | & 23078,16618,23018,16678,21448,18248, 0, 0, 0, 0,
32 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /
33 | DATA NODE1 /
34 | & 21866,17830,21830,17866,24882,14814, 0, 0, 0, 0,
35 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
36 | & 21680,18016,11616,18080,11680, 0, 0, 0, 0, 0,
37 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
38 | & 21616,18080,18016,11680,11616, 0, 0, 0, 0, 0,
39 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
40 | & 24848,14859,11559,16917,14884,12717,18159,14859, 0, 0,
41 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /
42 |
--------------------------------------------------------------------------------
/orrs/src/otest.f:
--------------------------------------------------------------------------------
1 | PROGRAM OTEST
2 | REAL AI(-1:1), AI_R(-1:1), AI_W(-1:1), AI_H(-1:1),
3 | & AIW_R(-1:1), AIW_W(-1:1), AIW_H(-1:1)
4 | REAL AR(-1:1), AR_R(-1:1), AR_W(-1:1), AR_H(-1:1),
5 | & ARW_R(-1:1), ARW_W(-1:1), ARW_H(-1:1)
6 | LOGICAL OK
7 | C
8 | 1 WRITE(*,*) 'Enter Rth, w, H'
9 | READ (*,*) RSP, WSP, HSP
10 | IF(RSP.EQ.0.0) STOP
11 | C
12 | WRITE(*,*) 'Enter dRth, dw, dH'
13 | READ (*,*) DR, DW, DH
14 | C
15 | DO I=-1, 1
16 | cc I = 0
17 | R = RSP + DR*FLOAT(I)
18 | CALL OSMAP(R,WSP,HSP,
19 | & AI(I),
20 | & AI_R(I), AI_W(I), AI_H(I),
21 | & AIW_R(I),AIW_W(I),AIW_H(I),
22 | & AR(I),
23 | & AR_R(I), AR_W(I), AR_H(I),
24 | & ARW_R(I),ARW_W(I),ARW_H(I), OK )
25 | ENDDO
26 | WRITE(*,*) 'ai :', AI(0)
27 | DADR = (AI(1) - AI(-1))*0.5/DR
28 | WRITE(*,*) 'da/dR:', DADR, AI_R(-1), AI_R(0), AI_R(1)
29 | C
30 | DO I=-1, 1
31 | cc I = 0
32 | H = HSP + DH*FLOAT(I)
33 | CALL OSMAP(RSP,WSP,H,
34 | & AI(I),
35 | & AI_R(I), AI_W(I), AI_H(I),
36 | & AIW_R(I),AIW_W(I),AIW_H(I),
37 | & AR(I),
38 | & AR_R(I), AR_W(I), AR_H(I),
39 | & ARW_R(I),ARW_W(I),ARW_H(I), OK )
40 | ENDDO
41 | DADH = (AI(1) - AI(-1))*0.5/DH
42 | WRITE(*,*) 'da/dH:', DADH, AI_H(-1), AI_H(0), AI_H(1)
43 | C
44 | DO I=-1, 1
45 | cc I = 0
46 | W = WSP + DW*FLOAT(I)
47 | CALL OSMAP(RSP,W,HSP,
48 | & AI(I),
49 | & AI_R(I), AI_W(I), AI_H(I),
50 | & AIW_R(I),AIW_W(I),AIW_H(I),
51 | & AR(I),
52 | & AR_R(I), AR_W(I), AR_H(I),
53 | & ARW_R(I),ARW_W(I),ARW_H(I), OK )
54 | ENDDO
55 | DADW = (AI(1) - AI(-1))*0.5/DW
56 | WRITE(*,*) 'da/dw:', DADW, AI_W(-1), AI_W(0), AI_W(1)
57 | C
58 | DBDR = (AI_R(1) - AI_R(-1))*0.5/DW
59 | WRITE(*,*) 'daR/dw:', DBDR, AIW_R(-1), AIW_R(0), AIW_R(1)
60 | DBDH = (AI_H(1) - AI_H(-1))*0.5/DW
61 | WRITE(*,*) 'daH/dw:', DBDH, AIW_H(-1), AIW_H(0), AIW_H(1)
62 | DBDW = (AI_W(1) - AI_W(-1))*0.5/DW
63 | WRITE(*,*) 'daw/dw:', DBDW, AIW_W(-1), AIW_W(0), AIW_W(1)
64 | C
65 | C
66 | GO TO 1
67 | END
68 |
--------------------------------------------------------------------------------
/runs/dae11.dat:
--------------------------------------------------------------------------------
1 | DAE 11
2 | # Daedalus wing center panel airfoil. Design Re = 500K
3 | 1.000000 0.000000
4 | 0.986485 0.002537
5 | 0.970011 0.005613
6 | 0.947881 0.010041
7 | 0.918618 0.016374
8 | 0.887980 0.023556
9 | 0.857968 0.031118
10 | 0.827970 0.039139
11 | 0.797803 0.047590
12 | 0.767378 0.056399
13 | 0.736634 0.065482
14 | 0.705687 0.074715
15 | 0.675260 0.083695
16 | 0.645478 0.092177
17 | 0.616310 0.099961
18 | 0.587628 0.106875
19 | 0.559192 0.112804
20 | 0.530735 0.117738
21 | 0.502104 0.121740
22 | 0.473284 0.124848
23 | 0.444338 0.127068
24 | 0.415323 0.128391
25 | 0.386255 0.128806
26 | 0.357167 0.128336
27 | 0.328135 0.126996
28 | 0.299232 0.124754
29 | 0.270512 0.121609
30 | 0.242030 0.117536
31 | 0.213885 0.112508
32 | 0.186216 0.106500
33 | 0.159197 0.099489
34 | 0.133039 0.091476
35 | 0.108024 0.082466
36 | 0.084520 0.072514
37 | 0.062995 0.061754
38 | 0.044085 0.050490
39 | 0.028485 0.039251
40 | 0.016619 0.028679
41 | 0.008417 0.019287
42 | 0.003417 0.011421
43 | 0.000883 0.005097
44 | 0.000128 0.000182
45 | 0.000626 -0.003555
46 | 0.002138 -0.006473
47 | 0.004541 -0.008835
48 | 0.008212 -0.010744
49 | 0.014240 -0.012418
50 | 0.024697 -0.013921
51 | 0.041573 -0.014931
52 | 0.065014 -0.015107
53 | 0.092723 -0.014502
54 | 0.122696 -0.013331
55 | 0.153786 -0.011784
56 | 0.185487 -0.010003
57 | 0.217549 -0.008087
58 | 0.249834 -0.006102
59 | 0.282263 -0.004093
60 | 0.314698 -0.002099
61 | 0.347047 -0.000149
62 | 0.379318 0.001724
63 | 0.411508 0.003509
64 | 0.443624 0.005174
65 | 0.475671 0.006709
66 | 0.507637 0.008092
67 | 0.539527 0.009282
68 | 0.571366 0.010264
69 | 0.603162 0.011026
70 | 0.634928 0.011552
71 | 0.666677 0.011849
72 | 0.698414 0.011916
73 | 0.730135 0.011759
74 | 0.761819 0.011381
75 | 0.793447 0.010763
76 | 0.825020 0.009891
77 | 0.856580 0.008751
78 | 0.888343 0.007325
79 | 0.920025 0.005610
80 | 0.948000 0.003865
81 | 0.969655 0.002348
82 | 0.986285 0.001076
83 | 1.000000 0.000000
84 |
--------------------------------------------------------------------------------
/runs/dae21.dat:
--------------------------------------------------------------------------------
1 | DAE 21
2 | # Daedalus outer panel break airfoil. Design Re = 375K
3 | 1.000000 0.000000
4 | 0.986712 0.002418
5 | 0.970362 0.005492
6 | 0.947691 0.010083
7 | 0.917703 0.016743
8 | 0.887293 0.024120
9 | 0.857161 0.031966
10 | 0.826867 0.040283
11 | 0.796262 0.048982
12 | 0.765287 0.057938
13 | 0.734180 0.066919
14 | 0.703358 0.075625
15 | 0.672878 0.083860
16 | 0.642725 0.091437
17 | 0.612839 0.098204
18 | 0.583189 0.104141
19 | 0.553743 0.109238
20 | 0.524452 0.113495
21 | 0.495245 0.116921
22 | 0.466044 0.119541
23 | 0.436797 0.121383
24 | 0.407512 0.122444
25 | 0.378226 0.122715
26 | 0.348985 0.122181
27 | 0.319838 0.120829
28 | 0.290842 0.118635
29 | 0.262053 0.115583
30 | 0.233558 0.111651
31 | 0.205468 0.106814
32 | 0.177922 0.101046
33 | 0.151092 0.094310
34 | 0.125176 0.086572
35 | 0.100450 0.077840
36 | 0.077317 0.068163
37 | 0.056331 0.057700
38 | 0.038181 0.046773
39 | 0.023556 0.035891
40 | 0.012848 0.025735
41 | 0.005879 0.016869
42 | 0.001956 0.009449
43 | 0.000266 0.003383
44 | 0.000061 -0.001451
45 | 0.000768 -0.005145
46 | 0.002174 -0.007971
47 | 0.004373 -0.010203
48 | 0.007802 -0.012025
49 | 0.013654 -0.013482
50 | 0.024269 -0.014572
51 | 0.041672 -0.014985
52 | 0.065976 -0.014369
53 | 0.094566 -0.012972
54 | 0.125275 -0.011034
55 | 0.156913 -0.008816
56 | 0.189022 -0.006461
57 | 0.221380 -0.004063
58 | 0.253714 -0.001687
59 | 0.285949 0.000632
60 | 0.318102 0.002874
61 | 0.350185 0.005015
62 | 0.382195 0.007039
63 | 0.414128 0.008920
64 | 0.445987 0.010630
65 | 0.477768 0.012157
66 | 0.509472 0.013465
67 | 0.541126 0.014532
68 | 0.572758 0.015351
69 | 0.604367 0.015925
70 | 0.635947 0.016240
71 | 0.667511 0.016282
72 | 0.699072 0.016053
73 | 0.730622 0.015565
74 | 0.762134 0.014807
75 | 0.793605 0.013763
76 | 0.825056 0.012422
77 | 0.856541 0.010783
78 | 0.888226 0.008848
79 | 0.920042 0.006634
80 | 0.948501 0.004447
81 | 0.970227 0.002643
82 | 0.986570 0.001203
83 | 1.000000 0.000000
84 |
--------------------------------------------------------------------------------
/plotlib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # Xplot11 Graphics Package
4 | #
5 | # Copyright (C) 1996 Harold Youngren, Mark Drela
6 | #
7 | # This library is free software; you can redistribute it and/or
8 | # modify it under the terms of the GNU Library General Public
9 | # License as published by the Free Software Foundation; either
10 | # version 2 of the License, or (at your option) any later version.
11 | #
12 | # This library is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | # Library General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Library General Public
18 | # License along with this library; if not, write to the Free
19 | # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | set(PLT_SRCS plt_base.f plt_font.f CHAR.INC SLAN.INC MATH.INC SYMB.INC
24 | plt_util.f plt_color.f set_subs.f gw_subs.f ps_subs.f pltlib.inc)
25 |
26 | option(OLD_PLOT_COMPATIBILITY_ROUTINES
27 | "Add the old plot compatibility routines" OFF)
28 |
29 | if(OLD_PLOT_COMPATIBILITY_ROUTINES)
30 | set(PLT_SRCS ${PLT_SRCS} plt_old.f)
31 | endif()
32 |
33 | option(PRIMITIVE_3D_VIEW_ROUTINES
34 | "Add the primitive 3D-view routines" OFF)
35 |
36 | if(3D_VIEW_ROUTINES)
37 | set(PLT_SRCS ${PLT_SRCS} plt_3D.f)
38 | endif()
39 |
40 | if(WIN32)
41 | set(W32WIN_SRCS win32/W32win.c win32/rgbtbl.h win32/Xdefs.h)
42 | add_library(W32win OBJECT ${W32WIN_SRCS})
43 | set(PLT_SRCS ${PLT_SRCS} $)
44 | else()
45 | find_package(X11 REQUIRED)
46 | set(XWIN_SRCS Xwin.c)
47 | add_library(Xwin OBJECT ${XWIN_SRCS})
48 | target_compile_definitions(Xwin PRIVATE UNDERSCORE)
49 | target_include_directories(Xwin SYSTEM PRIVATE ${X11_INCLUDE_DIR})
50 | set(PLT_SRCS ${PLT_SRCS} $)
51 | endif()
52 |
53 | add_library(plt STATIC ${PLT_SRCS})
54 |
55 | set(PLT_VERSION_MAJOR 4)
56 | set(PLT_VERSION_MINOR 47)
57 | set(PLT_VERSION ${PLT_VERSION_MAJOR}.${PLT_VERSION_MINOR})
58 |
59 | set_target_properties(plt PROPERTIES VERSION ${PLT_VERSION})
60 |
61 | if(NOT WIN32)
62 | target_link_libraries(plt PUBLIC ${X11_LIBRARIES})
63 | endif()
64 |
65 | add_subdirectory(examples)
66 | add_subdirectory(sym)
67 |
--------------------------------------------------------------------------------
/orrs/src/ncorr.f:
--------------------------------------------------------------------------------
1 | PROGRAM NCORR
2 | PARAMETER (NH=13)
3 | REAL H(NH), RT(NH),DN(NH)
4 | C
5 | DATA H / 2.3, 2.4, 2.5, 2.6, 2.8, 3.0, 3.4,
6 | & 4.0, 5.0, 7.0, 10.0, 15.0, 20.0 /
7 | C
8 | DATA RT / 4000., 1820., 700., 270., 100., 76., 52.,
9 | & 34., 26., 14., 9.0, 6.4, 5.0 /
10 | C
11 | DATA DN / 0.0067, 0.0064, 0.0076, 0.0104, 0.0200, 0.0323, 0.0529,
12 | & 0.0727, 0.110 , 0.169 , 0.253 , 0.390 , 0.526 /
13 | C
14 | REAL X1(NH), Y1(NH), F1(NH), G1(NH)
15 | REAL X2(NH), Y2(NH), F2(NH), G2(NH)
16 | C
17 | IDEV = 6
18 | SIZE = 8.0
19 | CH = 0.02
20 | C
21 | HMAX = 20.0
22 | DH = 2.0
23 | C
24 | FMAX = 0.5
25 | DF = 0.1
26 | C
27 | FMAX = 0.05
28 | DF = 0.005
29 | C
30 | PAR = 0.75
31 | C
32 | HWT = 1.0/HMAX
33 | FWT = PAR/FMAX
34 | C
35 | N = NH
36 | C
37 | DO 20 I=1, N
38 | HB = 1.0/(H(I)-1.0)
39 | C
40 | X1(I) = 4.0*H(I)
41 | Y1(I) = DN(I)
42 | G1(I) = 0.13 * (0.215/HB)
43 | F1(I) = 0.13 * (0.215/HB)
44 | & - 0.0345 * EXP(-15.0*(HB-0.65)**2)
45 | F1(I) = 0.028*(H(I)-1.0)
46 | & - 0.0345 * EXP(-(3.87/(H(I)-1.0) - 2.52)**2)
47 | C
48 | X2(I) = HMAX* HB
49 | Y2(I) = DN(I)
50 | G2(I) = 0.13 * (0.215/HB)
51 | F2(I) = 0.13 * (0.215/HB)
52 | & - 0.0345 * EXP(-15.0*(HB-0.65)**2)
53 | F2(I) = 0.028*(H(I)-1.0)
54 | & - 0.0345 * EXP(-(3.87/(H(I)-1.0) - 2.52)**2)
55 | C
56 | 20 CONTINUE
57 | C
58 | C
59 | CALL PLOTS(0,-999,IDEV)
60 | CALL FACTOR(SIZE)
61 | C
62 | CALL PLOT(8.0*CH,8.0*CH,-3)
63 | C
64 | CALL PLOTON
65 | C
66 | CALL XAXIS(0.0,-PAR,1.0,0.1,0.0,0.1,CH,1)
67 | C
68 | CALL XAXIS(0.0,0.0,1.0,DH*HWT,0.0,DH,CH,1)
69 | CALL YAXIS(0.0,0.0,PAR,DF*FWT,0.0,DF,CH,3)
70 | C
71 | CALL XYPLOT(N,X1,Y1,0.0,HWT,0.0,FWT,1,0.3*CH,+1)
72 | CALL XYPLOT(N,X1,F1,0.0,HWT,0.0,FWT,1,0.3*CH, 0)
73 | CALL XYPLOT(N,X1,G1,0.0,HWT,0.0,FWT,5,0.3*CH, 0)
74 | C
75 | CALL XYPLOT(N,X2,Y2,0.0,HWT,0.0,FWT,3,0.3*CH,+5)
76 | CALL XYPLOT(N,X2,F2,0.0,HWT,0.0,FWT,2,0.3*CH, 0)
77 | CALL XYPLOT(N,X2,G2,0.0,HWT,0.0,FWT,3,0.3*CH, 0)
78 | C
79 | CALL PLOTOF
80 | C
81 | WRITE(*,*) 'Hit '
82 | READ(*,1000) ANS
83 | 1000 FORMAT(A4)
84 | C
85 | CALL PLOT(0.0,0.0,+999)
86 | STOP
87 | END
88 |
89 |
--------------------------------------------------------------------------------
/runs/dae31.dat:
--------------------------------------------------------------------------------
1 | DAE 31
2 | # Daedalus tip panel airfoil (4ft from tip). Design Re = 250K
3 | 1.000000 0.000000
4 | 0.983670 0.003678
5 | 0.964831 0.008217
6 | 0.942298 0.013939
7 | 0.915136 0.021198
8 | 0.884751 0.029762
9 | 0.854418 0.038671
10 | 0.823963 0.047867
11 | 0.793343 0.057188
12 | 0.763399 0.066115
13 | 0.734041 0.074433
14 | 0.705002 0.082031
15 | 0.676045 0.088917
16 | 0.647058 0.095104
17 | 0.617978 0.100577
18 | 0.588755 0.105349
19 | 0.559366 0.109434
20 | 0.529812 0.112852
21 | 0.500123 0.115621
22 | 0.470348 0.117747
23 | 0.440557 0.119235
24 | 0.410816 0.120061
25 | 0.381154 0.120198
26 | 0.351603 0.119637
27 | 0.322220 0.118356
28 | 0.293057 0.116321
29 | 0.264162 0.113501
30 | 0.235612 0.109876
31 | 0.207525 0.105414
32 | 0.180030 0.100065
33 | 0.153293 0.093810
34 | 0.127559 0.086629
35 | 0.103134 0.078508
36 | 0.080386 0.069477
37 | 0.059755 0.059645
38 | 0.041713 0.049168
39 | 0.026721 0.038403
40 | 0.015173 0.027944
41 | 0.007269 0.018571
42 | 0.002584 0.010709
43 | 0.000358 0.004518
44 | 0.000025 -0.000558
45 | 0.000189 -0.002800
46 | 0.001175 -0.006664
47 | 0.002966 -0.009596
48 | 0.005693 -0.011873
49 | 0.009988 -0.013595
50 | 0.017247 -0.014838
51 | 0.029729 -0.015535
52 | 0.049021 -0.015193
53 | 0.074285 -0.013756
54 | 0.102957 -0.011523
55 | 0.133315 -0.008820
56 | 0.164511 -0.005908
57 | 0.196175 -0.002926
58 | 0.228118 0.000031
59 | 0.260168 0.002902
60 | 0.292125 0.005647
61 | 0.323993 0.008244
62 | 0.355786 0.010669
63 | 0.387504 0.012911
64 | 0.419145 0.014938
65 | 0.450717 0.016729
66 | 0.482216 0.018267
67 | 0.513641 0.019520
68 | 0.545019 0.020458
69 | 0.576374 0.021089
70 | 0.607695 0.021417
71 | 0.638977 0.021429
72 | 0.670233 0.021125
73 | 0.701474 0.020513
74 | 0.732690 0.019612
75 | 0.763858 0.018421
76 | 0.794976 0.016921
77 | 0.826072 0.015114
78 | 0.857232 0.012998
79 | 0.888815 0.010562
80 | 0.919284 0.007958
81 | 0.945604 0.005528
82 | 0.967071 0.003429
83 | 0.984882 0.001590
84 | 1.000000 0.000000
85 |
--------------------------------------------------------------------------------
/runs/lnv109a.dat:
--------------------------------------------------------------------------------
1 | LNV-109A
2 | 1.000000 0.000000
3 | 0.993938 0.000543
4 | 0.986151 0.001101
5 | 0.976665 0.001787
6 | 0.965515 0.002657
7 | 0.952740 0.003737
8 | 0.938385 0.005056
9 | 0.922500 0.006639
10 | 0.905141 0.008509
11 | 0.886369 0.010690
12 | 0.866250 0.013204
13 | 0.844856 0.016069
14 | 0.822261 0.019300
15 | 0.798545 0.022912
16 | 0.773791 0.026914
17 | 0.748087 0.031312
18 | 0.721524 0.036110
19 | 0.694194 0.041303
20 | 0.666193 0.046886
21 | 0.637621 0.052846
22 | 0.608579 0.059164
23 | 0.579167 0.065813
24 | 0.549490 0.072756
25 | 0.519653 0.079934
26 | 0.489759 0.087276
27 | 0.459916 0.094701
28 | 0.430226 0.102116
29 | 0.400796 0.109249
30 | 0.371729 0.115295
31 | 0.343127 0.119496
32 | 0.315090 0.121941
33 | 0.287718 0.122784
34 | 0.261106 0.122185
35 | 0.235350 0.120264
36 | 0.210538 0.117155
37 | 0.186758 0.113001
38 | 0.164095 0.107922
39 | 0.142628 0.102024
40 | 0.122432 0.095430
41 | 0.103579 0.088284
42 | 0.086135 0.080712
43 | 0.070162 0.072825
44 | 0.055715 0.064730
45 | 0.042846 0.056528
46 | 0.031599 0.048318
47 | 0.022015 0.040194
48 | 0.014127 0.032222
49 | 0.007963 0.024369
50 | 0.003544 0.016413
51 | 0.000887 0.008081
52 | 0.000000 0.000000
53 | 0.000887 -.008081
54 | 0.003544 -.015530
55 | 0.007963 -.022138
56 | 0.014127 -.027272
57 | 0.022015 -.030455
58 | 0.031599 -.031544
59 | 0.042846 -.031202
60 | 0.055715 -.030105
61 | 0.070162 -.028554
62 | 0.086135 -.026666
63 | 0.103579 -.024529
64 | 0.122432 -.022211
65 | 0.142628 -.019767
66 | 0.164095 -.017246
67 | 0.186758 -.014689
68 | 0.210538 -.012132
69 | 0.235350 -.009608
70 | 0.261106 -.007151
71 | 0.287718 -.004782
72 | 0.315090 -.002532
73 | 0.343127 -.000425
74 | 0.371729 0.001516
75 | 0.400796 0.003265
76 | 0.430226 0.004793
77 | 0.459916 0.006064
78 | 0.489759 0.006997
79 | 0.519653 0.007552
80 | 0.549490 0.007802
81 | 0.579167 0.007826
82 | 0.608579 0.007672
83 | 0.637621 0.007376
84 | 0.666193 0.006968
85 | 0.694194 0.006477
86 | 0.721524 0.005927
87 | 0.748087 0.005340
88 | 0.773791 0.004735
89 | 0.798545 0.004130
90 | 0.822261 0.003538
91 | 0.844856 0.002973
92 | 0.866250 0.002443
93 | 0.886369 0.001955
94 | 0.905141 0.001515
95 | 0.922500 0.001126
96 | 0.938385 0.000789
97 | 0.952740 0.000505
98 | 0.965515 0.000273
99 | 0.976665 0.000093
100 | 0.986151 -.000038
101 | 0.993938 -.000097
102 | 1.000000 0.000000
103 |
--------------------------------------------------------------------------------
/orrs/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # Orr-Sommerfeld Computation and Database Package
4 | #
5 | # Copyright (C) 2000 Mark Drela
6 | #
7 | # This program is free software; you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation; either version 2 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program; if not, write to the Free Software
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | add_executable(osgen osgen.f io.f spline.f getarg0.f)
24 |
25 | add_executable(osgen1 osgen1.f io.f spline.f getarg0.f)
26 |
27 | if(OLD_PLOT_COMPATIBILITY_ROUTINES)
28 | add_executable(fscorr fscorr.f fs.f plutil.f)
29 | target_link_libraries(fscorr plt)
30 |
31 | add_executable(fsrun fsrun.f fs.f)
32 | target_link_libraries(fsrun plt)
33 | endif()
34 |
35 | add_executable(intai intai.f osmap.f plutil.f)
36 | target_compile_definitions(intai PRIVATE "OSFILE_DIR=${ORRS_DIR}")
37 | target_link_libraries(intai plt)
38 |
39 | if(OLD_PLOT_COMPATIBILITY_ROUTINES)
40 | add_executable(mappl1 mappl1.f ask1.f conlab.f io.f getarg0.f)
41 | target_link_libraries(mappl1 plt)
42 |
43 | add_executable(ncorr ncorr.f fs.f plutil.f)
44 | target_link_libraries(ncorr plt)
45 | endif()
46 |
47 | add_executable(osrun osrun.f fs.f orrs.f ORRS.INC ospres.f OSPRES.INC
48 | plutil.f userio.f)
49 | target_link_libraries(osrun plt)
50 |
51 | add_executable(osseq osseq.f fs.f orrs.f ORRS.INC ospres.f OSPRES.INC
52 | plutil.f userio.f)
53 | target_link_libraries(osseq plt)
54 |
55 | add_executable(pfplot pfplot.f fs.f ask1.f)
56 | target_link_libraries(pfplot plt)
57 |
58 | add_executable(roll roll.f)
59 | target_link_libraries(roll plt)
60 |
61 | add_executable(as2bi as2bi.f io.f getarg0.f)
62 |
63 | add_executable(bi2as bi2as.f io.f getarg0.f)
64 |
65 | # Disabled due to build errors.
66 | # add_executable(bi2bi bi2bi.f io.f getarg0.f)
67 |
68 | add_executable(otest otest.f osmap.f)
69 | target_compile_definitions(otest PRIVATE "OSFILE_DIR=${ORRS_DIR}")
70 |
71 | add_executable(osweep osweep.f osmap.f)
72 | target_compile_definitions(osweep PRIVATE "OSFILE_DIR=${ORRS_DIR}")
73 |
--------------------------------------------------------------------------------
/src/frplot.f:
--------------------------------------------------------------------------------
1 |
2 | SUBROUTINE FRPLOT(N,S,X,HK,TH,UE,VE,XTR,FREF,
3 | & XOFF,XSF, YOFF,YSF, CHF)
4 | DIMENSION S(N+1), X(N+1), HK(N+1), TH(N+1), UE(N+1), VE(N+1)
5 | C------------------------------------------------------------
6 | C Plots the amplitude A(x) for a specified number
7 | C of frequencies. The frequency values which are
8 | C used are set internally in the amplitude calculation
9 | C routine NTCALC, and displayed here.
10 | C
11 | C N number of laminar streamwise points i
12 | C (transition is in interval N...N+1)
13 | C S(i) streamwise arc length for integrating -a_i = d[ln(A)]/ds
14 | C X(i) plotting x coordinate
15 | C HK(i) kinematic shape parameter
16 | C TH(i) momentum thickness
17 | C UE(i) edge velocity
18 | C VE(i) edge kinematic viscosity
19 | C XTR transition x location, should be X(N) < XTR < X(N+1)
20 | C
21 | C FREF reference radian frequency (w/FREF is displayed)
22 | C
23 | C XOFF plotting offsets, scales... Xplot = (X-XOFF)*XSF
24 | C YOFF Yplot = (Y-YOFF)*YSF
25 | C XSF
26 | C YSF
27 | C
28 | C CHF character height
29 | C------------------------------------------------------------
30 | C
31 | C---- max number of streamwise points and frequencies
32 | PARAMETER (IDIM=300,NFX=15)
33 | ccc PARAMETER (IDIM=300,NFX=50)
34 | C
35 | DIMENSION FREQ(NFX), ANF(IDIM,NFX)
36 | C
37 | IF(N+1 .GT. IDIM) STOP 'FRPLOT: Array overflow. Increase IDIM.'
38 | C
39 | C---- set number of frequencies plotted
40 | NFR = NFX
41 | C
42 | C---- calculate wave amplitudes for each frequency
43 | CALL NTCALC(IDIM,N+1, S,HK,TH,UE,VE,
44 | & NFR,FREQ,ANF)
45 | C
46 | C---- plot amplitudes for all frequencies
47 | X1 = X(N)
48 | X2 = XTR
49 | FRAC = (X2-X1)/(X(N+1)-X1)
50 | DO 10 IFR=1, NFR
51 | C
52 | C------ plot A(x) up to the transition interval
53 | CALL XYLINE(N,X,ANF(1,IFR),XOFF,XSF,YOFF,YSF,1)
54 | C
55 | C------ plot last bit to the transition location in the transition interval
56 | Y1 = ANF(N,IFR)
57 | Y2 = ANF(N,IFR) + FRAC*(ANF(N+1,IFR)-ANF(N,IFR))
58 | CALL PLOT((X1-XOFF)*XSF,(Y1-YOFF)*YSF,3)
59 | CALL PLOT((X2-XOFF)*XSF,(Y2-YOFF)*YSF,2)
60 | C
61 | C------ label the curve with its frequency if it grew to more than ANFMIN
62 | ANFMIN = 0.5
63 | IF(MAX(ANF(N,IFR),ANF(N+1,IFR)) .GT. ANFMIN) THEN
64 | XNUM = (X2-XOFF)*XSF + 0.5*CHF
65 | YNUM = (Y2-YOFF)*YSF - 0.5*CHF
66 | CALL PLNUMB(XNUM,YNUM,CHF,FREQ(IFR)/FREF,0.0,2)
67 | ENDIF
68 | C
69 | 10 CONTINUE
70 | C
71 | RETURN
72 | END
73 |
--------------------------------------------------------------------------------
/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # XFOIL
4 | #
5 | # Copyright (C) 2000 Mark Drela
6 | #
7 | # This program is free software; you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation; either version 2 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program; if not, write to the Free Software
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | set(XFOIL_SRCS xfoil.f xpanel.f xoper.f xtcam.f xgdes.f xqdes.f xmdes.f
24 | CIRCLE.INC xsolve.f xbl.f XBL.INC xblsys.f xpol.f xplots.f pntops.f
25 | XDES.INC xgeom.f xutils.f modify.f blplot.f polplt.f aread.f naca.f
26 | spline.f plutil.f iopol.f PINDEX.INC gui.f sort.f dplot.f XFOIL.INC
27 | profil.f userio.f)
28 |
29 | option(INDIVIDUAL_TS_WAVE_FREQUENCY_PLOTTING
30 | "Individual TS-wave frequency plotting" OFF)
31 |
32 | if(INDIVIDUAL_TS_WAVE_FREQUENCY_PLOTTING)
33 | set(XFOIL_SRCS ${XFOIL_SRCS} frplot.f ntcalc.f $
34 | $)
35 | else()
36 | set(XFOIL_SRCS ${XFOIL_SRCS} frplot0.f)
37 | endif()
38 |
39 | add_executable(xfoil ${XFOIL_SRCS})
40 | set_target_properties(xfoil PROPERTIES VERSION ${PROJECT_VERSION})
41 | target_link_libraries(xfoil plt)
42 |
43 | export(TARGETS xfoil FILE "${CMAKE_BINARY_DIR}/xfoil-targets.cmake")
44 |
45 | install(TARGETS xfoil EXPORT xfoil-targets DESTINATION ${CMAKE_INSTALL_BINDIR})
46 | install(EXPORT xfoil-targets
47 | DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
48 |
49 | set(XFOIL_COPYING gpl.txt)
50 | install(FILES ${XFOIL_COPYING} DESTINATION ${CMAKE_INSTALL_DOCDIR}
51 | RENAME COPYING)
52 |
53 | set(PXPLOT_SRCS pxplot.f PXPLOT.INC plutil.f gui.f userio.f)
54 | add_executable(pxplot ${PXPLOT_SRCS})
55 | set_target_properties(pxplot PROPERTIES VERSION ${PROJECT_VERSION})
56 | target_link_libraries(pxplot plt)
57 | install(TARGETS pxplot DESTINATION ${CMAKE_INSTALL_BINDIR})
58 |
59 | set(PPLOT_SRCS pplot.f PPLOT.INC polplt.f sort.f iopol.f PINDEX.INC userio.f)
60 | add_executable(pplot ${PPLOT_SRCS})
61 | set_target_properties(pplot PROPERTIES VERSION ${PROJECT_VERSION})
62 | target_link_libraries(pplot plt)
63 | install(TARGETS pplot DESTINATION ${CMAKE_INSTALL_BINDIR})
64 |
--------------------------------------------------------------------------------
/plotlib/sym/Readme:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Module: Readme
3 |
4 | Copyright (C) 1996 Harold Youngren, Mark Drela
5 |
6 | This library is free software; you can redistribute it and/or
7 | modify it under the terms of the GNU Library General Public
8 | License as published by the Free Software Foundation; either
9 | version 2 of the License, or (at your option) any later version.
10 |
11 | This library is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | Library General Public License for more details.
15 |
16 | You should have received a copy of the GNU Library General Public
17 | License along with this library; if not, write to the Free
18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 |
20 | Report problems to: guppy@maine.com
21 | or drela@mit.edu
22 | ***********************************************************************/
23 |
24 |
25 | This directory contains programs and routines for creating,
26 | modifying, and using vector fonts.
27 |
28 |
29 | PROGRAM SYMGEN is an interactive program for creating or modifying
30 | font description files XXXX.FNT, and is invoked with
31 |
32 | % make symgen (requires ../libPlt.a)
33 | % symgen XXXX
34 |
35 | The header of symgen.f has a description of the format of
36 | a XXXX.FNT file, although this is of no concern to the user.
37 | SYMGEN can create an include file XXXX.INC which has the
38 | font encoding placed into Fortran DATA statements. XXXX.INC
39 | is then compiled with a Versaplot SYMBOL-type routine which
40 | is used in applications.
41 |
42 | Four sample databases, include files, and application routines
43 | already exist. The application routines are in ../plt_font.f:
44 |
45 | CHAR.FNT CHAR.INC SUBR. PLCHAR (Upper,lower case letters, WYSIWYG)
46 | SLAN.FNT SLAN.INC SUBR. PLSLAN (Upper,lower case slanted letters)
47 | MATH.FNT MATH.INC SUBR. PLMATH (Latex-like Greek symbols, exponents)
48 | SYMB.FNT SYMB.INC SUBR. PLSYMB (Versaplot plotting symbols)
49 |
50 | also available: SUBR. PLNUMB (Whole floating-point numbers)
51 |
52 | One can generate analogous files and plot routines for any
53 | custom font, e.g.
54 |
55 | USER.FNT USER.INC SUBR. PLUSER
56 |
57 |
58 | PROGRAM TEST plots the complete CHAR, SLAN, MATH, and SYMB fonts,
59 | and also plots sample character strings for examination.
60 |
61 | % make test
62 | % test
63 |
64 | Mark Drela
65 | 10 March 96
66 |
67 |
68 |
--------------------------------------------------------------------------------
/plotlib/misc/Readme.absoft:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Module: Readme.absoft
3 |
4 | Copyright (C) 1996 Harold Youngren, Mark Drela
5 |
6 | This library is free software; you can redistribute it and/or
7 | modify it under the terms of the GNU Library General Public
8 | License as published by the Free Software Foundation; either
9 | version 2 of the License, or (at your option) any later version.
10 |
11 | This library is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | Library General Public License for more details.
15 |
16 | You should have received a copy of the GNU Library General Public
17 | License along with this library; if not, write to the Free
18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 |
20 | Report problems to: guppy@maine.com
21 | or drela@mit.edu
22 | ***********************************************************************/
23 |
24 | Xplot11
25 | C Version 4.46 11/28/01
26 |
27 |
28 | This Readme file pertains to the Absoft Linux f77 compiler, version 5.x, this
29 | stuff has not been checked for later versions...
30 |
31 | Various compilers support intrinsics for RSHIFT, LSHIFT and AND(). Absoft
32 | is among those that do not have these supported (also HPUX f77 at last check).
33 |
34 | I added a file (util-ops.f) that needs to be included for the Absoft f77 environment. This file contains functions for bit shifts RSHIFT,LSHIFT and
35 | arithmetic AND(I1,I2) for fortrans that lack these intrinsics.
36 |
37 | See the Makefile where this is one of the commented out options.
38 |
39 | Note that a number of compile switches need to be set when using the Absoft
40 | f77 compiler. See the Makefile for these.
41 |
42 |
43 | Absoft Linux f77 flags that I use...
44 |
45 | DP = -N113 (only for making a double precision version of the library)
46 | FFLAGS = -s -f -O -B100 -B108 -N3 -N90 $(DP)
47 |
48 | -s static
49 | -f force to lower case
50 | -O optimize
51 | -B100 Pentium Pro flag (use -B101 for general Pentium compatibility)
52 | -B108 append single underscore to names
53 | -N3 explicitly opened unformatted files contain record information
54 | -N90 pass character args same as g77 and f2c
55 | -N113 lame version of -r8 flag to promote singles into doubles
56 |
57 | Note that you will need to link with the libU77 library if you use some
58 | of the UNIX fortran-isms like GETARG. This is supplied by Absoft but is not
59 | in their default link libs. You need to add this library to a link statement
60 | something like this:
61 |
62 | f77 -o foobar foobar.o -lU77
63 |
64 | HY
65 |
66 |
--------------------------------------------------------------------------------
/plotlib/Readme.colors:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Module: Readme.colors
3 |
4 | Copyright (C) 1996 Harold Youngren, Mark Drela
5 |
6 | This library is free software; you can redistribute it and/or
7 | modify it under the terms of the GNU Library General Public
8 | License as published by the Free Software Foundation; either
9 | version 2 of the License, or (at your option) any later version.
10 |
11 | This library is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | Library General Public License for more details.
15 |
16 | You should have received a copy of the GNU Library General Public
17 | License along with this library; if not, write to the Free
18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 |
20 | Report problems to: guppy@maine.com
21 | or drela@mit.edu
22 | ***********************************************************************/
23 |
24 | Xplot11
25 | C Version 4.46 11/28/01
26 |
27 |
28 | This Readme file pertains to problems with colors under some window managers.
29 |
30 | The color routines used here employ shared colormaps to avoid the major screen
31 | color dislocations that accompany switching mouse focus with private colormaps.
32 | When the window manager leaves a sufficient number of color entries unallocated
33 | this approach works fine. Newer window managers, notably the fvwm-95 variants
34 | that are now supplied with the Linux distributions, appear to eat up almost
35 | the complete colormap for themselves with allocations for many pixmaps for
36 | icons. This causes heartaches when using Xplot11 as you get lots of messages
37 | about trouble allocating colors (and the colors are messed up in the plot).
38 |
39 | This could be avoided by allocating private colormaps but this gets into the
40 | color flashing problem alluded to above.
41 |
42 | For the time being I suggest using a window manager that doesn't go overboard
43 | allocating lots of colors. Twm works fine, I use plain old fvwm with xfm
44 | for my usual interface, I set up an .fvwmrc file that does not use
45 | too many wasteful color features (like lots of pixmap icons). This leaves
46 | around 200 free colors most of the time. Note that if you run something like
47 | xv displaying a typical color gif file you will eat up most or all the free
48 | colors while that application is running. Once you quit xv (or whatever) the
49 | colors are freed and clashes with Xplot11 disappear.
50 |
51 | If there is a sufficient problem with this I will make an option of allocating
52 | a private colormap when no color space is available in the shared colormap...
53 |
54 | HY
55 |
56 |
--------------------------------------------------------------------------------
/runs/la203.dat:
--------------------------------------------------------------------------------
1 | LA203A
2 | 1.000000 0.000000
3 | 0.993938 0.003044
4 | 0.986151 0.005883
5 | 0.976665 0.008985
6 | 0.965516 0.012408
7 | 0.952740 0.016162
8 | 0.938385 0.020258
9 | 0.922500 0.024700
10 | 0.905141 0.029490
11 | 0.886369 0.034630
12 | 0.866250 0.040113
13 | 0.844856 0.045936
14 | 0.822261 0.052086
15 | 0.798545 0.058545
16 | 0.773791 0.065291
17 | 0.748087 0.072292
18 | 0.721524 0.079495
19 | 0.694194 0.086797
20 | 0.666193 0.094063
21 | 0.637621 0.101087
22 | 0.608579 0.107640
23 | 0.579167 0.113566
24 | 0.549490 0.118770
25 | 0.519653 0.123176
26 | 0.489759 0.126743
27 | 0.459916 0.129436
28 | 0.430226 0.131219
29 | 0.400796 0.132090
30 | 0.371729 0.132075
31 | 0.343127 0.131182
32 | 0.315090 0.129435
33 | 0.287716 0.126854
34 | 0.261106 0.123424
35 | 0.235350 0.119234
36 | 0.210538 0.114389
37 | 0.186758 0.108970
38 | 0.164095 0.103048
39 | 0.142628 0.096688
40 | 0.122432 0.089956
41 | 0.103579 0.082919
42 | 0.086135 0.075641
43 | 0.070162 0.068190
44 | 0.055715 0.060636
45 | 0.042846 0.053047
46 | 0.031599 0.045492
47 | 0.022015 0.038031
48 | 0.014127 0.030677
49 | 0.007963 0.023336
50 | 0.003544 0.015836
51 | 0.000887 0.008000
52 | 0.000000 0.000000
53 | 0.000887 -0.008018
54 | 0.003544 -0.015138
55 | 0.007963 -0.021544
56 | 0.014127 -0.026519
57 | 0.022015 -0.029639
58 | 0.031599 -0.031320
59 | 0.042846 -0.032209
60 | 0.055715 -0.032676
61 | 0.070162 -0.032868
62 | 0.086135 -0.032857
63 | 0.103579 -0.032693
64 | 0.122432 -0.032408
65 | 0.142628 -0.032024
66 | 0.164095 -0.031556
67 | 0.186758 -0.031016
68 | 0.210538 -0.030405
69 | 0.235350 -0.029724
70 | 0.261106 -0.028966
71 | 0.287716 -0.028124
72 | 0.315090 -0.027183
73 | 0.343127 -0.026124
74 | 0.371729 -0.024919
75 | 0.400796 -0.023512
76 | 0.430226 -0.021827
77 | 0.459916 -0.019830
78 | 0.489759 -0.017533
79 | 0.519653 -0.014948
80 | 0.549490 -0.012098
81 | 0.579167 -0.009052
82 | 0.608579 -0.005918
83 | 0.637621 -0.002821
84 | 0.666193 0.000143
85 | 0.694194 0.002917
86 | 0.721524 0.005447
87 | 0.748087 0.007686
88 | 0.773791 0.009595
89 | 0.798545 0.011145
90 | 0.822261 0.012312
91 | 0.844856 0.013088
92 | 0.866250 0.013463
93 | 0.886369 0.013448
94 | 0.905141 0.013056
95 | 0.922500 0.012302
96 | 0.938385 0.011218
97 | 0.952740 0.009838
98 | 0.965516 0.008212
99 | 0.976665 0.006393
100 | 0.986151 0.004425
101 | 0.993938 0.002384
102 | 1.000000 0.000000
103 |
104 |
--------------------------------------------------------------------------------
/plotlib/examples/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # Xplot11 Graphics Package
4 | #
5 | # Copyright (C) 1996 Harold Youngren, Mark Drela
6 | #
7 | # This library is free software; you can redistribute it and/or
8 | # modify it under the terms of the GNU Library General Public
9 | # License as published by the Free Software Foundation; either
10 | # version 2 of the License, or (at your option) any later version.
11 | #
12 | # This library is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | # Library General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Library General Public
18 | # License along with this library; if not, write to the Free
19 | # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | if(BUILD_TESTING)
24 | if(OLD_PLOT_COMPATIBILITY_ROUTINES)
25 | add_executable(volts volts.f)
26 | target_link_libraries(volts plt)
27 | add_test(NAME volts COMMAND volts)
28 |
29 | add_executable(volts_old volts_old.f)
30 | target_link_libraries(volts_old plt)
31 | add_test(NAME volts_old COMMAND volts_old)
32 | endif()
33 |
34 | add_executable(symbols symbols.f)
35 | target_link_libraries(symbols plt)
36 | add_test(NAME symbols COMMAND symbols)
37 |
38 | add_executable(symbolsall symbolsall.f)
39 | target_link_libraries(symbolsall plt)
40 | add_test(NAME symbolsall COMMAND symbolsall)
41 |
42 | add_executable(squares squares.f)
43 | target_link_libraries(squares plt)
44 | add_test(NAME squares COMMAND squares)
45 |
46 | add_executable(squaresdoublebuff squaresdoublebuff.f)
47 | target_link_libraries(squaresdoublebuff plt)
48 | add_test(NAME squaresdoublebuff COMMAND squaresdoublebuff)
49 |
50 | add_executable(spectrum spectrum.f)
51 | target_link_libraries(spectrum plt)
52 | add_test(NAME spectrum COMMAND spectrum)
53 |
54 | add_executable(cmap2 cmap2.f)
55 | target_link_libraries(cmap2 plt)
56 | add_test(NAME cmap2 COMMAND cmap2)
57 |
58 | add_executable(cmap3 cmap3.f)
59 | target_link_libraries(cmap3 plt)
60 | add_test(NAME cmap3 COMMAND cmap3)
61 |
62 | add_executable(defmap defmap.f)
63 | target_link_libraries(defmap plt)
64 | add_test(NAME defmap COMMAND defmap)
65 |
66 | # Disabled due to build errors.
67 | # add_executable(gridtest gridtest.f)
68 | # target_link_libraries(gridtest plt)
69 | # add_test(NAME gridtest COMMAND gridtest)
70 |
71 | add_executable(zoomtest zoomtest.f)
72 | target_link_libraries(zoomtest plt)
73 | add_test(NAME zoomtest COMMAND zoomtest)
74 |
75 | if(OLD_PLOT_COMPATIBILITY_ROUTINES)
76 | add_executable(contest contest.f)
77 | target_link_libraries(contest plt)
78 | add_test(NAME contest COMMAND contest)
79 | endif()
80 | endif()
81 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #############################################################################
2 | #
3 | # XFOIL
4 | #
5 | # Copyright (C) 2000 Mark Drela
6 | #
7 | # This program is free software; you can redistribute it and/or modify
8 | # it under the terms of the GNU General Public License as published by
9 | # the Free Software Foundation; either version 2 of the License, or
10 | # (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU General Public License
18 | # along with this program; if not, write to the Free Software
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | #
21 | #############################################################################
22 |
23 | cmake_minimum_required(VERSION 3.5)
24 | project(xfoil LANGUAGES C Fortran VERSION 6.97)
25 |
26 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
27 | set(CMAKE_BUILD_TYPE Release CACHE STRING
28 | "Choose the type of build; options are Debug Release RelWithDebInfo MinSizeRel"
29 | FORCE)
30 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
31 | STRINGS
32 | Debug
33 | Release
34 | RelWithDebInfo
35 | MinSizeRel)
36 | endif()
37 |
38 | include(CTest)
39 |
40 | if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
41 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy")
42 | endif()
43 |
44 | option(DOUBLE_PRECISION
45 | "Make the real and complex types eight bytes long" OFF)
46 |
47 | if(DOUBLE_PRECISION)
48 | if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
49 | if(WIN32)
50 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /real-size:64")
51 | else()
52 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64")
53 | endif()
54 | elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
55 | set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8")
56 | endif()
57 | endif()
58 |
59 | include(GNUInstallDirs)
60 |
61 | set(ORRS_DIR "${CMAKE_SOURCE_DIR}/orrs")
62 |
63 | add_subdirectory(orrs)
64 | add_subdirectory(osrc)
65 | add_subdirectory(plotlib)
66 | add_subdirectory(src)
67 |
68 | set(XFOIL_DOCS version_notes.txt xfoil_doc.txt)
69 | install(FILES ${XFOIL_DOCS} DESTINATION ${CMAKE_INSTALL_DOCDIR})
70 |
71 | include(CMakePackageConfigHelpers)
72 |
73 | configure_package_config_file(xfoil-config.cmake.in xfoil-config.cmake.in
74 | INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
75 | PATH_VARS CMAKE_INSTALL_BINDIR
76 | NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO)
77 |
78 | file(GENERATE
79 | OUTPUT xfoil-config.cmake
80 | INPUT "${CMAKE_CURRENT_BINARY_DIR}/xfoil-config.cmake.in")
81 |
82 | write_basic_package_version_file(xfoil-config-version.cmake
83 | COMPATIBILITY SameMajorVersion)
84 |
85 | install(FILES
86 | "${CMAKE_CURRENT_BINARY_DIR}/xfoil-config.cmake"
87 | "${CMAKE_CURRENT_BINARY_DIR}/xfoil-config-version.cmake"
88 | DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
89 |
90 | include(CPack)
91 |
--------------------------------------------------------------------------------
/plotlib/examples/Readme-examples:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Module: Readme-examples
3 |
4 | Copyright (C) 1996 Harold Youngren, Mark Drela
5 |
6 | This program is free software; you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation; either version 2 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; if not, write to the Free Software
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 |
20 | Report problems to: guppy@maine.com
21 | or drela@mit.edu
22 | ***********************************************************************/
23 |
24 | Make the test programs under Unix by:
25 |
26 | change options in ../config.make to match your environment
27 | % make
28 |
29 | Make the test programs under Windoze:
30 |
31 | You need Visual C and either the Compaq Visual Fortran compiler or the Intel
32 | Fortran compiler.
33 | compile and link with command in DOS window:
34 |
35 | C:\Xfoil\plotlib\examples: nmake /f Makefile.NT
36 |
37 |
38 |
39 |
40 | Sample and test programs
41 | -------------------------
42 |
43 | volts.f - demo program that draws a simple, labeled plot with axes.
44 |
45 | volts_old.f - demo program that draws a simple, labeled plot with axes.
46 | (uses old "Versatec" plot calls)
47 |
48 | squares.f - draws a sine wave in colored boxes, has colored labels
49 |
50 | squaresdoublebuff.f - demo of double buffering, draws a sine wave in colored
51 | boxes that cycle across the sine wave w/o flickering
52 |
53 | gridtest.f - tests the grid routines (obvious, aren't we...)
54 |
55 | symbols.f
56 | symbolsall.f - display and test the vector fonts
57 |
58 | cmap2.f
59 | cmap3.f - used for interactive viewing of RGB color components:
60 |
61 | zoomtest.f - test of zooming
62 |
63 | contest.f - test of contouring primitives for color, filled contours
64 |
65 | defmap.f - displays the default colormap produced by CALL COLORMAPDEFAULT
66 |
67 | spectrum.f - displays the "Spectrum" produced by
68 | CALL COLORSPECTRUMHUES(ncols, RYGCBM_string)
69 | in pie and bar form.
70 |
71 | Typical values for RYGCBM_string might be
72 | 'RYG'
73 | 'GYR'
74 | 'MCY'
75 | 'BMRY'
76 | 'BCGYR', etc.
77 |
78 | Choosing strongly non-contiguous sequences like 'RCB' is OK,
79 | but will make a horrid-looking Spectrum.
80 |
81 | sym/test.f - display current vector fonts
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/orrs/src/pfplot.f:
--------------------------------------------------------------------------------
1 | PROGRAM PFPLOT
2 | PARAMETER (NMAX=256)
3 | REAL ETA(NMAX), F(NMAX), U(NMAX), S(NMAX)
4 | CHARACTER*1 ANS
5 | LOGICAL OK
6 | C
7 | IDEV = 1
8 | IDEVRP = 2
9 | SIZE = 5.0
10 | IPSLU = 0
11 | SCRNFR = 0.85
12 | C
13 | CALL PLINITIALIZE
14 | C
15 | CALL PLOPEN(SCRNFR,IPSLU,IDEV)
16 | CALL NEWFACTOR(SIZE)
17 | C
18 | CALL PLOT(0.7,0.1,-3)
19 | C
20 | N = 256
21 | ETAE = 16.0
22 | GEO = 1.01
23 | C
24 | EWT = 1.0/ETAE
25 | UWT = 0.5
26 | PWT = 0.2
27 | PWT = 1.0
28 | CH = 0.02
29 | C
30 | IF(N.GT.NMAX) STOP 'TEST: Array overflow.'
31 | C
32 | 2 CALL PFLGET(N,GEO,ETAE,ETA,F,U,S,H)
33 | C
34 | CALL NEWPEN(1)
35 | C
36 | CALL PLOT(0.0,0.0,3)
37 | CALL PLOT(UWT*1.0,0.0,2)
38 | CALL PLOT(0.0,0.0,3)
39 | CALL PLOT(0.0,EWT*ETAE,2)
40 | C
41 | CALL NEWPEN(3)
42 | CALL PLOT(UWT*U(1),EWT*ETA(1),3)
43 | DO 10 I=2, N
44 | CALL PLOT(UWT*U(I),EWT*ETA(I),2)
45 | 10 CONTINUE
46 | C
47 | CALL PLSYMB(UWT ,EWT*ETA(N)+0.5*CH,CH,'H = ',0.0,4)
48 | CALL PLNUMB(UWT+4.0*CH,EWT*ETA(N)+0.5*CH,CH, H ,0.0,3)
49 | CALL PLFLUSH
50 | C
51 | CALL ASKL('Another profile ?^',OK)
52 | IF(OK) GO TO 2
53 | C
54 | CALL PLCLOSE
55 | STOP
56 | END
57 |
58 |
59 |
60 | SUBROUTINE PFLGET(N,GEO,ETAE,ETA,F,U,S,H)
61 | REAL ETA(N),F(N),U(N),S(N)
62 | CHARACTER*48 FNAME
63 | C
64 | C---- eta coordinate normalized with momentum thickness
65 | INORM = 3
66 | C
67 | WRITE(6,*) ' '
68 | WRITE(6,*) ' 1 Falkner-Skan parameter m = x/U dU/dx'
69 | WRITE(6,*) ' 2 Falkner-Skan parameter beta = 2m/(m+1)'
70 | WRITE(6,*) ' 3 Falkner-Skan shape parameter H'
71 | WRITE(6,*) ' 4 General profile input file'
72 | WRITE(6,*) ' '
73 | CALL ASKI('Select profile option^',IOPT)
74 | C
75 | IF(IOPT.NE.4) THEN
76 | CALL ASKI('Enter number of BL points^',N)
77 | CALL ASKR('Enter geometric stretching factor^',GEO)
78 | CALL ASKR('Enter edge y/theta value^',ETAE)
79 | ENDIF
80 | C
81 | C
82 | IF(IOPT.EQ.1) THEN
83 | C
84 | CALL ASKR('Enter m^',BU)
85 | CALL FS(INORM,1,BU,H,N,ETAE,GEO,ETA,F,U,S,DELTA)
86 | C
87 | ELSE IF(IOPT.EQ.2) THEN
88 | C
89 | CALL ASKR('Enter beta^',BETA)
90 | BU = BETA/(2.0-BETA)
91 | CALL FS(INORM,1,BU,H,N,ETAE,GEO,ETA,F,U,S,DELTA)
92 | C
93 | ELSE IF(IOPT.EQ.3) THEN
94 | C
95 | CALL ASKR('Enter H^',H)
96 | CALL FS(INORM,2,BU,H,N,ETAE,GEO,ETA,F,U,S,DELTA)
97 | C
98 | ELSE
99 | C
100 | CALL ASKS('Enter profile filename^',FNAME)
101 | OPEN(1,FILE=FNAME,STATUS='OLD')
102 | READ(1,*) N, H
103 | DO 5 I=1, N
104 | READ(1,*) ETA(I), U(I), S(I)
105 | 5 CONTINUE
106 | CLOSE(1)
107 | C
108 | GEO = (ETA(3)-ETA(2)) / (ETA(2)-ETA(1))
109 | ETAE = ETA(N)
110 | ENDIF
111 | C
112 | WRITE(6,1050) N, H, ETA(N), GEO
113 | 1050 FORMAT(/' n =', I4,' H =', F7.3,
114 | & ' Ye =', F7.3,
115 | & ' dYi+1/dYi =',F6.3 /)
116 | C
117 | RETURN
118 | END
119 |
--------------------------------------------------------------------------------
/src/XBL.INC:
--------------------------------------------------------------------------------
1 | C
2 | PARAMETER (NCOM=73)
3 | REAL COM1(NCOM), COM2(NCOM)
4 | REAL M1, M1_U1, M1_MS, M2, M2_U2, M2_MS
5 | LOGICAL SIMI,TRAN,TURB,WAKE
6 | LOGICAL TRFORC,TRFREE
7 | C
8 | C- SCCON = shear coefficient lag constant
9 | C- GACON = G-beta locus constants...
10 | C- GBCON = G = GACON * sqrt(1.0 + GBCON*beta)
11 | C- GCCON = + GCCON / [H*Rtheta*sqrt(Cf/2)] <-- wall term
12 | C- DLCON = wall/wake dissipation length ratio Lo/L
13 | C- CTCON = Ctau weighting coefficient (implied by G-beta constants)
14 | C
15 | INCLUDE 'BLPAR.INC'
16 | C
17 | COMMON/V_VAR1/ X1, U1, T1, D1, S1, AMPL1, U1_UEI, U1_MS, DW1
18 | & , H1, H1_T1, H1_D1
19 | & , M1, M1_U1, M1_MS
20 | & , R1, R1_U1, R1_MS
21 | & , V1, V1_U1, V1_MS, V1_RE
22 | & , HK1, HK1_U1, HK1_T1, HK1_D1, HK1_MS
23 | & , HS1, HS1_U1, HS1_T1, HS1_D1, HS1_MS, HS1_RE
24 | & , HC1, HC1_U1, HC1_T1, HC1_D1, HC1_MS
25 | & , RT1, RT1_U1, RT1_T1, RT1_MS, RT1_RE
26 | & , CF1, CF1_U1, CF1_T1, CF1_D1, CF1_MS, CF1_RE
27 | & , DI1, DI1_U1, DI1_T1, DI1_D1, DI1_S1, DI1_MS, DI1_RE
28 | & , US1, US1_U1, US1_T1, US1_D1, US1_MS, US1_RE
29 | & , CQ1, CQ1_U1, CQ1_T1, CQ1_D1, CQ1_MS, CQ1_RE
30 | & , DE1, DE1_U1, DE1_T1, DE1_D1, DE1_MS
31 | COMMON/V_VAR2/ X2, U2, T2, D2, S2, AMPL2, U2_UEI, U2_MS, DW2
32 | & , H2, H2_T2, H2_D2
33 | & , M2, M2_U2, M2_MS
34 | & , R2, R2_U2, R2_MS
35 | & , V2, V2_U2, V2_MS, V2_RE
36 | & , HK2, HK2_U2, HK2_T2, HK2_D2, HK2_MS
37 | & , HS2, HS2_U2, HS2_T2, HS2_D2, HS2_MS, HS2_RE
38 | & , HC2, HC2_U2, HC2_T2, HC2_D2, HC2_MS
39 | & , RT2, RT2_U2, RT2_T2, RT2_MS, RT2_RE
40 | & , CF2, CF2_U2, CF2_T2, CF2_D2, CF2_MS, CF2_RE
41 | & , DI2, DI2_U2, DI2_T2, DI2_D2, DI2_S2, DI2_MS, DI2_RE
42 | & , US2, US2_U2, US2_T2, US2_D2, US2_MS, US2_RE
43 | & , CQ2, CQ2_U2, CQ2_T2, CQ2_D2, CQ2_MS, CQ2_RE
44 | & , DE2, DE2_U2, DE2_T2, DE2_D2, DE2_MS
45 | EQUIVALENCE (X1,COM1(1)), (X2,COM2(1))
46 | C
47 | COMMON/V_VARA/ CFM, CFM_MS, CFM_RE
48 | & , CFM_U1, CFM_T1, CFM_D1
49 | & , CFM_U2, CFM_T2, CFM_D2
50 | & , XT, XT_A1, XT_MS, XT_RE, XT_XF
51 | & , XT_X1, XT_T1, XT_D1, XT_U1
52 | & , XT_X2, XT_T2, XT_D2, XT_U2
53 | C
54 | C
55 | COMMON/V_SAV/ C1SAV(NCOM), C2SAV(NCOM)
56 | C
57 | COMMON/V_VAR/ DWTE
58 | & , QINFBL
59 | & , TKBL , TKBL_MS
60 | & , RSTBL , RSTBL_MS
61 | & , HSTINV, HSTINV_MS
62 | & , REYBL , REYBL_MS, REYBL_RE
63 | & , GAMBL, GM1BL, HVRAT
64 | & , BULE, XIFORC, AMCRIT
65 | C
66 | COMMON/V_INT/ SIMI,TRAN,TURB,WAKE
67 | & , TRFORC,TRFREE
68 | & , IDAMPV
69 | C
70 | COMMON/V_SYS/ VS1(4,5),VS2(4,5),VSREZ(4),VSR(4),VSM(4),VSX(4)
71 | C
72 |
73 |
--------------------------------------------------------------------------------
/orrs/bin/Makefile_DP:
--------------------------------------------------------------------------------
1 |
2 | SRC = ../src
3 | PLTOBJ = /var/local/codes/Xplot/libPltDP.a
4 |
5 | #========================================
6 | # Default compiler flags
7 | FC = f77
8 | FLG = -O -r8
9 | PLTLIB = -lX11
10 | FTNLIB =
11 |
12 | #========================================
13 | # Uncomment for Intel Fortran Compiler
14 | FC = ifort
15 | FLG = -O -r8
16 | PLTLIB = -L/usr/X11R6/lib -lX11
17 | FTNLIB =
18 |
19 | #========================================
20 |
21 |
22 | OS: osgen osmap.o
23 |
24 |
25 | osgen: osgen.o io.o spline.o getarg0.o
26 | $(FC) -o osgen osgen.o io.o spline.o getarg0.o $(FTNLIB)
27 | fscorr: fscorr.o fs.o
28 | $(FC) -o fscorr fscorr.o fs.o $(PLTOBJ) $(PLTLIB)
29 | fsrun: fsrun.o fs.o
30 | $(FC) -o fsrun fsrun.o fs.o $(PLTOBJ) $(PLTLIB)
31 | intai: intai.o osmap.o plutil.o
32 | $(FC) -o intai intai.o osmap.o plutil.o $(PLTOBJ) $(PLTLIB)
33 | mappl1: mappl1.o ask1.o conlab.o io.o getarg0.o
34 | $(FC) -o mappl1 mappl1.o ask1.o conlab.o io.o getarg0.o $(PLTOBJ) $(PLTLIB)
35 | ncorr: ncorr.o fs.o
36 | $(FC) -o ncorr ncorr.o fs.o $(PLTOBJ) $(PLTLIB)
37 | osrun: osrun.o fs.o orrs.o ospres.o plutil.o userio.o
38 | $(FC) -o osrun osrun.o fs.o orrs.o ospres.o \
39 | plutil.o userio.o $(PLTOBJ) $(PLTLIB) $(FTNLIB)
40 | osseq: osseq.o fs.o orrs.o ospres.o plutil.o userio.o
41 | $(FC) -o osseq osseq.o fs.o orrs.o ospres.o \
42 | plutil.o userio.o $(PLTOBJ) $(PLTLIB) $(FTNLIB)
43 | pfplot: pfplot.o fs.o ask1.o
44 | $(FC) -o pfplot pfplot.o fs.o ask1.o $(PLTOBJ) $(PLTLIB)
45 | roll: roll.o
46 | $(FC) -o roll roll.o $(PLTOBJ) $(PLTLIB) $(FTNLIB)
47 | as2bi: as2bi.o io.o getarg0.o
48 | $(FC) -o as2bi as2bi.o io.o getarg0.o $(FTNLIB)
49 | bi2as: bi2as.o io.o getarg0.o
50 | $(FC) -o bi2as bi2as.o io.o getarg0.o $(FTNLIB)
51 | bi2bi: bi2bi.o io.o getarg0.o
52 | $(FC) -o bi2bi bi2bi.o io.o getarg0.o $(FTNLIB)
53 | otest: otest.o osmap.o
54 | $(FC) -o otest otest.o osmap.o
55 | osweep: osweep.o osmap.o
56 | $(FC) -o osweep osweep.o osmap.o
57 |
58 | osgen.o: $(SRC)/osgen.f
59 | $(FC) -c $(FLG) $(SRC)/osgen.f
60 | orrs.o: $(SRC)/orrs.f $(SRC)/ORRS.INC
61 | $(FC) -c $(FLG) $(SRC)/orrs.f
62 | ospres.o: $(SRC)/ospres.f $(SRC)/OSPRES.INC
63 | $(FC) -c $(FLG) $(SRC)/ospres.f
64 | pfplot.o: $(SRC)/pfplot.f
65 | $(FC) -c $(FLG) $(SRC)/pfplot.f
66 | fscorr.o: $(SRC)/fscorr.f
67 | $(FC) -c $(FLG) $(SRC)/fscorr.f
68 | fsrun.o: $(SRC)/fsrun.f
69 | $(FC) -c $(FLG) $(SRC)/fsrun.f
70 | fs.o: $(SRC)/fs.f
71 | $(FC) -c $(FLG) $(SRC)/fs.f
72 | io.o: $(SRC)/io.f
73 | $(FC) -c $(FLG) $(SRC)/io.f
74 | intai.o: $(SRC)/intai.f
75 | $(FC) -c $(FLG) $(SRC)/intai.f
76 | mappl1.o: $(SRC)/mappl1.f
77 | $(FC) -c $(FLG) $(SRC)/mappl1.f
78 | ncorr.o: $(SRC)/ncorr.f
79 | $(FC) -c $(FLG) $(SRC)/ncorr.f
80 | osmap.o: $(SRC)/osmap.f
81 | $(FC) -c $(FLG) $(SRC)/osmap.f
82 | osrun.o: $(SRC)/osrun.f
83 | $(FC) -c $(FLG) $(SRC)/osrun.f
84 | osseq.o: $(SRC)/osseq.f
85 | $(FC) -c $(FLG) $(SRC)/osseq.f
86 | roll.o: $(SRC)/roll.f
87 | $(FC) -c $(FLG) $(SRC)/roll.f
88 | otest.o: $(SRC)/otest.f
89 | $(FC) -c $(FLG) $(SRC)/otest.f
90 | osweep.o: $(SRC)/osweep.f
91 | $(FC) -c $(FLG) $(SRC)/osweep.f
92 |
93 | spline.o: $(SRC)/spline.f
94 | $(FC) -c $(FLG) $(SRC)/spline.f
95 | conlab.o: $(SRC)/conlab.f
96 | $(FC) -c $(FLG) $(SRC)/conlab.f
97 | plutil.o: $(SRC)/plutil.f
98 | $(FC) -c $(FLG) $(SRC)/plutil.f
99 | ask1.o: $(SRC)/ask1.f
100 | $(FC) -c $(FLG) $(SRC)/ask1.f
101 | userio.o: $(SRC)/userio.f
102 | $(FC) -c $(FLG) $(SRC)/userio.f
103 | getarg0.o: $(SRC)/getarg0.f
104 | $(FC) -c $(FLG) $(SRC)/getarg0.f
105 |
106 |
--------------------------------------------------------------------------------
/plotlib/examples/zoomtest.f:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: zoomtest.f
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This program is free software; you can redistribute it and/or modify
7 | C it under the terms of the GNU General Public License as published by
8 | C the Free Software Foundation; either version 2 of the License, or
9 | C (at your option) any later version.
10 | C
11 | C This program is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | C GNU General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU General Public License
17 | C along with this program; if not, write to the Free Software
18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 |
24 |
25 | PROGRAM ZOOMTEST
26 | C
27 | C---- dot-pattern masks for use with PLGRID, NEWPAT, etc.
28 | C
29 | C mask0: _________________________ (solid)
30 | C 1: .........................
31 | C 2: . . . . . . . . . . . . .
32 | C 3: . . . . . . .
33 | C 4: . . . .
34 | C
35 | CHARACTER LINE*80
36 | LOGICAL LXYSAME, LCURSOR
37 | data mask0, mask1, mask2, mask3, mask4
38 | & / -1 , -21846, -30584, -32640, -32768 /
39 |
40 |
41 | C
42 | IDEV = 1
43 | IPSLU = 0
44 | SIZE = 0.8
45 | C
46 | CH = 0.020
47 | C
48 | CALL PLINITIALIZE
49 | CALL PLOPEN(0.78,IPSLU,IDEV)
50 | CALL DRAWTOBUFFER
51 | CALL NEWFACTOR(SIZE)
52 | C
53 | CALL PLOTABS(1.00,1.00,-3)
54 | C
55 | call PLGRID(0.0,0.0,22,0.5,17,0.5,MASK2)
56 | call PLGRID(0.0,0.0,11,1.0, 9,1.0,MASK1)
57 | call PLGRID(0.0,0.0, 3,5.0, 2,5.0,MASK0)
58 | call PLSLAN(0.1,0.1,0.2,'abcDEF123',0.0,9)
59 | CALL NEWCOLORNAME('green')
60 | call PLCHAR(1.1,1.1,0.2,'321GHIjkl',0.0,9)
61 | CALL NEWCOLORNAME('red')
62 | call PLSLAN(2.1,2.1,0.2,'mnoPQR123',0.0,9)
63 | CALL NEWCOLORNAME('blue')
64 | call PLCHAR(3.1,3.1,0.2,'321STUvwx',0.0,9)
65 | CALL NEWCOLORNAME('black')
66 | c
67 | CALL PLFLUSH
68 | c
69 | write(*,*) ' '
70 | write(*,*) 'The zoom can be done with same X,Y scales'
71 | write(*,*) 'Either mouse or keyboard can set the zoom rectangle'
72 | write(*,*) 'Enter XYsame, MouseInput flags (T/F):'
73 | LXYSAME = .TRUE.
74 | LCURSOR = .TRUE.
75 | read(*,1000) LINE
76 | if(LINE.NE.' ') THEN
77 | read(LINE,*,err=10) LXYSAME,LCURSOR
78 | endif
79 | 10 write(*,*) ' '
80 | C
81 | do k=1, 3
82 | call USETZOOM( LXYSAME , LCURSOR )
83 | call REPLOT(1)
84 | enddo
85 | pause
86 | call CLRZOOM
87 | call REPLOT(1)
88 | pause
89 | c
90 | CALL PLOT(0.0,0.0,+999)
91 | 1000 FORMAT(A)
92 | C
93 | END
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/orrs/README:
--------------------------------------------------------------------------------
1 |
2 | Orr-Sommerfeld Computation and Database Package
3 | Last update: 2 Aug 04
4 | Mark Drela, MIT Aero & Astro
5 |
6 | =============================================================================
7 | Execute the following commands to enable OS-database lookup table routine.
8 | Start in the directory containing this README file.
9 |
10 |
11 | % pwd
12 | % cd src
13 | % edit osmap.f
14 |
15 | 1) Find the following line in osmap.f (roughly line 100) :
16 |
17 | DATA OSFILE / '/var/local/codes/orrs/osmap.dat' /
18 |
19 | Take the absolute directory string which is generated
20 | by the pwd command above, paste it in front of the
21 | osmap.dat filename, e.g.
22 |
23 | DATA OSFILE / '/usr/whatever/orrs/osmap.dat' /
24 |
25 | This statement will tell SUBROUTINE OSMAP where to
26 | find this table data file.
27 |
28 | NOTE: I've replaced this logic with a preprocessor dec. Use -DOSFILE_DIR=install_location (no trailing /) instead. - russt@mit.edu
29 |
30 |
31 | 2) Find the following line in osmap.f (roughly line 75):
32 |
33 | REAL*4 RLSP, WLSP, HLSP,
34 | & RINCR, WINCR, RL, WL, HL,
35 | & A, AR, AW, AH, ARW, ARH, AWH, ARWH
36 |
37 | If you choose to use single-precision for the OS data file (should be adequate),
38 | leave this line as is. If you wish to do everything in double precision,
39 | change the REAL*4 to REAL.
40 |
41 |
42 | % cd ../bin
43 | % edit Makefile
44 | Change the compiler flags to match the Fortran compiler on your system.
45 | Use Makefile_DP for double-precision OS database file.
46 |
47 | % make osgen OR make -f Makefile_DP osgen
48 | % make osmap.o
49 | % cd ..
50 |
51 | % bin/osgen osmaps_ns.lst (creates binary file osmap.dat)
52 |
53 | SUBROUTINE OSMAP is now enabled. Programs which call it must
54 | be linked with the object file bin/osmap.o
55 |
56 |
57 | =============================================================================
58 | Brief description of relevant files.
59 |
60 | osm.0220
61 | osm.0230
62 | osm.0240
63 | osm.0250
64 | osm.0260
65 | osm.0270
66 | osm.0280
67 | osm.0300
68 | osm.0320
69 | osm.0350
70 | osm.0400
71 | osm_ns.0500
72 | osm_ns.0600
73 | osm_ns.0800
74 | osm_ns.1000
75 | osm_ns.1200
76 | osm_ns.1500
77 | osm_ns.2000
78 |
79 | These contain the data defining the alpha(H,Re,w) function, in ascii format.
80 | Program osgen reads and collates this data into one binary file osmap.dat .
81 | Each file contains data from a constant-H "slice" through the (H,Re,w) space.
82 | The suffix indicates the H value:
83 |
84 | osm.0220 is for H=2.20
85 | osm.0230 is for H=2.30, etc
86 |
87 | The mean-flow U(y) and dU/dy profiles which were used by the OS solver
88 | to generate each slice is contained in each osm.xxxx file near the top.
89 | SUBROUTINE READOS (src/io.f) can be used to extract these mean-flow profiles.
90 |
91 | The profiles in osm.0220 through osm.0400 are the Falkner-Skan similarity
92 | profiles for attached flow. The profiles in osm_ns.0500 through osm_ns.2000
93 | are non-similar separated-flow profiles, which have smaller reverse flow
94 | velocities than the alternative Falkner-Skan profiles with the same H.
95 | The non-similar profiles are a better match to actual profiles found
96 | in typical separation bubbles.
97 |
98 | =============================================================================
99 | Other useful routines.
100 |
101 | fs.f Generates Falkner-Skan profiles
102 |
103 | orrs.f Solves Orr-Sommerfeld spatial or temporal-stability problem
104 |
--------------------------------------------------------------------------------
/plotlib/examples/volts_old.f:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: volts_old.f
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This program is free software; you can redistribute it and/or modify
7 | C it under the terms of the GNU General Public License as published by
8 | C the Free Software Foundation; either version 2 of the License, or
9 | C (at your option) any later version.
10 | C
11 | C This program is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | C GNU General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU General Public License
17 | C along with this program; if not, write to the Free Software
18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 |
24 | C VOLTS
25 | C
26 | C Old-style Versatec calls test routine
27 | C
28 | LOGICAL LODD
29 | DIMENSION X(26),Y(26),RED(9),BLUE(9),GREEN(9),NCOL(2)
30 | DATA X/0.,5.,15.,25.,30.,35.,40.,45.,50.,55.,60.,65.,70.,75.,80.,
31 | 1 85.,90.,95.,100.,105.,110.,115.,120.,125.,2*0./
32 | C
33 | DATA Y/0.,10.,15.,10.,-10.,-50.,-80.,-110.,-130.,-145.,-155.,
34 | 1 -160.,-158.,-150.,-130.,-90.,-70.,-20.,20.,50.,70.,80.,85.,
35 | 2 90.,2*0./
36 | DATA NCOL/0,8/
37 | DATA RED /0.0,0.0,0.0,1.0,0.0,1.0,1.0,0.0,1.0/
38 | DATA BLUE /0.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,1.0/
39 | DATA GREEN/0.0,0.0,1.0,0.0,1.0,0.0,1.0,0.0,1.0/
40 | C
41 | C
42 | C...ALTER ACTUAL DATA SCALES
43 | DO 10 I=1,24
44 | X(I) = X(I) * 1000
45 | 10 Y(I) = Y(I) / 10000
46 | C
47 | IDUM = 0
48 | ICNT = 0
49 | IPD = 6
50 | 100 CALL PLOTS (IDUM,0,IPD)
51 | C
52 | LODD = (MOD(ICNT,2).EQ.1)
53 | CALL FACTOR (.9)
54 | IF(IPD .EQ. 6) THEN
55 | DO 20 I=1,NCOL(2)
56 | IF(.NOT.LODD) CALL SETCOL(I-1,RED(I),GREEN(I),BLUE(I))
57 | IF(LODD) CALL SETCOL(I-1,RED(9-I),GREEN(9-I),BLUE(9-I))
58 | 20 CONTINUE
59 | ENDIF
60 | C
61 | CALL PLOT (1.05,1.05,-3)
62 | C
63 | CALL SCALE (X,7.,24,+1)
64 | CALL SCALE (Y,7.,24,+1)
65 | C
66 | CALL COLOR(2)
67 | CALL NEWPEN (2)
68 | cc CALL LINE (X,Y,24,1,1,0)
69 | CALL LINE (X,Y,24,1,1,0)
70 | CALL NEWPEN (1)
71 | CALL COLOR(0)
72 | C
73 | CALL AXIS (0.,0.,'NANOSECONDS',-11,7.,0.,X(25),X(26))
74 | CALL AXIS (0.,0.,'MILLIVOLTS',+10,7.,90.,Y(25),Y(26))
75 | C
76 | CALL SYMBOL (.5,.5,.1,'DX = ',0.,+5)
77 | CALL NUMBER (999.,999.,.1,X(26),0.,+3)
78 | CALL NUMBER (1.,.75,.1,X(26),0.,0)
79 | CALL NUMBER (1.,1.,.1,X(26),0.,-1)
80 | CALL NUMBER (1.,1.25,.1,X(26),0.,-4)
81 | C
82 | CALL COLOR(4)
83 | CALL SYMBOL (2.3,6.5,.1,'VERSAPLOT SAMPLE',0.,+16)
84 | CALL SYMBOL (1.5,6.75,.2,'TIME VS VOLTAGE',0.,+15)
85 | CALL COLOR(0)
86 | CALL PLOTOF
87 | C
88 | ICNT = ICNT+1
89 | CALL PLOT (0.,0.,-999)
90 | WRITE(*,*) ' to cycle colors'
91 | READ(*,*)
92 | if(ICNT.LE.2) go to 100
93 |
94 | CALL PLOT (0.,0.,999)
95 | STOP
96 | END
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/src/xutils.f:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SUBROUTINE SETEXP(S,DS1,SMAX,NN)
5 | C........................................................
6 | C Sets geometrically stretched array S:
7 | C
8 | C S(i+1) - S(i) = r * [S(i) - S(i-1)]
9 | C
10 | C S (output) array to be set
11 | C DS1 (input) first S increment: S(2) - S(1)
12 | C SMAX (input) final S value: S(NN)
13 | C NN (input) number of points
14 | C........................................................
15 | REAL S(NN)
16 | C
17 | SIGMA = SMAX/DS1
18 | NEX = NN-1
19 | RNEX = FLOAT(NEX)
20 | RNI = 1.0/RNEX
21 | C
22 | C---- solve quadratic for initial geometric ratio guess
23 | AAA = RNEX*(RNEX-1.0)*(RNEX-2.0) / 6.0
24 | BBB = RNEX*(RNEX-1.0) / 2.0
25 | CCC = RNEX - SIGMA
26 | C
27 | DISC = BBB**2 - 4.0*AAA*CCC
28 | DISC = MAX( 0.0 , DISC )
29 | C
30 | IF(NEX.LE.1) THEN
31 | STOP 'SETEXP: Cannot fill array. N too small.'
32 | ELSE IF(NEX.EQ.2) THEN
33 | RATIO = -CCC/BBB + 1.0
34 | ELSE
35 | RATIO = (-BBB + SQRT(DISC))/(2.0*AAA) + 1.0
36 | ENDIF
37 | C
38 | IF(RATIO.EQ.1.0) GO TO 11
39 | C
40 | C---- Newton iteration for actual geometric ratio
41 | DO 1 ITER=1, 100
42 | SIGMAN = (RATIO**NEX - 1.0) / (RATIO - 1.0)
43 | RES = SIGMAN**RNI - SIGMA**RNI
44 | DRESDR = RNI*SIGMAN**RNI
45 | & * (RNEX*RATIO**(NEX-1) - SIGMAN) / (RATIO**NEX - 1.0)
46 | C
47 | DRATIO = -RES/DRESDR
48 | RATIO = RATIO + DRATIO
49 | C
50 | IF(ABS(DRATIO) .LT. 1.0E-5) GO TO 11
51 | C
52 | 1 CONTINUE
53 | WRITE(*,*) 'SETEXP: Convergence failed. Continuing anyway ...'
54 | C
55 | C---- set up stretched array using converged geometric ratio
56 | 11 S(1) = 0.0
57 | DS = DS1
58 | DO 2 N=2, NN
59 | S(N) = S(N-1) + DS
60 | DS = DS*RATIO
61 | 2 CONTINUE
62 | C
63 | RETURN
64 | END
65 |
66 |
67 |
68 | FUNCTION ATANC(Y,X,THOLD)
69 | IMPLICIT REAL (A-H,M,O-Z)
70 | C---------------------------------------------------------------
71 | C ATAN2 function with branch cut checking.
72 | C
73 | C Increments position angle of point X,Y from some previous
74 | C value THOLD due to a change in position, ensuring that the
75 | C position change does not cross the ATAN2 branch cut
76 | C (which is in the -x direction). For example:
77 | C
78 | C ATANC( -1.0 , -1.0 , 0.75*pi ) returns 1.25*pi , whereas
79 | C ATAN2( -1.0 , -1.0 ) returns -.75*pi .
80 | C
81 | C Typically, ATANC is used to fill an array of angles:
82 | C
83 | C THETA(1) = ATAN2( Y(1) , X(1) )
84 | C DO i=2, N
85 | C THETA(i) = ATANC( Y(i) , X(i) , THETA(i-1) )
86 | C END DO
87 | C
88 | C This will prevent the angle array THETA(i) from jumping by
89 | C +/- 2 pi when the path X(i),Y(i) crosses the negative x axis.
90 | C
91 | C Input:
92 | C X,Y point position coordinates
93 | C THOLD position angle of nearby point
94 | C
95 | C Output:
96 | C ATANC position angle of X,Y
97 | C---------------------------------------------------------------
98 | DATA PI /3.1415926535897932384/
99 | DATA TPI /6.2831853071795864769/
100 | C
101 | C---- set new position angle, ignoring branch cut in ATAN2 function for now
102 | THNEW = ATAN2( Y , X )
103 | DTHET = THNEW - THOLD
104 | C
105 | C---- angle change cannot exceed +/- pi, so get rid of any multiples of 2 pi
106 | DTCORR = DTHET - TPI*INT( (DTHET + SIGN(PI,DTHET))/TPI )
107 | C
108 | C---- set correct new angle
109 | ATANC = THOLD + DTCORR
110 | C
111 | RETURN
112 | END ! ATANC
113 |
114 |
--------------------------------------------------------------------------------
/orrs/bin/Makefile:
--------------------------------------------------------------------------------
1 |
2 | SRC = ../src
3 | PLTOBJ = /var/local/codes/Xplot/libPlt.a
4 |
5 | #========================================
6 | # Default compiler flags
7 | FC = f77
8 | FLG = -O
9 | PLTLIB = -lX11
10 | FTNLIB =
11 |
12 | #========================================
13 | # Uncomment for Intel Fortran Compiler
14 | FC = ifort
15 | FLG = -O -fpe0 -CB
16 | PLTLIB = -L/usr/X11R6/lib -lX11
17 | FTNLIB =
18 |
19 | # Additional IFC stuff needed on MIT's Athena system
20 | #FC = ifc
21 | #FTNLIB = -Vaxlib /usr/lib/C-ctype.o /usr/lib/C_name.o /usr/lib/ctype-info.o
22 |
23 | #========================================
24 |
25 |
26 | OS: osgen osmap.o
27 |
28 | clean:
29 | /bin/rm *.o osgen
30 |
31 | osgen: osgen.o io.o spline.o getarg0.o
32 | $(FC) -o osgen osgen.o io.o spline.o getarg0.o $(FTNLIB)
33 | osgen1: osgen1.o io.o spline.o getarg0.o
34 | $(FC) -o osgen1 osgen1.o io.o spline.o getarg0.o $(FTNLIB)
35 | fscorr: fscorr.o fs.o
36 | $(FC) -o fscorr fscorr.o fs.o $(PLTOBJ) $(PLTLIB)
37 | fsrun: fsrun.o fs.o
38 | $(FC) -o fsrun fsrun.o fs.o $(PLTOBJ) $(PLTLIB)
39 | intai: intai.o osmap.o plutil.o
40 | $(FC) -o intai intai.o osmap.o plutil.o $(PLTOBJ) $(PLTLIB)
41 | mappl1: mappl1.o ask1.o conlab.o io.o getarg0.o
42 | $(FC) -o mappl1 mappl1.o ask1.o conlab.o io.o getarg0.o $(PLTOBJ) $(PLTLIB)
43 | ncorr: ncorr.o fs.o
44 | $(FC) -o ncorr ncorr.o fs.o $(PLTOBJ) $(PLTLIB)
45 | osrun: osrun.o fs.o orrs.o ospres.o plutil.o userio.o
46 | $(FC) -o osrun osrun.o fs.o orrs.o ospres.o \
47 | plutil.o userio.o $(PLTOBJ) $(PLTLIB) $(FTNLIB)
48 | osseq: osseq.o fs.o orrs.o ospres.o plutil.o userio.o
49 | $(FC) -o osseq osseq.o fs.o orrs.o ospres.o \
50 | plutil.o userio.o $(PLTOBJ) $(PLTLIB) $(FTNLIB)
51 | pfplot: pfplot.o fs.o ask1.o
52 | $(FC) -o pfplot pfplot.o fs.o ask1.o $(PLTOBJ) $(PLTLIB)
53 | roll: roll.o
54 | $(FC) -o roll roll.o $(PLTOBJ) $(PLTLIB) $(FTNLIB)
55 | as2bi: as2bi.o io.o getarg0.o
56 | $(FC) -o as2bi as2bi.o io.o getarg0.o $(FTNLIB)
57 | bi2as: bi2as.o io.o getarg0.o
58 | $(FC) -o bi2as bi2as.o io.o getarg0.o $(FTNLIB)
59 | bi2bi: bi2bi.o io.o getarg0.o
60 | $(FC) -o bi2bi bi2bi.o io.o getarg0.o $(FTNLIB)
61 | otest: otest.o osmap.o
62 | $(FC) -o otest otest.o osmap.o
63 | osweep: osweep.o osmap.o
64 | $(FC) -o osweep osweep.o osmap.o
65 |
66 | osgen.o: $(SRC)/osgen.f
67 | $(FC) -c $(FLG) $(SRC)/osgen.f
68 | osgen1.o: $(SRC)/osgen1.f
69 | $(FC) -c $(FLG) $(SRC)/osgen1.f
70 | orrs.o: $(SRC)/orrs.f $(SRC)/ORRS.INC
71 | $(FC) -c $(FLG) $(SRC)/orrs.f
72 | ospres.o: $(SRC)/ospres.f $(SRC)/OSPRES.INC
73 | $(FC) -c $(FLG) $(SRC)/ospres.f
74 | pfplot.o: $(SRC)/pfplot.f
75 | $(FC) -c $(FLG) $(SRC)/pfplot.f
76 | fscorr.o: $(SRC)/fscorr.f
77 | $(FC) -c $(FLG) $(SRC)/fscorr.f
78 | fsrun.o: $(SRC)/fsrun.f
79 | $(FC) -c $(FLG) $(SRC)/fsrun.f
80 | fs.o: $(SRC)/fs.f
81 | $(FC) -c $(FLG) $(SRC)/fs.f
82 | io.o: $(SRC)/io.f
83 | $(FC) -c $(FLG) $(SRC)/io.f
84 | intai.o: $(SRC)/intai.f
85 | $(FC) -c $(FLG) $(SRC)/intai.f
86 | mappl1.o: $(SRC)/mappl1.f
87 | $(FC) -c $(FLG) $(SRC)/mappl1.f
88 | ncorr.o: $(SRC)/ncorr.f
89 | $(FC) -c $(FLG) $(SRC)/ncorr.f
90 | osmap.o: $(SRC)/osmap.f
91 | $(FC) -c $(FLG) $(SRC)/osmap.f
92 | osrun.o: $(SRC)/osrun.f
93 | $(FC) -c $(FLG) $(SRC)/osrun.f
94 | osseq.o: $(SRC)/osseq.f
95 | $(FC) -c $(FLG) $(SRC)/osseq.f
96 | roll.o: $(SRC)/roll.f
97 | $(FC) -c $(FLG) $(SRC)/roll.f
98 | otest.o: $(SRC)/otest.f
99 | $(FC) -c $(FLG) $(SRC)/otest.f
100 | osweep.o: $(SRC)/osweep.f
101 | $(FC) -c $(FLG) $(SRC)/osweep.f
102 |
103 | spline.o: $(SRC)/spline.f
104 | $(FC) -c $(FLG) $(SRC)/spline.f
105 | conlab.o: $(SRC)/conlab.f
106 | $(FC) -c $(FLG) $(SRC)/conlab.f
107 | plutil.o: $(SRC)/plutil.f
108 | $(FC) -c $(FLG) $(SRC)/plutil.f
109 | ask1.o: $(SRC)/ask1.f
110 | $(FC) -c $(FLG) $(SRC)/ask1.f
111 | userio.o: $(SRC)/userio.f
112 | $(FC) -c $(FLG) $(SRC)/userio.f
113 | getarg0.o: $(SRC)/getarg0.f
114 | $(FC) -c $(FLG) $(SRC)/getarg0.f
115 |
116 |
--------------------------------------------------------------------------------
/runs/la203t.dat:
--------------------------------------------------------------------------------
1 | LA230A blunt TE
2 | 1.000455 0.000895
3 | 0.993427 0.004332
4 | 0.981492 0.008450
5 | 0.967879 0.012697
6 | 0.952291 0.017269
7 | 0.934612 0.022276
8 | 0.914876 0.027744
9 | 0.893349 0.033633
10 | 0.870451 0.039856
11 | 0.846614 0.046320
12 | 0.822246 0.052928
13 | 0.797640 0.059604
14 | 0.773000 0.066294
15 | 0.748527 0.072935
16 | 0.724456 0.079441
17 | 0.700950 0.085719
18 | 0.678100 0.091696
19 | 0.655966 0.097294
20 | 0.634488 0.102460
21 | 0.613509 0.107185
22 | 0.592872 0.111482
23 | 0.572474 0.115369
24 | 0.552260 0.118854
25 | 0.532181 0.121940
26 | 0.512197 0.124633
27 | 0.492299 0.126938
28 | 0.472493 0.128851
29 | 0.452778 0.130366
30 | 0.433139 0.131481
31 | 0.413556 0.132197
32 | 0.394032 0.132519
33 | 0.374603 0.132449
34 | 0.355296 0.131983
35 | 0.336122 0.131120
36 | 0.317102 0.129862
37 | 0.298297 0.128215
38 | 0.279735 0.126157
39 | 0.261354 0.123677
40 | 0.243142 0.120790
41 | 0.225156 0.117523
42 | 0.207483 0.113902
43 | 0.190225 0.109959
44 | 0.173498 0.105734
45 | 0.157428 0.101275
46 | 0.142137 0.096640
47 | 0.127740 0.091896
48 | 0.114330 0.087111
49 | 0.101967 0.082352
50 | 0.090672 0.077676
51 | 0.080423 0.073127
52 | 0.071170 0.068734
53 | 0.062842 0.064514
54 | 0.055354 0.060471
55 | 0.048621 0.056601
56 | 0.042561 0.052894
57 | 0.037097 0.049337
58 | 0.032164 0.045916
59 | 0.027702 0.042615
60 | 0.023663 0.039417
61 | 0.020007 0.036305
62 | 0.016704 0.033262
63 | 0.013731 0.030267
64 | 0.011068 0.027303
65 | 0.008710 0.024356
66 | 0.006648 0.021414
67 | 0.004880 0.018473
68 | 0.003404 0.015529
69 | 0.002211 0.012581
70 | 0.001291 0.009644
71 | 0.000631 0.006741
72 | 0.000216 0.003893
73 | 0.000020 0.001100
74 | 0.000029 -0.001660
75 | 0.000247 -0.004414
76 | 0.000696 -0.007167
77 | 0.001403 -0.009910
78 | 0.002374 -0.012614
79 | 0.003602 -0.015256
80 | 0.005087 -0.017812
81 | 0.006845 -0.020249
82 | 0.008898 -0.022529
83 | 0.011262 -0.024606
84 | 0.013938 -0.026425
85 | 0.016933 -0.027936
86 | 0.020241 -0.029152
87 | 0.023844 -0.030106
88 | 0.027745 -0.030836
89 | 0.031980 -0.031393
90 | 0.036588 -0.031834
91 | 0.041629 -0.032180
92 | 0.047184 -0.032454
93 | 0.053351 -0.032666
94 | 0.060260 -0.032819
95 | 0.068071 -0.032916
96 | 0.076988 -0.032954
97 | 0.087263 -0.032928
98 | 0.099188 -0.032834
99 | 0.113069 -0.032661
100 | 0.129156 -0.032402
101 | 0.147544 -0.032052
102 | 0.168081 -0.031613
103 | 0.190368 -0.031094
104 | 0.213899 -0.030504
105 | 0.238204 -0.029853
106 | 0.262922 -0.029142
107 | 0.287810 -0.028374
108 | 0.312695 -0.027544
109 | 0.337469 -0.026643
110 | 0.362036 -0.025661
111 | 0.386318 -0.024578
112 | 0.410302 -0.023356
113 | 0.434088 -0.021960
114 | 0.457807 -0.020377
115 | 0.481536 -0.018608
116 | 0.505316 -0.016656
117 | 0.529216 -0.014513
118 | 0.553344 -0.012183
119 | 0.577787 -0.009687
120 | 0.602567 -0.007073
121 | 0.627482 -0.004428
122 | 0.652205 -0.001848
123 | 0.676637 0.000620
124 | 0.700697 0.002939
125 | 0.724337 0.005075
126 | 0.747521 0.006998
127 | 0.770218 0.008681
128 | 0.792379 0.010100
129 | 0.813952 0.011230
130 | 0.834872 0.012054
131 | 0.855042 0.012555
132 | 0.874384 0.012720
133 | 0.892795 0.012552
134 | 0.910177 0.012048
135 | 0.926478 0.011213
136 | 0.941673 0.010057
137 | 0.955776 0.008580
138 | 0.968861 0.006778
139 | 0.980995 0.004570
140 | 0.992375 0.001840
141 | 0.999545 -0.000895
142 |
--------------------------------------------------------------------------------
/plotlib/examples/squares.f:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: squares.f
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This program is free software; you can redistribute it and/or modify
7 | C it under the terms of the GNU General Public License as published by
8 | C the Free Software Foundation; either version 2 of the License, or
9 | C (at your option) any later version.
10 | C
11 | C This program is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | C GNU General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU General Public License
17 | C along with this program; if not, write to the Free Software
18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 |
24 | C---Test of filled polyline plotting
25 | C Displays a sine wave of filled color rectangles
26 | dimension xp(100), yp(100), x(100), y(100)
27 | C
28 | CHARACTER*4 INP
29 | CH = 0.02
30 | C
31 | x(1) = 0.
32 | y(1) = 0.
33 | x(2) = 0.5
34 | y(2) = 0.
35 | x(3) = 0.5
36 | y(3) = 0.3
37 | x(4) = 0.
38 | y(4) = 0.3
39 | x(5) = x(1)
40 | y(5) = y(1)
41 | n = 5
42 | C
43 | C---Decide about what devices to plot to
44 | WRITE(*,*) ' '
45 | WRITE(*,*) 'SQUARES Plot test'
46 | WRITE(*,*) ' You may just for each question to take defaults'
47 | WRITE(*,*) ' '
48 | 1 WRITE(*,*) ' Enter -1 for no PS, 0 for B&W PS, 1 for color PS'
49 | READ(*,1000,end=2000) INP
50 | ips = -1
51 | if(INP.ne.' ') then
52 | READ(INP,*,end=2000,err=2000) ips
53 | endif
54 | IDEV = 1
55 | IF(ips.eq.0) IDEV = 3
56 | IF(ips.ge.1) IDEV = 5
57 | ipslu = 0
58 | C
59 | C---- for REPLOT: X11 only
60 | IDEVRP = 1
61 | C
62 | C
63 | CALL PLINITIALIZE
64 | C
65 | C---Now, how many colors...
66 | WRITE(*,*) ' Enter # colors (0 or 1 gives no colors)'
67 | READ(*,1000,end=2000) INP
68 | ncolors = 64
69 | if(INP.ne.' ') then
70 | READ(INP,*,end=2000,err=2000) ncolors
71 | endif
72 | C---Set up colormap spectrum colors
73 | if(ncolors.LE.1) ncolors = 0
74 | CALL COLORSPECTRUMHUES(ncolors,'MBCGYR')
75 | C
76 | C
77 | CALL PLOPEN(0.7,ipslu,IDEV)
78 | C
79 | CALL PLOT(0.5,0.5,-3)
80 | do ii = 1,ncolors
81 | call NEWCOLOR(-ii)
82 | f = float(ii-1)/float(ncolors-1)
83 | xx = 9.0*f
84 | yy = 3.0*sin(2.0*3.1416*f)
85 | do i = 1, n
86 | xp(i) = x(i) + xx
87 | yp(i) = 4.0 + y(i) + yy
88 | end do
89 | call POLYLINE(xp,yp,n,1)
90 | end do
91 | C
92 | CALL NEWCOLORNAME('green')
93 | CALL PLCHAR(0.,0.,10.*CH,'Test ',0.0,5)
94 | CALL NEWCOLORRGB(0,0,255)
95 | CALL PLCHAR(999.,999.,10.*CH,'of ',0.0,3)
96 | CALL NEWCOLORNAME('yellow')
97 | CALL PLCHAR(999.,999.,10.*CH,'Color ',0.0,6)
98 | CALL NEWCOLORNAME('red')
99 | CALL PLCHAR(999.,999.,10.*CH,'Fill',0.0,4)
100 | C
101 | CALL PLFLUSH
102 | C
103 | WRITE(*,*) 'Hit return to test replot'
104 | READ(5,1000) DUMMY
105 | CALL REPLOT(IDEVRP)
106 | CALL PLFLUSH
107 | C
108 | WRITE(*,*) 'Hit return to end test'
109 | READ(5,1000) DUMMY
110 | 1000 FORMAT(A)
111 | C
112 | 2000 CALL PLCLOSE
113 | STOP
114 | END
115 |
116 |
117 |
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/plotlib/examples/gridtest.f:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: gridtest.f
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This program is free software; you can redistribute it and/or modify
7 | C it under the terms of the GNU General Public License as published by
8 | C the Free Software Foundation; either version 2 of the License, or
9 | C (at your option) any later version.
10 | C
11 | C This program is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | C GNU General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU General Public License
17 | C along with this program; if not, write to the Free Software
18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 |
24 | C Example/Test of grid routine
25 | C Sets up two plots, each containing a grid with a label and symbol line
26 | C First plot comes up as B&W in portrait window
27 | C Second plot comes up as color in larger landscape window
28 | C
29 | INCLUDE 'colors.inc'
30 | CHARACTER INP*10
31 | DATA LMASK1, LMASK2 / -32640, -30584 /
32 | DATA LMASK3, LMASK4/ -21846, Z'AAAAAAAA'/
33 | C
34 | C---- number of grid intervals per axis annotation interval
35 | NGR = 2
36 | C
37 | XMIN=.1
38 | YMIN=.1
39 | XMAX=.9
40 | YMAX=.6
41 | XDEL = 0.1
42 | YDEL = 0.1
43 | XSF = 1.0
44 | YSF = 1.0
45 | NXG = NGR * INT((XMAX-XMIN)/XDEL + 0.001)
46 | NYG = NGR * INT((YMAX-YMIN)/YDEL + 0.001)
47 | DXG = XSF*XDEL / FLOAT(NGR)
48 | DYG = YSF*YDEL / FLOAT(NGR)
49 | C
50 | CH = 0.03
51 | SH = 0.2*CH
52 | C
53 | C---What devices to plot to?
54 | WRITE(*,*) ' '
55 | 1 WRITE(*,*) ' Enter -1 for no PS, 0 for B&W PS, 1 for color PS'
56 | READ(*,1000,end=2000) INP
57 | IOUT = -1
58 | if(INP.NE.' ') READ(INP,*,end=2000,err=2000) IOUT
59 | 2 IF(IOUT.LT.0) IDEV = 1
60 | IF(IOUT.EQ.0) IDEV = 3
61 | IF(IOUT.GE.1) IDEV = 5
62 | C
63 | C---plot #1 in B&W portrait mode 0.5 of screen height
64 | CALL PLINITIALIZE
65 | CALL PLOPEN(-0.5,0,IDEV)
66 | CALL PLOT(0.1,0.1,-3)
67 | CALL NEWPEN(1)
68 | CALL NEWFACTOR(10.)
69 | CALL PLCHAR(0.2,0.2,1.2*CH,'TEST FOR GRID',0.0,13)
70 | CALL PLSYMB(999.,0.2,CH,1,0.0,0)
71 | CALL PLSYMB(0.2,0.2,CH,1,0.0,-1)
72 | CALL PLGRID(0.0,0.0, NXG,DXG, NYG,DYG, LMASK4)
73 | CALL PLFLUSH
74 | PAUSE
75 | CALL PLOT(0.,0.,-999)
76 | C
77 | C---plot #2 in landscape mode 0.7 of screen width
78 | C (green grid with red lettering with blue symbol line)
79 | CALL PLOPEN(0.7,0,IDEV)
80 | CALL PLOT(0.1,0.1,-3)
81 | CALL NEWFACTOR(10.)
82 | CALL NEWPEN(1)
83 | NXG = NGR * INT((XMAX-XMIN)/XDEL + 0.001)
84 | NYG = NGR * INT((YMAX-YMIN)/YDEL + 0.001)
85 | DXG = XSF*XDEL / FLOAT(NGR)
86 | DYG = YSF*YDEL / FLOAT(NGR)
87 |
88 | call NEWCOLORNAME('green')
89 | CALL PLGRID(0.0,0.0, NXG,DXG, NYG,DYG, LMASK2)
90 |
91 | CALL NEWPEN(1)
92 | CALL NEWCOLORRGB(255,0,0)
93 | CALL PLCHAR(0.2,0.2,1.2*CH,'TEST FOR GRID',0.0,13)
94 | call NEWCOLOR(BLUE)
95 | call NEWPEN(1)
96 | CALL PLSYMB(999.,0.2,CH,1,0.0,0)
97 | CALL PLSYMB(0.2,0.2,CH,1,0.0,-1)
98 | CALL PLFLUSH
99 | PAUSE
100 | CALL PLCLOSE
101 | C
102 | 1000 FORMAT(A)
103 | 2000 STOP
104 | END
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/plotlib/examples/defmap.f:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: defmap.f
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This program is free software; you can redistribute it and/or modify
7 | C it under the terms of the GNU General Public License as published by
8 | C the Free Software Foundation; either version 2 of the License, or
9 | C (at your option) any later version.
10 | C
11 | C This program is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | C GNU General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU General Public License
17 | C along with this program; if not, write to the Free Software
18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 |
24 |
25 | program defmap
26 | C
27 | C Displays Default colormap in a bar
28 | C
29 | C
30 | dimension xp(100), yp(100), x(100), y(100)
31 | C
32 | character*24 colorname, inp*2
33 | C
34 | CH = 0.125
35 | C
36 | PI = 4.0*ATAN(1.0)
37 | C
38 | C---Decide about what devices to plot to
39 | WRITE(*,*) ' '
40 | 1 WRITE(*,*) ' Enter -1 for no PS, 0 for B&W PS, 1 for color PS'
41 | READ(*,1000,end=2000) INP
42 | ips = -1
43 | if(INP.ne.' ') then
44 | READ(INP,*,end=2000,err=2000) ips
45 | endif
46 | IDEV = 1
47 | IF(ips.eq.0) IDEV = 3
48 | IF(ips.ge.1) IDEV = 5
49 | ipslu = 0
50 | C
51 | C---- for REPLOT: X11 only
52 | IDEVRP = 1
53 | CALL PLINITIALIZE
54 | C
55 | C---Now, how many colors...
56 | ncolors = 10
57 | C
58 | CALL PLOPEN(0.7,ipslu,IDEV)
59 | CALL PLOTABS(1.5,1.0,-3)
60 | c
61 | call GETCOLOR(ICOL0)
62 | C
63 | c---- plot bar
64 | dx = 1.0
65 | dy = 5.0/float(ncolors)
66 | do ii = 1,ncolors
67 | call NEWCOLOR(ii)
68 | c
69 | x0 = 0.0
70 | y0 = dy*float(ii-1)
71 | c
72 | xp(1) = x0
73 | yp(1) = y0
74 | xp(2) = x0+dx
75 | yp(2) = y0
76 | xp(3) = x0+dx
77 | yp(3) = y0+dy
78 | xp(4) = x0
79 | yp(4) = y0+dy
80 | xp(5) = xp(1)
81 | yp(5) = yp(1)
82 | call POLYLINE(xp,yp,5,1)
83 | C
84 | call GETCOLORRGB(ii,ired,igrn,iblu,colorname)
85 | C
86 | xplt = xp(2) + 3.0*ch
87 | yplt = 0.5*(yp(2)+yp(3)) - 0.5*ch
88 | call plnumb(xplt,yplt,ch,float(ii),0.0,-1)
89 | C
90 | xplt = xplt + 6.0*ch
91 | call plchar(xplt,yplt,ch,colorname,0.0,24)
92 | C
93 | xplt = xplt + 26.0*ch
94 | call NEWCOLORRGB(255,0,0)
95 | call plnumb(xplt,yplt,ch,float(ired),0.0,-1)
96 | C
97 | xplt = xplt + 4.0*ch
98 | call NEWCOLORRGB(0,255,0)
99 | call plnumb(xplt,yplt,ch,float(igrn),0.0,-1)
100 | C
101 | xplt = xplt + 4.0*ch
102 | call NEWCOLORRGB(0,0,255)
103 | call plnumb(xplt,yplt,ch,float(iblu),0.0,-1)
104 | c
105 | end do
106 | C
107 | call NEWCOLOR(ICOL0)
108 | xplt = 0.0
109 | yplt = yplt + dy + 2.0*ch
110 | call plchar(xplt,yplt,1.5*ch,'Default Colormap',0.0,16)
111 | C
112 | CALL PLFLUSH
113 | C
114 | WRITE(*,*) 'Hit return to end test'
115 | READ(5,1000) DUMMY
116 | 1000 FORMAT(A)
117 | C
118 | C GO TO 1
119 | C
120 | 2000 CALL PLOT(0.0,0.0,+999)
121 | STOP
122 | END
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/plotlib/examples/squares2.f:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: squares.f
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This program is free software; you can redistribute it and/or modify
7 | C it under the terms of the GNU General Public License as published by
8 | C the Free Software Foundation; either version 2 of the License, or
9 | C (at your option) any later version.
10 | C
11 | C This program is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | C GNU General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU General Public License
17 | C along with this program; if not, write to the Free Software
18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 |
24 | C---Test of filled polyline plotting
25 | C Displays a sine wave of filled color rectangles
26 | dimension xp(100), yp(100), x(100), y(100)
27 | C
28 | CHARACTER*4 INP
29 | CH = 0.02
30 | C
31 | x(1) = 0.
32 | y(1) = 0.
33 | x(2) = 0.5
34 | y(2) = 0.
35 | x(3) = 0.5
36 | y(3) = 0.3
37 | x(4) = 0.
38 | y(4) = 0.3
39 | x(5) = x(1)
40 | y(5) = y(1)
41 | n = 5
42 | C
43 | C---Decide about what devices to plot to
44 | WRITE(*,*) ' '
45 | WRITE(*,*) 'SQUARES Plot test'
46 | WRITE(*,*) ' You may just for each question to take defaults'
47 | WRITE(*,*) ' '
48 | 1 WRITE(*,*) ' Enter -1 for no PS, 0 for B&W PS, 1 for color PS'
49 | READ(*,1000,end=2000) INP
50 | ips = -1
51 | if(INP.ne.' ') then
52 | READ(INP,*,end=2000,err=2000) ips
53 | endif
54 | IDEV = 1
55 | IF(ips.eq.0) IDEV = 3
56 | IF(ips.ge.1) IDEV = 5
57 | ipslu = 0
58 | C
59 | C---- for REPLOT: X11 only
60 | IDEVRP = 1
61 | C
62 | C
63 | CALL PLINITIALIZE
64 | C
65 | C---Now, how many colors...
66 | WRITE(*,*) ' Enter # colors (0 or 1 gives no colors)'
67 | READ(*,1000,end=2000) INP
68 | ncolors = 64
69 | if(INP.ne.' ') then
70 | READ(INP,*,end=2000,err=2000) ncolors
71 | endif
72 | C---Set up colormap spectrum colors
73 | if(ncolors.LE.1) ncolors = 0
74 | CALL COLORSPECTRUMHUES(ncolors,'MBCGYR')
75 | C
76 | DO III = -1,1,2
77 | C
78 | CALL PLOPEN(float(III)*0.7,ipslu,IDEV)
79 | C
80 | CALL PLOT(0.5,0.5,-3)
81 | do ii = 1,ncolors
82 | call NEWCOLOR(-ii)
83 | f = float(ii-1)/float(ncolors-1)
84 | xx = 9.0*f
85 | yy = 3.0*sin(2.0*3.1416*f)
86 | do i = 1, n
87 | xp(i) = x(i) + xx
88 | yp(i) = 4.0 + y(i) + yy
89 | end do
90 | call POLYLINE(xp,yp,n,1)
91 | end do
92 | C
93 | CALL NEWCOLORNAME('green')
94 | CALL PLCHAR(0.,0.,10.*CH,'Test ',0.0,5)
95 | CALL NEWCOLORRGB(0,0,255)
96 | CALL PLCHAR(999.,999.,10.*CH,'of ',0.0,3)
97 | CALL NEWCOLORNAME('yellow')
98 | CALL PLCHAR(999.,999.,10.*CH,'Color ',0.0,6)
99 | CALL NEWCOLORNAME('red')
100 | CALL PLCHAR(999.,999.,10.*CH,'Fill',0.0,4)
101 | C
102 | CALL PLFLUSH
103 | C
104 | WRITE(*,*) 'Hit return to test replot'
105 | READ(5,1000) DUMMY
106 | END DO
107 | C
108 | WRITE(*,*) 'Hit return to end test'
109 | READ(5,1000) DUMMY
110 | 1000 FORMAT(A)
111 | C
112 | 2000 CALL PLCLOSE
113 | STOP
114 | END
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
--------------------------------------------------------------------------------
/plotlib/examples/symbols.f:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: symbols.f
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This program is free software; you can redistribute it and/or modify
7 | C it under the terms of the GNU General Public License as published by
8 | C the Free Software Foundation; either version 2 of the License, or
9 | C (at your option) any later version.
10 | C
11 | C This program is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | C GNU General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU General Public License
17 | C along with this program; if not, write to the Free Software
18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 |
24 | C---Test routine for Pltlib
25 | C Displays a symbol set in color
26 | C
27 | CHARACTER*4 INP
28 | CH = 0.02
29 | C
30 | C---Decide about what devices to plot to
31 | WRITE(*,*) ' '
32 | WRITE(*,*) 'SYMBOLS Plot test'
33 | WRITE(*,*) ' You may just for each question to take defaults'
34 | WRITE(*,*) ' '
35 | 1 WRITE(*,*) ' Enter -1 for no PS, 0 for B&W PS, 1 for color PS'
36 | READ(*,1000,end=2000) INP
37 | ihard = -1
38 | if(INP.ne.' ') then
39 | READ(INP,*,end=2000,err=2000) ihard
40 | endif
41 | IDEV = 1
42 | IF(ihard.eq.0) IDEV = 3
43 | IF(ihard.ge.1) IDEV = 5
44 | ipslu = 0
45 | C
46 | C---Initialize the plot package before we get into color plotting...
47 | CALL PLINITIALIZE
48 | C
49 | C---Now, how many colors...
50 | WRITE(*,*) ' Enter # colors (0 or 1 gives no colors)'
51 | READ(*,1000,end=2000) INP
52 | ncolors = 32
53 | if(INP.ne.' ') then
54 | READ(INP,*,end=2000,err=2000) ncolors
55 | endif
56 | C---Set up colormap spectrum colors
57 | if(ncolors.LE.1) ncolors = 1
58 | CALL COLORSPECTRUMHUES(ncolors,'MBCGYR')
59 | C
60 | C---Take the default window (portrait, 2/3 screen dimension)
61 | CALL PLOPEN(0.,ipslu,IDEV)
62 | C
63 | CALL NEWFACTOR(5.0)
64 | CALL PLOT(0.10,0.1,-3)
65 | ccc CALL NEWCOLORNAME('black')
66 | C
67 | C---Plot the symbols in 8 columns of 32 characters each (256 total)
68 | DO ISET=1, 8
69 | C
70 | I0 = (ISET-1)*32 + 1
71 | IN = I0 + 31
72 | C
73 | DO I=I0, IN
74 | RNUM = FLOAT(I-1)
75 | XX = 0.2*FLOAT(ISET-1)
76 | YY = (36.-FLOAT(I-I0))*2.0*CH
77 | C
78 | ICOLOR = MOD(I-1,NCOLORS) + 1
79 | C WRITE(*,*) 'ICOLOR,ISYM ',ICOLOR,I-1
80 | C---Select one of the colormap spectrum colors (repeat, modulo ncolors)
81 | IF(ncolors.GT.1) CALL NEWCOLOR(-icolor)
82 | CALL PLNUMB(XX,YY-0.5*CH,CH,RNUM,0.0,-1)
83 | CALL PLCHAR(XX+4.0*CH,YY,CH,char(I-1),0.0,1)
84 | END DO
85 | END DO
86 | C
87 | C---Put colored title at bottom of plot
88 | CALL NEWCOLORNAME('blue')
89 | CALL PLCHAR(0.,0.,2.*CH,'Xplot11 ',0.0,8)
90 | CALL NEWCOLORNAME('green')
91 | CALL PLCHAR(999.,999.,2.*CH,'PLCHAR ',0.0,7)
92 | CALL NEWCOLORNAME('red')
93 | CALL PLCHAR(999.,999.,2.*CH,'test',0.0,4)
94 | C
95 | CALL PLFLUSH
96 | WRITE(*,*) 'Hit return to end test'
97 | READ(5,1000) INP
98 | 1000 FORMAT(A)
99 | C
100 | CALL PLEND
101 | C GO TO 1
102 | C
103 | 2000 CALL PLCLOSE
104 | STOP
105 | END
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/src/ntcalc.f:
--------------------------------------------------------------------------------
1 |
2 | SUBROUTINE NTCALC(NX,N,X,HK,TH,UE,VE, NW,W,A)
3 | C------------------------------------------------------------------
4 | C Calculates range of frequencies which span the
5 | C critical frequency. Also calculates the amplitude
6 | C distribution for each frequency.
7 | C
8 | C Input: NX array physical dimension
9 | C N number of streamwise points i
10 | C (i = N point is assumed turbulent)
11 | C X (i) streamwise coordinate array for integrating A(x)
12 | C HK(i) kinematic shape parameter
13 | C TH(i) momentum thickness
14 | C UE(i) edge velocity
15 | C VE(i) edge kinematic viscosity (in same units as UE*TH)
16 | C NW number of frequencies to be set
17 | C
18 | C Output: W(k) radian frequencies in same units as UE/TH
19 | C A(i,k) amplitude distribution for frequency W(k)
20 | C------------------------------------------------------------------
21 | REAL X(NX), HK(NX), TH(NX), UE(NX), VE(NX)
22 | REAL W(NW), A(NX,NW)
23 | C
24 | REAL RSP,WSP,HSP,
25 | & AR,
26 | & AR_R, AR_W, AR_H,
27 | & ARW_R,ARW_W,ARW_H ,
28 | & AI,
29 | & AI_R, AI_W, AI_H,
30 | & AIW_R,AIW_W,AIW_H
31 | C
32 | LOGICAL OK
33 | C
34 | C---- log(frequency) increment over range (i.e. 1.5 decades)
35 | DW = -1.50/FLOAT(NW-1)
36 | C
37 | C---- frequency and amplitude will be returned as zero if no instability
38 | DO 10 IW=1, NW
39 | W(IW) = 0.
40 | DO 105 I=1, N
41 | A(I,IW) = 0.
42 | 105 CONTINUE
43 | 10 CONTINUE
44 | C
45 | C---- search downstream for location where Rcrit is first exceeded
46 | DO 20 I=1, N-1
47 | C------ local Rdelta*
48 | RDL = LOG10( HK(I)*TH(I)*UE(I)/VE(I) )
49 | C
50 | C------ approximate critical Rdelta* for local shape parameter
51 | HKB = 1.0 / (HK(I) - 1.0)
52 | RDLC = 2.23 + 1.35*HKB + 0.85*TANH(10.4*HKB - 7.07) - 0.1
53 | C
54 | IF(RDL .GE. RDLC) GO TO 21
55 | 20 CONTINUE
56 | CCC WRITE(*,*) 'Rcrit not exceeded'
57 | RETURN
58 | C
59 | 21 ISTART = I
60 | C
61 | C---- set frequency array at location where Rcrit is first exceeded
62 | I = ISTART
63 | UOT = UE(I)/TH(I)
64 | DO 30 IW=1, NW
65 | WLOG = -1.0 + DW*FLOAT(IW-1)
66 | W(IW) = (10.0 ** WLOG) * UOT
67 | 30 CONTINUE
68 | C
69 | DO 40 I=ISTART+1, N
70 | IM = I-1
71 | C
72 | C------ set flow variables over i-1,i interval
73 | UA = (UE(IM) + UE(I))*0.5
74 | VA = (VE(IM) + VE(I))*0.5
75 | TA = (TH(IM) + TH(I))*0.5
76 | HA = (HK(IM) + HK(I))*0.5
77 | C
78 | IF(I.EQ.N) THEN
79 | C------- last point is turbulent, so extrapolate from laminar region
80 | C- (turbulent H is likely to be inappropriate)
81 | UA = 1.5*UE(IM) - 0.5*UE(IM-1)
82 | VA = 1.5*VE(IM) - 0.5*VE(IM-1)
83 | TA = 1.5*TH(IM) - 0.5*TH(IM-1)
84 | HA = 1.5*HK(IM) - 0.5*HK(IM-1)
85 | ENDIF
86 | C
87 | C------ set local Rtheta, Hk
88 | RSP = UA*TA/VA
89 | HSP = HA
90 | C
91 | C------ limit Hk, (OSMAP routine would clip anyway)
92 | HSP = MIN( HSP , 19.999 )
93 | C
94 | C------ go over frequencies
95 | DO 405 IW=1, NW
96 | C-------- set Ue/Theta-normalized frequency WSP = w Theta/Ue
97 | WSP = W(IW)*TA/UA
98 | C
99 | C-------- calculate Theta-normalized spatial growth rate AI = ai * Theta
100 | CALL OSMAP(RSP,WSP,HSP,
101 | & AR,
102 | & AR_R, AR_W, AR_H,
103 | & ARW_R,ARW_W,ARW_H ,
104 | & AI,
105 | & AI_R, AI_W, AI_H,
106 | & AIW_R,AIW_W,AIW_H , OK)
107 | C
108 | C-------- integrate growth rate to get amplitude
109 | DX = X(I) - X(IM)
110 | A(I,IW) = A(IM,IW) - AI * DX/TA
111 | A(I,IW) = MAX( A(I,IW) , 0.0 )
112 | 405 CONTINUE
113 | 40 CONTINUE
114 | C
115 | RETURN
116 | END
117 |
118 |
--------------------------------------------------------------------------------
/plotlib/examples/Makefile:
--------------------------------------------------------------------------------
1 | #***********************************************************************
2 | # Module: Makefile (examples directory)
3 | #
4 | # Copyright (C) 1996 Harold Youngren, Mark Drela
5 | #
6 | # This library is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU Library General Public
8 | # License as published by the Free Software Foundation; either
9 | # version 2 of the License, or (at your option) any later version.
10 | #
11 | # This library is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | # Library General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU Library General Public
17 | # License along with this library; if not, write to the Free
18 | # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | #
20 | # Report problems to: guppy@maine.com
21 | # or drela@mit.edu
22 | #***********************************************************************
23 |
24 | ########################################
25 | # makefile for Xplot11 library examples
26 | ########################################
27 |
28 |
29 | ###================================================
30 | ### This line includes your compiler/make options
31 | ### with definitions for compiler and flags
32 |
33 | include ../config.make
34 |
35 | ###================================================
36 |
37 | LIB = ../$(PLTLIB)
38 |
39 | #FC = ifort
40 | #FFLAGS = -r8
41 |
42 | PROGS = volts volts_old \
43 | symbols symbolsall \
44 | squares squaresdoublebuff \
45 | spectrum cmap2 cmap3 defmap \
46 | gridtest zoomtest contest
47 |
48 |
49 | examples: $(PROGS)
50 |
51 |
52 | test: $(PROGS)
53 |
54 | clean:
55 | -/bin/rm *.o
56 | -/bin/rm $(PROGS)
57 | -/bin/rm plot*.ps
58 |
59 |
60 |
61 | #Test routines for package
62 |
63 | volts: volts.o
64 | $(FC) -o volts volts.o $(LIB) $(LINKLIB)
65 |
66 | volts_old: volts_old.o
67 | $(FC) -o volts_old volts_old.o $(LIB) $(LINKLIB)
68 |
69 | symbols: symbols.o
70 | $(FC) -o symbols symbols.o $(LIB) $(LINKLIB)
71 |
72 | symbolsall: symbolsall.o
73 | $(FC) -o symbolsall symbolsall.o $(LIB) $(LINKLIB)
74 |
75 | squares: squares.o
76 | $(FC) -o squares squares.o $(LIB) $(LINKLIB)
77 |
78 | squaresdoublebuff: squaresdoublebuff.o
79 | $(FC) -o squaresdoublebuff squaresdoublebuff.o $(LIB) $(LINKLIB)
80 |
81 | spectrum: spectrum.o
82 | $(FC) -o spectrum spectrum.o $(LIB) $(LINKLIB)
83 |
84 | cmap2: cmap2.o
85 | $(FC) -o cmap2 cmap2.o $(LIB) $(LINKLIB)
86 |
87 | cmap3: cmap3.o
88 | $(FC) -o cmap3 cmap3.o $(LIB) $(LINKLIB)
89 |
90 | defmap: defmap.o
91 | $(FC) -o defmap defmap.o $(LIB) $(LINKLIB)
92 |
93 | gridtest: gridtest.o
94 | $(FC) -o gridtest gridtest.o $(LIB) $(LINKLIB)
95 |
96 | zoomtest: zoomtest.o
97 | $(FC) -o zoomtest zoomtest.o $(LIB) $(LINKLIB)
98 |
99 | contest: contest.o
100 | $(FC) -o contest contest.o $(LIB) $(LINKLIB)
101 |
102 |
103 |
104 | volts.o: volts.f
105 | $(FC) -c $(FFLAGS) $<
106 |
107 | volts_old.o: volts_old.f
108 | $(FC) -c $(FFLAGS) $<
109 |
110 | symbols.o: symbols.f
111 | $(FC) -c $(FFLAGS) $<
112 |
113 | symbolsall.o: symbolsall.f
114 | $(FC) -c $(FFLAGS) $<
115 |
116 | squares.o: squares.f
117 | $(FC) -c $(FFLAGS) $<
118 |
119 | squaresdoublebuff.o: squaresdoublebuff.f
120 | $(FC) -c $(FFLAGS) $<
121 |
122 | spectrum.o: spectrum.f
123 | $(FC) -c $(FFLAGS) $<
124 |
125 | cmap2.o: cmap2.f
126 | $(FC) -c $(FFLAGS) $<
127 |
128 | cmap3.o: cmap3.f
129 | $(FC) -c $(FFLAGS) $<
130 |
131 | defmap.o: defmap.f
132 | $(FC) -c $(FFLAGS) $<
133 |
134 | gridtest.o: gridtest.f
135 | $(FC) -c $(FFLAGS) $<
136 |
137 | zoomtest.o: zoomtest.f
138 | $(FC) -c $(FFLAGS) $<
139 |
140 | contest.o: contest.f
141 | $(FC) -c $(FFLAGS) $<
142 |
143 | #May need to specify these on a brain-dead make system
144 | #.f.o: $(FC) -c $(FFLAGS) $<
145 | #.c.o: $(CC) -c $(CFLAGS) $<
146 |
147 |
148 |
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/plotlib/examples/volts.f:
--------------------------------------------------------------------------------
1 | C***********************************************************************
2 | C Module: volts.f
3 | C
4 | C Copyright (C) 1996 Harold Youngren, Mark Drela
5 | C
6 | C This program is free software; you can redistribute it and/or modify
7 | C it under the terms of the GNU General Public License as published by
8 | C the Free Software Foundation; either version 2 of the License, or
9 | C (at your option) any later version.
10 | C
11 | C This program is distributed in the hope that it will be useful,
12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | C GNU General Public License for more details.
15 | C
16 | C You should have received a copy of the GNU General Public License
17 | C along with this program; if not, write to the Free Software
18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | C
20 | C Report problems to: guppy@maine.com
21 | C or drela@mit.edu
22 | C***********************************************************************
23 |
24 | C
25 | C...VOLTS
26 | C Test of Xplot11 interface
27 | C
28 | C
29 | CHARACTER RDLINE*60
30 | DIMENSION X(26),Y(26)
31 | DATA X/0.,5.,15.,25.,30.,35.,40.,45.,50.,55.,60.,65.,70.,75.,80.,
32 | 1 85.,90.,95.,100.,105.,110.,115.,120.,125.,2*0./
33 | C
34 | DATA Y/0.,10.,15.,10.,-10.,-50.,-80.,-110.,-130.,-145.,-155.,
35 | 1 -160.,-158.,-150.,-130.,-90.,-70.,-20.,20.,50.,70.,80.,85.,
36 | 2 90.,2*0./
37 | C
38 | C
39 | 5 FORMAT(A)
40 | C
41 | C...Alter actual data scales
42 | DO 10 I=1,24
43 | X(I) = X(I) * 1000
44 | 10 Y(I) = Y(I) / 10000
45 | C
46 | IPD = 1
47 | RELSIZ = -0.6
48 | C
49 | C...Select type(s) of plot output
50 | WRITE(*,40)
51 | 40 FORMAT('Input plot device (1 screen, 2 PShardcopy, 3 both): ',$)
52 | READ(*,5,end=1000) RDLINE
53 | IF(RDLINE.NE.' ') READ(RDLINE,*,err=42) IPD
54 | C
55 | C...Get plot window size as fraction of root window
56 | 42 WRITE(*,45)
57 | 45 FORMAT('Enter window relative size ( gives -0.6): ',$)
58 | READ(*,5,end=1000) RDLINE
59 | IF(RDLINE.NE.' ') READ(RDLINE,*,err=50) RELSIZ
60 | C
61 | 50 CALL PLINITIALIZE
62 | ipslu = 0
63 | CALL PLOPEN(RELSIZ,ipslu,IPD)
64 | C
65 | CALL NEWFACTOR(0.9)
66 | CALL PLOT(1.05,1.05,-3)
67 | C
68 | C...Scale factors from array coordinates
69 | CALL SCALE(X,7.,24,+1)
70 | CALL SCALE(Y,7.,24,+1)
71 | C
72 | IMASK = -1
73 | IMASK = -30584
74 | C...Test for line mask
75 | c WRITE(*,*) 'Enter line pattern bit mask (integer)'
76 | c READ(*,*,end=1000) IMASK
77 | call NEWPAT(IMASK)
78 | C
79 | C...Plot the array of points
80 | CALL NEWPEN (3)
81 | CALL NEWCOLORNAME('red')
82 | CALL LINE (X,Y,24,1,+1,0)
83 | MSKALL = -1
84 | call NEWPAT(MSKALL)
85 | C
86 | C...Label the axes
87 | CALL NEWPEN (2)
88 | CALL NEWCOLORNAME('orchid')
89 | CALL AXIS (0.,0.,'NANOSECONDS',-11,7.,0.,X(25),X(26))
90 | CALL NEWCOLORRGB(0,255,255)
91 | CALL AXIS (0.,0.,'MILLIVOLTS',+10,7.,90.,Y(25),Y(26))
92 | C
93 | C...Plot legend
94 | CALL NEWPEN (1)
95 | CALL NEWCOLORNAME('cadetblue')
96 | CALL PLCHAR (.5,.5,.1,'DX = ',0.,+5)
97 | CALL PLNUMB (999.,999.,.1,X(26),0.,+3)
98 | CALL PLNUMB (1.,.75,.1,X(26),0.,0)
99 | CALL PLNUMB (1.,1.,.1,X(26),0.,-1)
100 | CALL PLNUMB (1.,1.25,.1,X(26),0.,-4)
101 | C
102 | C...Titles
103 | CALL NEWCOLORNAME('lime green')
104 | CALL PLCHAR (2.3,6.5,.1,'VERSAPLOT SAMPLE',0.,+16)
105 | CALL PLCHAR (1.5,6.75,.2,'TIME VS VOLTAGE',0.,+15)
106 | CALL NEWCOLORNAME('black')
107 | C
108 | CALL PLEND
109 | write(*,*) 'Hit return to exit'
110 | READ(*,999)
111 | C
112 | 999 FORMAT(A)
113 | 1000 CALL PLCLOSE
114 | STOP
115 | END
116 |
117 |
118 |
--------------------------------------------------------------------------------
/orrs/src/bi2bi.f:
--------------------------------------------------------------------------------
1 | PROGRAM BI2BI
2 | PARAMETER (NMAX=257,NRX=101,NWX=91,NHX=21)
3 | C
4 | REAL ETA(NMAX,NHX), U(NMAX,NHX), S(NMAX,NHX)
5 | REAL AR(NRX,NWX,NHX), AI(NRX,NWX,NHX)
6 | REAL RT(NRX,NHX),RTL(NRX,NHX)
7 | REAL WS(NWX,NHX),WSL(NWX,NHX)
8 | REAL HH(NHX),HHL(NHX)
9 | INTEGER N(NHX), NRP(NHX), NWP(NHX)
10 | CHARACTER*80 ARGP
11 | C
12 | CALL GETARG(1,ARGP)
13 | C
14 | CALL READIT(ARGP,
15 | & N,NMAX,ETA,U,S,
16 | & NRP,NWP,NHP,
17 | & RTL,WSL,HH , AR,AI,
18 | & NRX,NWX,NHX)
19 | C
20 | C
21 | DO 1000 IH=1, NHX
22 | IF(N(IH) .EQ. 0) GO TO 1001
23 | C
24 | CALL BREV(HH(IH))
25 | C
26 | write(*,*) ih, n(ih), hh(ih)
27 |
28 | DO 10 I=1, N(IH)
29 | CALL BREV(ETA(I,IH))
30 | CALL BREV(U(I,IH))
31 | CALL BREV(S(I,IH))
32 | 10 CONTINUE
33 | C
34 | DO 20 IR=1, NRP(IH)
35 | CALL BREV(RTL(IR,IH))
36 | 20 CONTINUE
37 | C
38 | DO 30 IW=1, NWP(IH)
39 | CALL BREV(WSL(IW,IH))
40 | 30 CONTINUE
41 | C
42 | DO 40 IW=1, NWP(IH)
43 | DO 405 IR=1, NRP(IH)
44 | CALL BREV(AR(IR,IW,IH))
45 | CALL BREV(AI(IR,IW,IH))
46 | 405 CONTINUE
47 | 40 CONTINUE
48 | C
49 | CALL BREV(N(IH))
50 | CALL BREV(NRP(IH))
51 | CALL BREV(NWP(IH))
52 | C
53 | 1000 CONTINUE
54 | 1001 CONTINUE
55 | C
56 | C
57 | CALL DUMPIT(ARGP,
58 | & N,NMAX,ETA,U,S,
59 | & NRP,NWP,NHP,
60 | & RTL,WSL,HH , AR,AI,
61 | & NRX,NWX,NHX)
62 | C
63 | STOP
64 | END
65 |
66 |
67 | SUBROUTINE DUMPIT(ARGP,
68 | & N,NMAX,ETA,U,S,
69 | & NRP,NWP,NHP,
70 | & RTL,WSL,HH , AR,AI,
71 | & NRX,NWX,NHX)
72 | CHARACTER*(*) ARGP
73 | DIMENSION N(NHX), NRP(NHX),NWP(NHX)
74 | DIMENSION ETA(NMAX,NHX), U(NMAX,NHX), S(NMAX,NHX)
75 | DIMENSION AR(NRX,NWX,NHX),AI(NRX,NWX,NHX)
76 | DIMENSION RTL(NRX,NHX), WSL(NWX,NHX), HH(NHX)
77 | CHARACTER*80 FNAME
78 | C
79 | OPEN(10,FILE=ARGP,STATUS='OLD')
80 | C
81 | DO 1000 IH=1, NHX
82 | 5 READ(10,5000,END=1001) FNAME(2:80)
83 | 5000 FORMAT(A)
84 | C
85 | C------ skip comment line
86 | IF(INDEX('#!',FNAME(1:1)) .NE. 0) GO TO 5
87 | C
88 | C------ strip off leading blanks
89 | 10 CONTINUE
90 | IF(INDEX(FNAME(1:1).EQ.' ') THEN
91 | FNAME = FNAME(2:80)
92 | GO TO 10
93 | ENDIF
94 | C
95 | K = INDEX(FNAME,' ') - 1
96 | C
97 | FNAME = ARGP(1:K) // '.rbin'
98 | WRITE(*,*) FNAME
99 | C
100 | OPEN(9,FILE=FNAME,STATUS='UNKNOWN',FORM='UNFORMATTED')
101 | WRITE(9) N(IH), HH(IH)
102 | CALL BREV(N(IH))
103 |
104 | HHREV = HH(IH)
105 | CALL BREV(HHREV)
106 | C
107 | WRITE(9) (ETA(I,IH),I=1, N(IH))
108 | WRITE(9) (U(I,IH) ,I=1, N(IH))
109 | WRITE(9) (S(I,IH) ,I=1, N(IH))
110 | WRITE(9) NRP(IH), NWP(IH)
111 | CALL BREV(NRP(IH))
112 | CALL BREV(NWP(IH))
113 | C
114 | WRITE(9) (RTL(IR,IH),IR=1,NRP(IH))
115 | WRITE(9) (WSL(IW,IH),IW=1,NWP(IH))
116 | C
117 | DO IW=1, NWP(IH)
118 | WRITE(9) (AR(IR,IW,IH),IR=1,NRP(IH))
119 | WRITE(9) (AI(IR,IW,IH),IR=1,NRP(IH))
120 | ENDDO
121 | CLOSE(9)
122 |
123 | WRITE(*,*) N(IH), NRP(IH), NWP(IH), HHREV
124 | C
125 | 1000 CONTINUE
126 | 1001 NHP = IH-1
127 | CLOSE(10)
128 | CLOSE(9)
129 | C
130 | RETURN
131 | END
132 |
133 |
134 | SUBROUTINE BREV(AINP)
135 |
136 | C---- byte-reverse between DEC and standard format
137 | C
138 | LOGICAL*1 AB(4), TEMP
139 | EQUIVALENCE (A,AB)
140 | C
141 | ccc return
142 |
143 | A = AINP
144 | C
145 | TEMP = AB(1)
146 | AB(1) = AB(4)
147 | AB(4) = TEMP
148 | C
149 | TEMP = AB(2)
150 | AB(2) = AB(3)
151 | AB(3) = TEMP
152 | C
153 | AINP = A
154 | C
155 | RETURN
156 | END
157 |
--------------------------------------------------------------------------------
/plotlib/config.make.QP:
--------------------------------------------------------------------------------
1 |
2 | #=======================================#
3 | # Makefile options for Xplot11 library #
4 | # Set up or select a set of compile #
5 | # options for your system #
6 | #=======================================#
7 |
8 |
9 | ### Use these to set library name
10 | ### (you might add QP to name to keep quad precision version separate)
11 | #PLTLIB = libPlt.a
12 | PLTLIB = libPltQP.a
13 |
14 |
15 | # Some fortrans need trailing underscores in C interface symbols (see Xwin.c)
16 | # This should work for most of the "unix" fortran compilers
17 | DEFINE = -DUNDERSCORE
18 |
19 |
20 | ###-------------------------------------------------------------------------
21 | ### Uncomment for Linux, using the script fort77 or yaf77 or old f77 script
22 | ### Compiler options for Linux GNU compilers include:
23 | ### fort77 perl script (calls f2c/gcc) from RH or from yaf77
24 | ### or the yaf77 or the old f77 shell script from f2c
25 | ### g77 the GNU Fortran compiler
26 | #
27 | #FC = g77-3
28 | #FC = fort77
29 | #CC = gcc
30 | # Uncomment DP to make double-precision version
31 | # (note -r8 does not work in g77, use f2c instead)
32 | #DP = -r8
33 | #FFLAGS = -O2 $(DP)
34 | #CFLAGS = -O2 $(DEFINE)
35 | #AR = ar r
36 | #RANLIB = ranlib
37 | #LINKLIB = -L/usr/X11R6/lib -lX11
38 |
39 | ###-------------------------------------------------------------------------
40 | ### Uncomment for Linux, using PGI f77
41 | #FC = pgf77
42 | #CC = gcc
43 | ##
44 | # Uncomment to make double-precision version
45 | #DP = -r8
46 | #FFLAGS = -fast -O $(DP)
47 | #CFLAGS = -O2 $(DEFINE)
48 | #AR = ar r
49 | #RANLIB = ranlib
50 | #LINKLIB = -L/usr/X11R6/lib -lX11
51 |
52 | ###-------------------------------------------------------------------------
53 | ### Uncomment for Linux, using Intel Fortran compiler
54 | FC = ifort
55 | CC = gcc
56 |
57 | # Uncomment to make quad-precision version
58 | DP = -r16
59 | FFLAGS = -O3 $(DP)
60 | CFLAGS = -O3 $(DEFINE)
61 | AR = ar r
62 | RANLIB = ranlib
63 |
64 | LINKLIB = -L/usr/X11R6/lib -lX11
65 |
66 |
67 | ###-------------------------------------------------------------------------
68 | ### Uncomment for DEC OSF/Alpha
69 | #FC = f77
70 | #
71 | # Uncomment DP to make double-precision version
72 | #DP = -r8
73 | #CFLAGS = -O4 -float $(DEFINE)
74 | #FFLAGS = -O4 $(DP)
75 | # Debug flags
76 | #CFLAGS = -O0 -g -float $(DEFINE)
77 | #FFLAGS = -O0 -g $(DP)
78 | #LINKLIB = -lX11
79 |
80 | ###-------------------------------------------------------------------------
81 | ### Uncomment for RS/6000
82 | # Note if the library is compiled double precision use the -qautodbl=dbl4
83 | # option, not the -qautodbl=dblpad4 option. The dblpad4 option puts padding
84 | # into the argument lists for integer args that cause the polylines and
85 | # linepatterns to fail as the alignment assumptions between the C and fortran
86 | # routines are then different. (The problem lies with xlf90, at least you
87 | # can cure it with a compile option:-). This is not a problem on xlf (f77)
88 | # because it doesn't have a dblpad4 option...
89 | #
90 | #FC = xlf90
91 | #
92 | # Uncomment DP to make double-precision version
93 | #DP = -qautodbl=dbl4
94 | #FFLAGS = -O -qextname -qfixed $(DP)
95 | #### Link libs required for xlf90 at ABB (HHY 9/96)
96 | #LINKLIB = -lX11 -L/venus/u1/fortran/libfor -lxlfabb
97 |
98 | ###-------------------------------------------------------------------------
99 | ### Uncomment for Sun Open-Windows
100 | ### (give location of X11/xxx.h include files)
101 | #
102 | # Uncomment DP to make double-precision version
103 | #DP = -r8
104 | #FFLAGS = -O $(DP)
105 | #CFLAGS = -O -I/usr/openwin/share/include $(DEFINE)
106 | #LINKLIB = -lX11
107 |
108 | ###-------------------------------------------------------------------------
109 | ### Uncomment for HP-9000
110 | ### (use ANSI-C standard, use underscored C-routine names)
111 | #
112 | # Uncomment DP to make double-precision version
113 | #DP = -r8
114 | #CFLAGS = -O -Aa $(DEFINE)
115 | #FFLAGS = -O +ppu $(DP)
116 | #OBJMISC = util-ops.o
117 | #LINKLIB = -lX11
118 |
119 | ###-------------------------------------------------------------------------
120 | ### Uncomment for SGI IRIX
121 | ### (use ANSI-C standard, use underscored C-routine names)
122 | #
123 | # Uncomment DP to make double-precision version
124 | #DP = -r8
125 | #CFLAGS = -O $(DEFINE)
126 | #FFLAGS = -O -static $(DP)
127 | #RANLIB = ar qs
128 | #LINKLIB = -lX11
129 |
130 |
--------------------------------------------------------------------------------
/plotlib/config.make.DP:
--------------------------------------------------------------------------------
1 |
2 | #=======================================#
3 | # Makefile options for Xplot11 library #
4 | # Set up or select a set of compile #
5 | # options for your system #
6 | #=======================================#
7 |
8 |
9 | ### Use these to set library name
10 | ### (you might add DP to name to keep double precision version separate)
11 | #PLTLIB = libPlt.a
12 | PLTLIB = libPltDP.a
13 |
14 |
15 | # Some fortrans need trailing underscores in C interface symbols (see Xwin.c)
16 | # This should work for most of the "unix" fortran compilers
17 | DEFINE = -DUNDERSCORE
18 |
19 |
20 | ###-------------------------------------------------------------------------
21 | ### Uncomment for Linux, using the script fort77 or yaf77 or old f77 script
22 | ### Compiler options for Linux GNU compilers include:
23 | ### fort77 perl script (calls f2c/gcc) from RH or from yaf77
24 | ### or the yaf77 or the old f77 shell script from f2c
25 | ### g77 the GNU Fortran compiler
26 | #
27 | #FC = g77-3
28 | #FC = fort77
29 | #CC = gcc
30 | # Uncomment DP to make double-precision version
31 | # (note -r8 does not work in g77, use f2c instead)
32 | #DP = -r8
33 | #FFLAGS = -O2 $(DP)
34 | #CFLAGS = -O2 $(DEFINE)
35 | #AR = ar r
36 | #RANLIB = ranlib
37 | #LINKLIB = -L/usr/X11R6/lib -lX11
38 |
39 | ###-------------------------------------------------------------------------
40 | ### Uncomment for Linux, using PGI f77
41 | #FC = pgf77
42 | #CC = gcc
43 | ##
44 | # Uncomment to make double-precision version
45 | #DP = -r8
46 | #FFLAGS = -fast -O $(DP)
47 | #CFLAGS = -O2 $(DEFINE)
48 | #AR = ar r
49 | #RANLIB = ranlib
50 | #LINKLIB = -L/usr/X11R6/lib -lX11
51 |
52 | ###-------------------------------------------------------------------------
53 | ### Uncomment for Linux, using Intel Fortran compiler
54 | FC = ifort
55 | CC = gcc
56 |
57 | # Uncomment to make double-precision version
58 | DP = -r8
59 | FFLAGS = -O3 $(DP)
60 | CFLAGS = -O3 $(DEFINE)
61 | AR = ar r
62 | RANLIB = ranlib
63 |
64 | LINKLIB = -L/usr/X11R6/lib -lX11
65 |
66 |
67 | ###-------------------------------------------------------------------------
68 | ### Uncomment for DEC OSF/Alpha
69 | #FC = f77
70 | #
71 | # Uncomment DP to make double-precision version
72 | #DP = -r8
73 | #CFLAGS = -O4 -float $(DEFINE)
74 | #FFLAGS = -O4 $(DP)
75 | # Debug flags
76 | #CFLAGS = -O0 -g -float $(DEFINE)
77 | #FFLAGS = -O0 -g $(DP)
78 | #LINKLIB = -lX11
79 |
80 | ###-------------------------------------------------------------------------
81 | ### Uncomment for RS/6000
82 | # Note if the library is compiled double precision use the -qautodbl=dbl4
83 | # option, not the -qautodbl=dblpad4 option. The dblpad4 option puts padding
84 | # into the argument lists for integer args that cause the polylines and
85 | # linepatterns to fail as the alignment assumptions between the C and fortran
86 | # routines are then different. (The problem lies with xlf90, at least you
87 | # can cure it with a compile option:-). This is not a problem on xlf (f77)
88 | # because it doesn't have a dblpad4 option...
89 | #
90 | #FC = xlf90
91 | #
92 | # Uncomment DP to make double-precision version
93 | #DP = -qautodbl=dbl4
94 | #FFLAGS = -O -qextname -qfixed $(DP)
95 | #### Link libs required for xlf90 at ABB (HHY 9/96)
96 | #LINKLIB = -lX11 -L/venus/u1/fortran/libfor -lxlfabb
97 |
98 | ###-------------------------------------------------------------------------
99 | ### Uncomment for Sun Open-Windows
100 | ### (give location of X11/xxx.h include files)
101 | #
102 | # Uncomment DP to make double-precision version
103 | #DP = -r8
104 | #FFLAGS = -O $(DP)
105 | #CFLAGS = -O -I/usr/openwin/share/include $(DEFINE)
106 | #LINKLIB = -lX11
107 |
108 | ###-------------------------------------------------------------------------
109 | ### Uncomment for HP-9000
110 | ### (use ANSI-C standard, use underscored C-routine names)
111 | #
112 | # Uncomment DP to make double-precision version
113 | #DP = -r8
114 | #CFLAGS = -O -Aa $(DEFINE)
115 | #FFLAGS = -O +ppu $(DP)
116 | #OBJMISC = util-ops.o
117 | #LINKLIB = -lX11
118 |
119 | ###-------------------------------------------------------------------------
120 | ### Uncomment for SGI IRIX
121 | ### (use ANSI-C standard, use underscored C-routine names)
122 | #
123 | # Uncomment DP to make double-precision version
124 | #DP = -r8
125 | #CFLAGS = -O $(DEFINE)
126 | #FFLAGS = -O -static $(DP)
127 | #RANLIB = ar qs
128 | #LINKLIB = -lX11
129 |
130 |
--------------------------------------------------------------------------------
/plotlib/config.make.g77:
--------------------------------------------------------------------------------
1 |
2 | #=======================================#
3 | # Makefile options for Xplot11 library #
4 | # Set up or select a set of compile #
5 | # options for your system #
6 | #=======================================#
7 |
8 |
9 | ### Use these to set library name
10 | ### (you might add DP to name to keep double precision version separate)
11 | PLTLIB = libPlt_g77.a
12 | #PLTLIB = libPltDP.a
13 |
14 |
15 | # Some fortrans need trailing underscores in C interface symbols (see Xwin.c)
16 | # This should work for most of the "unix" fortran compilers
17 | DEFINE = -DUNDERSCORE
18 |
19 |
20 |
21 | ###-------------------------------------------------------------------------
22 | ### Uncomment for Linux, using the script fort77 or yaf77 or old f77 script
23 | ### Compiler options for Linux GNU compilers include:
24 | ### fort77 perl script (calls f2c/gcc) from RH or from yaf77
25 | ### or the yaf77 or the old f77 shell script from f2c
26 | ### g77 the GNU Fortran compiler
27 | #
28 | FC = g77
29 | #FC = fort77
30 | CC = gcc
31 | # Uncomment DP to make double-precision version
32 | # (note -r8 does not work in g77, use f2c instead)
33 | #DP = -r8
34 | FFLAGS = -O2 $(DP)
35 | CFLAGS = -O2 $(DEFINE)
36 | AR = ar r
37 | RANLIB = ranlib
38 | LINKLIB = -L/usr/X11R6/lib -lX11
39 |
40 | ###-------------------------------------------------------------------------
41 | ### Uncomment for Linux, using PGI f77
42 | #FC = pgf77
43 | #CC = gcc
44 | ##
45 | # Uncomment to make double-precision version
46 | #DP = -r8
47 | #FFLAGS = -fast -O $(DP)
48 | #CFLAGS = -O2 $(DEFINE)
49 | #AR = ar r
50 | #RANLIB = ranlib
51 | #LINKLIB = -L/usr/X11R6/lib -lX11
52 |
53 | ###-------------------------------------------------------------------------
54 | ### Uncomment for Linux, using Intel Fortran compiler
55 | #FC = ifc
56 | #CC = gcc
57 | ##
58 | # Uncomment to make double-precision version
59 | #DP = -r8
60 | #FFLAGS = -O3 $(DP)
61 | #CFLAGS = -O3 $(DEFINE)
62 | #AR = ar r
63 | #RANLIB = ranlib
64 | #LINKLIB = -L/usr/X11R6/lib -lX11
65 |
66 |
67 | ###-------------------------------------------------------------------------
68 | ### Uncomment for DEC OSF/Alpha
69 | #FC = f77
70 | #
71 | # Uncomment DP to make double-precision version
72 | #DP = -r8
73 | #CFLAGS = -O4 -float $(DEFINE)
74 | #FFLAGS = -O4 $(DP)
75 | # Debug flags
76 | #CFLAGS = -O0 -g -float $(DEFINE)
77 | #FFLAGS = -O0 -g $(DP)
78 | #LINKLIB = -lX11
79 |
80 | ###-------------------------------------------------------------------------
81 | ### Uncomment for RS/6000
82 | # Note if the library is compiled double precision use the -qautodbl=dbl4
83 | # option, not the -qautodbl=dblpad4 option. The dblpad4 option puts padding
84 | # into the argument lists for integer args that cause the polylines and
85 | # linepatterns to fail as the alignment assumptions between the C and fortran
86 | # routines are then different. (The problem lies with xlf90, at least you
87 | # can cure it with a compile option:-). This is not a problem on xlf (f77)
88 | # because it doesn't have a dblpad4 option...
89 | #
90 | #FC = xlf90
91 | #
92 | # Uncomment DP to make double-precision version
93 | #DP = -qautodbl=dbl4
94 | #FFLAGS = -O -qextname -qfixed $(DP)
95 | #### Link libs required for xlf90 at ABB (HHY 9/96)
96 | #LINKLIB = -lX11 -L/venus/u1/fortran/libfor -lxlfabb
97 |
98 | ###-------------------------------------------------------------------------
99 | ### Uncomment for Sun Open-Windows
100 | ### (give location of X11/xxx.h include files)
101 | #
102 | # Uncomment DP to make double-precision version
103 | #DP = -r8
104 | #FFLAGS = -O $(DP)
105 | #CFLAGS = -O -I/usr/openwin/share/include $(DEFINE)
106 | #LINKLIB = -lX11
107 |
108 | ###-------------------------------------------------------------------------
109 | ### Uncomment for HP-9000
110 | ### (use ANSI-C standard, use underscored C-routine names)
111 | #
112 | # Uncomment DP to make double-precision version
113 | #DP = -r8
114 | #CFLAGS = -O -Aa $(DEFINE)
115 | #FFLAGS = -O +ppu $(DP)
116 | #OBJMISC = util-ops.o
117 | #LINKLIB = -lX11
118 |
119 | ###-------------------------------------------------------------------------
120 | ### Uncomment for SGI IRIX
121 | ### (use ANSI-C standard, use underscored C-routine names)
122 | #
123 | # Uncomment DP to make double-precision version
124 | #DP = -r8
125 | #CFLAGS = -O $(DEFINE)
126 | #FFLAGS = -O -static $(DP)
127 | #RANLIB = ar qs
128 | #LINKLIB = -lX11
129 |
130 |
--------------------------------------------------------------------------------
/plotlib/config.make:
--------------------------------------------------------------------------------
1 |
2 | #=======================================#
3 | # Makefile options for Xplot11 library #
4 | # Set up or select a set of compile #
5 | # options for your system #
6 | #=======================================#
7 |
8 |
9 | ### Use these to set library name
10 | ### (you might add DP to name to keep double precision version separate)
11 | PLTLIB = libPlt.a
12 | #PLTLIB = libPltDP.a
13 |
14 |
15 | # Some fortrans need trailing underscores in C interface symbols (see Xwin.c)
16 | # This should work for most of the "unix" fortran compilers
17 | DEFINE = -DUNDERSCORE
18 |
19 |
20 | ###-------------------------------------------------------------------------
21 | ### Uncomment for Linux, using the script fort77 or yaf77 or old f77 script
22 | ### Compiler options for Linux GNU compilers include:
23 | ### fort77 perl script (calls f2c/gcc) from RH or from yaf77
24 | ### or the yaf77 or the old f77 shell script from f2c
25 | ### g77 the GNU Fortran compiler
26 | #
27 | #FC = g77-3
28 | #FC = fort77
29 | #CC = gcc
30 | # Uncomment DP to make double-precision version
31 | # (note -r8 does not work in g77, use f2c instead)
32 | #DP = -r8
33 | #FFLAGS = -O2 $(DP)
34 | #CFLAGS = -O2 $(DEFINE)
35 | #AR = ar r
36 | #RANLIB = ranlib
37 | #LINKLIB = -L/usr/X11R6/lib -lX11
38 |
39 | ###-------------------------------------------------------------------------
40 | ### Uncomment for Linux, using PGI f77
41 | #FC = pgf77
42 | #CC = gcc
43 | ##
44 | # Uncomment to make double-precision version
45 | #DP = -r8
46 | #FFLAGS = -fast -O $(DP)
47 | #CFLAGS = -O2 $(DEFINE)
48 | #AR = ar r
49 | #RANLIB = ranlib
50 | #LINKLIB = -L/usr/X11R6/lib -lX11
51 |
52 | ###-------------------------------------------------------------------------
53 | ### Uncomment for Linux, using Intel Fortran compiler 8.x
54 | FC = ifort
55 | CC = gcc
56 |
57 | # Uncomment to make double-precision version
58 | #DP = -r8
59 |
60 | FFLAGS = -O3 $(DP)
61 | CFLAGS = -O3 $(DEFINE)
62 | AR = ar r
63 | RANLIB = ranlib
64 |
65 | LINKLIB = -L/usr/X11R6/lib -lX11
66 |
67 |
68 | ###-------------------------------------------------------------------------
69 | ### Uncomment for DEC OSF/Alpha
70 | #FC = f77
71 | #
72 | # Uncomment DP to make double-precision version
73 | #DP = -r8
74 | #CFLAGS = -O4 -float $(DEFINE)
75 | #FFLAGS = -O4 $(DP)
76 | # Debug flags
77 | #CFLAGS = -O0 -g -float $(DEFINE)
78 | #FFLAGS = -O0 -g $(DP)
79 | #LINKLIB = -lX11
80 |
81 | ###-------------------------------------------------------------------------
82 | ### Uncomment for RS/6000
83 | # Note if the library is compiled double precision use the -qautodbl=dbl4
84 | # option, not the -qautodbl=dblpad4 option. The dblpad4 option puts padding
85 | # into the argument lists for integer args that cause the polylines and
86 | # linepatterns to fail as the alignment assumptions between the C and fortran
87 | # routines are then different. (The problem lies with xlf90, at least you
88 | # can cure it with a compile option:-). This is not a problem on xlf (f77)
89 | # because it doesn't have a dblpad4 option...
90 | #
91 | #FC = xlf90
92 | #
93 | # Uncomment DP to make double-precision version
94 | #DP = -qautodbl=dbl4
95 | #FFLAGS = -O -qextname -qfixed $(DP)
96 | #### Link libs required for xlf90 at ABB (HHY 9/96)
97 | #LINKLIB = -lX11 -L/venus/u1/fortran/libfor -lxlfabb
98 |
99 | ###-------------------------------------------------------------------------
100 | ### Uncomment for Sun Open-Windows
101 | ### (give location of X11/xxx.h include files)
102 | #
103 | # Uncomment DP to make double-precision version
104 | #DP = -r8
105 | #FFLAGS = -O $(DP)
106 | #CFLAGS = -O -I/usr/openwin/share/include $(DEFINE)
107 | #LINKLIB = -lX11
108 |
109 | ###-------------------------------------------------------------------------
110 | ### Uncomment for HP-9000
111 | ### (use ANSI-C standard, use underscored C-routine names)
112 | #
113 | # Uncomment DP to make double-precision version
114 | #DP = -r8
115 | #CFLAGS = -O -Aa $(DEFINE)
116 | #FFLAGS = -O +ppu $(DP)
117 | #OBJMISC = util-ops.o
118 | #LINKLIB = -lX11
119 |
120 | ###-------------------------------------------------------------------------
121 | ### Uncomment for SGI IRIX
122 | ### (use ANSI-C standard, use underscored C-routine names)
123 | #
124 | # Uncomment DP to make double-precision version
125 | #DP = -r8
126 | #CFLAGS = -O $(DEFINE)
127 | #FFLAGS = -O -static $(DP)
128 | #RANLIB = ar qs
129 | #LINKLIB = -lX11
130 |
131 |
--------------------------------------------------------------------------------
/plotlib/config.make.SP:
--------------------------------------------------------------------------------
1 |
2 | #=======================================#
3 | # Makefile options for Xplot11 library #
4 | # Set up or select a set of compile #
5 | # options for your system #
6 | #=======================================#
7 |
8 |
9 | ### Use these to set library name
10 | ### (you might add DP to name to keep double precision version separate)
11 | PLTLIB = libPlt.a
12 | #PLTLIB = libPltDP.a
13 |
14 |
15 | # Some fortrans need trailing underscores in C interface symbols (see Xwin.c)
16 | # This should work for most of the "unix" fortran compilers
17 | DEFINE = -DUNDERSCORE
18 |
19 |
20 | ###-------------------------------------------------------------------------
21 | ### Uncomment for Linux, using the script fort77 or yaf77 or old f77 script
22 | ### Compiler options for Linux GNU compilers include:
23 | ### fort77 perl script (calls f2c/gcc) from RH or from yaf77
24 | ### or the yaf77 or the old f77 shell script from f2c
25 | ### g77 the GNU Fortran compiler
26 | #
27 | #FC = g77-3
28 | #FC = fort77
29 | #CC = gcc
30 | # Uncomment DP to make double-precision version
31 | # (note -r8 does not work in g77, use f2c instead)
32 | #DP = -r8
33 | #FFLAGS = -O2 $(DP)
34 | #CFLAGS = -O2 $(DEFINE)
35 | #AR = ar r
36 | #RANLIB = ranlib
37 | #LINKLIB = -L/usr/X11R6/lib -lX11
38 |
39 | ###-------------------------------------------------------------------------
40 | ### Uncomment for Linux, using PGI f77
41 | #FC = pgf77
42 | #CC = gcc
43 | ##
44 | # Uncomment to make double-precision version
45 | #DP = -r8
46 | #FFLAGS = -fast -O $(DP)
47 | #CFLAGS = -O2 $(DEFINE)
48 | #AR = ar r
49 | #RANLIB = ranlib
50 | #LINKLIB = -L/usr/X11R6/lib -lX11
51 |
52 | ###-------------------------------------------------------------------------
53 | ### Uncomment for Linux, using Intel Fortran compiler 8.x
54 | FC = ifort
55 | CC = gcc
56 |
57 | # Uncomment to make double-precision version
58 | #DP = -r8
59 |
60 | FFLAGS = -O3 $(DP)
61 | CFLAGS = -O3 $(DEFINE)
62 | AR = ar r
63 | RANLIB = ranlib
64 |
65 | LINKLIB = -L/usr/X11R6/lib -lX11
66 |
67 |
68 | ###-------------------------------------------------------------------------
69 | ### Uncomment for DEC OSF/Alpha
70 | #FC = f77
71 | #
72 | # Uncomment DP to make double-precision version
73 | #DP = -r8
74 | #CFLAGS = -O4 -float $(DEFINE)
75 | #FFLAGS = -O4 $(DP)
76 | # Debug flags
77 | #CFLAGS = -O0 -g -float $(DEFINE)
78 | #FFLAGS = -O0 -g $(DP)
79 | #LINKLIB = -lX11
80 |
81 | ###-------------------------------------------------------------------------
82 | ### Uncomment for RS/6000
83 | # Note if the library is compiled double precision use the -qautodbl=dbl4
84 | # option, not the -qautodbl=dblpad4 option. The dblpad4 option puts padding
85 | # into the argument lists for integer args that cause the polylines and
86 | # linepatterns to fail as the alignment assumptions between the C and fortran
87 | # routines are then different. (The problem lies with xlf90, at least you
88 | # can cure it with a compile option:-). This is not a problem on xlf (f77)
89 | # because it doesn't have a dblpad4 option...
90 | #
91 | #FC = xlf90
92 | #
93 | # Uncomment DP to make double-precision version
94 | #DP = -qautodbl=dbl4
95 | #FFLAGS = -O -qextname -qfixed $(DP)
96 | #### Link libs required for xlf90 at ABB (HHY 9/96)
97 | #LINKLIB = -lX11 -L/venus/u1/fortran/libfor -lxlfabb
98 |
99 | ###-------------------------------------------------------------------------
100 | ### Uncomment for Sun Open-Windows
101 | ### (give location of X11/xxx.h include files)
102 | #
103 | # Uncomment DP to make double-precision version
104 | #DP = -r8
105 | #FFLAGS = -O $(DP)
106 | #CFLAGS = -O -I/usr/openwin/share/include $(DEFINE)
107 | #LINKLIB = -lX11
108 |
109 | ###-------------------------------------------------------------------------
110 | ### Uncomment for HP-9000
111 | ### (use ANSI-C standard, use underscored C-routine names)
112 | #
113 | # Uncomment DP to make double-precision version
114 | #DP = -r8
115 | #CFLAGS = -O -Aa $(DEFINE)
116 | #FFLAGS = -O +ppu $(DP)
117 | #OBJMISC = util-ops.o
118 | #LINKLIB = -lX11
119 |
120 | ###-------------------------------------------------------------------------
121 | ### Uncomment for SGI IRIX
122 | ### (use ANSI-C standard, use underscored C-routine names)
123 | #
124 | # Uncomment DP to make double-precision version
125 | #DP = -r8
126 | #CFLAGS = -O $(DEFINE)
127 | #FFLAGS = -O -static $(DP)
128 | #RANLIB = ar qs
129 | #LINKLIB = -lX11
130 |
131 |
--------------------------------------------------------------------------------