phys_552.dvr
============

.. py:module:: phys_552.dvr


Classes
-------

.. autoapisummary::

   phys_552.dvr.SphericalDVRBasis


Module Contents
---------------

.. py:class:: SphericalDVRBasis(**kw)

   Spherical DVR basis.

   This represents d-dimensional problems with rotational symmetry.

   :param d: Dimension of space.  I.e. `d=2` for cylindrical coordinates, `d=3` for spherical.
   :type d: int
   :param k_max: Cutoff (wavenumber in momentum space).
   :type k_max: float
   :param R: Approximate radius of basis.  The maximum number of lattice points will be
             roughly `R * k_max / np.pi`.
   :type R: float


   .. py:attribute:: d
      :value: 3



   .. py:attribute:: k_max
      :value: 1.0



   .. py:attribute:: R
      :value: 10.0



   .. py:method:: get_weights(l=0, volume=False)

      Return the integration weights.

      :param l: Angular momentum quantum number.
      :type l: int
      :param volume: If `True` then `sum(f*w)` will be the spherical integral (including the
                     factors of the area `S` of the sphere and `r**(d-1)`), otherwise it will
                     be simply the integral of the radial function from 0.
      :type volume: bool



   .. py:method:: get_N(nu=None, l=0)

      Return the number of abscissa below R.



   .. py:method:: get_nu(l=0)

      Return `nu = l + d/2 - 1` for the centrifugal term.

      :param l: Angular quantum number.
      :type l: int



   .. py:method:: get_K(l=0)

      Return `K`, the DVR kinetic energy matrix for the radial function.

      This term effects the $-d^2/dr^2 + (\nu^2 - 1/4)/r^2$ term.

      :returns: **K** -- Operates on radial wavefunctions
      :rtype: array



   .. py:method:: get_rn(nu=None, l=0)

      Return the abscissa.



   .. py:method:: _F(n, r, nu, d=0)

      Return the dth derivative of the n'th basis function.



   .. py:method:: get_F(r, l=0)

      Return a function that can extrapolate a radial
      wavefunction to a new set of abscissa `r`.



