biosspheres.formulations.mtf.righthands#

Routine listings#

b_vector_1_sphere_mtf b_vector_n_spheres_mtf_cte_function b_vector_n_spheres_mtf_linear_function_z b_vector_n_spheres_mtf_point_source b_vector_n_spheres_mtf_plane_wave

Functions

biosspheres.formulations.mtf.righthands.b_vector_1_sphere_mtf(r: float, pi_inv: float, b_d: ndarray, b_n: ndarray) → ndarray[source]#
Parameters:
  • r (float) – > 0, radius of the sphere

  • pi_inv (float) – > 0, adimensional parameter.

  • b_d (np.ndarray) – for the Dirichlet traces. Must be one dimensional.

  • b_n (np.ndarray) – for the Neumann traces. Must be one dimensional

Returns:

b – Length 4 * length(b_d)

Return type:

numpy array

biosspheres.formulations.mtf.righthands.b_vector_n_spheres_mtf_cte_function(n: int, big_l: int, radii: ndarray, cte: float, azimuthal: bool = True) → ndarray[source]#
Parameters:
  • n (int) – >= 1, number of spheres.

  • big_l (int) – >= 0, max degree.

  • radii (np.ndarray) – of floats, each entry >= 0, radii of the spheres.

  • cte (float) – != 0.

  • azimuthal (bool) – Default True.

Returns:

b – of 1 dimension. If azimuthal = True:

Length 4 * n * (big_l+1)

Else:

Length 4 * n * (big_l+1)

Return type:

numpy array

biosspheres.formulations.mtf.righthands.b_vector_n_spheres_mtf_linear_function_z(big_l: int, n: int, ps, cte: float, radii: ndarray, x_dia: ndarray) → array[source]#

Function = cte * z.

Notes

All arrays that represent vectors are in the cartesian coordinate system.

Parameters:
  • big_l (int) – >= 1, max degree.

  • n (int) – >= 1, number of spheres.

  • ps (list of numpy arrays) – the numpy arrays are of length 3, and represent the position vectors of the center of the spheres.

  • cte (float) – Constant parameter.

  • radii (np.ndarray) – of the radii of the spheres.

  • x_dia (np.ndarray) – diagonal of the matrix X.

Returns:

b – of 1 dimension and length 4 * n * (big_l+1)**2

Return type:

np.ndarray

biosspheres.formulations.mtf.righthands.b_vector_n_spheres_mtf_plane_wave(n: int, big_l: int, ps: list[array], p_z: float, k0: float, a: float, radii: ndarray, x_dia: ndarray, mass_n_two_j_blocks: ndarray) → array[source]#

Notes

All arrays that represent vectors are in the cartesian coordinate system.

Parameters:
  • n (int) – >= 1, number of spheres.

  • big_l (int) – >= 0, max degree.

  • ps (list of numpy arrays) – of floats, the numpy arrays are of length 3, and represent the position vectors of the center of the spheres.

  • p_z (float)

  • k0 (float) – > 0, wave number.

  • radii (numpy array) – of the radii of the spheres.

  • a (float) – > 0, parameter, intensity.

  • x_dia (np.ndarray)

  • mass_n_two_j_blocks (np.ndarray.)

Returns:

b – of 1 dimension and length 4 * n * (big_l+1)**2

Return type:

numpy array

biosspheres.formulations.mtf.righthands.b_vector_n_spheres_mtf_point_source(n: int, big_l: int, ps: list[array], p0: ndarray, rs: ndarray, sigma_e: float, x_dia: ndarray, mass_n_two_j_blocks: ndarray) → array[source]#

Notes

All arrays that represent vectors are in the cartesian coordinate system.

Parameters:
  • n (int) – >= 1, number of spheres.

  • big_l (int) – >= 0, max degree.

  • ps (list of numpy arrays) – of floats, the numpy arrays are of length 3, and represent the position vectors of the center of the spheres.

  • p0 (numpy array) – of floats, length 3. Represents the position of the point source in the original coordinate system.

  • rs (numpy array) – of the radii of the spheres.

  • sigma_e (float) – > 0, parameter.

  • x_dia (np.ndarray)

  • mass_n_two_j_blocks (np.ndarray.)

Returns:

b – of 1 dimension and length 4 * n * (big_l+1)**2

Return type:

numpy array