Basis-set expansion method for relativistic atoms in the atomic-nucleus model of a finite sphere of constant electric field