作业帮 > 英语 > 作业

英语翻译The Scatter class shown in Listing 5.7 calculates the tr

来源:学生作业帮 编辑:拍题作业网作业帮 分类:英语作业 时间:2024/03/29 15:06:46
英语翻译
The Scatter class shown in Listing 5.7 calculates the trajectories by expressing the equation of motion as a rate equation.The most important method is calcul ateTrajectory,which calculates a trajectory by stepping the differential equation solver and adding the resulting data to a trail to display the path.Because the beam source is far away,we stop the calculation when the distance of the scattered particle from the target exceeds the initial distance.Note the use of the ternary :operator.This very efficient and compact operator uses three expressions.The first expression evaluates to a boolean.If this expression is true,then the statement after the is executed.If this expression is false,then the statement after the :is executed.However,because some potentials may trap particles for long periods of time,we also stop the calculation after a predetermined number of time steps.
通过把一运动方程表示为速率方程,程序7所显示的Scatter类可以计算轨迹.最重要的方法是calculateTrajectory,利用微分方程求解器计算轨道并且增加结果数据去追踪显示路径.因为束半径很远,但散射粒子到标靶的距离超过了原始距离时,我们停止计算.注意使用三元的操作.这是非常有效的和简洁的操作使用三个公式.这是布尔数学体系的第一个表达评价.在被执行后,如果这个表达是真,则进行申明,在被执行后,如果这个表达式是假,则进行申明.但是,因为很多潜在的将会陷进粒子系统的长周期性里.在预定的time step后,我们也要停止计算.