Application of the finite element method in self-consistent relativistic mean field calculations