fmmgen/generator.py
def generate_L_shift_operators(order, symbols, L_dict, source_order=0):
    """
    generate_L_shift_operators(order, symbols, index_dict):

    Generates multiple operators up to order.

    Input:
    order, int:
        Maximum order of multipole expansion

    symbols, list:
        List of sympy symbol type objects which
        define coordinate labels.

    index_dict:
        Forward mapping dictionary between
        monomials of symbols and array indices,
        generated by generate_mappings or otherwise.

    Output:
    list:
        List of symbolic local expansion shifting operators up to order.

    Example:
    >>> order = 1
    >>> x, y, z = sp.symbols('x y z')
    >>> map, _ = generate_mappings(order, (x, y, z))
    >>> generate_L_shift_operators(order, (x, y, z), map)
    [x*L[1, 0] + y*L[2, 0] + z*L[3, 0] + L[0, 0], L[1, 0], L[2, 0], L[3, 0]]
    """
    x, y, z = symbols
    L_shift_operators = []
    for n in L_dict.keys():
        L_shift_operators.append(L_shift(n, order, symbols, L_dict, source_order=source_order))
    return L_shift_operators

    generate_L_shift_operators(order, symbols, index_dict):

    Generates multiple operators up to order.

    Input:
    order, int:
        Maximum order of multipole expansion

    symbols, list:
        List of sympy symbol type objects which
        define coordinate labels.

    index_dict:
        Forward mapping dictionary between
        monomials of symbols and array indices,
        generated by generate_mappings or otherwise.

    Output:
    list:
        List of symbolic local expansion shifting operators up to order.

    Example:
    >>> order = 1
    >>> x, y, z = sp.symbols('x y z')
    >>> map, _ = generate_mappings(order, (x, y, z))
    >>> generate_L_shift_operators(order, (x, y, z), map)
    [x*L[1, 0] + y*L[2, 0] + z*L[3, 0] + L[0, 0], L[1, 0], L[2, 0], L[3, 0]]
    
generate_L_shift_operators(order, symbols, index_dict):
Generates multiple operators up to order.

order, int:
Maximum order of multipole expansion

symbols, list:
List of sympy symbol type objects which
define coordinate labels.

Forward mapping dictionary between
monomials of symbols and array indices,
generated by generate_mappings or otherwise.

List of symbolic local expansion shifting operators up to order.
generate_L_shift_operators ( order symbols index_dict ) : Generates multiple operators up to order . order int : Maximum order of multipole expansion symbols list : List of sympy symbol type objects which define coordinate labels . Forward mapping dictionary between monomials of symbols and array indices generated by generate_mappings or otherwise . List of symbolic local expansion shifting operators up to order .
def generate_L_shift_operators(order, symbols, L_dict, source_order=0):
    x, y, z = symbols
    L_shift_operators = []
    for n in L_dict.keys():
        L_shift_operators.append(L_shift(n, order, symbols, L_dict, source_order=source_order))
    return L_shift_operators
def generate_L_shift_operators ( order , symbols , L_dict , source_order = 0 ) : x , y , z = symbols L_shift_operators = [ ] for n in L_dict . keys ( ) : L_shift_operators . append ( L_shift ( n , order , symbols , L_dict , source_order = source_order ) ) return L_shift_operators
generate_L_shift_operators(order, symbols, index_dict):
Generates multiple operators up to order.
generate_L_shift_operators ( order symbols index_dict ) : Generates multiple operators up to order .
"""
    generate_L_shift_operators(order, symbols, index_dict):

    Generates multiple operators up to order.

    Input:
    order, int:
        Maximum order of multipole expansion

    symbols, list:
        List of sympy symbol type objects which
        define coordinate labels.

    index_dict:
        Forward mapping dictionary between
        monomials of symbols and array indices,
        generated by generate_mappings or otherwise.

    Output:
    list:
        List of symbolic local expansion shifting operators up to order.

    Example:
    >>> order = 1
    >>> x, y, z = sp.symbols('x y z')
    >>> map, _ = generate_mappings(order, (x, y, z))
    >>> generate_L_shift_operators(order, (x, y, z), map)
    [x*L[1, 0] + y*L[2, 0] + z*L[3, 0] + L[0, 0], L[1, 0], L[2, 0], L[3, 0]]
    """
order
symbols
L_dict
source_order
examples
None