[cig-commits] [commit] inversion, master, validate_MT_params: Allow multiple instances of same element in endmember formulae (c376611)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Dec 12 18:26:46 PST 2014
Repository : https://github.com/geodynamics/burnman
On branches: inversion,master,validate_MT_params
Link : https://github.com/geodynamics/burnman/compare/80c2a295c42dfdb38f83f6c1334bf7d8f97a8463...409647ff05dfad6a686198cac1481bd46b5e2e62
>---------------------------------------------------------------
commit c3766111361f9d0c6a7af857cbf260f8c23586f0
Author: Bob Myhill <myhill.bob at gmail.com>
Date: Thu Oct 2 14:08:21 2014 +0200
Allow multiple instances of same element in endmember formulae
>---------------------------------------------------------------
c3766111361f9d0c6a7af857cbf260f8c23586f0
burnman/processchemistry.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/burnman/processchemistry.py b/burnman/processchemistry.py
index e7de384..eca5eba 100644
--- a/burnman/processchemistry.py
+++ b/burnman/processchemistry.py
@@ -38,7 +38,10 @@ def dictionarize_formula(formula):
nel=1.
else:
nel=float(list[1])
- f[list[0]]=nel
+ if list[0] not in f:
+ f[list[0]]=nel
+ else:
+ f[list[0]]=nel+f[list[0]]
return f
def formula_mass(formula, atomic_masses):
More information about the CIG-COMMITS
mailing list