[cig-commits] [commit] inversion, master, validate_MT_params: This is now out of place, so remove it. This type of error checking should be done in validate_parameters() (d7cbf83)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Dec 12 18:29:29 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 d7cbf83ccc55de3fece7126514c97d051dc8f04a
Author: ian-r-rose <ian.r.rose at gmail.com>
Date:   Mon Oct 13 19:25:13 2014 -0700

    This is now out of place, so remove it.  This type of error checking should be done in validate_parameters()


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

d7cbf83ccc55de3fece7126514c97d051dc8f04a
 burnman/mineral.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/burnman/mineral.py b/burnman/mineral.py
index 7a0d574..f1ece62 100644
--- a/burnman/mineral.py
+++ b/burnman/mineral.py
@@ -114,6 +114,7 @@ class Mineral(Material):
         self.gr = self.method.grueneisen_parameter(self.pressure, self.temperature, self.V, self.params)
         self.K_T = self.method.isothermal_bulk_modulus(self.pressure, self.temperature, self.V, self.params)
         self.K_S = self.method.adiabatic_bulk_modulus(self.pressure, self.temperature, self.V, self.params)
+        self.G = self.method.shear_modulus(self.pressure, self.temperature, self.V, self.params)
         self.C_v = self.method.heat_capacity_v(self.pressure, self.temperature, self.V, self.params)
         self.C_p = self.method.heat_capacity_p(self.pressure, self.temperature, self.V, self.params)
         self.alpha = self.method.thermal_expansivity(self.pressure, self.temperature, self.V, self.params)
@@ -137,12 +138,6 @@ class Mineral(Material):
         except (KeyError, NotImplementedError):
             self.H = float('nan')
 
-        if (self.params.has_key('G_0') and self.params.has_key('Gprime_0')):
-            self.G = self.method.shear_modulus(self.pressure, self.temperature, self.V, self.params)
-        else:
-            self.G = float('nan') #nan if there is no G, this should propagate through calculations to the end
-            if self.params['equation_of_state'] != 'mtait':
-                warnings.warn(('Warning: G_0 and or Gprime_0 are undefined for ' + self.to_string()))
 
     # The following gibbs function avoids having to calculate a bunch of unnecessary parameters over P-T space. This will be useful for gibbs minimisation.
     def calcgibbs(self, pressure, temperature):



More information about the CIG-COMMITS mailing list