[cig-commits] [commit] master: Probably better not to assume values, just use nan in this case (76e08d1)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Dec 12 16:37:37 PST 2014


Repository : https://github.com/geodynamics/burnman

On branch  : master
Link       : https://github.com/geodynamics/burnman/compare/916ee6acd98bd253c534a4b858b8d86ec62c3fd5...5e9eb1c42d6dd00a30a59872a2b31d1c0f8bd09c

>---------------------------------------------------------------

commit 76e08d173d01ebb45507106b5a07e02bcdffe3d6
Author: ian-r-rose <ian.r.rose at gmail.com>
Date:   Mon Oct 13 19:49:55 2014 -0700

    Probably better not to assume values, just use nan in this case


>---------------------------------------------------------------

76e08d173d01ebb45507106b5a07e02bcdffe3d6
 burnman/eos/birch_murnaghan.py      | 6 +++---
 burnman/eos/mie_grueneisen_debye.py | 6 +++---
 burnman/eos/slb.py                  | 8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/burnman/eos/birch_murnaghan.py b/burnman/eos/birch_murnaghan.py
index 5e208a1..76e7271 100644
--- a/burnman/eos/birch_murnaghan.py
+++ b/burnman/eos/birch_murnaghan.py
@@ -141,11 +141,11 @@ class BirchMurnaghanBase(eos.EquationOfState):
      
         #if G and Gprime are not included this is presumably deliberate,
         #as we can model density and bulk modulus just fine without them,
-        #so just add them to the dictionary as zeros
+        #so just add them to the dictionary as nans
         if 'G_0' not in params:
-            params['G_0'] = 0.
+            params['G_0'] = float('nan')
         if 'Gprime_0' not in params:
-            params['Gprime_0'] = 0.
+            params['Gprime_0'] = float('nan')
   
         #check that all the required keys are in the dictionary
         expected_keys = ['V_0', 'K_0', 'Kprime_0', 'G_0', 'Gprime_0']
diff --git a/burnman/eos/mie_grueneisen_debye.py b/burnman/eos/mie_grueneisen_debye.py
index 66b5f9c..80f85a2 100644
--- a/burnman/eos/mie_grueneisen_debye.py
+++ b/burnman/eos/mie_grueneisen_debye.py
@@ -175,11 +175,11 @@ class MGDBase(eos.EquationOfState):
 
         #if G and Gprime are not included this is presumably deliberate,
         #as we can model density and bulk modulus just fine without them,
-        #so just add them to the dictionary as zeros
+        #so just add them to the dictionary as nans
         if 'G_0' not in params:
-            params['G_0'] = 0.
+            params['G_0'] = float('nan')
         if 'Gprime_0' not in params:
-            params['Gprime_0'] = 0.
+            params['Gprime_0'] = float('nan')
   
         #check that all the required keys are in the dictionary
         expected_keys = ['V_0', 'K_0', 'Kprime_0', 'G_0', 'Gprime_0', 'molar_mass', 'n', 'Debye_0', 'grueneisen_0', 'q_0']
diff --git a/burnman/eos/slb.py b/burnman/eos/slb.py
index b650477..4a3230d 100644
--- a/burnman/eos/slb.py
+++ b/burnman/eos/slb.py
@@ -260,13 +260,13 @@ class SLBBase(eos.EquationOfState):
 
         #if G and Gprime are not included this is presumably deliberate,
         #as we can model density and bulk modulus just fine without them,
-        #so just add them to the dictionary as zeros
+        #so just add them to the dictionary as nans
         if 'G_0' not in params:
-            params['G_0'] = 0.
+            params['G_0'] = float('nan')
         if 'Gprime_0' not in params:
-            params['Gprime_0'] = 0.
+            params['Gprime_0'] = float('nan')
         if 'eta_s_0' not in params:
-            params['eta_s_0'] = 0.
+            params['eta_s_0'] = float('nan')
   
         #check that all the required keys are in the dictionary
         expected_keys = ['V_0', 'K_0', 'Kprime_0', 'G_0', 'Gprime_0', 'molar_mass', 'n', 'Debye_0', 'grueneisen_0', 'q_0', 'eta_s_0']



More information about the CIG-COMMITS mailing list