Generation of orthogonal boundary-fitted coordinate systems