Skip to content

Commit 46e5221

Browse files
authored
Change weight of coefficient in heat equation (#11)
* Change weight of coefficient in heat equation * Update miniconda download URL * Fix after linting
1 parent 2bcb965 commit 46e5221

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ before_install:
4141
fi
4242
- |
4343
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
44-
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > $HOME/miniconda.sh
44+
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > $HOME/miniconda.sh
4545
else
46-
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > $HOME/miniconda.sh
46+
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > $HOME/miniconda.sh
4747
fi
4848
- bash $HOME/miniconda.sh -b -p $HOME/anaconda
4949
- export PATH="$HOME/anaconda/bin:$PATH"

heat/heat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def solve_2d(temp, spacing, out=None, alpha=1.0, time_step=1.0):
3131
>>> from heat import solve_2d
3232
>>> z0 = np.zeros((3, 3))
3333
>>> z0[1:-1, 1:-1] = 1.
34-
>>> solve_2d(z0, (1., 1.), alpha=.125)
34+
>>> solve_2d(z0, (1., 1.), alpha=.25)
3535
array([[0. , 0. , 0. ],
3636
[0. , 0.5, 0. ],
3737
[0. , 0. , 0. ]])
@@ -41,7 +41,7 @@ def solve_2d(temp, spacing, out=None, alpha=1.0, time_step=1.0):
4141
np.array([[0.0, dy2, 0.0], [dx2, -2.0 * (dx2 + dy2), dx2], [0.0, dy2, 0.0]])
4242
* alpha
4343
* time_step
44-
/ (dx2 * dy2)
44+
/ (2.0 * (dx2 * dy2))
4545
)
4646

4747
if out is None:

0 commit comments

Comments
 (0)