Skip to content

Commit

Permalink
update black formatting to version 24.1.1
Browse files Browse the repository at this point in the history
bobmyhill committed Feb 11, 2024
1 parent 7a650cc commit 1b3a55d
Showing 34 changed files with 12 additions and 72 deletions.
7 changes: 0 additions & 7 deletions burnman/classes/averaging_schemes.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@


class AveragingScheme(object):

"""
Base class defining an interface for determining average
elastic properties of a rock. Given a list of volume
@@ -144,7 +143,6 @@ def average_heat_capacity_p(self, fractions, c_p):


class VoigtReussHill(AveragingScheme):

"""
Class for computing the Voigt-Reuss-Hill average for elastic properties.
This derives from :class:`burnman.averaging_schemes.averaging_scheme`,
@@ -218,7 +216,6 @@ def average_shear_moduli(self, volumes, bulk_moduli, shear_moduli):


class Voigt(AveragingScheme):

"""
Class for computing the Voigt (iso-strain) bound for elastic properties.
This derives from :class:`burnman.averaging_schemes.averaging_scheme`,
@@ -277,7 +274,6 @@ def average_shear_moduli(self, volumes, bulk_moduli, shear_moduli):


class Reuss(AveragingScheme):

"""
Class for computing the Reuss (iso-stress) bound for elastic properties.
This derives from :class:`burnman.averaging_schemes.averaging_scheme`,
@@ -336,7 +332,6 @@ def average_shear_moduli(self, volumes, bulk_moduli, shear_moduli):


class HashinShtrikmanUpper(AveragingScheme):

"""
Class for computing the upper Hashin-Shtrikman bound for elastic properties.
This derives from :class:`burnman.averaging_schemes.averaging_scheme`,
@@ -423,7 +418,6 @@ def average_shear_moduli(self, volumes, bulk_moduli, shear_moduli):


class HashinShtrikmanLower(AveragingScheme):

"""
Class for computing the lower Hashin-Shtrikman bound for elastic properties.
This derives from :class:`burnman.averaging_schemes.averaging_scheme`,
@@ -510,7 +504,6 @@ def average_shear_moduli(self, volumes, bulk_moduli, shear_moduli):


class HashinShtrikmanAverage(AveragingScheme):

"""
Class for computing arithmetic mean of the Hashin-Shtrikman bounds on
elastic properties.
1 change: 0 additions & 1 deletion burnman/classes/combinedmineral.py
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@


class CombinedMineral(Mineral):

"""
This is the base class for endmembers constructed from a
linear combination of other minerals.
1 change: 0 additions & 1 deletion burnman/classes/composite.py
Original file line number Diff line number Diff line change
@@ -38,7 +38,6 @@ def check_pairs(phases, fractions):

# static composite of minerals/composites
class Composite(Material):

"""
Base class for a composite material.
The static phases can be minerals or materials,
6 changes: 0 additions & 6 deletions burnman/classes/elasticsolutionmodel.py
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@


class ElasticSolutionModel(object):

"""
This is the base class for an Elastic solution model, intended for use
in defining solutions and performing thermodynamic calculations
@@ -216,7 +215,6 @@ def excess_partial_pressures(self, volume, temperature, molar_fractions):


class ElasticMechanicalSolution(ElasticSolutionModel):

"""
An extremely simple class representing a mechanical solution model.
A mechanical solution experiences no interaction between endmembers.
@@ -251,7 +249,6 @@ def excess_partial_entropies(self, volume, temperature, molar_fractions):


class ElasticIdealSolution(ElasticSolutionModel):

"""
A class representing an ideal solution model.
Calculates the excess Helmholtz energy and entropy due to configurational
@@ -382,7 +379,6 @@ def _ideal_activities(self, molar_fractions):


class ElasticAsymmetricRegularSolution(ElasticIdealSolution):

