Self-consistent nuclear calculations with a deformed basis