Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Commit 26ec590

Browse files
committed
Removal of now-obsolete components
1 parent 59bf0e1 commit 26ec590

3 files changed

Lines changed: 0 additions & 976 deletions

File tree

devitoboundary/stencils.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -406,55 +406,3 @@ def _all_variants(self, deriv):
406406
self._stencil_list[le][ri] = sp.simplify(stencil_entry)
407407

408408
self._stencil_dict[str(self._bcs)+str(self._s_o)+str(deriv)+'ns'] = self._stencil_list
409-
410-
def subs(self, eta_l=None, eta_r=None):
411-
"""
412-
Obtain a numpy array of the stencil coefficients given values of eta_l
413-
and eta_r. This is the offset between the central stencil point and
414-
the boundary on the respective side. As such eta_l should always be
415-
negative and eta_r positive.
416-
417-
Parameters
418-
----------
419-
eta_l : float
420-
The offset between the center of the stencil and the left side
421-
boundary, measured in grid increments. Should always be negative.
422-
Default is None.
423-
eta_r : float
424-
The offset between the center of the stencil and the right side
425-
boundary, measured in grid increments. Should always be positive.
426-
Default is None
427-
428-
Returns
429-
-------
430-
coeffs : ndarray
431-
An array of the stencil coefficients for these eta values.
432-
"""
433-
434-
if eta_l is None or abs(eta_l) > self._s_o/2:
435-
dist_l = 0
436-
sub_l = 0 # Placeholder to stop subs() encountering None
437-
else:
438-
if eta_l >= 0:
439-
raise ValueError("eta_l must be negative. Current value is %.6f" % eta_l)
440-
# Turn eta into the relevent le index in the stencil list
441-
dist_l = self._s_o - np.ceil(abs(eta_l)*2).astype(np.int) + 1
442-
sub_l = eta_l
443-
444-
if eta_r is None or eta_r > self._s_o/2:
445-
dist_r = 0
446-
sub_r = 0 # Placeholder to stop subs() encountering None
447-
else:
448-
if eta_r <= 0:
449-
raise ValueError("eta_r must be positive. Current value is %.6f" % eta_r)
450-
# Turn eta into the relevent ri index in the stencil list
451-
dist_r = self._s_o - np.ceil(eta_r*2).astype(np.int) + 1
452-
sub_r = eta_r
453-
454-
stencil = self._stencil_list[dist_l][dist_r].subs([(self._eta_l, sub_l),
455-
(self._eta_r, sub_r)])
456-
coeffs = np.empty(self._s_o+1)
457-
for i in range(self._s_o+1):
458-
coeffs[i] = float(stencil.coeff(self._f[i-int(self._s_o/2)], 1))
459-
460-
return coeffs

0 commit comments

Comments
 (0)