"""
Solution model implementing the asymmetric regular solution model
formulation as described in :cite:`HP2003`.
@@ -510,7 +506,6 @@ def pressure_hessian(self, volume, temperature, molar_fractions):


class ElasticSymmetricRegularSolution(ElasticAsymmetricRegularSolution):

"""
Solution model implementing the symmetric regular solution model.
This is a special case of the
@@ -536,7 +531,6 @@ def __init__(


class ElasticSubregularSolution(ElasticIdealSolution):

"""
Solution model implementing the subregular solution model formulation
as described in :cite:`HW1989`. The excess conconfigurational
2 changes: 0 additions & 2 deletions burnman/classes/material.py
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
# TODO: When we require Python 3.8+, replace with
# functools.cached_property decorator
class cached_property(property):

"""A decorator that converts a function into a lazy property. The
function wrapped is called the first time to retrieve the result
and then that calculated result is used the next time you access
@@ -87,7 +86,6 @@ def get(self, obj):


class Material(object):

"""
Base class for all materials. The main functionality is unroll() which
returns a list of objects of type :class:`~burnman.Mineral` and their molar
1 change: 0 additions & 1 deletion burnman/classes/mineral.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@


class Mineral(Material):

"""
This is the base class for all minerals. States of the mineral
can only be queried after setting the pressure and temperature
1 change: 0 additions & 1 deletion burnman/classes/mineral_helpers.py
Original file line number Diff line number Diff line change
@@ -168,7 +168,6 @@ def debug_print(self, indent=""):


class HelperSpinTransition(Composite):

"""
Helper class that makes a mineral that switches between two materials
(for low and high spin) based on some transition pressure [Pa]
6 changes: 0 additions & 6 deletions burnman/classes/solutionmodel.py
Original file line number Diff line number Diff line change
@@ -128,7 +128,6 @@ def inverseish(x, eps=1.0e-5):


class SolutionModel(object):

"""
This is the base class for a solution model, intended for use
in defining solutions and performing thermodynamic calculations
@@ -326,7 +325,6 @@ def VoverKT_excess(self):


class MechanicalSolution(SolutionModel):

"""
An extremely simple class representing a mechanical solution model.
A mechanical solution experiences no interaction between endmembers.
@@ -372,7 +370,6 @@ def activities(self, pressure, temperature, molar_fractions):


class IdealSolution(SolutionModel):

"""
A class representing an ideal solution model.
Calculates the excess gibbs free energy and entropy due to configurational
@@ -511,7 +508,6 @@ def activities(self, pressure, temperature, molar_fractions):


class AsymmetricRegularSolution(IdealSolution):

"""
Solution model implementing the asymmetric regular solution model
formulation as described in :cite:`HP2003`.
@@ -657,7 +653,6 @@ def activities(self, pressure, temperature, molar_fractions):


class SymmetricRegularSolution(AsymmetricRegularSolution):

"""
Solution model implementing the symmetric regular solution model.
This is a special case of the
@@ -683,7 +678,6 @@ def __init__(


class SubregularSolution(IdealSolution):

"""
Solution model implementing the subregular solution model formulation
as described in :cite:`HW1989`. The excess nonconfigurational
3 changes: 0 additions & 3 deletions burnman/eos/birch_murnaghan.py
Original file line number Diff line number Diff line change
@@ -114,7 +114,6 @@ def shear_modulus_third_order(volume, params):


class BirchMurnaghanBase(eos.EquationOfState):

"""
Base class for the isothermal Birch Murnaghan equation of state. This is third order in strain, and
has no temperature dependence. However, the shear modulus is sometimes fit to a second order
@@ -258,7 +257,6 @@ def validate_parameters(self, params):


class BM3(BirchMurnaghanBase):

"""
Third order Birch Murnaghan isothermal equation of state.
This uses the third order expansion for shear modulus.
@@ -269,7 +267,6 @@ def __init__(self):


class BM2(BirchMurnaghanBase):

"""
Third order Birch Murnaghan isothermal equation of state.
This uses the second order expansion for shear modulus.
1 change: 0 additions & 1 deletion burnman/eos/birch_murnaghan_4th.py
Original file line number Diff line number Diff line change
@@ -81,7 +81,6 @@ def birch_murnaghan_fourth(x, params):


class BM4(eos.EquationOfState):

"""
Base class for the isothermal Birch Murnaghan equation of state. This is fourth order in strain, and
has no temperature dependence.
1 change: 0 additions & 1 deletion burnman/eos/cork.py
Original file line number Diff line number Diff line change
@@ -34,7 +34,6 @@ def cork_variables(cork, cork_P, cork_T, temperature):


class CORK(eos.EquationOfState):

"""
Class for the CoRK equation of state detailed in :cite:`HP1991`. The
CoRK EoS is a simple virial-type extension to the modified Redlich-Kwong
1 change: 0 additions & 1 deletion burnman/eos/dks_solid.py
Original file line number Diff line number Diff line change
@@ -61,7 +61,6 @@ def _delta_pressure(


class DKS_S(eos.EquationOfState):

"""
Base class for the finite strain solid equation of state detailed
in :cite:`deKoker2013` (supplementary materials).
1 change: 0 additions & 1 deletion burnman/eos/equation_of_state.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@


class EquationOfState(object):

"""
This class defines the interface for an equation of state
that a mineral uses to determine its properties at a
3 changes: 0 additions & 3 deletions burnman/eos/hp.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@


class HP_TMT(eos.EquationOfState):

"""
Base class for the thermal equation of state based on
the generic modified Tait equation of state (class MT),
@@ -395,7 +394,6 @@ def validate_parameters(self, params):


class HP_TMTL(eos.EquationOfState):

"""
Base class for the thermal equation of state
described in :cite:`HP1998`, but with the Modified Tait as the static part,
@@ -668,7 +666,6 @@ def validate_parameters(self, params):


class HP98(eos.EquationOfState):

"""
Base class for the thermal equation of state
described in :cite:`HP1998`.
3 changes: 0 additions & 3 deletions burnman/eos/mie_grueneisen_debye.py
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@


class MGDBase(eos.EquationOfState):

"""
Base class for a generic finite-strain Mie-Grueneisen-Debye
equation of state. References for this can be found in many
@@ -304,7 +303,6 @@ def validate_parameters(self, params):


class MGD3(MGDBase):

"""
MGD equation of state with third order finite strain expansion for the
shear modulus (this should be preferred, as it is more thermodynamically
@@ -316,7 +314,6 @@ def __init__(self):


class MGD2(MGDBase):

"""
MGD equation of state with second order finite strain expansion for the
shear modulus. In general, this should not be used, but sometimes
1 change: 0 additions & 1 deletion burnman/eos/modified_tait.py
Original file line number Diff line number Diff line change
@@ -92,7 +92,6 @@ def intVdP(pressure, params):


class MT(eos.EquationOfState):

"""
Base class for the generic modified Tait equation of state.
References for this can be found in :cite:`HC1974`
1 change: 0 additions & 1 deletion burnman/eos/morse_potential.py
Original file line number Diff line number Diff line change
@@ -75,7 +75,6 @@ def volume(pressure, params):


class Morse(eos.EquationOfState):

"""
Class for the isothermal Morse Potential equation of state
detailed in :cite:`Stacey1981`.
1 change: 0 additions & 1 deletion burnman/eos/murnaghan.py
Original file line number Diff line number Diff line change
@@ -39,7 +39,6 @@ def intVdP(pressure, V_0, K_0, Kprime_0):


class Murnaghan(eos.EquationOfState):

"""
Base class for the isothermal Murnaghan equation of state,
as described in :cite:`Murnaghan1944`.
1 change: 0 additions & 1 deletion burnman/eos/reciprocal_kprime.py
Original file line number Diff line number Diff line change
@@ -124,7 +124,6 @@ def shear_modulus(pressure, params):


class RKprime(eos.EquationOfState):

"""
Class for the isothermal reciprocal K-prime equation of state
detailed in :cite:`StaceyDavis2004`. This equation of state is
3 changes: 0 additions & 3 deletions burnman/eos/slb.py
Original file line number Diff line number Diff line change
@@ -63,7 +63,6 @@ def _delta_pressure(


class SLBBase(eos.EquationOfState):

"""
Base class for the finite strain-Mie-Grueneiesen-Debye equation of state
detailed in :cite:`Stixrude2005`. For the most part the equations are
@@ -468,7 +467,6 @@ def validate_parameters(self, params):


class SLB3(SLBBase):

"""
SLB equation of state with third order finite strain expansion for the
shear modulus (this should be preferred, as it is more thermodynamically
@@ -480,7 +478,6 @@ def __init__(self):


class SLB2(SLBBase):

"""
SLB equation of state with second order finite strain expansion for the
shear modulus. In general, this should not be used, but sometimes
1 change: 0 additions & 1 deletion burnman/eos/vinet.py
Original file line number Diff line number Diff line change
@@ -56,7 +56,6 @@ def volume(pressure, params):


class Vinet(eos.EquationOfState):

"""
Base class for the isothermal Vinet equation of state.
References for this equation of state are :cite:`vinet1986`
1 change: 0 additions & 1 deletion burnman/minerals/Murakami_2013.py
Original file line number Diff line number Diff line change
@@ -36,7 +36,6 @@ def __init__(self):


class wuestite(Mineral):

"""
Murakami 2013 and references therein
"""
4 changes: 0 additions & 4 deletions burnman/minerals/other.py
Original file line number Diff line number Diff line change
@@ -130,7 +130,6 @@ def __init__(self):


class Speziale_fe_periclase_HS(Mineral):

"""
Speziale et al. 2007, Mg#=83
"""
@@ -151,7 +150,6 @@ def __init__(self):


class Speziale_fe_periclase_LS(Mineral):

"""
Speziale et al. 2007, Mg#=83
"""
@@ -172,7 +170,6 @@ def __init__(self):


class Liquid_Fe_Anderson(Mineral):

"""
Anderson & Ahrens, 1994 JGR
"""
@@ -190,7 +187,6 @@ def __init__(self):


class Fe_Dewaele(Mineral):

"""
Dewaele et al., 2006, Physical Review Letters
"""
8 changes: 5 additions & 3 deletions burnman/tools/equilibration.py
Original file line number Diff line number Diff line change
@@ -644,9 +644,11 @@ def get_equilibration_parameters(assemblage, composition, free_compositional_vec
prm.free_compositional_vectors = np.array(
[
[
free_compositional_vectors[i][e]
if e in free_compositional_vectors[i]
else 0.0
(
free_compositional_vectors[i][e]
if e in free_compositional_vectors[i]
else 0.0
)
for e in assemblage.elements
]
for i in range(n_free_compositional_vectors)
1 change: 0 additions & 1 deletion contrib/CHRU2014/helper_solid_solution.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@


class HelperSolidSolution(burnman.Mineral):

"""
This material is deprecated!
1 change: 0 additions & 1 deletion contrib/CHRU2014/paper_uncertain.py
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@


class my_perovskite(burnman.Mineral):

"""
based on Stixrude & Lithgow-Bertelloni 2011 and references therein
"""
8 changes: 5 additions & 3 deletions contrib/anisotropic_eos/tools.py
Original file line number Diff line number Diff line change
@@ -42,9 +42,11 @@ def print_table_for_mineral_constants_2(mineral, param_list, indices):
row = [f"{i}", f"{j}"]
row.extend(
[
f"{constants[ci, i]:.4e}"
if constants[ci, i] != 0 and constants[ci, i] != 1
else "-"
(
f"{constants[ci, i]:.4e}"
if constants[ci, i] != 0 and constants[ci, i] != 1
else "-"
)
for i in range(len(param_list))
]
)
2 changes: 1 addition & 1 deletion examples/example_user_input_material.py
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ def __init__(self):
# See Stixrude & Lithgow-Bertelloni, 2005 for values
"q_0": 0.917, # isotropic strain derivative of gruneisen
# parameter. Values in Stixrude & Lithgow-Bertelloni, 2005
"eta_s_0": 3.0 # full strain derivative of gruneisen parameter
"eta_s_0": 3.0, # full strain derivative of gruneisen parameter
# parameter. Values in Stixrude & Lithgow-Bertelloni, 2005
}
burnman.Mineral.__init__(self)
1 change: 1 addition & 0 deletions misc/gen_doc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" generates a list with the examples """

from __future__ import absolute_import
from __future__ import print_function

1 change: 0 additions & 1 deletion tests/test_averaging.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@


class mypericlase(burnman.Mineral):

"""
Stixrude & Lithgow-Bertelloni 2005 and references therein
"""
1 change: 0 additions & 1 deletion tests/test_debye.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@


class mypericlase(burnman.Mineral):

"""
Stixrude & Lithgow-Bertelloni 2005 and references therein
"""
5 changes: 0 additions & 5 deletions tests/test_eos.py
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@


class mypericlase(burnman.Mineral):

"""
Stixrude & Lithgow-Bertelloni 2005 and references therein
"""
@@ -36,7 +35,6 @@ def __init__(self):


class Fe_Dewaele(burnman.Mineral):

"""
Dewaele et al., 2006, Physical Review Letters
"""
@@ -54,7 +52,6 @@ def __init__(self):


class Liquid_Fe_Anderson(burnman.Mineral):

"""
Anderson & Ahrens, 1994 JGR
"""
@@ -72,7 +69,6 @@ def __init__(self):


class outer_core_rkprime(burnman.Mineral):

"""
Stacey and Davis, 2004 PEPI (Table 5)
"""
@@ -90,7 +86,6 @@ def __init__(self):


class periclase_morse(burnman.Mineral):

"""
Periclase parameters from SLB dataset (which uses BM3)
"""
1 change: 0 additions & 1 deletion tests/test_geotherm.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@


class mypericlase(burnman.Mineral):

"""
Stixrude & Lithgow-Bertelloni 2005 and references therein
"""
4 changes: 0 additions & 4 deletions tests/test_material.py
Original file line number Diff line number Diff line change
@@ -7,11 +7,9 @@


class test_material_name(BurnManTest):

"""test Material.name and that we can edit and override it in Mineral"""

class min_no_name(burnman.Mineral):

"""
Stixrude & Lithgow-Bertelloni 2005 and references therein
"""
@@ -36,7 +34,6 @@ def __init__(self):
burnman.Mineral.__init__(self)

class min_with_name(burnman.Mineral):

"""
Stixrude & Lithgow-Bertelloni 2005 and references therein
"""
@@ -62,7 +59,6 @@ def __init__(self):
burnman.Mineral.__init__(self)

class min_with_name_manually(burnman.Mineral):

"""
Stixrude & Lithgow-Bertelloni 2005 and references therein
"""

0 comments on commit 1b3a55d

Please sign in to comment.