Compactness results for a Dirichlet energy of nonlocal gradient with applications | Synapse