Photomechanical effects in crosslinked photochromic polymers