Commit 28277fb6 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

new code

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 2195
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 58efa240
# this is <Makefile>
# ----------------------------------------------------------------------------
# ($Id: Makefile,v 1.7 2006-12-19 15:42:21 tforb Exp $)
# ($Id: Makefile,v 1.8 2006-12-19 15:43:59 tforb Exp $)
#
# 16/11/2001 by Thomas Forbriger (IMGF Frankfurt)
#
......@@ -94,7 +94,23 @@ dispfield.bp100.red.ps: dispfield.bp100.fil.sff Makefile
refract $(REFRACTOPT) -Tt 'Dispergierter Wellenzug (f\dBandpass\u=100Hz, v\dred\u=114m/s)' \
-Sr .114 -St -0.1,0.2 -d $@/vps $< $(REFRACTTRACE)
%.psp: %.ps
ghostview $<
#======================================================================
allplane: planefield.ps
planefield: planefield.o
$(CC) -o $@ $< -ltf -lsffu -lsff $(F2CLIB)
#----------------------------------------------------------------------
planefield.sff: Makefile planefield
planefield $@ -t 1. -c 80. -x 0.,40. -f 5. -n 1024 -N 21
planefield.ps: planefield.sff Makefile
refract -Sx -3.,43. -Sa 1.2 -Eg -Tt 'Ebene Welle (f=5Hz, c=80.m/s)' \
-Tx 'Zeit (s)' -Ty 'Offset (m)' -Tm F -Tl F -Ts 1.3 \
-d $@/vps $< s:1,1,1 $< s:1,1,4 t:1,21
%.psp: %.ps; gv $<; /bin/rm -fv $<
#
# ----- END OF Makefile -----
c this is <planefield.f>
c------------------------------------------------------------------------------
c ($Id: planefield.f,v 1.1 2006-12-19 15:44:00 tforb Exp $)
c
c 09/02/2001 by Thomas Forbriger (IMGF Frankfurt)
c
c create field of harmonic plane waves
c
c REVISIONS and CHANGES
c 09/02/2001 V1.0 Thomas Forbriger
c
c
c==============================================================================
c
program planefield
c
character*(*) version
parameter(version='PLANEFIELD V1.0 create field of harmonic plane waves')
c
logical last
character*80 filename
integer nmax,i,ntrace,n,j,lu
parameter(nmax=10000,lu=10)
real x(nmax)
real xmin,xmax,vel,tmax,fre,pi2,dt,r,t
parameter(pi2=2.* 3.1415926535)
c commandline
integer maxopt, lastarg, iargc
character*80 argument
parameter(maxopt=8)
character*2 optid(maxopt)
character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
c debugging
logical debug, verbose
c here are the keys to our commandline options
data optid/2h-d, 2h-v, 2h-x, 2h-c, 2h-t, 2h-n, 2h-f, 2h-N/
data opthasarg/2*.FALSE.,6*.TRUE./
data optarg/2*1h-,'2.,50.','50.','1.','1024','30.', '25'/
c
c------------------------------------------------------------------------------
c basic information
c
c
argument=' '
if (iargc().eq.1) call getarg(1, argument)
if ((argument(1:5).eq.'-help').or.(iargc().lt.1)) then
print *,version
print *,'Usage: planefield arguments'
print *,' or: planefield -help'
if (argument(1:5).ne.'-help') stop 'ERROR: wrong number of arguments'
print *,' '
print *,'create field of harmonic plane waves'
print *,' '
stop
endif
c
c------------------------------------------------------------------------------
c read command line arguments
c
call getarg(1, filename)
call tf_cmdline(2, lastarg, maxopt, optid,
& optarg, optset, opthasarg)
debug=optset(1)
verbose=optset(2)
read(optarg(3), *) xmin, xmax
read(optarg(4), *) vel
read(optarg(5), *) tmax
read(optarg(6), *) n
read(optarg(7), *) fre
read(optarg(8), *) ntrace
c
c------------------------------------------------------------------------------
c go
dt=tmax/float(n)
if (n.gt.nmax) stop 'ERROR: too many samples'
call sffu_simpleopen(lu, filename)
do i=1,ntrace
r=(i-1)*(xmax-xmin)/float(ntrace-1)+xmin
last=.false.
if (i.eq.ntrace) last=.true.
do j=1,n
t=(j-1)*tmax/float(n-1)
x(j)=sin(pi2*fre*(t-r/vel))
enddo
call sffu_simplewrite(lu, last, x, n, dt, r)
enddo
c
stop
end
c
c ----- END OF planefield.f -----
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment