Switch to gradle build

user: Alexander Nozik <altavir@gmail.com>
This commit is contained in:
Alexander Nozik 2016-05-08 18:44:14 +03:00
parent 9bb67f5691
commit 8e517aeecb
3 changed files with 8 additions and 12 deletions

View File

@ -11,7 +11,6 @@ import java.util.stream.Stream;
import org.apache.commons.math3.geometry.euclidean.threed.Rotation; import org.apache.commons.math3.geometry.euclidean.threed.Rotation;
import org.apache.commons.math3.geometry.euclidean.threed.SphericalCoordinates; import org.apache.commons.math3.geometry.euclidean.threed.SphericalCoordinates;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.random.JDKRandomGenerator;
import org.apache.commons.math3.random.MersenneTwister; import org.apache.commons.math3.random.MersenneTwister;
import org.apache.commons.math3.random.RandomGenerator; import org.apache.commons.math3.random.RandomGenerator;
import org.apache.commons.math3.random.SynchronizedRandomGenerator; import org.apache.commons.math3.random.SynchronizedRandomGenerator;

View File

@ -16,7 +16,6 @@
package inr.numass.trapping; package inr.numass.trapping;
import java.io.PrintStream; import java.io.PrintStream;
import java.io.PrintWriter;
import static java.lang.Integer.valueOf; import static java.lang.Integer.valueOf;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View File

@ -22,10 +22,8 @@ public class Trapping {
double E = 18000d; double E = 18000d;
System.out.println(); System.out.println();
// System.setProperty("jna.library.path", "d:\\projects\\Trapping\\target\\classes\\win32-amd64\\libScatter.dll");
ElectronTrappingSimulator simulator = new ElectronTrappingSimulator(); ElectronTrappingSimulator simulator = new ElectronTrappingSimulator();
simulator.setFields(0.6, 3.6, 7.2); simulator.setFields(0.6, 3.6, 7.2);
// ElectronTrappingSimulator.SimulaionResult result;
int accepted = 0; int accepted = 0;
int pass = 0; int pass = 0;
@ -33,18 +31,18 @@ public class Trapping {
int lowE = 0; int lowE = 0;
simulator.scatter.counter.resetAll(); simulator.scatter.counter.resetAll();
List<ElectronTrappingSimulator.SimulaionResult> results = simulator.simulateAll(E, 10000); List<ElectronTrappingSimulator.SimulaionResult> results = simulator.simulateAll(E, (int) 1e6);
simulator.scatter.counter.print(System.out); simulator.scatter.counter.print(System.out);
System.out.printf("%nSimulation complete.%n%n"); System.out.printf("%nSimulation complete.%n%n");
for (ElectronTrappingSimulator.SimulaionResult res : results) { for (ElectronTrappingSimulator.SimulaionResult res : results) {
if (out != null) {
ElectronTrappingSimulator.printOne(System.out, res);
}
switch (res.state) { switch (res.state) {
case ACCEPTED: case ACCEPTED:
// ElectronTrappingSimulator.printOne(System.out, res); // ElectronTrappingSimulator.printOne(System.out, res);
if (out != null) {
ElectronTrappingSimulator.printOne(out, res);
}
accepted++; accepted++;
break; break;
case LOWENERGY: case LOWENERGY: