On the automatic generation of near-optimal meshes for three-dimensional linear elastic finite element anlaysis