Skip to content

Commit

Permalink
Changes while loop convergence condition of FORM.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtsap committed Dec 8, 2022
1 parent 2dcd16a commit ace9ebe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/UQpy/reliability/taylor_series/FORM.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit ace9ebe

Please sign in to comment.