From c59733a4a8dcbeedd7d60e2b587a8705af848eaf Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 19 May 2020 15:44:27 -0600 Subject: [PATCH 1/3] Change weight of coefficient in heat equation --- heat/heat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heat/heat.py b/heat/heat.py index 56ab831..2574d47 100644 --- a/heat/heat.py +++ b/heat/heat.py @@ -31,7 +31,7 @@ def solve_2d(temp, spacing, out=None, alpha=1.0, time_step=1.0): >>> from heat import solve_2d >>> z0 = np.zeros((3, 3)) >>> z0[1:-1, 1:-1] = 1. - >>> solve_2d(z0, (1., 1.), alpha=.125) + >>> solve_2d(z0, (1., 1.), alpha=.25) array([[0. , 0. , 0. ], [0. , 0.5, 0. ], [0. , 0. , 0. ]]) @@ -41,7 +41,7 @@ def solve_2d(temp, spacing, out=None, alpha=1.0, time_step=1.0): np.array([[0.0, dy2, 0.0], [dx2, -2.0 * (dx2 + dy2), dx2], [0.0, dy2, 0.0]]) * alpha * time_step - / (dx2 * dy2) + / (2.0*(dx2 * dy2)) ) if out is None: From 9d21a4119b3e269063957d3d7b709cd81662414d Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 19 May 2020 16:14:29 -0600 Subject: [PATCH 2/3] Update miniconda download URL --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 35dcd63..7e6403b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,9 +41,9 @@ before_install: fi - | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > $HOME/miniconda.sh + curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > $HOME/miniconda.sh else - curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > $HOME/miniconda.sh + curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > $HOME/miniconda.sh fi - bash $HOME/miniconda.sh -b -p $HOME/anaconda - export PATH="$HOME/anaconda/bin:$PATH" From df52511591408eea6bf0fccff41c7be7ed0b14f2 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Tue, 19 May 2020 16:22:00 -0600 Subject: [PATCH 3/3] Fix after linting --- heat/heat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat/heat.py b/heat/heat.py index 2574d47..ea6ea56 100644 --- a/heat/heat.py +++ b/heat/heat.py @@ -41,7 +41,7 @@ def solve_2d(temp, spacing, out=None, alpha=1.0, time_step=1.0): np.array([[0.0, dy2, 0.0], [dx2, -2.0 * (dx2 + dy2), dx2], [0.0, dy2, 0.0]]) * alpha * time_step - / (2.0*(dx2 * dy2)) + / (2.0 * (dx2 * dy2)) ) if out is None: