def v2d_xxx_from_xyz(v2d):
    """
    Return the vertex to dof map in the form

        v2d_xxx = [x0, x1, x2 , ... y0, y1, y2, ..., z0, z1, z2, ... ]
    
    using the vertex to dof map in the form (we are assuming this)

        v2d = [x0, y0, z0, x1 , y1, z1,  x2, y2, z2, ... ]

    """
    # Copy the original map (to not reference it)
    v2d_xxx = v2d.copy()
    
    # Reshape to have 3 rows with n numbers of columns
    v2d_xxx.shape=(3, -1)
    # Get rows,columns values
    (m, n) = v2d_xxx.shape
    
    # For every column of v2d_xxx , copy the corresponding values from
    # the xyz arrangement, for the 3 rows. For example:
    #
    # Row 0 (x values):
    #   [x0,   x1,    x2,      , ... , xi, ... ]  
    #           |      |               |
    #        v2d[3]   v2d[6]         v2d[3 * i]
    #
    # Row 1:
    #   [y0,   y1,    y2,      , ... , yi, ... ]  
    #           |      |               |
    #        v2d[4]   v2d[7]         v2d[3 * i + 1]
    #
    # Row 2: ...
    for i in range(n):
        v2d_xxx[0, i]=v2d[3 * i]
        v2d_xxx[1, i]=v2d[3 * i + 1]
        v2d_xxx[2, i]=v2d[3 * i + 2]
    # Return to the usual shape (see top) 
    v2d_xxx.shape=(-1, )
    return v2d_xxx