Skip to content

Commit

Permalink
Tutorial-Finite_Difference_Derivatives-FDtable_soln.ipynb: Default to…
Browse files Browse the repository at this point in the history
… 10th-order accuracy so that columns do not exceed mybinder default width
  • Loading branch information
zachetienne committed Sep 10, 2018
1 parent 88647cd commit 7a692f5
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions Tutorial-Finite_Difference_Derivatives-FDtable_soln.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Creating the Finite-Difference Table for Centered First and Second Derivatives, from 2nd through 12th-Order Accuracy\n",
"# Creating the Finite-Difference Table for Centered First and Second Derivatives, from 2nd through 10th-Order Accuracy\n",
"\n",
"## *Courtesy Brandon Clark*"
]
Expand All @@ -18,20 +18,18 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Derivative Accuracy -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 \n",
"---------- -------- -------- ------- ------- ------ ------ ---- ---------- ---- ------ ------ ------- ------ --------\n",
" 1st 2 -1/2 1/2 \n",
" 1st 4 1/12 -2/3 2/3 -1/12 \n",
" 1st 6 -1/60 3/20 -3/4 3/4 -3/20 1/60 \n",
" 1st 8 1/280 -4/105 1/5 -4/5 4/5 -1/5 4/105 -1/280 \n",
" 1st 10 -1/1260 5/504 -5/84 5/21 -5/6 5/6 -5/21 5/84 -5/504 1/1260 \n",
" 1st 12 1/5544 -1/385 1/56 -5/63 15/56 -6/7 6/7 -15/56 5/63 -1/56 1/385 -1/5544\n",
" 2nd 2 1 -2 1 \n",
" 2nd 4 -1/12 4/3 -5/2 4/3 -1/12 \n",
" 2nd 6 1/90 -3/20 3/2 -49/18 3/2 -3/20 1/90 \n",
" 2nd 8 -1/560 8/315 -1/5 8/5 -205/72 8/5 -1/5 8/315 -1/560 \n",
" 2nd 10 1/3150 -5/1008 5/126 -5/21 5/3 -5269/1800 5/3 -5/21 5/126 -5/1008 1/3150 \n",
" 2nd 12 -1/16632 2/1925 -1/112 10/189 -15/56 12/7 -5369/1800 12/7 -15/56 10/189 -1/112 2/1925 -1/16632\n"
"Derivative Accuracy -5 -4 -3 -2 -1 0 1 2 3 4 5 \n",
"---------- -------- ------- ------- ------ ----- ---- ---------- --- ----- ----- ------- ------\n",
" 1st 2 -1/2 1/2 \n",
" 1st 4 1/12 -2/3 2/3 -1/12 \n",
" 1st 6 -1/60 3/20 -3/4 3/4 -3/20 1/60 \n",
" 1st 8 1/280 -4/105 1/5 -4/5 4/5 -1/5 4/105 -1/280 \n",
" 1st 10 -1/1260 5/504 -5/84 5/21 -5/6 5/6 -5/21 5/84 -5/504 1/1260\n",
" 2nd 2 1 -2 1 \n",
" 2nd 4 -1/12 4/3 -5/2 4/3 -1/12 \n",
" 2nd 6 1/90 -3/20 3/2 -49/18 3/2 -3/20 1/90 \n",
" 2nd 8 -1/560 8/315 -1/5 8/5 -205/72 8/5 -1/5 8/315 -1/560 \n",
" 2nd 10 1/3150 -5/1008 5/126 -5/21 5/3 -5269/1800 5/3 -5/21 5/126 -5/1008 1/3150\n"
]
}
],
Expand All @@ -42,7 +40,7 @@
"from astropy.table import Table\n",
"\n",
"# Step 1: Set the maximum finite-difference accuracy order computed in the table\n",
"max_fdorder = 12\n",
"max_fdorder = 10\n",
"\n",
"# Step 2: Set up table parameters\n",
"# One column for deriv order, one for deriv accuracy, and max_fdorder+1\n",
Expand Down

0 comments on commit 7a692f5

Please sign in to comment.