Removing shared faces in 3D datasets for numerical simulations