# Automatically generated. All your changes will be lost on recompilation!

"""
Optical solvers.

This package combines all optical solvers and helper functions that can
create solver classes without a need to explicitly import the proper binary
module.

Example:

    >>> import optical
    >>> optical.BesselCyl('mysolver')
    <optical.slab.BesselCyl at 0x42ac2b8>

Solver classes
--------------

.. autosummary::
   :toctree: optical
   :template: solver.rst

   effective.EffectiveIndex2D
   effective.EffectiveFrequencyCyl
   slab.Fourier2D
   slab.Fourier3D
   slab.OldBesselCyl
   slab.BesselCyl
"""


def EffectiveIndex2D(name=''):
    """
    Create EffectiveIndex2D solver.

    This function automatically loads ``effective`` submodule and creates
    :class:`~effective.EffectiveIndex2D` class.

    Args:
        name (str): Solver name.
    """
    import optical.effective
    return optical.effective.EffectiveIndex2D(name)


def EffectiveFrequencyCyl(name=''):
    """
    Create EffectiveFrequencyCyl solver.

    This function automatically loads ``effective`` submodule and creates
    :class:`~effective.EffectiveFrequencyCyl` class.

    Args:
        name (str): Solver name.
    """
    import optical.effective
    return optical.effective.EffectiveFrequencyCyl(name)


def Fourier2D(name=''):
    """
    Create Fourier2D solver.

    This function automatically loads ``slab`` submodule and creates
    :class:`~slab.Fourier2D` class.

    Args:
        name (str): Solver name.
    """
    import optical.slab
    return optical.slab.Fourier2D(name)


def Fourier3D(name=''):
    """
    Create Fourier3D solver.

    This function automatically loads ``slab`` submodule and creates
    :class:`~slab.Fourier3D` class.

    Args:
        name (str): Solver name.
    """
    import optical.slab
    return optical.slab.Fourier3D(name)


def OldBesselCyl(name=''):
    """
    Create OldBesselCyl solver.

    This function automatically loads ``slab`` submodule and creates
    :class:`~slab.OldBesselCyl` class.

    Args:
        name (str): Solver name.
    """
    import optical.slab
    return optical.slab.OldBesselCyl(name)


def BesselCyl(name=''):
    """
    Create BesselCyl solver.

    This function automatically loads ``slab`` submodule and creates
    :class:`~slab.BesselCyl` class.

    Args:
        name (str): Solver name.
    """
    import optical.slab
    return optical.slab.BesselCyl(name)
