A non-planar solidi cation front can cause many defects in the directional solidi cation process. The irregular shape of the cross section of the cast leads to a non-uniform heat distribution and hence causes a non-planar solidi cation front. This paper provides a method to decrease the circumferential temperature gradient in the directional solidi cation process by varying the wall thickness of the mould. The relationship between the wall thickness and the control parameter has been determined. An optimization algorithm for obtaining the control parameter and the corresponding wall thickness of mould is presented with three simulation examples provided to verify the superiority of this method. According to the results the circumferential temperature gradients can be reduced by 68.7%, 72.0% and 88.2% respectively. Moreover, the transverse temperature gradients are reduced by 57.3%, 60.8% and 89.3% accordingly. The solidi cation front with a varying thickness mould is thus attened compared with the un-optimized one.