Electrodynamics of a continuous medium in a system with specified structure