Skip to content

Commit fe41fe8

Browse files
committed
change tol
1 parent 9f44b23 commit fe41fe8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

burnman/tools/equilibration.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,7 @@ def set_compositions_and_state_from_parameters(assemblage, parameters):
163163
else:
164164
i += 1
165165

166-
if not np.all(phase_amounts > -1.0e-8):
167-
raise Exception(
168-
f"Phase amounts should be >-1.0e-8 but they are {repr(phase_amounts)}.\n"
169-
f"Parameters: {repr(parameters)}.\n"
170-
f"{repr(assemblage)}."
171-
)
166+
assert np.all(phase_amounts > -1.0e-8)
172167
phase_amounts = np.abs(phase_amounts)
173168
assemblage.n_moles = sum(phase_amounts)
174169
assemblage.set_fractions(phase_amounts / assemblage.n_moles)

misc/benchmarks/slb_2024_benchmarks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,17 @@ def check_fig_3_fcc_ferric_fper():
183183
fper = SLB_2024.ferropericlase()
184184
mag = SLB_2024.smag()
185185

186+
fper.set_composition([0.0, 0.95, 0.01, 0.0, 0.04])
187+
186188
assemblage = simplify_composite_with_composition(
187189
Composite([fper]), {"Fe": 1.0, "O": 1.1}
188190
)
189191
fper = assemblage.phases[0]
190192

191193
composition = {"Fe": 1.0, "O": 1.0}
192194
assemblage = Composite([bcc, fper, mag], [0.5, 0.49, 0.01])
193-
fper.set_composition([0.05, 0.0, 0.95])
194195
equality_constraints = [["P", 1.0e5], ["phase_fraction", (mag, 0.0)]]
195-
sol = equilibrate(composition, assemblage, equality_constraints, tol=1.0e-5)
196+
sol = equilibrate(composition, assemblage, equality_constraints)
196197
T_a_wu_mag = sol[0].assemblage.temperature
197198
print(f"BCC-fper-mag triple point at 1 bar: {T_a_wu_mag:.2f} K")
198199

0 commit comments

Comments
 (0)