2D AMRCLAW
fdisc.f
Go to the documentation of this file.
1 c
2 c
3 c
4 c =================================================
5  function fdisc(x,y)
6 c =================================================
7  implicit double precision (a-h,o-z)
8  common/cdisc/ x0,y0,alf,beta,r0,idisc
9 c
10 c # for computing cell averages for initial data that has a
11 c # discontinuity along some curve. fdisc should be negative to the
12 c # left of the curve and positive to the right
13 c # idisc specifies the nature of the discontinuity for two
14 c # particular cases (a straight line and circle) but this routine
15 c # can be modified for any other curve.
16 c
17  go to (10,20) idisc
18 c
19  10 continue
20 c # straight line through (x0,y0) with normal (alf,beta) pointing
21 c # into right state
22 c
23  fdisc = (x-x0)*alf + (y-y0)*beta
24  return
25 c
26  20 continue
27 c # circle of radius r0:
28  fdisc = (x-x0)**2 + (y-y0)**2 - r0**2
29 c
30  return
31  end
function fdisc(x, y)
Definition: fdisc.f:6