Constrains using null space in dolfinx

Thanks @dokken and @francesco-ballarin for your response. Sorry, I am still having query from interpolation step. I am trying to implement nullspace method of applying constraints.

  1. I am not able to understand why we are interpolating if we want to apply constraint over entire mesh.
    Why do we create c function and its interpolation? In general, interpolation means, we give expression as input.
  1. Can you give the steps in algorithm form from creating interpolation to using it for nullspace and tell the reason for using assert(C.array,1.0) ?
    I have some understanding that we give solving function u as u_o +Z v for null space where u_o is solution of constraint applied, Z as basis of null space and v as vector of dimension (no of constraints X1). I might be wrong, but I am trying to relate theory with process.

in beam theory, we require displacement derivatives averaged to zero. I have doubt of do we need to apply this constraint through c.interpolate and where does this constraint applied. If possible can you give in example expression form.

    397     _interpolate(u, cells)
    398 except TypeError:
    399     # u is callable
--> 400     assert callable(u)


In Mixed function space with dolfinx - how to implement an integral constraint - #6 by bagla0, the domain without decomposition uses u_average and u_substract to implement \int u dx=0 after solving u through solver.

4.I couldn’t understand if we are applying constraints using null space, why do we need to subtract the average. Does that mean, no constrains was applied in entire code and we are just subtracting average at end.