The cohesive frictional crack model applied to the analysis of the dam-foundation joint