Magnetogravitodynamics model of galaxy formation