biosspheres.formulations.mtf.solvertemplates#

Routine listings#

mtf_laplace_one_sphere_point_source_azimuthal_direct_solver mtf_laplace_n_spheres_point_source_direct_solver mtf_laplace_n_spheres_point_source_indirect_solver

Functions

mtf_laplace_n_spheres_point_source_direct_solver(n, ...)

mtf_laplace_n_spheres_point_source_indirect_solver(n, ...)

mtf_laplace_one_sphere_point_source_azimuthal_direct_solver(...)

Returns the solution of the system M x = b, where M is the matrix of the MTF system for one sphere, and b is the right hand corresponding to an external excitation of the function biossphere.miscella.mathfunctions.point_source( r, [0, 0, distance], sigma_e).

biosspheres.formulations.mtf.solvertemplates.mtf_laplace_n_spheres_point_source_direct_solver(n: int, big_l: int, big_l_c: int, radii: ndarray, center_positions: list[ndarray], sigmas: ndarray, p0: ndarray) → ndarray[source]#
Parameters:
  • n (int) – > 0, number of spheres.

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

  • big_l_c (int) – >= 0. It’s the parameter used to compute the points of the quadrature.

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

  • center_positions (list[np.ndarray]) – List or arrays with the center position of the spheres

  • sigmas (np.ndarray) – Array with the parameters of each medium.

  • p0 (np.ndarray) – Length 3. Indicates the position of the point source.

Returns:

solution – of floats. Length 4 * n * (big_l + 1)**2.

Return type:

np.ndarray

biosspheres.formulations.mtf.solvertemplates.mtf_laplace_n_spheres_point_source_indirect_solver(n: int, big_l: int, big_l_c: int, radii: ndarray, center_positions: list[ndarray], sigmas: ndarray, p0: ndarray, tolerance: float) → ndarray[source]#
Parameters:
  • n (int) – > 0, number of spheres.

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

  • big_l_c (int) – >= 0. It’s the parameter used to compute the points of the quadrature.

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

  • center_positions (list[np.ndarray]) – List or arrays with the center position of the spheres

  • sigmas (np.ndarray) – Array with the parameters of each medium.

  • p0 (np.ndarray) – Length 3. Indicates the position of the point source.

  • tolerance (float) – Tolerance for scipy.sparse.linalg.gmres routine.

Returns:

solution – of floats. Length 4 * n * (big_l + 1)**2.

Return type:

np.ndarray

biosspheres.formulations.mtf.solvertemplates.mtf_laplace_one_sphere_point_source_azimuthal_direct_solver(big_l: int, r: float, sigma_e: float, sigma_i: float, distance: float, intensity: float) → ndarray[source]#

Returns the solution of the system M x = b, where M is the matrix of the MTF system for one sphere, and b is the right hand corresponding to an external excitation of the function biossphere.miscella.mathfunctions.point_source(

r, [0, 0, distance], sigma_e).

Notes

Write details about what it is being solved.

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

  • r (float) – > 0, radius.

  • sigma_e (float) – > 0, parameter of the exterior medium.

  • sigma_i (float) – > 0, parameter of the interior medium.

  • distance (float) – > 0, distance of the center of the sphere to the point source.

  • intensity (float) – > 0, intensity of the point source.

Returns:

solution – of floats. Length 4 * (big_l + 1).

Return type:

np.ndarray