Skip to content

Commit 67252cc

Browse files
committed
change tol
1 parent 9f44b23 commit 67252cc

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

burnman/tools/equilibration.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,14 @@ def F(
218218
:returns: The vector corresponding to F(x).
219219
:rtype: numpy.array
220220
"""
221-
221+
if any(x == np.nan):
222+
raise Exception(
223+
f"Parameter values include np.nan for \n{assemblage}\n"
224+
f"Equality constraints: {equality_constraints}\n"
225+
f"Compositional vector: {reduced_composition_vector}\n"
226+
"Free compositional vectors: "
227+
f"{reduced_free_composition_vectors}."
228+
)
222229
set_compositions_and_state_from_parameters(assemblage, x)
223230
new_endmember_amounts = get_endmember_amounts(assemblage)
224231

misc/benchmarks/slb_2024_benchmarks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ def check_fig_3_fcc_ferric_fper():
190190

191191
composition = {"Fe": 1.0, "O": 1.0}
192192
assemblage = Composite([bcc, fper, mag], [0.5, 0.49, 0.01])
193-
fper.set_composition([0.05, 0.0, 0.95])
193+
fper.set_composition([0.04, 0.01, 0.95])
194194
equality_constraints = [["P", 1.0e5], ["phase_fraction", (mag, 0.0)]]
195-
sol = equilibrate(composition, assemblage, equality_constraints, tol=1.0e-5)
195+
sol = equilibrate(composition, assemblage, equality_constraints)
196196
T_a_wu_mag = sol[0].assemblage.temperature
197197
print(f"BCC-fper-mag triple point at 1 bar: {T_a_wu_mag:.2f} K")
198198

0 commit comments

Comments
 (0)