Coupled PDE and ODE

Dear All,

I am using FEniCSx to solve a PDE that has a time dependent boundary condition. This boundary condition depends on a variable that is the solution of an ODE. Therefore, The PDE and ODE are coupled.
Is there any way of defining a constant element space everywhere in the domain, so that I can assemble the matrix system corresponding with the PDE and ODE discretization?

Thanks in advance.