We introduce a mesoscopic framework that is capable of simulating the evolution of dislocation networks and, at the same time, spatial variations of the stress, strain and displacement fields throughout the body. Within this model, dislocations are viewed as sources of incompatibility of strains. The free energy of a deformed solid is represented by the elastic strain energy that can be augmented by gradient terms to reproduce dispersive nature of acoustic phonons and thus set the length scale of the problem. The elastic strain field that is due to a known dislocation network is obtained by minimizing the strain energy subject to the corresponding field of incompatibility constraints. These stresses impose Peach-Koehler forces on all dislocations and thus drive the evolution of the dislocation network.