mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
removed print statements
This commit is contained in:
parent
9156410d65
commit
1d8ac57f9a
1 changed files with 2 additions and 8 deletions
|
|
@ -31,7 +31,6 @@ def linearize(x, f, tolerance=0.001):
|
|||
# Initialize stack
|
||||
x_stack = [x[0]]
|
||||
y_stack = [f(x[0])]
|
||||
print(y_stack)
|
||||
|
||||
for i in range(x.shape[0] - 1):
|
||||
x_stack.insert(0, x[i + 1])
|
||||
|
|
@ -145,16 +144,12 @@ def linearizeIter(x, f, tolerance=0.001, unified=True):
|
|||
for item in y_dict:
|
||||
#Initialize output
|
||||
x_out = []
|
||||
y_out = []
|
||||
print(str(item))
|
||||
|
||||
#Initialize stacks
|
||||
x_stack = [x[0]]
|
||||
print(y_dict)
|
||||
y_stack = [y_dict[item]]
|
||||
for i in range(x.shape[0] - 1):
|
||||
print(x_stack)
|
||||
x_stack.insert(0, x[i + 1])
|
||||
print(x_stack)
|
||||
y_stack.insert(0, f(x[i + 1])[item])
|
||||
|
||||
while True:
|
||||
|
|
@ -170,12 +165,11 @@ def linearizeIter(x, f, tolerance=0.001, unified=True):
|
|||
y_stack.insert(-1, y_mid)
|
||||
else:
|
||||
x_out.append(x_stack.pop())
|
||||
y_out.append(y_stack.pop())
|
||||
y_stack.pop()
|
||||
if len(x_stack) == 1:
|
||||
break
|
||||
|
||||
x_out.append(x_stack.pop())
|
||||
y_out.append(y_stack.pop())
|
||||
x=np.array(x_out) #Use x_out for initial x values in next item
|
||||
|
||||
y_dict_out = f(np.array(x_out))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue