pystella/multigrid/transfer.py
def FullWeighting(StencilKernel=Stencil, **kwargs):
    """
    Creates a full-weighting restriction kernel, which restricts in input array
    :math:`f^{(h)}` on the fine grid into an array :math:`f^{(2 h)}` on the
    coarse grid by applying

    .. math::

        f^{(2 h)}_i
        = \\frac{1}{4} f^{(h)}_{2 i - 1}
            + \\frac{1}{2} f^{(h)}_{2 i}
            + \\frac{1}{4} f^{(h)}_{2 i + 1}

    in each dimension.

    See :class:`transfer.RestrictionBase`.
    """

    from pymbolic.primitives import Quotient
    coefs = {-1: Quotient(1, 4), 0: Quotient(1, 2), 1: Quotient(1, 4)}
    return RestrictionBase(coefs, StencilKernel, **kwargs)

    Creates a full-weighting restriction kernel, which restricts in input array
    :math:`f^{(h)}` on the fine grid into an array :math:`f^{(2 h)}` on the
    coarse grid by applying

    .. math::

        f^{(2 h)}_i
        = \\frac{1}{4} f^{(h)}_{2 i - 1}
            + \\frac{1}{2} f^{(h)}_{2 i}
            + \\frac{1}{4} f^{(h)}_{2 i + 1}

    in each dimension.

    See :class:`transfer.RestrictionBase`.
    
Creates a full-weighting restriction kernel, which restricts in input array
Creates a full - weighting restriction kernel which restricts in input array
def FullWeighting(StencilKernel=Stencil, **kwargs):
    from pymbolic.primitives import Quotient
    coefs = {-1: Quotient(1, 4), 0: Quotient(1, 2), 1: Quotient(1, 4)}
    return RestrictionBase(coefs, StencilKernel, **kwargs)
def FullWeighting ( StencilKernel = Stencil , ** kwargs ) : from pymbolic . primitives import Quotient coefs = { - 1 : Quotient ( 1 , 4 ) , 0 : Quotient ( 1 , 2 ) , 1 : Quotient ( 1 , 4 ) } return RestrictionBase ( coefs , StencilKernel , ** kwargs )
Creates a full-weighting restriction kernel, which restricts in input array
Creates a full - weighting restriction kernel which restricts in input array
"""
    Creates a full-weighting restriction kernel, which restricts in input array
    :math:`f^{(h)}` on the fine grid into an array :math:`f^{(2 h)}` on the
    coarse grid by applying

    .. math::

        f^{(2 h)}_i
        = \\frac{1}{4} f^{(h)}_{2 i - 1}
            + \\frac{1}{2} f^{(h)}_{2 i}
            + \\frac{1}{4} f^{(h)}_{2 i + 1}

    in each dimension.

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





in each dimension.

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