Buckling of shear deformable beams with singularities