def locate_s_in_RHS(surf_index, surf_array):
    """Find starting index for current surface on RHS

    This is assembling the RHS of the block matrix. Needs to go through all the
    previous surfaces to find out where on the RHS vector it belongs. If any
    previous surfaces were dirichlet, neumann or asc, then they take up half
    the number of spots in the RHS, so we act accordingly.

    Arguments
    ---------
    surf_index: int, index of surface in question
    surf_array: list, list of all surfaces in problem

    Returns
    -------
    s_start: int, index to insert values on RHS

    """
    s_start = 0
    for surfs in range(surf_index):
        if surf_array[surfs].surf_type in ['dirichlet_surface',
                                           'neumann_surface',
                                           'asc_surface']:
            s_start += len(surf_array[surfs].xi)
        else:
            s_start += 2 * len(surf_array[surfs].xi)

    return s_start