Evaluation of the elastic stress distribution ahead of a crack by Weight Functions