Three-dimensional finite-difference analysis of deformation and failure of weak porous sandstones subjected to uniaxial compression