minor fixes. Updated libraries

This commit is contained in:
darksnake 2016-03-30 16:01:28 +03:00
parent 8f1a01d54f
commit b768fe6186
2 changed files with 9 additions and 8 deletions

10
pom.xml
View File

@ -20,16 +20,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
@ -46,7 +46,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.2</version>
<version>3.5</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>

View File

@ -14,9 +14,11 @@ public class Trapping {
public static void main(String[] args) throws FileNotFoundException {
PrintWriter out = null;
if ((args != null) && (args[0] != null)) {
if ((args.length > 0) && (args[0] != null)) {
File file = new File(args[0]);
out = new PrintWriter(file);
} else {
}
double E = 18000d;
@ -31,7 +33,7 @@ public class Trapping {
int rejected = 0;
int lowE = 0;
ArrayList<ElectronTrappingSimulator.SimulaionResult> results = simulator.simulateAll(E, 500000);
ArrayList<ElectronTrappingSimulator.SimulaionResult> results = simulator.simulateAll(E, 50000);
for (Iterator<ElectronTrappingSimulator.SimulaionResult> it = results.iterator(); it.hasNext();) {
ElectronTrappingSimulator.SimulaionResult res = it.next();
@ -87,6 +89,5 @@ public class Trapping {
out.close();
}
}
}