@@ -29,9 +29,9 @@ function calc_forward_upper(n_nodes, RealT = Float64)
29
29
wbary = barycentric_weights (nodes)
30
30
31
31
# Calculate projection matrix (actually: interpolation)
32
- operator = zeros (n_nodes, n_nodes)
32
+ operator = zeros (RealT, n_nodes, n_nodes)
33
33
for j in 1 : n_nodes
34
- poly = lagrange_interpolating_polynomials (1 / 2 * (nodes[j] + 1 ), nodes, wbary)
34
+ poly = lagrange_interpolating_polynomials (0.5f0 * (nodes[j] + 1 ), nodes, wbary)
35
35
for i in 1 : n_nodes
36
36
operator[j, i] = poly[i]
37
37
end
@@ -49,9 +49,9 @@ function calc_forward_lower(n_nodes, RealT = Float64)
49
49
wbary = barycentric_weights (nodes)
50
50
51
51
# Calculate projection matrix (actually: interpolation)
52
- operator = zeros (n_nodes, n_nodes)
52
+ operator = zeros (RealT, n_nodes, n_nodes)
53
53
for j in 1 : n_nodes
54
- poly = lagrange_interpolating_polynomials (1 / 2 * (nodes[j] - 1 ), nodes, wbary)
54
+ poly = lagrange_interpolating_polynomials (0.5f0 * (nodes[j] - 1 ), nodes, wbary)
55
55
for i in 1 : n_nodes
56
56
operator[j, i] = poly[i]
57
57
end
@@ -70,12 +70,12 @@ function calc_reverse_upper(n_nodes, ::Val{:gauss}, RealT = Float64)
70
70
gauss_wbary = barycentric_weights (gauss_nodes)
71
71
72
72
# Calculate projection matrix (actually: discrete L2 projection with errors)
73
- operator = zeros (n_nodes, n_nodes)
73
+ operator = zeros (RealT, n_nodes, n_nodes)
74
74
for j in 1 : n_nodes
75
- poly = lagrange_interpolating_polynomials (1 / 2 * (gauss_nodes[j] + 1 ),
75
+ poly = lagrange_interpolating_polynomials (0.5f0 * (gauss_nodes[j] + 1 ),
76
76
gauss_nodes, gauss_wbary)
77
77
for i in 1 : n_nodes
78
- operator[i, j] = 1 / 2 * poly[i] * gauss_weights[j] / gauss_weights[i]
78
+ operator[i, j] = 0.5f0 * poly[i] * gauss_weights[j] / gauss_weights[i]
79
79
end
80
80
end
81
81
@@ -97,12 +97,12 @@ function calc_reverse_lower(n_nodes, ::Val{:gauss}, RealT = Float64)
97
97
gauss_wbary = barycentric_weights (gauss_nodes)
98
98
99
99
# Calculate projection matrix (actually: discrete L2 projection with errors)
100
- operator = zeros (n_nodes, n_nodes)
100
+ operator = zeros (RealT, n_nodes, n_nodes)
101
101
for j in 1 : n_nodes
102
- poly = lagrange_interpolating_polynomials (1 / 2 * (gauss_nodes[j] - 1 ),
102
+ poly = lagrange_interpolating_polynomials (0.5f0 * (gauss_nodes[j] - 1 ),
103
103
gauss_nodes, gauss_wbary)
104
104
for i in 1 : n_nodes
105
- operator[i, j] = 1 / 2 * poly[i] * gauss_weights[j] / gauss_weights[i]
105
+ operator[i, j] = 0.5f0 * poly[i] * gauss_weights[j] / gauss_weights[i]
106
106
end
107
107
end
108
108
0 commit comments