diff --git a/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/plausibility/impl/path/PathPlausibilityFilter.java b/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/plausibility/impl/path/PathPlausibilityFilter.java index c00441169..6b782a49a 100644 --- a/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/plausibility/impl/path/PathPlausibilityFilter.java +++ b/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/plausibility/impl/path/PathPlausibilityFilter.java @@ -170,6 +170,13 @@ public PlausibilityResult apply(ClusterRupture rupture, boolean verbose) { result = result.logicalOr(subResult); else result = result.logicalAnd(subResult); + + if (logicalOr && result.isPass() && !verbose) { + break; + } + if (!logicalOr && !result.canContinue() && !verbose){ + break; + } } if (result.isPass()) numPasses++; diff --git a/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/plausibility/impl/prob/CoulombSectRatioProb.java b/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/plausibility/impl/prob/CoulombSectRatioProb.java index 2e6ca94b1..75771a87d 100644 --- a/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/plausibility/impl/prob/CoulombSectRatioProb.java +++ b/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/plausibility/impl/prob/CoulombSectRatioProb.java @@ -99,6 +99,9 @@ else if (myProb > 1) System.out.println("Probability of adding "+receiver.getSectionId()+" with " +currentSects.size()+" sources: "+track.sum+"/|"+track.getSumHighest()+"| = "+myProb); prob *= myProb; + if (prob == 0 && !verbose) { + return 0; + } } currentSects = nav.getCurrentSects(); diff --git a/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/strategies/PlausibleClusterConnectionStrategy.java b/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/strategies/PlausibleClusterConnectionStrategy.java index 4c00e4b31..07cc493b0 100644 --- a/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/strategies/PlausibleClusterConnectionStrategy.java +++ b/src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/strategies/PlausibleClusterConnectionStrategy.java @@ -743,7 +743,9 @@ protected List buildPossibleConnections(FaultSubsectionCluster from, Fault PlausibilityResult result = PlausibilityResult.PASS; boolean directional = false; for (PlausibilityFilter filter : filters) { - result = result.logicalAnd(filter.apply(rupture, false)); + if (result.canContinue()) { + result = result.logicalAnd(filter.apply(rupture, false)); + } directional = directional || filter.isDirectional(false); } if (debug) @@ -761,8 +763,12 @@ protected List buildPossibleConnections(FaultSubsectionCluster from, Fault if (debug) System.out.println("\tTrying reversed: "+rupture); PlausibilityResult reverseResult = PlausibilityResult.PASS; - for (PlausibilityFilter filter : filters) + for (PlausibilityFilter filter : filters) { reverseResult = reverseResult.logicalAnd(filter.apply(rupture, false)); + if (!reverseResult.canContinue()) { + break; + } + } if (debug) System.out.println("\tResult: "+reverseResult); if (scalarFilter != null && reverseResult.isPass()) {