def main(): #my_test() np.seterr(all='ignore') options = arg.parse_args() cfg = pc.ParticlesConfig() if options.version : print( py_particle_version() ) return if options.config_model : file_name = "example_pyparticles_config.cfg" cfg.write_example_config_file("example_pyparticles_config.cfg") print( "A file named: %s has been written in the current directory" % file_name ) print( "" ) return if options.demo == "springs" : print("") print("Start the simulation example:") print(" 3 body springs") spr.springs() return if options.demo == "gas_lj" : print("") print("Start the simulation example:") print(" Pseudo gas with Lennard Jones potential") lj.gas_lj() return if options.demo == "bubble" : print("") print("Start the simulation example:") print(" Pseudo bubble demo") bu.bubble() return if options.path_name == None or options.demo == "solar_system": print("") print("Start the simulation example:") print(" Solar system") print(" -- Try to watch the Moon ... around the Earth ") print("") print(" Use your mouse for rotating, zooming and tranlating the scene.") print("") print("For more details type:") print(" pyparticles --help") print("") sol.solar_system() return if options.path_name != None : cfg.read_config( options.path_name ) ( an , pset , force , ode_solver ) = cfg.build_problem() an.build_animation() print("") print("Start the simulation described in: %s ... " % options.path_name ) an.start() return print("Ops ... ") return
man_dir = os.path.abspath("./man/") prefix = re.sub( r'^/' , '' , self.prefix ) output = subprocess.Popen([os.path.join(man_dir, "install.sh")], stdout=subprocess.PIPE, cwd=man_dir, env=dict({"PREFIX": os.path.join( self.root , prefix ) }, **dict(os.environ))).communicate()[0] print( output ) setup(name = "pyparticles", version = "%s" % py_particle_version() , description = "Particles simulation toolbox for python, with some force model and integrations methods", author = "Simone Riva", author_email = "simone.rva [at] gmail.com", url = "https://github.com/simon-r/PyParticles", packages = ['pyparticles' , 'pyparticles.utils' , 'pyparticles.ode' , 'pyparticles.forces' , 'pyparticles.animation' , 'pyparticles.demo' , 'pyparticles.pset' , 'pyparticles.measures' , 'pyparticles.main' , 'pyparticles.geometry' , 'pyparticles.ogl' ],
def main(): #my_test() np.seterr(all='ignore') options = arg.parse_args() cfg = pc.ParticlesConfig() if options.version: print(py_particle_version()) return if options.test: print("") print("Start a test simulation:") print( " It compares the simulated solution with the analytical solution in a specific problem" ) tst.test(options.test) return if options.config_model: file_name = "example_pyparticles_config.cfg" cfg.write_example_config_file("example_pyparticles_config.cfg") print("A file named: %s has been written in the current directory" % file_name) print("") return if options.demo == "fountain": print("") print("Start the simulation example:") print(" 250K Particles fountain") fou.fountain() return if options.demo == "springs": print("") print("Start the simulation example:") print(" 3 body springs") spr.springs() return if options.demo == "cat_spri": print("") print("Start the simulation example:") print(" catenary springs (constraints demo)") spc.spring_constr() return if options.demo == "gas_lj": print("") print("Start the simulation example:") print(" Pseudo gas with Lennard Jones potential") lj.gas_lj() return if options.demo == "bubble": print("") print("Start the simulation example:") print(" Pseudo bubble demo") bu.bubble() return if options.demo == "el_static": print("") print("Start the simulation example:") print(" electrostatic") eld.electro() return if options.demo == "elmag_field": print("") print("Start the simulation example:") print(" electromagnetic fields") emd.electromag_field() return if options.path_name == None or options.demo == "solar_system": print("") print("Start the simulation example:") print(" Solar system") print(" -- Try to watch the Moon ... around the Earth ") print("") print( " Use your mouse for rotating, zooming and tranlating the scene.") print("") print("For more details type:") print(" pyparticles --help") print("") sol.solar_system() return if options.path_name != None: cfg.read_config(options.path_name) (an, pset, force, ode_solver) = cfg.build_problem() an.build_animation() print("") print("Start the simulation described in: %s ... " % options.path_name) an.start() return print("Ops ... ") return