Basic principle of shape memory effect