1. A computer implemented method comprising: identifying a layout design for a mask and a partition distance; forming a planar grid based upon the partition distance; overlaying the planar grid onto the layout design to define a plurality of layout sections; consolidating the plurality of layout sections into a plurality of pattern groups, each pattern group including layout sections having geometric structures or shapes similar to each other relative to a reference point; using a computer system to derive a pattern group printing difficulty factor for one or more of the plurality of pattern groups; selecting one or more of the plurality of layout sections for source mask optimization based in part upon the pattern group printing difficulty factor; and applying a source mask optimization to the one or more selected layout sections.