2D AMRCLAW
Functions/Subroutines
fdisc.f File Reference

Go to the source code of this file.

Functions/Subroutines

function fdisc (x, y)
 

Function/Subroutine Documentation

◆ fdisc()

function fdisc (   x,
  y 
)

Definition at line 6 of file fdisc.f.

Referenced by cellave(), and fss().

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
function fdisc(x, y)
Definition: fdisc.f:6
Here is the caller graph for this function: