Class SphericalHarmonicCalculator#

Class Documentation#

class SphericalHarmonicCalculator#

Reduced spherical harmonics.

The ‘reduced’ (conjugated and unit normalised) spherical harmonics are given by

\[ y_\ell^m = \sqrt{\frac{4\pi}{2\ell + 1}} {Y_\ell^m}^\ast \]
with \( y_0^0 = 1 \).

Public Static Functions

static std::complex<double> calc_reduced_spherical_harmonic(const int ell, const int m, double pos[3])#

Calculate the reduced spherical harmonic.

Parameters
  • ell – Degree \( \ell \).

  • m – Order \( m \).

  • pos – 3-d position vector.

Returns

Value of \( y_\ell^m \).

static void store_reduced_spherical_harmonic_in_fourier_space(const int ell, const int m, const double boxsize[3], const int ngrid[3], std::vector<std::complex<double>> &ylm_out)#

Store reduced spherical harmonics computed in Fourier space.

Parameters
  • ell[in] Degree \( \ell \).

  • m[in] Order \( m \).

  • boxsize[in] Box size in each dimension.

  • ngrid[in] Grid number in each dimension.

  • ylm_out[out] Stored \( y_\ell^m \) values.

Throws

trv::sys::InvalidDataError – When the output variable is not provided.

static void store_reduced_spherical_harmonic_in_config_space(const int ell, const int m, const double boxsize[3], const int ngrid[3], std::vector<std::complex<double>> &ylm_out)#

Store reduced spherical harmonics computed in configuration space.

Parameters
  • ell[in] Degree \( \ell \).

  • m[in] Order \( m \).

  • boxsize[in] Box size in each dimension.

  • ngrid[in] Grid number in each dimension.

  • ylm_out[out] Stored \( y_\ell^m \) values.

Throws

trv::sys::InvalidDataError – When the output variable is not provided.