Compatibility of External Operators and Real Function Spaces

Yup! That’s exactly what I’m after. This relates back to an earlier post (Adding Non-Nodal Degrees of Freedom to a Problem) where I described trying to couple rigid body degrees of freedom to an elastic model. Based on your suggestion, I have been attempting this by using real function space functions (r\in R) to good success. Now I am looking to create an external operator that takes in r so that I can define how those degrees of freedom couple using non-UFL code (basically, in my eventual problem, the coupling will depend on some geometry of the rigid body components that I need to account for that cannot be expressed in UFL).