Vortex configuration in the presence of local magnetic field and locally applied stress