An analogy between superconductors and smectics A