The optimal pump and resonator configurations can be determined before the laser is built. A ray-tracing algorithm is used to determine the pump-absorption, and the mode-coupling efficiencies to specific transverse modes are calculated. The diode laser side-pumped CW Nd:YAG slab is studied as CW 40W pumped socurse. Over 11.8W single transverse mode power output is achieved. The optical-optical efficiency is about 30%. The instability of the output laser is less than 1.2%.