-
Notifications
You must be signed in to change notification settings - Fork 7
/
glwed.jl
93 lines (83 loc) · 2.52 KB
/
glwed.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/FEMQuad.jl/blob/master/LICENSE
### Gauss quadrature rules for prismatic elements (wedge)
""" Gauss-Legendre quadrature, 6 point rule on wedge. """
function get_quadrature_points(::Type{Val{:GLWED6}})
w = 1.0/6.0
a = sqrt(1.0/3.0)
weights = (w, w, w, w, w, w)
points = ((0.5, 0.0, -a), (0.0, 0.5, -a), (0.5, 0.5, -a),
(0.5, 0.0, a), (0.0, 0.5, a), (0.5, 0.5, a))
return zip(weights, points)
end
function get_order(::Type{Val{:GLWED6}})
return 1
end
""" Gauss-Legendre quadrature, 6 point rule on wedge. """
function get_quadrature_points(::Type{Val{:GLWED6B}})
w = 1.0/6.0
a = sqrt(1.0/3.0)
weights = (w, w, w, w, w, w)
points = ((2.0/3.0, 1.0/6.0, -a), (1.0/6.0, 2.0/3.0, -a), (1.0/6.0, 1.0/6.0, -a),
(2.0/3.0, 1.0/6.0, a), (1.0/6.0, 2.0/3.0, a), (1.0/6.0, 1.0/6.0, a))
return zip(weights, points)
end
function get_order(::Type{Val{:GLWED6B}})
return 1
end
""" Gauss-Legendre quadrature, 21 point rule on wedge. """
function get_quadrature_points(::Type{Val{:GLWED21}})
alpha = sqrt(3/5)
c1 = 5/9
c2 = 8/9
a = (6+sqrt(15))/21
b = (6-sqrt(15))/21
weights = (
c1*9/80,
c1*((155+sqrt(15))/2400),
c1*((155+sqrt(15))/2400),
c1*((155+sqrt(15))/2400),
c1*((155-sqrt(15))/2400),
c1*((155-sqrt(15))/2400),
c1*((155-sqrt(15))/2400),
c2*9/80,
c2*((155+sqrt(15))/2400),
c2*((155+sqrt(15))/2400),
c2*((155+sqrt(15))/2400),
c2*((155-sqrt(15))/2400),
c2*((155-sqrt(15))/2400),
c2*((155-sqrt(15))/2400),
c1*9/80,
c1*((155+sqrt(15))/2400),
c1*((155+sqrt(15))/2400),
c1*((155+sqrt(15))/2400),
c1*((155-sqrt(15))/2400),
c1*((155-sqrt(15))/2400),
c1*((155-sqrt(15))/2400))
points = (
(1/3, 1/3, -alpha),
(a, a, -alpha),
(1-2a, a, -alpha),
(a, 1-2a, -alpha),
(b, b, -alpha),
(1-2b, b, -alpha),
(b, 1-2b, -alpha),
(1/3, 1/3, 0),
(a, a, 0),
(1-2a, a, 0),
(a, 1-2a, 0),
(b, b, 0),
(1-2b, b, 0),
(b, 1-2b, 0),
(1/3, 1/3, alpha),
(a, a, alpha),
(1-2a, a, alpha),
(a, 1-2a, alpha),
(b, b, alpha),
(1-2b, b, alpha),
(b, 1-2b, alpha))
return zip(weights, points)
end
function get_order(::Type{Val{:GLWED21}})
return 5
end