New generalized equations of motion for the Weber-Clebsch potentials that describe both the Navier-Stokes and magnetohydrodynamics (MHD) dynamics are derived. These depend on a new parameter, which has dimensions of time for Navier-Stokes and inverse velocity for MHD. Direct numerical simulations (DNSs) are performed. For Navier-Stokes, the generalized formalism captures the intense reconnection of vortices of the Boratav, Pelz and Zabusky (BPZ) flow, in agreement with the previous study by Ohkitani and Constantin. For MHD, the new formalism is used to detect magnetic reconnection in several flows: the three-dimensional (3D) Arnold, Beltrami and Childress (ABC) flow and the (2D and 3D) Orszag-Tang (OT) vortex. It is concluded that periods of intense activity in the magnetic enstrophy are correlated with periods of increasingly frequent resettings. Finally, the positive correlation between the sharpness of the increase in resetting frequency and the spatial localization of the reconnection region is discussed.