def _inject_mutations_3D(phi, dt, xx, yy, zz, theta0, frozen1, frozen2, frozen3
    ):
    """
    Inject novel mutations for a timestep.
    """
    if not frozen1:
        phi[1, 0, 0] += dt / xx[1] * theta0 / 2 * 8 / ((xx[2] - xx[0]) * yy
            [1] * zz[1])
    if not frozen2:
        phi[0, 1, 0] += dt / yy[1] * theta0 / 2 * 8 / ((yy[2] - yy[0]) * xx
            [1] * zz[1])
    if not frozen3:
        phi[0, 0, 1] += dt / zz[1] * theta0 / 2 * 8 / ((zz[2] - zz[0]) * xx
            [1] * yy[1])
    return phi
