Failure prediction in composite laminates according to the layerwise plate theory