From ace9ebe7055d01f8a7c119d554c5f1ccfe41fec5 Mon Sep 17 00:00:00 2001 From: Dimitris Tsapetis Date: Thu, 8 Dec 2022 14:33:55 -0500 Subject: [PATCH] Changes while loop convergence condition of FORM.py --- src/UQpy/reliability/taylor_series/FORM.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/UQpy/reliability/taylor_series/FORM.py b/src/UQpy/reliability/taylor_series/FORM.py index 8d26ed01..47eff2c6 100644 --- a/src/UQpy/reliability/taylor_series/FORM.py +++ b/src/UQpy/reliability/taylor_series/FORM.py @@ -185,7 +185,7 @@ def run(self, seed_x: Union[list, np.ndarray] = None, g_record.append(0.0) dg_u_record = np.zeros([self.n_iterations + 1, self.dimension]) - while not converged and k <= self.n_iterations: + while not converged and k < self.n_iterations: self.logger.info("Number of iteration: %i", k) # FORM always starts from the standard normal space if k == 0: @@ -314,8 +314,6 @@ def run(self, seed_x: Union[list, np.ndarray] = None, self.logger.info("Error: %s", error_record[-1]) - if converged is True or k > self.n_iterations: - break if k > self.n_iterations: self.logger.info("UQpy: Maximum number of iterations {0} was reached before convergence."