Skip to content

Commit 6f18788

Browse files
committed
fix: if interpolator results in 0, still set up to date
otherwise interpolator won't stop solving!
1 parent a8d364c commit 6f18788

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

LoopStructural/interpolators/_discrete_interpolator.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Discrete interpolator base for least squares
33
"""
4+
45
import logging
56

67
from time import time
@@ -304,9 +305,6 @@ def add_equality_constraints(self, node_idx, values, name="undefined"):
304305
}
305306
self.eq_const_c += idc[outside].shape[0]
306307

307-
def add_non_linear_constraints(self, nonlinear_constraint):
308-
self.non_linear_constraints.append(nonlinear_constraint)
309-
310308
def add_inequality_constraints_to_matrix(self, A, l, u, idc, name="undefined"):
311309
"""Adds constraints for a matrix where the linear function
312310
l < Ax > u constrains the objective function
@@ -785,7 +783,7 @@ def solve_system(self, solver="cg", **kwargs):
785783
if np.all(self.c[self.region] == 0):
786784
self.valid = False
787785
logger.warning("No solution, scalar field 0. Add more data.")
788-
786+
self.up_to_date = True
789787
return
790788
self.valid = True
791789
logging.info(f"Solving interpolation took: {time()-starttime}")

0 commit comments

Comments
 (0)