Révision 172

NBody/NBody.py (revision 172)
609 609
    # Shape to distribute
610 610
    Shape='Ball'
611 611
    # Type of Interaction
612
    InterType='Potential'
612
    InterType='Force'
613 613
    
614
    HowToUse='%s -h [Help] -r [InitialRandom] -g [OpenGL] -e [VirielStress] -o [Verbose] -p [SpeedRendering] -x [NegativeExponential4ArteEvasions] -f [Force] -d <DeviceId> -n <NumberOfParticules> -i <Iterations> -z <SizeOfBoxOrBall> -v <Velocity> -s <Step> -b <Ball|Box> -m <ImplicitEuler|RungeKutta|ExplicitEuler|Heun> -t <FP32|FP64>'
614
    HowToUse='%s -h [Help] -r [InitialRandom] -g [OpenGL] -e [VirielStress] -o [Verbose] -p [Potential] -x [NegativeExponential4ArteEvasions] -d <DeviceId> -n <NumberOfParticules> -i <Iterations> -z <SizeOfBoxOrBall> -v <Velocity> -s <Step> -b <Ball|Box> -m <ImplicitEuler|RungeKutta|ExplicitEuler|Heun> -t <FP32|FP64>'
615 615

  
616 616
    try:
617
        opts, args = getopt.getopt(sys.argv[1:],"rpxfgehod:n:i:z:v:s:m:t:b:",["random","rendering","negexp","force","opengl","viriel","verbose","device=","number=","iterations=","size=","velocity=","step=","method=","valuetype=","shape="])
617
        opts, args = getopt.getopt(sys.argv[1:],"rpxgehod:n:i:z:v:s:m:t:b:",["random","potential","negexp","opengl","viriel","verbose","device=","number=","iterations=","size=","velocity=","step=","method=","valuetype=","shape="])
618 618
    except getopt.GetoptError:
619 619
        print(HowToUse % sys.argv[0])
620 620
        sys.exit(2)
......
669 669
            VirielStress=True
670 670
        elif opt in ("-g", "--opengl"):
671 671
            OpenGL=True
672
        elif opt in ("-p", "--rendering"):
673
            SpeedRendering=True
672
        elif opt in ("-p", "--potential"):
673
            InterType='Potential'
674 674
        elif opt in ("-x", "--negexp"):
675 675
            CoArEv='NegExp'
676 676
        elif opt in ("-o", "--verbose"):
677 677
            Verbose=True
678
        elif opt in ("-f", "--force"):
679
            InterType='Force'
680 678

  
681 679
    SizeOfShape=MyFloat(SizeOfShape*Number)
682 680
    Velocity=MyFloat(Velocity)
......
856 854
    Squertz*=Number*Number
857 855
    Squertz/=Durations
858 856

  
859
    print("Squertz in log10 stats on device %s with %s iterations :\n\tMean:\t%s\n\tMedian:\t%s\n\tStddev:\t%s\n\tMin:\t%s\n\tMax:\t%s\n" % (Device,Iterations,np.log10(np.mean(Squertz)),np.log10(np.median(Squertz)),np.log10(np.std(Squertz)),np.log10(np.min(Squertz)),np.log10(np.max(Squertz))))
857
    print("Squertz in log10 & complete stats on device %s with %s iterations :\n\tMean:\t%s\t%s\n\tMedian:\t%s\t%s\n\tStddev:\t%s\t%s\n\tMin:\t%s\t%s\n\tMax:\t%s\t%s\n" % (Device,Iterations,np.log10(np.mean(Squertz)),np.mean(Squertz),np.log10(np.median(Squertz)),np.median(Squertz),np.log10(np.std(Squertz)),np.std(Squertz),np.log10(np.min(Squertz)),np.min(Squertz),np.log10(np.max(Squertz)),np.max(Squertz)))
860 858
        
861 859
    clDataX.release()
862 860
    clDataV.release()

Formats disponibles : Unified diff