Skip to content

Commit

Permalink
Fix readme IPython notebook (idaholab#5596)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Oct 26, 2015
1 parent 4800873 commit b3cb6b6
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions modules/phase_field/examples/anisotropic_transport/README.ipynb
Expand Up @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"metadata": {
"collapsed": true
},
Expand All @@ -32,7 +32,7 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": 2,
"metadata": {
"collapsed": false
},
Expand All @@ -43,14 +43,14 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"Rz = [[cos(a),-sin(a),0],\n",
" [sin(d),cos(d),0],\n",
" [sin(a),cos(a),0],\n",
" [0,0,0]]\n",
"\n",
"M = [[1, 0 ,0],\n",
Expand All @@ -67,26 +67,13 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"array([[ 0.505, 0.495, 0. ],\n",
" [ 0.495, 0.505, 0. ],\n",
" [ 0. , 0. , 0. ]])"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"np.dot(np.dot(Rz,M),np.transpose(Rz))"
"Mrot = np.dot(np.dot(Rz,M),np.transpose(Rz))"
]
},
{
Expand All @@ -95,6 +82,28 @@
"source": [
"The rotated tensor is then used as the ```tensor``` argument in the ```ConstantAnisotropicMobility``` material."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.505 0.495 0.0\n",
"0.495 0.505 0.0\n",
"0.0 0.0 0.0\n"
]
}
],
"source": [
"for l in [' '.join(map(str,a)) for a in Mrot]:\n",
" print l"
]
}
],
"metadata": {
Expand Down

0 comments on commit b3cb6b6

Please sign in to comment.