Hello,
When we impose the Periodic BC, the master dofs and puppet dofs should be matched one by one.
I can easily find all the master dofs and puppet dofs using dolfinx::mesh::locate_entities_boundary and dolfinx::fem::locate_dofs_topological. But in order to find the corresponding master for each puppet dof, the easiest way I can think about is using a nest loop, as follows
for i in master_dofs
for j in puppet_dofs
if coordinates match
record
end
end
The above algorithm can be very slow when I work in 3D mesh, since there are many dofs. I also tried DOLFINX_MPC, and it turns out to be very fast, so I wonder what is the algorithm you used? Can I do locate_dofs for each coordinates one by one, is this going to be faster?
Thanks!