The finite element method in the deformation and consolidation of porous media