Skip to content

Commit

Permalink
Merge pull request #599 from bobmyhill/update
Browse files Browse the repository at this point in the history
Update files
  • Loading branch information
bobmyhill authored Oct 6, 2024
2 parents f9ce9a3 + 7c780aa commit fb33866
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
python-versions: ['3.12']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-versions }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-versions }}
- name: make indent
Expand All @@ -24,7 +24,7 @@ jobs:
./contrib/utilities/indent
git diff > changes-astyle.diff
- name: archive indent results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: changes-astyle.diff
path: changes-astyle.diff
Expand All @@ -41,9 +41,9 @@ jobs:
python-versions: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-versions }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-versions }}
- name: setup
Expand All @@ -55,7 +55,7 @@ jobs:
texlive \
texlive-latex-extra
python -m pip install --upgrade pip
pip install pycddlib # this is optional
pip install pycddlib==2.1.7 # this is optional
pip install autograd # this is optional
python --version
- name: test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
3 changes: 2 additions & 1 deletion burnman/classes/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,10 @@ def evaluate(self, vars_list, pressures, temperatures, molar_fractions=None):

assert pressures.shape == temperatures.shape

first_index = list(np.ndenumerate(temperatures))[0][0]
if molar_fractions is not None:
molar_fractions = np.array(molar_fractions)
self.set_composition(molar_fractions[0])
self.set_composition(molar_fractions[first_index])
assert temperatures.shape == molar_fractions.shape[:-1]

# First, check the output types of all the requested variables:
Expand Down
2 changes: 1 addition & 1 deletion burnman/classes/seismic.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def _compute_pressure(self):
# convert radii to depths
depth = self.earth_radius - radii
pressure = scipy.integrate.cumulative_trapezoid(
gravity * density, x=depth, initial=0.0
gravity * density, x=depth, initial=0
)

self.table_pressure = pressure
Expand Down
3 changes: 2 additions & 1 deletion burnman/classes/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,8 @@ def compositional_null_basis(self):
null_basis = np.array([v[:] for v in null])

M = null_basis[:, self.dependent_element_indices]
assert (M.shape[0] == M.shape[1]) and (M == np.eye(M.shape[0])).all()
assert M.shape[0] == M.shape[1]
assert (np.abs(M - np.eye(M.shape[0])) < 1.0e-20).all()

return null_basis

Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ echo ""

# Quietly install optional modules after burnman
echo "Installing optional cvxpy, pycddlib, autograd and jupyter modules ..."
$PYTHON -m pip install -q cvxpy pycddlib autograd jupyter
$PYTHON -m pip install -q cvxpy pycddlib==2.1.7 autograd jupyter
echo ""

function testit {
Expand Down

0 comments on commit fb33866

Please sign in to comment.