diff --git a/src/main/java/inr/numass/trapping/Simulator.java b/src/main/java/inr/numass/trapping/Simulator.java index 0ad8c25..ad8d987 100644 --- a/src/main/java/inr/numass/trapping/Simulator.java +++ b/src/main/java/inr/numass/trapping/Simulator.java @@ -149,7 +149,7 @@ public class Simulator { double deltaZ = deltaL * cos(pos.theta); // direction already included in cos(theta) double z0 = pos.z; pos.addZ(deltaZ); - pos.l += abs(pos.z - z0) / cos(pos.theta); + pos.l += deltaL; // //if we are crossing source boundary, check for end condition // while (abs(deltaZ + pos.z) > SOURCE_LENGTH / 2d && !pos.isFinished()) { diff --git a/src/main/java/inr/numass/trapping/Trapping.java b/src/main/java/inr/numass/trapping/Trapping.java index 139ef92..dd357bf 100644 --- a/src/main/java/inr/numass/trapping/Trapping.java +++ b/src/main/java/inr/numass/trapping/Trapping.java @@ -15,8 +15,8 @@ public class Trapping { Instant startTime = Instant.now(); System.out.printf("Starting at %s%n%n", startTime.toString()); new SimulationManager() - .withParameters(0.6, 3.7, 4.84, 18000d, 4000) - .withOutputFile("D:\\Work\\Numass\\trapping\\trap 18, pinch 100A.out") + .withParameters(0.6, 3.7, 4.84, 14000d, 4000) + .withOutputFile("D:\\Work\\Numass\\trapping\\trap 14, pinch 100A.out") // .withFieldMap(z, b) // .withDensity(5e20) .simulateAll((int) 1e6);