How to do adaptive mesh refinement in the latest Fenicsx

Hello everyone. I have the following questions about mesh refinement. I have searched the related topics on the fenics discourse, however the codes are too old or can’t meet my requirement.
(1) Is the mesh refinemet not supported for the 1-d case ? I tried to call the dolfinx.mesh.refine on an interval, errors occured.

domain1 = dolfinx.mesh.create_interval(MPI.COMM_WORLD, 12, points=(-1.0, 1.0))
domain1 = dolfinx.mesh.refine(domain1)
Traceback (most recent call last):
  File "/mnt/g/workdir/MKM/NO_mkm/test_refine2.py", line 9, in <module>
    domain1 = dolfinx.mesh.refine(domain1)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/d/software_install/fenics/lib/python3.12/site-packages/dolfinx/mesh.py", line 292, in refine
    mesh1 = _cpp.refinement.refine(mesh._cpp_object, redistribute)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Refinement only defined for simplices

(2) How to do the refinement manually using functions such as scipy.interpolate.interp1d ? For example:

domain1 = dolfinx.mesh.create_interval(MPI.COMM_WORLD, 12, points=(-1.0, 1.0))
domain2 = dolfinx.mesh.create_interval(MPI.COMM_WORLD, 32, points=(-1.0, 1.0))

V1 = dolfinx.fem.FunctionSpace(domain1, ("Lagrange", 2))
u_n1 = dolfinx.fem.Function(V1)
u_n1.interpolate(lambda x: np.exp(-x[0]**2))
# I expected to get the spatial coordinates and the values of u_n1 here
# to use the interp1d function. How to do that ?

V2 = dolfinx.fem.FunctionSpace(domain2, ("Lagrange", 2))
u_n2 = dolfinx.fem.Function(V2)
# get the spatial coordinates for domain2

the function ufl.SpatialCoordinate returns a <class ‘ufl.geometry.SpatialCoordinate’>, it’s not an object I can use.
(3) I find that the second arguments of dolfinx.mesh.refine is the indexes of edges. How to find these edges ? For example, I define a 2d-domain, I want to refine the cells on which the second derivative is large than a threshold, how to do that ?