def get_order(xyz):
    """
    Get order of the coordinates.

    Depending on the pyramid in which the point is located, the order need to be adjusted.
    
    Parameters
    ----------
    xyz : numpy.ndarray
       coordinates of a point on a uniform refinable grid on a ball or
       in a uniform refinable cubical grid.

    References
    ----------
    D. Roşca et al., Modelling and Simulation in Materials Science and Engineering 22:075013, 2014
    https://doi.org/10.1088/0965-0393/22/7/075013

    """
    if abs(xyz[0]) <= xyz[2] and abs(xyz[1]) <= xyz[2] or abs(xyz[0]) <= -xyz[2
        ] and abs(xyz[1]) <= -xyz[2]:
        return [0, 1, 2]
    elif abs(xyz[2]) <= xyz[0] and abs(xyz[1]) <= xyz[0] or abs(xyz[2]
        ) <= -xyz[0] and abs(xyz[1]) <= -xyz[0]:
        return [1, 2, 0]
    elif abs(xyz[0]) <= xyz[1] and abs(xyz[2]) <= xyz[1] or abs(xyz[0]
        ) <= -xyz[1] and abs(xyz[2]) <= -xyz[1]:
        return [2, 0, 1]
