@@ -111,7 +111,7 @@ def init_grid(self):
111
111
CONSEQUENCE: I NEED TO RE-MAKE A NEW 'Delaunay' OBJECT EVERYTIME THE GRID
112
112
IS REFINED.
113
113
"""
114
- #tri = Delaunay(xi_k_jl, incremental=True)
114
+ # tri = Delaunay(xi_k_jl, incremental=True)
115
115
tri = Delaunay (xi_k_jl )
116
116
117
117
else :
@@ -590,15 +590,15 @@ def check_LEC_j(self, p_j, v, S_j, n_mc, queue):
590
590
Psi = self .compute_Psi (xi_Sj , p_j )
591
591
592
592
# check if Psi is well poised
593
- #det_Psi = np.linalg.det(Psi)
593
+ # det_Psi = np.linalg.det(Psi)
594
594
# if det_Psi == 0:
595
595
# #print 'Warning: determinant Psi is zero.'
596
596
# #print 'Reducing local p_j from ' + str(p_j[j]) + ' to a lower value.'
597
597
# #return an error code
598
598
# return queue.put({'p_j[j]':-99, 'el_idx_j':el_idx_j})
599
599
600
600
# compute the coefficients c_jl
601
- #c_jl = np.linalg.solve(Psi, v_Sj)
601
+ # c_jl = np.linalg.solve(Psi, v_Sj)
602
602
c_jl = DAFSILAS (Psi , v_Sj )
603
603
604
604
# check the LEC condition for all simplices in the STENCIL S_j
@@ -644,15 +644,15 @@ def check_LEC_j(self, p_j, v, S_j, n_mc, queue):
644
644
Psi = self .compute_Psi (xi_Sj , p_j )
645
645
646
646
# check if Psi is well poised
647
- #det_Psi = np.linalg.det(Psi)
647
+ # det_Psi = np.linalg.det(Psi)
648
648
# if det_Psi == 0:
649
649
# #print 'Warning: determinant Psi is zero.'
650
650
# #print 'Reducing local p_j from ' + str(p_j[j]) + ' to a lower value.'
651
651
# #return an error code
652
652
# return queue.put({'p_j[j]':-99, 'el_idx_j':el_idx_j})
653
653
654
654
# compute the coefficients c_jl
655
- #c_jl = np.linalg.solve(Psi, v_Sj)
655
+ # c_jl = np.linalg.solve(Psi, v_Sj)
656
656
c_jl = DAFSILAS (Psi , v_Sj , False )
657
657
658
658
if k == el_idx_j .size :
@@ -684,7 +684,7 @@ def compute_stencil_j(self):
684
684
685
685
for j in range (n_e ):
686
686
# the number of points in S_j
687
- #Np1_j = factorial(n_xi + p_j[j])/(factorial(n_xi)*factorial(p_j[j]))
687
+ # Np1_j = factorial(n_xi + p_j[j])/(factorial(n_xi)*factorial(p_j[j]))
688
688
# k = {1,...,n_s}\{k_j0, ..., k_jn_xi}
689
689
idx = np .delete (range (n_s ), self .tri .simplices [j ])
690
690
# store the vertex indices of the element itself
@@ -1055,7 +1055,7 @@ def surrogate(self, xi, S_j, p_j, v):
1055
1055
# print 'Error, det(Psi)=0 in compute_surplus_k() method, should not be possible'
1056
1056
1057
1057
# compute the coefficients c_jl
1058
- #c_jl = np.linalg.solve(Psi, v_Sj)
1058
+ # c_jl = np.linalg.solve(Psi, v_Sj)
1059
1059
c_jl = DAFSILAS (Psi , v_Sj , False )
1060
1060
1061
1061
# compute the interpolation on the old grid
@@ -1240,7 +1240,7 @@ def DAFSILAS(A, b, print_message=False):
1240
1240
P = np .eye (n )
1241
1241
1242
1242
# the ill-condition control parameter
1243
- #epsilon = np.finfo(np.float64).eps
1243
+ # epsilon = np.finfo(np.float64).eps
1244
1244
epsilon = 10 ** - 14
1245
1245
1246
1246
for i in range (n - 1 ):
@@ -1266,9 +1266,9 @@ def DAFSILAS(A, b, print_message=False):
1266
1266
Ap [:, i + col ] = tmp
1267
1267
1268
1268
# Also interchange the entries in b
1269
- #tmp = A[i, n]
1269
+ # tmp = A[i, n]
1270
1270
# A[i, n] = A[i+col, n]Ap[i+1+j, i:m]
1271
- #A[i+col, n] = tmp
1271
+ # A[i+col, n] = tmp
1272
1272
1273
1273
# keep track of column switches via a series of permuation matrices P =
1274
1274
# P1*P2*...*Pi*...*Pn ==> at each iteration x = P*xi
@@ -1305,7 +1305,7 @@ def DAFSILAS(A, b, print_message=False):
1305
1305
1306
1306
# ajj = 1, aij = 0 for j = i...n
1307
1307
Ap [idx [0 ]:n , idx [0 ]:n ] = np .eye (nullity )
1308
- #bj = 0
1308
+ # bj = 0
1309
1309
Ap [idx [0 ]:n , n ] = 0
1310
1310
# ejj = 1, eij = 0
1311
1311
Ap [idx [0 ]:n , idx [0 ] + n + 1 :m ] = np .eye (nullity )
0 commit comments