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

"""
Electrical solvers.

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

Example:

    >>> import electrical
    >>> electrical.DriftDiffusionCyl('mysolver')
    <electrical.ddm2d.DriftDiffusionCyl at 0x42ac2b8>

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

.. autosummary::
   :toctree: electrical
   :template: solver.rst

   diffusion.Diffusion2D
   diffusion.DiffusionCyl
   shockley.Shockley2D
   shockley.ShockleyCyl
   shockley.Shockley3D
   ddm2d.DriftDiffusion2D
   ddm2d.DriftDiffusionCyl
"""


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

    This function automatically loads ``diffusion`` submodule and creates
    :class:`~diffusion.Diffusion2D` class.

    Args:
        name (str): Solver name.
    """
    import electrical.diffusion
    return electrical.diffusion.Diffusion2D(name)


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

    This function automatically loads ``diffusion`` submodule and creates
    :class:`~diffusion.DiffusionCyl` class.

    Args:
        name (str): Solver name.
    """
    import electrical.diffusion
    return electrical.diffusion.DiffusionCyl(name)


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

    This function automatically loads ``shockley`` submodule and creates
    :class:`~shockley.Shockley2D` class.

    Args:
        name (str): Solver name.
    """
    import electrical.shockley
    return electrical.shockley.Shockley2D(name)


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

    This function automatically loads ``shockley`` submodule and creates
    :class:`~shockley.ShockleyCyl` class.

    Args:
        name (str): Solver name.
    """
    import electrical.shockley
    return electrical.shockley.ShockleyCyl(name)


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

    This function automatically loads ``shockley`` submodule and creates
    :class:`~shockley.Shockley3D` class.

    Args:
        name (str): Solver name.
    """
    import electrical.shockley
    return electrical.shockley.Shockley3D(name)


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

    This function automatically loads ``ddm2d`` submodule and creates
    :class:`~ddm2d.DriftDiffusion2D` class.

    Args:
        name (str): Solver name.
    """
    import electrical.ddm2d
    return electrical.ddm2d.DriftDiffusion2D(name)


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

    This function automatically loads ``ddm2d`` submodule and creates
    :class:`~ddm2d.DriftDiffusionCyl` class.

    Args:
        name (str): Solver name.
    """
    import electrical.ddm2d
    return electrical.ddm2d.DriftDiffusionCyl(name)
