A priori and a posteriori analysis of the flow around a rectangular cylinder