[cig-commits] [commit] master: fix user_material example (a2c0f44)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Dec 11 12:20:01 PST 2014
Repository : https://github.com/geodynamics/burnman
On branch : master
Link : https://github.com/geodynamics/burnman/compare/c5ec36a308413012ee5b0763ccb541c2ad56f382...bc315ff9a2ed1d4871962882f0626468342f1ffc
>---------------------------------------------------------------
commit a2c0f44b216b8f4a69e5f0f5c31ec4b645e11495
Author: sannecottaar <sanne.cottaar at gmail.com>
Date: Wed Dec 10 12:34:00 2014 -0800
fix user_material example
>---------------------------------------------------------------
a2c0f44b216b8f4a69e5f0f5c31ec4b645e11495
examples/example_user_input_material.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/examples/example_user_input_material.py b/examples/example_user_input_material.py
index 005ce94..8751b83 100644
--- a/examples/example_user_input_material.py
+++ b/examples/example_user_input_material.py
@@ -61,6 +61,8 @@ if __name__ == "__main__":
class own_material (burnman.Mineral):
def __init__(self):
self.params = {
+ 'name': 'myownmineral',
+ 'equation_of_state': method,
'V_0': 10.844e-6, #Molar volume [m^3/(mole molecules)]
#at room pressure/temperature
'K_0': 135.19e9, #Reference bulk modulus [Pa]
@@ -94,7 +96,7 @@ if __name__ == "__main__":
temperature = burnman.geotherm.brown_shankland(seis_p)
-
+ # The next line is not required here, because the method is set automatically my defining 'equation_of_state' in mineral.params. This shows an alternative way to set the method later, or reset the method to a different one.
rock.set_method(method)
print "Calculations are done for:"
More information about the CIG-COMMITS
mailing list