1. A method, comprising: establishing first values for a plurality of node potentials or ray currents defined with respect to a charged particle beam emission structure; based on the first values and at least a first relaxation value, with a computer, determining second values for the plurality of node potentials or ray currents based on a gun code; and based on the second values and at least a second relaxation value, determining third values for the plurality of node potentials or ray currents based on the gun code, wherein the first and second relaxation values are different.