On the treatment of solid boundary in smoothed particle hydrodynamics