摘要
Geant4是欧洲核子中心主导开发用于精确模拟粒子在介质中输运过程的数值计算软件工具包。对于Windows用户而言,一般都是用Cygwin实现Geant4工具包在Windows环境的运行,Cygwin在windows下提供Unix/Linux环境的模拟,但是其无论在稳定性和代码执行效率上都不是很理想。文章直接从Geant4源代码出发,使用Visual Studio2008编译工具开发Geant4程序,并通过加载OpenGL图形系统驱动,实现Geant4中几何模型和粒子图形化的显示。最后用一个实例讨论了实现Geant4图形化显示的方法。该文方法的提出,增强了Geant4开发的灵活性,有效地降低了Geant4模拟程序的开发难度。
Geant4 is a tool kit developed by CERN for accurately simulating of the passage of particles through matter.For Windows users,are generally provided with the Cygwin to achieve the Geant4 simulation toolkit to run in the Windows environment,The Cygwin running on windows system to provide Unix/Linux environment simulation,which is not very satisfactory in terms of stability and efficiency of code execution.The method use Visual Studio 2008 compiler to directly compile Geant4 source code and achieve Geant4 geometry model and particle in the graphical display by loading OpenGL drivers.Finally,an example is discussed to achieve Geant4 graphical display methods.This paper proposes a method to enhance the flexibility of Geant4 development,effectively reduce the Geant4 simulation program development effort.
出处
《舰船电子工程》
2011年第6期132-134,185,共4页
Ship Electronic Engineering
关键词
动态链接库
程序移植
数值模拟
dynamic link library
program transfer
numerical simulation