pystella/multigrid/transfer.py
def LinearInterpolation(StencilKernel=Stencil, **kwargs):
    """
    Creates an linear interpolation kernel, which interpolates in input array
    :math:`f^{(h)}` on the fine grid into an array :math:`f^{(2 h)}` on the
    coarse grid via

    .. math::

        f^{(h)}_{2 i}
        &= f^{(2 h)}_{i}

        f^{(h)}_{2 i + 1}
        &= \\frac{1}{2} f^{(2 h)}_{i} + \\frac{1}{2} f^{(2 h)}_{i + 1}

    in each dimension.

    See :class:`transfer.InterpolationBase`.
    """

    from pymbolic.primitives import Quotient
    odd_coefs = {-1: Quotient(1, 2), 1: Quotient(1, 2)}
    even_coefs = {0: 1}

    return InterpolationBase(even_coefs, odd_coefs, StencilKernel, **kwargs)

    Creates an linear interpolation kernel, which interpolates in input array
    :math:`f^{(h)}` on the fine grid into an array :math:`f^{(2 h)}` on the
    coarse grid via

    .. math::

        f^{(h)}_{2 i}
        &= f^{(2 h)}_{i}

        f^{(h)}_{2 i + 1}
        &= \\frac{1}{2} f^{(2 h)}_{i} + \\frac{1}{2} f^{(2 h)}_{i + 1}

    in each dimension.

    See :class:`transfer.InterpolationBase`.
    
Creates an linear interpolation kernel, which interpolates in input array
Creates an linear interpolation kernel which interpolates in input array
def LinearInterpolation(StencilKernel=Stencil, **kwargs):
    from pymbolic.primitives import Quotient
    odd_coefs = {-1: Quotient(1, 2), 1: Quotient(1, 2)}
    even_coefs = {0: 1}
    return InterpolationBase(even_coefs, odd_coefs, StencilKernel, **kwargs)
def LinearInterpolation ( StencilKernel = Stencil , ** kwargs ) : from pymbolic . primitives import Quotient odd_coefs = { - 1 : Quotient ( 1 , 2 ) , 1 : Quotient ( 1 , 2 ) } even_coefs = { 0 : 1 } return InterpolationBase ( even_coefs , odd_coefs , StencilKernel , ** kwargs )
Creates an linear interpolation kernel, which interpolates in input array
Creates an linear interpolation kernel which interpolates in input array
"""
    Creates an linear interpolation kernel, which interpolates in input array
    :math:`f^{(h)}` on the fine grid into an array :math:`f^{(2 h)}` on the
    coarse grid via

    .. math::

        f^{(h)}_{2 i}
        &= f^{(2 h)}_{i}

        f^{(h)}_{2 i + 1}
        &= \\frac{1}{2} f^{(2 h)}_{i} + \\frac{1}{2} f^{(2 h)}_{i + 1}

    in each dimension.

    See :class:`transfer.InterpolationBase`.
    """
StencilKernel
math
`f^{(h)}` on the fine grid into an array :math:`f^{(2 h)}` on the
coarse grid via







in each dimension.

See :class:`transfer.InterpolationBase`.
` f^ { ( h ) } ` on the fine grid into an array : math : ` f^ { ( 2 h ) } ` on the coarse grid via in each dimension . See : class : ` transfer . InterpolationBase ` .