A three-dimensional mesh- refinement algorithm with low boundary reflections for the simulation of metallic structures