 EVSL  1.1.0 EigenValues Slicing Library
functns.f90
Go to the documentation of this file.
1 !-----------------------------------------------------------------------
2 ! contains the functions needed for defining the PDE poroblems.
3 !
4 ! first for the scalar 5-point and 7-point PDE
5 !-----------------------------------------------------------------------
6  function afun (x,y,z)
7  real*8 afun, x,y,z
8  afun = -1.0d0
9  return
10  end
11
12  function bfun (x,y,z)
13  real*8 bfun, x,y,z
14  bfun = -1.0d0
15  return
16  end
17
18  function cfun (x,y,z)
19  real*8 cfun, x,y,z
20  cfun = -1.0d0
21  return
22  end
23
24  function dfun (x,y,z)
25  real*8 dfun, x,y,z
26  data gamma /100.0/
27 ! dfun = gamma * exp( x * y )
28  dfun = 0.d0
29  return
30  end
31
32  function efun (x,y,z)
33  real*8 efun, x,y,z
34  data gamma /100.0/
35 ! efun = gamma * exp( (- x) * y )
36  efun = 0.d0
37  return
38  end
39
40  function ffun (x,y,z)
41  real*8 ffun, x,y,z
42  ffun = 0.d0
43  return
44  end
45
46  function gfun (x,y,z)
47  real*8 gfun, x,y,z
48  gfun = 0.d0
49  return
50  end
51
52  function hfun(x, y, z)
53  real*8 hfun, x, y, z
54  hfun = 0.0
55  return
56  end
57
58  function betfun(side, x, y, z)
59  real*8 betfun, x, y, z
60  character*2 side
61  betfun = 1.0
62  return
63  end
64
65  function gamfun(side, x, y, z)
66  real*8 gamfun, x, y, z
67  character*2 side
68  if (side.eq.'x2') then
69  gamfun = 5.0
70  else if (side.eq.'y1') then
71  gamfun = 2.0
72  else if (side.eq.'y2') then
73  gamfun = 7.0
74  else
75  gamfun = 0.0
76  endif
77  return
78  end
79
80 !-----------------------------------------------------------------------
81 ! functions for the block PDE's
82 !-----------------------------------------------------------------------
83  subroutine afunbl (nfree,x,y,z,coeff)
84  real*8 x, y, z, coeff(100)
85  do 2 j=1, nfree
86  do 1 i=1, nfree
87  coeff((j-1)*nfree+i) = 0.0d0
88  1 continue
89  coeff((j-1)*nfree+j) = -1.0d0
90  2 continue
91  return
92  end
93
94  subroutine bfunbl (nfree,x,y,z,coeff)
95  real*8 x, y, z, coeff(100)
96  do 2 j=1, nfree
97  do 1 i=1, nfree
98  coeff((j-1)*nfree+i) = 0.0d0
99  1 continue
100  coeff((j-1)*nfree+j) = -1.0d0
101  2 continue
102  return
103  end
104
105  subroutine cfunbl (nfree,x,y,z,coeff)
106  real*8 x, y, z, coeff(100)
107  do 2 j=1, nfree
108  do 1 i=1, nfree
109  coeff((j-1)*nfree+i) = 0.0d0
110  1 continue
111  coeff((j-1)*nfree+j) = -1.0d0
112  2 continue
113  return
114  end
115
116  subroutine dfunbl (nfree,x,y,z,coeff)
117  real*8 x, y, z, coeff(100)
118  do 2 j=1, nfree
119  do 1 i=1, nfree
120  coeff((j-1)*nfree+i) = 0.0d0
121  1 continue
122  2 continue
123  return
124  end
125
126  subroutine efunbl (nfree,x,y,z,coeff)
127  real*8 x, y, z, coeff(100)
128  do 2 j=1, nfree
129  do 1 i=1, nfree
130  coeff((j-1)*nfree+i) = 0.0d0
131  1 continue
132  2 continue
133  return
134  end
135
136  subroutine ffunbl (nfree,x,y,z,coeff)
137  real*8 x, y, z, coeff(100)
138  do 2 j=1, nfree
139  do 1 i=1, nfree
140  coeff((j-1)*nfree+i) = 0.0d0
141  1 continue
142  2 continue
143  return
144  end
145
146  subroutine gfunbl (nfree,x,y,z,coeff)
147  real*8 x, y, z, coeff(100)
148  do 2 j=1, nfree
149  do 1 i=1, nfree
150  coeff((j-1)*nfree+i) = 0.0d0
151  1 continue
152  2 continue
153  return
154  end
155 !-----------------------------------------------------------------------
156 ! The material property function xyk for the
157 ! finite element problem
158 !-----------------------------------------------------------------------
159  subroutine xyk(nel,xyke,x,y,ijk,node)
160  implicit real*8 (a-h,o-z)
161  dimension xyke(2,2), x(*), y(*), ijk(node,*)
162 !
163 ! this is the identity matrix.
164 !
165  xyke(1,1) = 1.0d0
166  xyke(2,2) = 1.0d0
167  xyke(1,2) = 0.0d0
168  xyke(2,1) = 0.0d0
169
170  return
171  end
subroutine xyk(nel, xyke, x, y, ijk, node)
Definition: functns.f90:159
real *8 function efun(x, y, z)
Definition: functns.f90:32
real *8 function betfun(side, x, y, z)
Definition: functns.f90:58
subroutine bfunbl(nfree, x, y, z, coeff)
Definition: functns.f90:94
subroutine dfunbl(nfree, x, y, z, coeff)
Definition: functns.f90:116
subroutine ffunbl(nfree, x, y, z, coeff)
Definition: functns.f90:136
real *8 function ffun(x, y, z)
Definition: functns.f90:40
real *8 function cfun(x, y, z)
Definition: functns.f90:18
real *8 function gamfun(side, x, y, z)
Definition: functns.f90:65
real *8 function gfun(x, y, z)
Definition: functns.f90:46
subroutine cfunbl(nfree, x, y, z, coeff)
Definition: functns.f90:105
real *8 function dfun(x, y, z)
Definition: functns.f90:24
real *8 function hfun(x, y, z)
Definition: functns.f90:52
subroutine gfunbl(nfree, x, y, z, coeff)
Definition: functns.f90:146
subroutine efunbl(nfree, x, y, z, coeff)
Definition: functns.f90:126
real *8 function afun(x, y, z)
Definition: functns.f90:6
subroutine afunbl(nfree, x, y, z, coeff)
Definition: functns.f90:83
real *8 function bfun(x, y, z)
Definition: functns.f90:12