Singularity swap quadrature for nearly singular line integrals on closed curves in two dimensions | Synapse