From 9679d37e095bbdb4c10f8e68e18fa8b8a994efd0 Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Fri, 29 Jul 2011 15:50:39 +0000 Subject: [PATCH] Use the new nth order bracketing Brent solver by default if user didn't specify a root solver for ODE events detection. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1152283 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/commons/math/ode/AbstractIntegrator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java b/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java index 20bdee417..1d732db5d 100644 --- a/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java +++ b/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java @@ -28,7 +28,7 @@ import java.util.TreeSet; import org.apache.commons.math.ConvergenceException; import org.apache.commons.math.MaxEvaluationsExceededException; -import org.apache.commons.math.analysis.solvers.BrentSolver; +import org.apache.commons.math.analysis.solvers.BracketingNthOrderBrentSolver; import org.apache.commons.math.analysis.solvers.UnivariateRealSolver; import org.apache.commons.math.exception.MathUserException; import org.apache.commons.math.exception.util.LocalizedFormats; @@ -126,7 +126,8 @@ public abstract class AbstractIntegrator implements FirstOrderIntegrator { final double convergence, final int maxIterationCount) { addEventHandler(handler, maxCheckInterval, convergence, - maxIterationCount, new BrentSolver(convergence)); + maxIterationCount, + new BracketingNthOrderBrentSolver(convergence, 5)); } /** {@inheritDoc} */