ultrasphere.special package¶
- ultrasphere.special.fundamental_solution(d: TArray, z: TArray, k: TArray, derivative: bool = False) TArray[source]¶
Fundamental solution of the Helmholtz equation in d dimensions.
- Parameters:
d (TArray) – The dimension of the space.
z (TArray) – The argument of the fundamental solution of shape (…, d (coordinates)).
k (TArray) – The wave number.
derivative (bool, optional) – Whether to compute the derivative of the fundamental solution, by default False
- Returns:
The fundamental solution of the Helmholtz equation of shape (…,).
- Return type:
TArray
- ultrasphere.special.potential_coef(n: TArray, d: TArray, k: TArray, /, *, x_abs: TArray, y_abs: TArray, x_abs_derivative: bool | None = None, y_abs_derivative: bool | None = None, derivative: Literal['S', 'D', 'D*', 'N'] | None = None, limit: Literal[False, 'x_larger', 'y_larger', 'warn'] = 'warn', for_func: Literal['harmonics', 'solution'] = 'harmonics') Array[source]¶
The coefficients for layer potentials.
The coefficients for single-layer or double-layer potential for hyperspherical harmonics with homogeneous degree (maximum quantum number) n.
y is the integral variable.
\[r \mathbb{S}^{d-1} := \{ x \in \mathbb{R}^d : \left|x\right| = r \}\]\[\begin{split}\forall d \in \mathbb{N} \setminus \{1\}. \forall x_a, y_a \in (0, \infty). \forall T \in \{S_{y_a \mathbb{S}^{d-1}}, D_{y_a \mathbb{S}^{d-1}}, D^*_{y_a \mathbb{S}^{d-1}}, N_{y_a \mathbb{S}^{d-1}}\}. \\ \forall x \in x_a \mathbb{S}^{d-1}. \forall n \in \mathbb{N}_0. \forall Y_n \in \mathcal{H}(\mathbb{S}^{d-1}). \\ T Y_n \left(\frac{x}{x_a}\right) = \text{potential_coef}(T) Y_n \left(\frac{x}{x_a}\right)\end{split}\]- Parameters:
n (TArray) – The homogeneous degree of the hyperspherical harmonics. (maximum quantum number)
d (TArray) – The dimension of the hypersphere.
k (TArray) – The wavenumber.
x_abs (TArray) – The distance from the origin O to the point x.
y_abs (TArray) – The radius of the hypersphere.
x_abs_derivative (bool | None, optional) – Whether the derivative is taken with respect to x_abs, by default False.
y_abs_derivative (bool | None, optional) – Whether the derivative is taken with respect to y_abs, by default False.
derivative (Literal["S", "D", "D*", "N"] | None, optional) –
The shorthand for the derivative. Note that the integral variable is y.
”S” <=> x_abs_derivative = False, y_abs_derivative = False
”D” <=> x_abs_derivative = False, y_abs_derivative = True
”D*” <=> x_abs_derivative = True, y_abs_derivative = False
”N” <=> x_abs_derivative = True, y_abs_derivative = True
limit (Literal[False, "x_larger", "y_larger"], optional) – Whether to return the directional derivative of the potential with respect to x to the x/|x| direction, by default False.
for_func (Literal["harmonics", "solution"], optional) – Whether the coefficient is for the harmonics or the suitable (singular if outer, regular if inner) elementary solution, by default “harmonics”.
- Returns:
The coefficient for the potential integrated by y.
- Return type:
Array
References
McLean, W. (2000). Strongly Elliptic Systems and Boundary Integral Equations. p.285
- ultrasphere.special.shn1(v: TArray, d: TArray, z: TArray, derivative: bool = False) TArray[source]¶
Hyperspherical Hankel function of the first kind.
\[h_v^{(1)(d)} (z) = \sqrt{\frac{\pi}{2}} \frac{H^{(1)}_{v + d/2 - 1}(z)}{z^{d/2 - 1}}\]- Parameters:
v (TArray) – The degree of the hyperspherical Hankel function.
d (TArray) – The dimension of the hypersphere.
z (TArray) – The argument of the hyperspherical Hankel function.
derivative (bool, optional) – Whether to compute the derivative of the hyperspherical Hankel function, by default False
- Returns:
The hyperspherical Hankel function of the first kind.
- Return type:
Array
- ultrasphere.special.shn2(v: TArray, d: TArray, z: TArray, derivative: bool = False) TArray[source]¶
Hyperspherical Hankel function of the second kind.
\[h_v^{(2)(d)} (z) = \sqrt{\frac{\pi}{2}} \frac{H^{(2)}_{v + d/2 - 1}(z)}{z^{d/2 - 1}}\]- Parameters:
v (TArray) – The degree of the hyperspherical Hankel function.
d (TArray) – The dimension of the hypersphere.
z (TArray) – The argument of the hyperspherical Hankel function.
derivative (bool, optional) – Whether to compute the derivative of the hyperspherical Hankel function, by default False
- Returns:
The hyperspherical Hankel function of the second kind.
- Return type:
Array
- ultrasphere.special.sjv(v: TArray, d: TArray, z: TArray, derivative: bool = False) TArray[source]¶
Hyperspherical Bessel function of the first kind.
\[j_v^{(d)} (z) = \sqrt{\frac{\pi}{2}} \frac{J_{v + d/2 - 1}(z)}{z^{d/2 - 1}}\]- Parameters:
v (TArray) – The degree of the hyperspherical Bessel function.
d (TArray) – The dimension of the hypersphere.
z (TArray) – The argument of the hyperspherical Bessel function.
derivative (bool, optional) – Whether to compute the derivative of the hyperspherical Bessel function, by default False
- Returns:
The hyperspherical Bessel function of the first kind.
- Return type:
Array
References
McLean, W. (2000). Strongly Elliptic Systems and Boundary Integral Equations. p.279
- ultrasphere.special.syv(v: TArray, d: TArray, z: TArray, derivative: bool = False) TArray[source]¶
Hyperspherical Bessel function of the second kind.
\[y_v^{(d)} (z) = \sqrt{\frac{\pi}{2}} \frac{Y_{v + d/2 - 1}(z)}{z^{d/2 - 1}}\]- Parameters:
v (TArray) – The degree of the hyperspherical Bessel function.
d (TArray) – The dimension of the hypersphere.
z (TArray) – The argument of the hyperspherical Bessel function.
derivative (bool, optional) – Whether to compute the derivative of the hyperspherical Bessel function, by default False
- Returns:
The hyperspherical Bessel function of the second kind.
- Return type:
Array
References
McLean, W. (2000). Strongly Elliptic Systems and Boundary Integral Equations. p.279
- ultrasphere.special.szv(v: TArray, d: TArray, z: TArray, type: Literal['j', 'y', 'h1', 'h2'], derivative: bool = False) TArray[source]¶
Utility function to compute hyperspherical functions.
\[f_v^{(d)} (z) = \sqrt{\frac{\pi}{2}} \frac{F_{v + d/2 - 1}(z)}{z^{d/2 - 1}}\]- Parameters:
v (TArray) – The degree of the hyperspherical Hankel function.
d (TArray) – The dimension of the hypersphere.
z (TArray) – The argument of the hyperspherical Hankel function.
type (Literal["j", "y", "h1", "h2"]) – The type of the hyperspherical function.
derivative (bool, optional) – Whether to compute the derivative of the hyperspherical Hankel function, by default False
- Returns:
The hyperspherical function.
- Return type:
TArray
References
McLean, W. (2000). Strongly Elliptic Systems and Boundary Integral Equations. p.279