diff --git a/notebooks/2015-06-25-elasticity-solver-example.ipynb b/notebooks/2015-06-25-elasticity-solver-example.ipynb
index 57f2e11..c4b82ae 100644
--- a/notebooks/2015-06-25-elasticity-solver-example.ipynb
+++ b/notebooks/2015-06-25-elasticity-solver-example.ipynb
@@ -50,27 +50,6 @@
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
- " in int32 at deprecated.jl:49\n",
- " in recv at /Users/jukka/.julia/v0.4/ZMQ/src/ZMQ.jl:617\n",
- " in recv_ipython at /Users/jukka/.julia/v0.4/IJulia/src/msg.jl:63\n",
- " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:120\n",
- " in anonymous at task.jl:365\n",
- "while loading /Users/jukka/.julia/v0.4/IJulia/src/kernel.jl, in expression starting on line 35\n",
- "WARNING: int32(x) is deprecated, use Int32(x) instead.\n",
- " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
- " in int32 at deprecated.jl:49\n",
- " in recv at /Users/jukka/.julia/v0.4/ZMQ/src/ZMQ.jl:617\n",
- " in recv_ipython at /Users/jukka/.julia/v0.4/IJulia/src/msg.jl:63\n",
- " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:120\n",
- " in anonymous at task.jl:365\n",
- "while loading /Users/jukka/.julia/v0.4/IJulia/src/kernel.jl, in expression starting on line 35\n"
- ]
}
],
"source": [
@@ -94,7 +73,7 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 18,
"metadata": {
"collapsed": false
},
@@ -105,7 +84,7 @@
"calc_local_matrices! (generic function with 1 method)"
]
},
- "execution_count": 2,
+ "execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@@ -225,7 +204,7 @@
" Jacobian = ForwardDiff.forwarddiff_jacobian(R!, Float64, fadtype=:dual, n=dim*nnodes, m=dim*nnodes)\n",
"\n",
" K[:, :] = Jacobian(reshape(u, dim*nnodes))\n",
- " R!(reshape(u, 8), reshape(R, dim*nnodes))\n",
+ " R!(reshape(u, dim*nnodes), reshape(R, dim*nnodes))\n",
"\n",
"end"
]
@@ -239,7 +218,7 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 16,
"metadata": {
"collapsed": true
},
@@ -250,18 +229,12 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 19,
"metadata": {
- "collapsed": false
+ "collapsed": false,
+ "scrolled": false
},
"outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "WARNING: the `=>` syntax is deprecated, use `-->` instead\n"
- ]
- },
{
"name": "stdout",
"output_type": "stream",
@@ -273,23 +246,39 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "11-Aug 00:20:24:DEBUG:root:Converged in 6 iterations.\n",
- "11-Aug 00:20:25:DEBUG:root:solution vector: \n",
+ "11-Aug 21:42:03:DEBUG:root:Converged in 6 iterations.\n",
+ "11-Aug 21:42:03:DEBUG:root:solution vector: \n",
" [0.0 -0.3991450609547433 -0.07228582695592461 0.0\n",
" 0.0 -2.1779892317073504 -2.222244754401764 0.0]\n",
- "11-Aug 00:20:25:DEBUG:root:norm of u: 3.1292483947150047\n",
- "11-Aug 00:20:25:DEBUG:root:Converged in 6 iterations.\n",
- "11-Aug 00:20:25:DEBUG:root:solution vector: \n",
+ "11-Aug 21:42:03:DEBUG:root:norm of u: 3.1292483947150047\n",
+ "11-Aug 21:42:03:DEBUG:root:Converged in 6 iterations.\n",
+ "11-Aug 21:42:03:DEBUG:root:solution vector: \n",
" [0.0 0.7433248532717796 1.048521014723486 0.0\n",
" 0.0 -2.085766534304891 -1.9606633242166027 0.0]\n",
- "11-Aug 00:20:25:DEBUG:root:norm of u: 3.1292483947150056\n"
+ "11-Aug 21:42:03:DEBUG:root:norm of u: 3.1292483947150056\n",
+ "11-Aug 21:42:03:DEBUG:root:Iteration 1\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
- "2 facts verified.\n"
+ "Array(Float64,(12,12)) 12x12 Array{Float64,2}"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "11-Aug 21:42:04:DEBUG:root:Norm of du: 0.5992228342549063\n",
+ "11-Aug 21:42:04:DEBUG:root:Element displacement: [0.0 -0.02264423092574128 0.022536491965822688 0.0\n",
+ " 0.0 -0.12688379170176511 -0.12679760053383046 0.0]\n",
+ "11-Aug 21:42:04:DEBUG:root:Element displacement: [-0.02264423092574128 -0.029998807330416523 0.030242156525002267 0.022536491965822688\n",
+ " -0.12688379170176511 -0.4041002710283739 -0.40446733271991214 -0.12679760053383046]\n",
+ "11-Aug 21:42:04:DEBUG:root:solution vector: \n",
+ " [-0.02264423092574128 -0.029998807330416523 0.022536491965822688 0.030242156525002267 0.0 0.0\n",
+ " -0.12688379170176511 -0.4041002710283739 -0.12679760053383046 -0.40446733271991214 0.0 0.0]\n",
+ "11-Aug 21:42:04:DEBUG:root:norm of u: 0.5992228342549063\n"
]
},
{
@@ -298,9 +287,34 @@
"delayed_handler (generic function with 4 methods)"
]
},
- "execution_count": 4,
+ "execution_count": 19,
"metadata": {},
"output_type": "execute_result"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ ":\n",
+ " 132.8 0.0 23.6 -3.0 -113.6 0.0 -33.2 -15.0 23.6 3.0 -33.2 15.0\n",
+ " 0.0 324.8 3.0 77.6 0.0 -317.6 -15.0 -81.2 -3.0 77.6 15.0 -81.2\n",
+ " 23.6 3.0 66.4 -15.0 -33.2 15.0 -56.8 -3.0 0.0 0.0 0.0 0.0\n",
+ " -3.0 77.6 -15.0 162.4 15.0 -81.2 3.0 -158.8 0.0 0.0 0.0 0.0\n",
+ " -113.6 0.0 -33.2 15.0 132.8 0.0 23.6 3.0 -33.2 -15.0 23.6 -3.0\n",
+ " 0.0 -317.6 15.0 -81.2 0.0 324.8 -3.0 77.6 -15.0 -81.2 3.0 77.6\n",
+ " -33.2 -15.0 -56.8 3.0 23.6 -3.0 66.4 15.0 0.0 0.0 0.0 0.0\n",
+ " -15.0 -81.2 -3.0 -158.8 3.0 77.6 15.0 162.4 0.0 0.0 0.0 0.0\n",
+ " 23.6 -3.0 0.0 0.0 -33.2 -15.0 0.0 0.0 66.4 15.0 -56.8 3.0\n",
+ " 3.0 77.6 0.0 0.0 -15.0 -81.2 0.0 0.0 15.0 162.4 -3.0 -158.8\n",
+ " -33.2 15.0 0.0 0.0 23.6 3.0 0.0 0.0 -56.8 -3.0 66.4 -15.0\n",
+ " 15.0 -81.2 0.0 0.0 -3.0 77.6 0.0 0.0 3.0 -158.8 -15.0 162.4\n",
+ "K norm = 708.0378644377365\n",
+ "du = [-0.02264423092574128 -0.029998807330416523 0.022536491965822688 0.030242156525002267 0.0 0.0\n",
+ " -0.12688379170176511 -0.4041002710283739 -0.12679760053383046 -0.40446733271991214 0.0 0.0]\n",
+ "Out of 3 total facts:\n",
+ " Verified: 2\n",
+ " Pending: 1\n"
+ ]
}
],
"source": [
@@ -347,7 +361,7 @@
"\n",
" # Tested against Elmer solution\n",
" Logging.debug(\"solution vector: \\n $u\")\n",
- " @fact u[2, 3] => roughly(-2.222244754401764)\n",
+ " @fact u[2, 3] --> roughly(-2.222244754401764)\n",
" norm1 = norm(u)\n",
" Logging.debug(\"norm of u: $(norm(u))\")\n",
"\n",
@@ -370,7 +384,49 @@
" end\n",
" Logging.debug(\"solution vector: \\n $u\")\n",
" Logging.debug(\"norm of u: $(norm(u))\")\n",
- " @fact norm(u) => roughly(norm1) \n",
+ " @fact norm(u) --> roughly(norm1) \n",
+ "\n",
+ " # test two element model\n",
+ " X = [0.0 0.0; 5.0 0.0; 5.0 1.0; 0.0 1.0]'\n",
+ " u = zeros(2, 6)\n",
+ " du = zeros(2, 6)\n",
+ " R = zeros(2, 4)\n",
+ " K = zeros(8, 8)\n",
+ " ass1 = [9, 10, 1, 2, 5, 6, 11, 12]\n",
+ " ass2 = [1, 2, 3, 4, 7, 8, 5, 6]\n",
+ " free_dofs = collect(1:8)\n",
+ " F = [0 0; 0 0; 0 0; 0 -0.1; 0 0; 0 0]'\n",
+ "\n",
+ " A = zeros(12, 12)\n",
+ " b = zeros(2, 6)\n",
+ " for i=1:1\n",
+ " Logging.debug(\"Iteration $i\")\n",
+ " A[:,:] = 0.0\n",
+ " b[:] = 0.0\n",
+ " #Logging.debug(\"Assembling\")\n",
+ " for ass in (ass1, ass2)\n",
+ " #Logging.debug(\"ass = $ass, u[ass] = $(u[ass])\")\n",
+ " calc_local_matrices!(X, u[ass], R, K, basis, dbasis, la, mu, ipoints, iweights)\n",
+ " A[ass,ass] += K\n",
+ " b[ass] += R[:]\n",
+ " end\n",
+ " dump(round(A, 2))\n",
+ " println(\"K norm = $(norm(A[free_dofs, free_dofs]))\")\n",
+ " du[free_dofs] = A[free_dofs, free_dofs] \\ -(b - F)[free_dofs]\n",
+ " println(\"du = $du\")\n",
+ " u += du\n",
+ " Logging.debug(\"Norm of du: $(norm(du))\")\n",
+ " for ass in (ass1, ass2)\n",
+ " Logging.debug(\"Element displacement: $(reshape(u[ass], 2, 4))\")\n",
+ " end\n",
+ " if norm(du) < 1.0e-9\n",
+ " Logging.debug(\"Converged in $i iterations.\")\n",
+ " break\n",
+ " end\n",
+ " end\n",
+ " Logging.debug(\"solution vector: \\n $u\")\n",
+ " Logging.debug(\"norm of u: $(norm(u))\")\n",
+ " @pending norm(u) --> :something\n",
"end"
]
},
@@ -558,7 +614,7 @@
" K = el.attributes[\"displacement tangent stiffness\"]\n",
"\n",
" gdofs = ass.gdofs[el.id]\n",
- " Logging.debug(\"Assemble element to gdofs $gdofs\")\n",
+ " #Logging.debug(\"Assemble element $(el.id) to gdofs $gdofs\")\n",
" basis, dbasis = get_shape_functions(el)\n",
" ipoints, iweights = get_integration_scheme(el, io)\n",
" calc_local_matrices!(X, u, R, K, basis, dbasis, la, mu, ipoints, iweights)\n",
@@ -594,6 +650,13 @@
"collapsed": false
},
"outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "WARNING: the `=>` syntax is deprecated, use `-->` instead\n"
+ ]
+ },
{
"name": "stdout",
"output_type": "stream",
@@ -605,34 +668,28 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "11-Aug 00:20:40:DEBUG:root:Adding nodes to array\n",
- "11-Aug 00:20:40:DEBUG:root:Creating elements\n",
- "11-Aug 00:20:40:DEBUG:root:Starting iteration 1\n",
- "11-Aug 00:20:40:DEBUG:root:Assembling\n",
- "11-Aug 00:20:40:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:41:DEBUG:root:Solution norm = 3.090022136728999\n",
- "11-Aug 00:20:41:DEBUG:root:Starting iteration 2\n",
- "11-Aug 00:20:41:DEBUG:root:Assembling\n",
- "11-Aug 00:20:41:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:41:DEBUG:root:Solution norm = 0.32121316021535135\n",
- "11-Aug 00:20:41:DEBUG:root:Starting iteration 3\n",
- "11-Aug 00:20:41:DEBUG:root:Assembling\n",
- "11-Aug 00:20:41:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:41:DEBUG:root:Solution norm = 0.040431781939994194\n",
- "11-Aug 00:20:41:DEBUG:root:Starting iteration 4\n",
- "11-Aug 00:20:41:DEBUG:root:Assembling\n",
- "11-Aug 00:20:41:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:41:DEBUG:root:Solution norm = 0.0009291101052124042\n",
- "11-Aug 00:20:41:DEBUG:root:Starting iteration 5\n",
- "11-Aug 00:20:41:DEBUG:root:Assembling\n",
- "11-Aug 00:20:41:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:41:DEBUG:root:Solution norm = 1.5638899022213175e-7\n",
- "11-Aug 00:20:41:DEBUG:root:Starting iteration 6\n",
- "11-Aug 00:20:41:DEBUG:root:Assembling\n",
- "11-Aug 00:20:41:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:41:DEBUG:root:Solution norm = 1.0118539067290854e-14\n",
- "11-Aug 00:20:41:DEBUG:root:Converged in 6 iterations.\n",
- "11-Aug 00:20:41:DEBUG:root:Displacement of element = \n",
+ "11-Aug 21:39:42:DEBUG:root:Adding nodes to array\n",
+ "11-Aug 21:39:42:DEBUG:root:Creating elements\n",
+ "11-Aug 21:39:42:DEBUG:root:Starting iteration 1\n",
+ "11-Aug 21:39:42:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:42:DEBUG:root:Solution norm = 3.090022136728999\n",
+ "11-Aug 21:39:42:DEBUG:root:Starting iteration 2\n",
+ "11-Aug 21:39:42:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:43:DEBUG:root:Solution norm = 0.32121316021535135\n",
+ "11-Aug 21:39:43:DEBUG:root:Starting iteration 3\n",
+ "11-Aug 21:39:43:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:43:DEBUG:root:Solution norm = 0.040431781939994194\n",
+ "11-Aug 21:39:43:DEBUG:root:Starting iteration 4\n",
+ "11-Aug 21:39:43:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:43:DEBUG:root:Solution norm = 0.0009291101052124042\n",
+ "11-Aug 21:39:43:DEBUG:root:Starting iteration 5\n",
+ "11-Aug 21:39:43:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:43:DEBUG:root:Solution norm = 1.5638899022213175e-7\n",
+ "11-Aug 21:39:43:DEBUG:root:Starting iteration 6\n",
+ "11-Aug 21:39:43:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:43:DEBUG:root:Solution norm = 1.0118539067290854e-14\n",
+ "11-Aug 21:39:43:DEBUG:root:Converged in 6 iterations.\n",
+ "11-Aug 21:39:43:DEBUG:root:Displacement of element = \n",
"[-0.39914506095474334 -0.0722858269559246 0.0 0.0\n",
" -2.1779892317073504 -2.2222447544017645 0.0 0.0]\n"
]
@@ -749,423 +806,6 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "solve one element problem\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:47:DEBUG:root:Creating nodes\n",
- "11-Aug 00:20:47:DEBUG:root:Creating elements\n",
- "11-Aug 00:20:47:INFO:root:create_ldof2gdofmap: dofs per node: 2\n",
- "11-Aug 00:20:47:DEBUG:root:Dict(4=>[7,8],2=>[3,4],3=>[5,6],1=>[1,2])\n",
- "11-Aug 00:20:48:INFO:root:solve!: dofs per node: 2\n",
- "11-Aug 00:20:48:DEBUG:root:Problem size = 8\n",
- "11-Aug 00:20:48:DEBUG:root:Starting iteration 1\n",
- "11-Aug 00:20:48:DEBUG:root:Assembling\n",
- "11-Aug 00:20:48:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:49:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:49:DEBUG:root:dof 5 => 0.0\n",
- "11-Aug 00:20:49:DEBUG:root:dof 6 => 0.0\n",
- "11-Aug 00:20:49:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:49:DEBUG:root:dof 8 => 0.0\n",
- "11-Aug 00:20:49:DEBUG:root:Added 4 Lagrange multipliers to model\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " 123.2 -15.0 -118.4 -3.0 -61.6 15.0 56.8 3.0\n",
- " -15.0 321.2 3.0 -319.4 15.0 -160.6 -3.0 158.8\n",
- " -118.4 3.0 123.2 15.0 56.8 -3.0 -61.6 -15.0\n",
- " -3.0 -319.4 15.0 321.2 3.0 158.8 -15.0 -160.6\n",
- " -61.6 15.0 56.8 3.0 123.2 -15.0 -118.4 -3.0\n",
- " 15.0 -160.6 -3.0 158.8 -15.0 321.2 3.0 -319.4\n",
- " 56.8 -3.0 -61.6 -15.0 -118.4 3.0 123.2 15.0\n",
- " 3.0 158.8 -15.0 -160.6 -3.0 -319.4 15.0 321.2\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:49:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:49:DEBUG:root:Solving system of equations. Total size = 12\n",
- "11-Aug 00:20:49:DEBUG:root:nothing\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n",
- " 123.2 -15.0 -118.4 -3.0 -61.6 15.0 56.8 3.0 0.0 0.0 0.0 0.0\n",
- " -15.0 321.2 3.0 -319.4 15.0 -160.6 -3.0 158.8 0.0 0.0 0.0 0.0\n",
- " -118.4 3.0 123.2 15.0 56.8 -3.0 -61.6 -15.0 0.0 0.0 0.0 0.0\n",
- " -3.0 -319.4 15.0 321.2 3.0 158.8 -15.0 -160.6 0.0 0.0 0.0 0.0\n",
- " -61.6 15.0 56.8 3.0 123.2 -15.0 -118.4 -3.0 1.0 0.0 0.0 0.0\n",
- " 15.0 -160.6 -3.0 158.8 -15.0 321.2 3.0 -319.4 0.0 1.0 0.0 0.0\n",
- " 56.8 -3.0 -61.6 -15.0 -118.4 3.0 123.2 15.0 0.0 0.0 1.0 0.0\n",
- " 3.0 158.8 -15.0 -160.6 -3.0 -319.4 15.0 321.2 0.0 0.0 0.0 1.0\n",
- " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,12)) 1x12 Array{Float64,2}"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:49:DEBUG:root:nothing\n",
- "11-Aug 00:20:49:DEBUG:root:Solution norm = 3.0900221367289444\n",
- "11-Aug 00:20:49:DEBUG:root:Starting iteration 2\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- ":\n",
- " 0.0 0.0 0.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:49:DEBUG:root:Assembling\n",
- "11-Aug 00:20:49:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:49:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:49:DEBUG:root:dof 5 => 0.0\n",
- "11-Aug 00:20:49:DEBUG:root:dof 6 => 0.0\n",
- "11-Aug 00:20:49:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:49:DEBUG:root:dof 8 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 147.61 36.88 -149.16 -55.03 -66.97 1.91 68.52 16.24\n",
- " 36.88 343.08 -48.76 -334.42 1.81 -174.07 10.06 165.4 \n",
- " -149.16 -48.76 160.72 65.4 63.17 10.41 -74.73 -27.06\n",
- " -55.03 -334.42 65.4 330.06 16.65 163.39 -27.02 -159.04\n",
- " -66.97 1.81 63.17 16.65 128.11 -15.44 -124.3 -3.03\n",
- " 1.91 -174.07 10.41 163.39 -15.44 338.21 3.11 -327.53\n",
- " 68.52 10.06 -74.73 -27.02 -124.3 3.11 130.51 13.85\n",
- " 16.24 165.4 -27.06 -159.04 -3.03 -327.53 13.85 321.16\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:49:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:49:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:49:DEBUG:root:Solving system of equations. Total size = 12\n",
- "11-Aug 00:20:49:DEBUG:root:nothing\n",
- "11-Aug 00:20:49:DEBUG:root:nothing\n",
- "11-Aug 00:20:49:DEBUG:root:Solution norm = 0.3212131602153477\n",
- "11-Aug 00:20:49:DEBUG:root:Starting iteration 3\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n",
- " 147.6 36.9 -149.2 -55.0 -67.0 1.9 68.5 16.2 0.0 0.0 0.0 0.0\n",
- " 36.9 343.1 -48.8 -334.4 1.8 -174.1 10.1 165.4 0.0 0.0 0.0 0.0\n",
- " -149.2 -48.8 160.7 65.4 63.2 10.4 -74.7 -27.1 0.0 0.0 0.0 0.0\n",
- " -55.0 -334.4 65.4 330.1 16.7 163.4 -27.0 -159.0 0.0 0.0 0.0 0.0\n",
- " -67.0 1.8 63.2 16.7 128.1 -15.4 -124.3 -3.0 1.0 0.0 0.0 0.0\n",
- " 1.9 -174.1 10.4 163.4 -15.4 338.2 3.1 -327.5 0.0 1.0 0.0 0.0\n",
- " 68.5 10.1 -74.7 -27.0 -124.3 3.1 130.5 13.8 0.0 0.0 1.0 0.0\n",
- " 16.2 165.4 -27.1 -159.0 -3.0 -327.5 13.8 321.2 0.0 0.0 0.0 1.0\n",
- " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n",
- " -2.3 -15.7 5.0 15.2 -20.2 12.2 17.5 -9.6 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:49:DEBUG:root:Assembling\n",
- "11-Aug 00:20:49:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:50:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:50:DEBUG:root:dof 5 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 6 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 8 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 131.01 35.45 -132.72 -52.73 -60.29 1.77 62.0 15.51\n",
- " 35.45 313.79 -46.75 -305.49 1.71 -163.9 9.58 155.6 \n",
- " -132.72 -46.75 143.74 62.55 56.75 10.12 -67.77 -25.93\n",
- " -52.73 -305.49 62.55 301.12 16.11 153.51 -25.93 -149.13\n",
- " -60.29 1.71 56.75 16.11 117.72 -14.75 -114.18 -3.07\n",
- " 1.77 -163.9 10.12 153.51 -14.75 327.07 2.86 -316.69\n",
- " 62.0 9.58 -67.77 -25.93 -114.18 2.86 119.94 13.49\n",
- " 15.51 155.6 -25.93 -149.13 -3.07 -316.69 13.49 310.22\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:50:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:50:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:50:DEBUG:root:Solving system of equations. Total size = 12\n",
- "11-Aug 00:20:50:DEBUG:root:nothing\n",
- "11-Aug 00:20:50:DEBUG:root:nothing\n",
- "11-Aug 00:20:50:DEBUG:root:Solution norm = 0.04043178194000972\n",
- "11-Aug 00:20:50:DEBUG:root:Starting iteration 4\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n",
- " 131.0 35.4 -132.7 -52.7 -60.3 1.8 62.0 15.5 0.0 0.0 0.0 0.0\n",
- " 35.4 313.8 -46.7 -305.5 1.7 -163.9 9.6 155.6 0.0 0.0 0.0 0.0\n",
- " -132.7 -46.7 143.7 62.6 56.7 10.1 -67.8 -25.9 0.0 0.0 0.0 0.0\n",
- " -52.7 -305.5 62.6 301.1 16.1 153.5 -25.9 -149.1 0.0 0.0 0.0 0.0\n",
- " -60.3 1.7 56.7 16.1 117.7 -14.8 -114.2 -3.1 1.0 0.0 0.0 0.0\n",
- " 1.8 -163.9 10.1 153.5 -14.8 327.1 2.9 -316.7 0.0 1.0 0.0 0.0\n",
- " 62.0 9.6 -67.8 -25.9 -114.2 2.9 119.9 13.5 0.0 0.0 1.0 0.0\n",
- " 15.5 155.6 -25.9 -149.1 -3.1 -316.7 13.5 310.2 0.0 0.0 0.0 1.0\n",
- " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n",
- " -0.0 -0.6 0.1 0.6 -19.7 3.2 19.6 -1.1 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:50:DEBUG:root:Assembling\n",
- "11-Aug 00:20:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:50:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:50:DEBUG:root:dof 5 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 6 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 8 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 130.66 36.04 -132.46 -53.26 -60.05 1.58 61.86 15.64\n",
- " 36.04 312.24 -47.29 -303.89 1.52 -163.43 9.73 155.09\n",
- " -132.46 -47.29 143.55 63.02 56.54 10.29 -67.63 -26.02\n",
- " -53.26 -303.89 63.02 299.46 16.27 152.96 -26.02 -148.53\n",
- " -60.05 1.52 56.54 16.27 117.21 -14.68 -113.7 -3.11\n",
- " 1.58 -163.43 10.29 152.96 -14.68 326.61 2.81 -316.14\n",
- " 61.86 9.73 -67.63 -26.02 -113.7 2.81 119.47 13.49\n",
- " 15.64 155.09 -26.02 -148.53 -3.11 -316.14 13.49 309.58\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:50:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:50:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:50:DEBUG:root:Solving system of equations. Total size = 12\n",
- "11-Aug 00:20:50:DEBUG:root:nothing\n",
- "11-Aug 00:20:50:DEBUG:root:nothing\n",
- "11-Aug 00:20:50:DEBUG:root:Solution norm = 0.0009291101052125497\n",
- "11-Aug 00:20:50:DEBUG:root:Starting iteration 5\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n",
- " 130.7 36.0 -132.5 -53.3 -60.1 1.6 61.9 15.6 0.0 0.0 0.0 0.0\n",
- " 36.0 312.2 -47.3 -303.9 1.5 -163.4 9.7 155.1 0.0 0.0 0.0 0.0\n",
- " -132.5 -47.3 143.5 63.0 56.5 10.3 -67.6 -26.0 0.0 0.0 0.0 0.0\n",
- " -53.3 -303.9 63.0 299.5 16.3 153.0 -26.0 -148.5 0.0 0.0 0.0 0.0\n",
- " -60.1 1.5 56.5 16.3 117.2 -14.7 -113.7 -3.1 1.0 0.0 0.0 0.0\n",
- " 1.6 -163.4 10.3 153.0 -14.7 326.6 2.8 -316.1 0.0 1.0 0.0 0.0\n",
- " 61.9 9.7 -67.6 -26.0 -113.7 2.8 119.5 13.5 0.0 0.0 1.0 0.0\n",
- " 15.6 155.1 -26.0 -148.5 -3.1 -316.1 13.5 309.6 0.0 0.0 0.0 1.0\n",
- " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n",
- " 0.0 -0.0 -0.0 0.0 -19.9 2.8 19.9 -0.8 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:50:DEBUG:root:Assembling\n",
- "11-Aug 00:20:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n",
- "11-Aug 00:20:50:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:50:DEBUG:root:dof 5 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 6 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 8 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:Added 4 Lagrange multipliers to model\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 130.66 36.06 -132.47 -53.28 -60.05 1.57 61.86 15.64\n",
- " 36.06 312.22 -47.3 -303.88 1.51 -163.43 9.73 155.08\n",
- " -132.47 -47.3 143.56 63.03 56.54 10.29 -67.63 -26.02\n",
- " -53.28 -303.88 63.03 299.44 16.27 152.96 -26.02 -148.52\n",
- " -60.05 1.51 56.54 16.27 117.21 -14.67 -113.69 -3.11\n",
- " 1.57 -163.43 10.29 152.96 -14.67 326.61 2.81 -316.14\n",
- " 61.86 9.73 -67.63 -26.02 -113.69 2.81 119.46 13.49\n",
- " 15.64 155.08 -26.02 -148.52 -3.11 -316.14 13.49 309.58\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:50:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:50:DEBUG:root:Solving system of equations. Total size = 12\n",
- "11-Aug 00:20:50:DEBUG:root:nothing\n",
- "11-Aug 00:20:50:DEBUG:root:nothing\n",
- "11-Aug 00:20:50:DEBUG:root:Solution norm = 1.5638898939617795e-7\n",
- "11-Aug 00:20:50:DEBUG:root:Starting iteration 6\n",
- "11-Aug 00:20:50:DEBUG:root:Assembling\n",
- "11-Aug 00:20:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n",
- " 130.7 36.1 -132.5 -53.3 -60.1 1.6 61.9 15.6 0.0 0.0 0.0 0.0\n",
- " 36.1 312.2 -47.3 -303.9 1.5 -163.4 9.7 155.1 0.0 0.0 0.0 0.0\n",
- " -132.5 -47.3 143.6 63.0 56.5 10.3 -67.6 -26.0 0.0 0.0 0.0 0.0\n",
- " -53.3 -303.9 63.0 299.4 16.3 153.0 -26.0 -148.5 0.0 0.0 0.0 0.0\n",
- " -60.1 1.5 56.5 16.3 117.2 -14.7 -113.7 -3.1 1.0 0.0 0.0 0.0\n",
- " 1.6 -163.4 10.3 153.0 -14.7 326.6 2.8 -316.1 0.0 1.0 0.0 0.0\n",
- " 61.9 9.7 -67.6 -26.0 -113.7 2.8 119.5 13.5 0.0 0.0 1.0 0.0\n",
- " 15.6 155.1 -26.0 -148.5 -3.1 -316.1 13.5 309.6 0.0 0.0 0.0 1.0\n",
- " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n",
- " 0.0 -0.0 0.0 0.0 -19.9 2.8 19.9 -0.8 0.0 0.0 0.0 0.0\n",
- "Element stiffness matrix"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:50:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:50:DEBUG:root:dof 5 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 6 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:dof 8 => 0.0\n",
- "11-Aug 00:20:50:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:50:DEBUG:root:Adding Neumann boundary conditions\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 130.66 36.06 -132.47 -53.28 -60.05 1.57 61.86 15.64\n",
- " 36.06 312.22 -47.3 -303.88 1.51 -163.43 9.73 155.08\n",
- " -132.47 -47.3 143.56 63.03 56.54 10.29 -67.63 -26.02\n",
- " -53.28 -303.88 63.03 299.44 16.27 152.96 -26.02 -148.52\n",
- " -60.05 1.51 56.54 16.27 117.21 -14.67 -113.69 -3.11\n",
- " 1.57 -163.43 10.29 152.96 -14.67 326.61 2.81 -316.14\n",
- " 61.86 9.73 -67.63 -26.02 -113.69 2.81 119.46 13.49\n",
- " 15.64 155.08 -26.02 -148.52 -3.11 -316.14 13.49 309.58\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:50:DEBUG:root:Solving system of equations. Total size = 12\n",
- "11-Aug 00:20:50:DEBUG:root:nothing\n",
- "11-Aug 00:20:50:DEBUG:root:nothing\n",
- "11-Aug 00:20:50:DEBUG:root:Solution norm = 1.0991584038546891e-14\n",
- "11-Aug 00:20:50:DEBUG:root:Converged in 6 iterations.\n",
- "11-Aug 00:20:51:DEBUG:root:Displacement of element = \n",
- "[-0.39914506095474345 -0.07228582695592463 0.0 0.0\n",
- " -2.1779892317073504 -2.2222447544017645 0.0 0.0]\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n",
- " 130.7 36.1 -132.5 -53.3 -60.1 1.6 61.9 15.6 0.0 0.0 0.0 0.0\n",
- " 36.1 312.2 -47.3 -303.9 1.5 -163.4 9.7 155.1 0.0 0.0 0.0 0.0\n",
- " -132.5 -47.3 143.6 63.0 56.5 10.3 -67.6 -26.0 0.0 0.0 0.0 0.0\n",
- " -53.3 -303.9 63.0 299.4 16.3 153.0 -26.0 -148.5 0.0 0.0 0.0 0.0\n",
- " -60.1 1.5 56.5 16.3 117.2 -14.7 -113.7 -3.1 1.0 0.0 0.0 0.0\n",
- " 1.6 -163.4 10.3 153.0 -14.7 326.6 2.8 -316.1 0.0 1.0 0.0 0.0\n",
- " 61.9 9.7 -67.6 -26.0 -113.7 2.8 119.5 13.5 0.0 0.0 1.0 0.0\n",
- " 15.6 155.1 -26.0 -148.5 -3.1 -316.1 13.5 309.6 0.0 0.0 0.0 1.0\n",
- " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n",
- " 0.0 0.0 -0.0 -0.0 -19.9 2.8 19.9 -0.8 0.0 0.0 0.0 0.0\n",
- "1 fact verified.\n",
"solve two element problem\n"
]
},
@@ -1173,571 +813,57 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "11-Aug 00:20:51:DEBUG:root:Creating elements\n",
- "11-Aug 00:20:51:INFO:root:create_ldof2gdofmap: dofs per node: 2\n",
- "11-Aug 00:20:51:DEBUG:root:Dict(4=>[7,8],2=>[3,4],3=>[5,6],5=>[9,10],6=>[11,12],1=>[1,2])\n",
- "11-Aug 00:20:51:INFO:root:solve!: dofs per node: 2\n",
- "11-Aug 00:20:51:DEBUG:root:Problem size = 12\n",
- "11-Aug 00:20:51:DEBUG:root:Starting iteration 1\n",
- "11-Aug 00:20:51:DEBUG:root:Assembling\n",
- "11-Aug 00:20:51:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n"
+ "11-Aug 21:39:49:DEBUG:root:Creating elements\n",
+ "11-Aug 21:39:49:INFO:root:create_ldof2gdofmap: dofs per node: 2\n",
+ "11-Aug 21:39:49:DEBUG:root:Dict(4=>[7,8],2=>[3,4],3=>[5,6],5=>[9,10],6=>[11,12],1=>[1,2])\n",
+ "11-Aug 21:39:50:INFO:root:solve!: dofs per node: 2\n",
+ "11-Aug 21:39:50:DEBUG:root:Problem size = 12\n",
+ "11-Aug 21:39:50:DEBUG:root:Starting iteration 1\n",
+ "11-Aug 21:39:50:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:50:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 21:39:50:DEBUG:root:Added 5 Lagrange multipliers to model\n",
+ "11-Aug 21:39:50:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 21:39:50:DEBUG:root:Solving system of equations. Total size = 16\n",
+ "11-Aug 21:39:51:DEBUG:root:Solution norm du = 0.6015838690633517\n",
+ "11-Aug 21:39:51:DEBUG:root:Starting iteration 2\n",
+ "11-Aug 21:39:51:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:51:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 21:39:51:DEBUG:root:Added 5 Lagrange multipliers to model\n",
+ "11-Aug 21:39:51:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 21:39:51:DEBUG:root:Solving system of equations. Total size = 16\n",
+ "11-Aug 21:39:51:DEBUG:root:Solution norm du = 0.013420417380980414\n",
+ "11-Aug 21:39:51:DEBUG:root:Starting iteration 3\n",
+ "11-Aug 21:39:51:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:51:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 21:39:51:DEBUG:root:Added 5 Lagrange multipliers to model\n",
+ "11-Aug 21:39:51:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 21:39:51:DEBUG:root:Solving system of equations. Total size = 16\n",
+ "11-Aug 21:39:51:DEBUG:root:Solution norm du = 0.00032202957936854873\n",
+ "11-Aug 21:39:51:DEBUG:root:Starting iteration 4\n",
+ "11-Aug 21:39:51:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:51:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 21:39:51:DEBUG:root:Added 5 Lagrange multipliers to model\n",
+ "11-Aug 21:39:51:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 21:39:51:DEBUG:root:Solving system of equations. Total size = 16\n",
+ "11-Aug 21:39:51:DEBUG:root:Solution norm du = 9.906677094801476e-8\n",
+ "11-Aug 21:39:51:DEBUG:root:Starting iteration 5\n",
+ "11-Aug 21:39:51:DEBUG:root:Assembling\n",
+ "11-Aug 21:39:51:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 21:39:51:DEBUG:root:Added 5 Lagrange multipliers to model\n",
+ "11-Aug 21:39:51:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 21:39:51:DEBUG:root:Solving system of equations. Total size = 16\n",
+ "11-Aug 21:39:51:DEBUG:root:Solution norm du = 5.027624635820698e-15\n",
+ "11-Aug 21:39:51:DEBUG:root:Converged in 5 iterations.\n",
+ "11-Aug 21:39:51:DEBUG:root:Displacement of element = \n",
+ "[-0.02442313597467864 -0.039356000063335075 0.021097993207232584 0.020877031423993653\n",
+ " -0.12673626841485705 -0.40433021969759375 -0.40656320177872923 -0.1275776940913048]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Element stiffness matrix\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:51:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n",
- "11-Aug 00:20:51:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:51:DEBUG:root:dof 1 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 2 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 8 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 66.4 15.0 23.6 -3.0 -33.2 -15.0 -56.8 3.0\n",
- " 15.0 162.4 3.0 77.6 -15.0 -81.2 -3.0 -158.8\n",
- " 23.6 3.0 66.4 -15.0 -56.8 -3.0 -33.2 15.0\n",
- " -3.0 77.6 -15.0 162.4 3.0 -158.8 15.0 -81.2\n",
- " -33.2 -15.0 -56.8 3.0 66.4 15.0 23.6 -3.0\n",
- " -15.0 -81.2 -3.0 -158.8 15.0 162.4 3.0 77.6\n",
- " -56.8 -3.0 -33.2 15.0 23.6 3.0 66.4 -15.0\n",
- " 3.0 -158.8 15.0 -81.2 -3.0 77.6 -15.0 162.4\n",
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 66.4 15.0 23.6 -3.0 -33.2 -15.0 -56.8 3.0\n",
- " 15.0 162.4 3.0 77.6 -15.0 -81.2 -3.0 -158.8\n",
- " 23.6 3.0 66.4 -15.0 -56.8 -3.0 -33.2 15.0\n",
- " -3.0 77.6 -15.0 162.4 3.0 -158.8 15.0 -81.2\n",
- " -33.2 -15.0 -56.8 3.0 66.4 15.0 23.6 -3.0\n",
- " -15.0 -81.2 -3.0 -158.8 15.0 162.4 3.0 77.6\n",
- " -56.8 -3.0 -33.2 15.0 23.6 3.0 66.4 -15.0\n",
- " 3.0 -158.8 15.0 -81.2 -3.0 77.6 -15.0 162.4\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:51:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:51:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:51:DEBUG:root:Solving system of equations. Total size = 16\n",
- "11-Aug 00:20:51:DEBUG:root:nothing\n",
- "11-Aug 00:20:51:DEBUG:root:nothing\n",
- "11-Aug 00:20:51:DEBUG:root:Solution norm = 12.031677381267034\n",
- "11-Aug 00:20:51:DEBUG:root:Starting iteration 2\n",
- "11-Aug 00:20:51:DEBUG:root:Assembling\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n",
- " 66.4 15.0 23.6 -3.0 0.0 0.0 -56.8 3.0 -33.2 -15.0 0.0 0.0 1.0 0.0 0.0 0.0\n",
- " 15.0 162.4 3.0 77.6 0.0 0.0 -3.0 -158.8 -15.0 -81.2 0.0 0.0 0.0 1.0 0.0 0.0\n",
- " 23.6 3.0 132.8 0.0 23.6 -3.0 -33.2 15.0 -113.6 0.0 -33.2 -15.0 0.0 0.0 0.0 0.0\n",
- " -3.0 77.6 0.0 324.8 3.0 77.6 15.0 -81.2 0.0 -317.6 -15.0 -81.2 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 23.6 3.0 66.4 -15.0 0.0 0.0 -33.2 15.0 -56.8 -3.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -3.0 77.6 -15.0 162.4 0.0 0.0 15.0 -81.2 3.0 -158.8 0.0 0.0 0.0 0.0\n",
- " -56.8 -3.0 -33.2 15.0 0.0 0.0 66.4 -15.0 23.6 3.0 0.0 0.0 0.0 0.0 1.0 0.0\n",
- " 3.0 -158.8 15.0 -81.2 0.0 0.0 -15.0 162.4 -3.0 77.6 0.0 0.0 0.0 0.0 0.0 1.0\n",
- " -33.2 -15.0 -113.6 0.0 -33.2 15.0 23.6 -3.0 132.8 0.0 23.6 3.0 0.0 0.0 0.0 0.0\n",
- " -15.0 -81.2 0.0 -317.6 15.0 -81.2 3.0 77.6 0.0 324.8 -3.0 77.6 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -33.2 -15.0 -56.8 3.0 0.0 0.0 23.6 -3.0 66.4 15.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -15.0 -81.2 -3.0 -158.8 0.0 0.0 3.0 77.6 15.0 162.4 0.0 0.0 0.0 0.0\n",
- " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:51:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n",
- "11-Aug 00:20:51:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n",
- "11-Aug 00:20:51:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:51:DEBUG:root:dof 1 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 2 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 8 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 520.78 72.26 330.9 62.7 -397.04 -45.87 -454.64 -89.09\n",
- " 72.26 461.85 83.07 254.3 -47.57 -243.98 -107.75 -472.18\n",
- " 330.9 83.07 874.92 211.87 -895.33 -206.2 -310.49 -88.74\n",
- " 62.7 254.3 211.87 708.11 -183.65 -617.73 -90.92 -344.68\n",
- " -397.04 -47.57 -895.33 -183.65 983.14 157.73 309.22 73.49\n",
- " -45.87 -243.98 -206.2 -617.73 157.73 615.62 94.34 246.08\n",
- " -454.64 -107.75 -310.49 -90.92 309.22 94.34 455.91 104.34\n",
- " -89.09 -472.18 -88.74 -344.68 73.49 246.08 104.34 570.77\n",
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 520.78 72.26 330.9 62.7 -397.04 -45.87 -454.64 -89.09\n",
- " 72.26 461.85 83.07 254.3 -47.57 -243.98 -107.75 -472.18\n",
- " 330.9 83.07 874.92 211.87 -895.33 -206.2 -310.49 -88.74\n",
- " 62.7 254.3 211.87 708.11 -183.65 -617.73 -90.92 -344.68\n",
- " -397.04 -47.57 -895.33 -183.65 983.14 157.73 309.22 73.49\n",
- " -45.87 -243.98 -206.2 -617.73 157.73 615.62 94.34 246.08\n",
- " -454.64 -107.75 -310.49 -90.92 309.22 94.34 455.91 104.34\n",
- " -89.09 -472.18 -88.74 -344.68 73.49 246.08 104.34 570.77\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:51:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:51:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:51:DEBUG:root:Solving system of equations. Total size = 16\n",
- "11-Aug 00:20:51:DEBUG:root:nothing\n",
- "11-Aug 00:20:51:DEBUG:root:nothing\n",
- "11-Aug 00:20:51:DEBUG:root:Solution norm = 8.151050361276273\n",
- "11-Aug 00:20:51:DEBUG:root:Starting iteration 3\n",
- "11-Aug 00:20:51:DEBUG:root:Assembling\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n",
- " 520.8 72.3 330.9 62.7 0.0 0.0 -454.6 -89.1 -397.0 -45.9 0.0 0.0 1.0 0.0 0.0 0.0\n",
- " 72.3 461.9 83.1 254.3 0.0 0.0 -107.8 -472.2 -47.6 -244.0 0.0 0.0 0.0 1.0 0.0 0.0\n",
- " 330.9 83.1 1395.7 284.1 330.9 62.7 -310.5 -88.7 -1350.0 -295.3 -397.0 -45.9 0.0 0.0 0.0 0.0\n",
- " 62.7 254.3 284.1 1170.0 83.1 254.3 -90.9 -344.7 -291.4 -1089.9 -47.6 -244.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 330.9 83.1 874.9 211.9 0.0 0.0 -310.5 -88.7 -895.3 -206.2 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 62.7 254.3 211.9 708.1 0.0 0.0 -90.9 -344.7 -183.7 -617.7 0.0 0.0 0.0 0.0\n",
- " -454.6 -107.8 -310.5 -90.9 0.0 0.0 455.9 104.3 309.2 94.3 0.0 0.0 0.0 0.0 1.0 0.0\n",
- " -89.1 -472.2 -88.7 -344.7 0.0 0.0 104.3 570.8 73.5 246.1 0.0 0.0 0.0 0.0 0.0 1.0\n",
- " -397.0 -47.6 -1350.0 -291.4 -310.5 -90.9 309.2 73.5 1439.1 262.1 309.2 94.3 0.0 0.0 0.0 0.0\n",
- " -45.9 -244.0 -295.3 -1089.9 -88.7 -344.7 94.3 246.1 262.1 1186.4 73.5 246.1 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -397.0 -47.6 -895.3 -183.7 0.0 0.0 309.2 73.5 983.1 157.7 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -45.9 -244.0 -206.2 -617.7 0.0 0.0 94.3 246.1 157.7 615.6 0.0 0.0 0.0 0.0\n",
- " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n",
- " -453.5 -212.6 -1168.0 -759.0 -714.5 -546.4 300.0 466.2 1168.0 759.0 868.1 294.8 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:51:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n",
- "11-Aug 00:20:51:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n",
- "11-Aug 00:20:51:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:51:DEBUG:root:dof 1 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 2 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:51:DEBUG:root:dof 8 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 43.42 28.69 48.59 17.79 -57.52 -15.59 -34.48 -30.89\n",
- " 28.69 51.46 22.52 33.82 -15.89 -22.99 -35.32 -62.29\n",
- " 48.59 22.52 142.25 54.77 -152.3 -53.31 -38.54 -23.98\n",
- " 17.79 33.82 54.77 88.5 -48.04 -72.78 -24.51 -49.53\n",
- " -57.52 -15.89 -152.3 -48.04 168.56 42.6 41.26 21.33\n",
- " -15.59 -22.99 -53.31 -72.78 42.6 67.46 26.29 28.32\n",
- " -34.48 -35.32 -38.54 -24.51 41.26 26.29 31.77 33.54\n",
- " -30.89 -62.29 -23.98 -49.53 21.33 28.32 33.54 83.5 \n",
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 43.42 28.69 48.59 17.79 -57.52 -15.59 -34.48 -30.89\n",
- " 28.69 51.46 22.52 33.82 -15.89 -22.99 -35.32 -62.29\n",
- " 48.59 22.52 142.25 54.77 -152.3 -53.31 -38.54 -23.98\n",
- " 17.79 33.82 54.77 88.5 -48.04 -72.78 -24.51 -49.53\n",
- " -57.52 -15.89 -152.3 -48.04 168.56 42.6 41.26 21.33\n",
- " -15.59 -22.99 -53.31 -72.78 42.6 67.46 26.29 28.32\n",
- " -34.48 -35.32 -38.54 -24.51 41.26 26.29 31.77 33.54\n",
- " -30.89 -62.29 -23.98 -49.53 21.33 28.32 33.54 83.5 \n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:51:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:51:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:51:DEBUG:root:Solving system of equations. Total size = 16\n",
- "11-Aug 00:20:51:DEBUG:root:nothing\n",
- "11-Aug 00:20:52:DEBUG:root:nothing\n",
- "11-Aug 00:20:52:DEBUG:root:Solution norm = 3.8869547569703458\n",
- "11-Aug 00:20:52:DEBUG:root:Starting iteration 4\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n",
- " 43.4 28.7 48.6 17.8 0.0 0.0 -34.5 -30.9 -57.5 -15.6 0.0 0.0 1.0 0.0 0.0 0.0\n",
- " 28.7 51.5 22.5 33.8 0.0 0.0 -35.3 -62.3 -15.9 -23.0 0.0 0.0 0.0 1.0 0.0 0.0\n",
- " 48.6 22.5 185.7 83.5 48.6 17.8 -38.5 -24.0 -186.8 -84.2 -57.5 -15.6 0.0 0.0 0.0 0.0\n",
- " 17.8 33.8 83.5 140.0 22.5 33.8 -24.5 -49.5 -83.4 -135.1 -15.9 -23.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 48.6 22.5 142.2 54.8 0.0 0.0 -38.5 -24.0 -152.3 -53.3 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 17.8 33.8 54.8 88.5 0.0 0.0 -24.5 -49.5 -48.0 -72.8 0.0 0.0 0.0 0.0\n",
- " -34.5 -35.3 -38.5 -24.5 0.0 0.0 31.8 33.5 41.3 26.3 0.0 0.0 0.0 0.0 1.0 0.0\n",
- " -30.9 -62.3 -24.0 -49.5 0.0 0.0 33.5 83.5 21.3 28.3 0.0 0.0 0.0 0.0 0.0 1.0\n",
- " -57.5 -15.9 -186.8 -83.4 -38.5 -24.5 41.3 21.3 200.3 76.1 41.3 26.3 0.0 0.0 0.0 0.0\n",
- " -15.6 -23.0 -84.2 -135.1 -24.0 -49.5 26.3 28.3 76.1 151.0 21.3 28.3 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -57.5 -15.9 -152.3 -48.0 0.0 0.0 41.3 21.3 168.6 42.6 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -15.6 -23.0 -53.3 -72.8 0.0 0.0 26.3 28.3 42.6 67.5 0.0 0.0 0.0 0.0\n",
- " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n",
- " 27.5 8.5 22.1 17.8 -5.4 9.3 -21.6 -15.8 -22.1 -17.8 -0.5 -0.0 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:52:DEBUG:root:Assembling\n",
- "11-Aug 00:20:52:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n",
- "11-Aug 00:20:52:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n",
- "11-Aug 00:20:52:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:52:DEBUG:root:dof 1 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:dof 2 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:dof 8 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 116.19 1.61 71.4 10.34 -89.72 1.21 -97.86 -13.16\n",
- " 1.61 96.17 17.73 49.31 0.67 -49.8 -20.01 -95.68\n",
- " 71.4 17.73 191.45 46.09 -197.12 -40.75 -65.73 -23.07\n",
- " 10.34 49.31 46.09 167.18 -32.77 -134.57 -23.66 -81.92\n",
- " -89.72 0.67 -197.12 -32.77 219.04 18.96 67.81 13.14\n",
- " 1.21 -49.8 -40.75 -134.57 18.96 135.27 20.58 49.1 \n",
- " -97.86 -20.01 -65.73 -23.66 67.81 20.58 95.78 23.09\n",
- " -13.16 -95.68 -23.07 -81.92 13.14 49.1 23.09 128.5 \n",
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 116.19 1.61 71.4 10.34 -89.72 1.21 -97.86 -13.16\n",
- " 1.61 96.17 17.73 49.31 0.67 -49.8 -20.01 -95.68\n",
- " 71.4 17.73 191.45 46.09 -197.12 -40.75 -65.73 -23.07\n",
- " 10.34 49.31 46.09 167.18 -32.77 -134.57 -23.66 -81.92\n",
- " -89.72 0.67 -197.12 -32.77 219.04 18.96 67.81 13.14\n",
- " 1.21 -49.8 -40.75 -134.57 18.96 135.27 20.58 49.1 \n",
- " -97.86 -20.01 -65.73 -23.66 67.81 20.58 95.78 23.09\n",
- " -13.16 -95.68 -23.07 -81.92 13.14 49.1 23.09 128.5 \n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:52:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:52:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:52:DEBUG:root:Solving system of equations. Total size = 16\n",
- "11-Aug 00:20:52:DEBUG:root:nothing\n",
- "11-Aug 00:20:52:DEBUG:root:nothing\n",
- "11-Aug 00:20:52:DEBUG:root:Solution norm = 2.9651628976855995\n",
- "11-Aug 00:20:52:DEBUG:root:Starting iteration 5\n",
- "11-Aug 00:20:52:DEBUG:root:Assembling\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n",
- " 116.2 1.6 71.4 10.3 0.0 0.0 -97.9 -13.2 -89.7 1.2 0.0 0.0 1.0 0.0 0.0 0.0\n",
- " 1.6 96.2 17.7 49.3 0.0 0.0 -20.0 -95.7 0.7 -49.8 0.0 0.0 0.0 1.0 0.0 0.0\n",
- " 71.4 17.7 307.6 47.7 71.4 10.3 -65.7 -23.1 -295.0 -53.9 -89.7 1.2 0.0 0.0 0.0 0.0\n",
- " 10.3 49.3 47.7 263.4 17.7 49.3 -23.7 -81.9 -52.8 -230.3 0.7 -49.8 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 71.4 17.7 191.5 46.1 0.0 0.0 -65.7 -23.1 -197.1 -40.8 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 10.3 49.3 46.1 167.2 0.0 0.0 -23.7 -81.9 -32.8 -134.6 0.0 0.0 0.0 0.0\n",
- " -97.9 -20.0 -65.7 -23.7 0.0 0.0 95.8 23.1 67.8 20.6 0.0 0.0 0.0 0.0 1.0 0.0\n",
- " -13.2 -95.7 -23.1 -81.9 0.0 0.0 23.1 128.5 13.1 49.1 0.0 0.0 0.0 0.0 0.0 1.0\n",
- " -89.7 0.7 -295.0 -52.8 -65.7 -23.7 67.8 13.1 314.8 42.0 67.8 20.6 0.0 0.0 0.0 0.0\n",
- " 1.2 -49.8 -53.9 -230.3 -23.1 -81.9 20.6 49.1 42.0 263.8 13.1 49.1 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -89.7 0.7 -197.1 -32.8 0.0 0.0 67.8 13.1 219.0 19.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 1.2 -49.8 -40.8 -134.6 0.0 0.0 20.6 49.1 19.0 135.3 0.0 0.0 0.0 0.0\n",
- " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n",
- " -2.5 8.8 -27.7 -26.3 -25.2 -35.2 -10.3 26.0 27.7 26.3 38.0 2.3 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:52:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n",
- "11-Aug 00:20:52:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n",
- "11-Aug 00:20:52:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:52:DEBUG:root:dof 1 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:dof 2 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:dof 8 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 80.58 18.37 53.97 14.28 -64.27 -7.29 -70.28 -25.36\n",
- " 18.37 29.48 19.23 20.58 -7.58 -16.78 -30.02 -33.28\n",
- " 53.97 19.23 139.54 47.2 -146.69 -42.11 -46.81 -24.33\n",
- " 14.28 20.58 47.2 74.51 -36.82 -59.55 -24.66 -35.54\n",
- " -64.27 -7.58 -146.69 -36.82 159.26 28.44 51.7 15.96\n",
- " -7.29 -16.78 -42.11 -59.55 28.44 56.47 20.96 19.86\n",
- " -70.28 -30.02 -46.81 -24.66 51.7 20.96 65.39 33.72\n",
- " -25.36 -33.28 -24.33 -35.54 15.96 19.86 33.72 48.96\n",
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 80.58 18.37 53.97 14.28 -64.27 -7.29 -70.28 -25.36\n",
- " 18.37 29.48 19.23 20.58 -7.58 -16.78 -30.02 -33.28\n",
- " 53.97 19.23 139.54 47.2 -146.69 -42.11 -46.81 -24.33\n",
- " 14.28 20.58 47.2 74.51 -36.82 -59.55 -24.66 -35.54\n",
- " -64.27 -7.58 -146.69 -36.82 159.26 28.44 51.7 15.96\n",
- " -7.29 -16.78 -42.11 -59.55 28.44 56.47 20.96 19.86\n",
- " -70.28 -30.02 -46.81 -24.66 51.7 20.96 65.39 33.72\n",
- " -25.36 -33.28 -24.33 -35.54 15.96 19.86 33.72 48.96\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:52:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:52:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:52:DEBUG:root:Solving system of equations. Total size = 16\n",
- "11-Aug 00:20:52:DEBUG:root:nothing\n",
- "11-Aug 00:20:52:DEBUG:root:nothing\n",
- "11-Aug 00:20:52:DEBUG:root:Solution norm = 2.638889456564558\n",
- "11-Aug 00:20:52:DEBUG:root:Starting iteration 6\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n",
- " 80.6 18.4 54.0 14.3 0.0 0.0 -70.3 -25.4 -64.3 -7.3 0.0 0.0 1.0 0.0 0.0 0.0\n",
- " 18.4 29.5 19.2 20.6 0.0 0.0 -30.0 -33.3 -7.6 -16.8 0.0 0.0 0.0 1.0 0.0 0.0\n",
- " 54.0 19.2 220.1 65.6 54.0 14.3 -46.8 -24.3 -217.0 -67.5 -64.3 -7.3 0.0 0.0 0.0 0.0\n",
- " 14.3 20.6 65.6 104.0 19.2 20.6 -24.7 -35.5 -66.8 -92.8 -7.6 -16.8 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 54.0 19.2 139.5 47.2 0.0 0.0 -46.8 -24.3 -146.7 -42.1 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 14.3 20.6 47.2 74.5 0.0 0.0 -24.7 -35.5 -36.8 -59.6 0.0 0.0 0.0 0.0\n",
- " -70.3 -30.0 -46.8 -24.7 0.0 0.0 65.4 33.7 51.7 21.0 0.0 0.0 0.0 0.0 1.0 0.0\n",
- " -25.4 -33.3 -24.3 -35.5 0.0 0.0 33.7 49.0 16.0 19.9 0.0 0.0 0.0 0.0 0.0 1.0\n",
- " -64.3 -7.6 -217.0 -66.8 -46.8 -24.7 51.7 16.0 224.7 62.2 51.7 21.0 0.0 0.0 0.0 0.0\n",
- " -7.3 -16.8 -67.5 -92.8 -24.3 -35.5 21.0 19.9 62.2 105.4 16.0 19.9 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -64.3 -7.6 -146.7 -36.8 0.0 0.0 51.7 16.0 159.3 28.4 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -7.3 -16.8 -42.1 -59.6 0.0 0.0 21.0 19.9 28.4 56.5 0.0 0.0 0.0 0.0\n",
- " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n",
- " 28.6 5.9 32.9 14.7 4.3 8.7 -24.6 -14.9 -32.9 -14.7 -8.3 2.2 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:52:DEBUG:root:Assembling\n",
- "11-Aug 00:20:52:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n",
- "11-Aug 00:20:52:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n",
- "11-Aug 00:20:52:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:52:DEBUG:root:dof 1 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:dof 2 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:dof 7 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 138.24 6.59 72.3 13.02 -91.67 -1.46 -118.87 -18.14\n",
- " 6.59 95.68 20.35 47.41 -1.83 -47.79 -25.11 -95.3 \n",
- " 72.3 20.35 177.29 48.61 -182.78 -43.91 -66.81 -25.05\n",
- " 13.02 47.41 48.61 159.72 -36.21 -128.01 -25.42 -79.12\n",
- " -91.67 -1.83 -182.78 -36.21 203.7 23.62 70.75 14.42\n",
- " -1.46 -47.79 -43.91 -128.01 23.62 126.88 21.75 48.93\n",
- " -118.87 -25.11 -66.81 -25.42 70.75 21.75 114.93 28.77\n",
- " -18.14 -95.3 -25.05 -79.12 14.42 48.93 28.77 125.49\n",
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 138.24 6.59 72.3 13.02 -91.67 -1.46 -118.87 -18.14\n",
- " 6.59 95.68 20.35 47.41 -1.83 -47.79 -25.11 -95.3 \n",
- " 72.3 20.35 177.29 48.61 -182.78 -43.91 -66.81 -25.05\n",
- " 13.02 47.41 48.61 159.72 -36.21 -128.01 -25.42 -79.12\n",
- " -91.67 -1.83 -182.78 -36.21 203.7 23.62 70.75 14.42\n",
- " -1.46 -47.79 -43.91 -128.01 23.62 126.88 21.75 48.93\n",
- " -118.87 -25.11 -66.81 -25.42 70.75 21.75 114.93 28.77\n",
- " -18.14 -95.3 -25.05 -79.12 14.42 48.93 28.77 125.49\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:52:DEBUG:root:dof 8 => 0.0\n",
- "11-Aug 00:20:52:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:52:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:52:DEBUG:root:Solving system of equations. Total size = 16\n",
- "11-Aug 00:20:52:DEBUG:root:nothing\n",
- "11-Aug 00:20:52:DEBUG:root:nothing\n",
- "11-Aug 00:20:52:DEBUG:root:Solution norm = 2.584668977172499\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n",
- " 138.2 6.6 72.3 13.0 0.0 0.0 -118.9 -18.1 -91.7 -1.5 0.0 0.0 1.0 0.0 0.0 0.0\n",
- " 6.6 95.7 20.3 47.4 0.0 0.0 -25.1 -95.3 -1.8 -47.8 0.0 0.0 0.0 1.0 0.0 0.0\n",
- " 72.3 20.3 315.5 55.2 72.3 13.0 -66.8 -25.0 -301.6 -62.1 -91.7 -1.5 0.0 0.0 0.0 0.0\n",
- " 13.0 47.4 55.2 255.4 20.3 47.4 -25.4 -79.1 -61.3 -223.3 -1.8 -47.8 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 72.3 20.3 177.3 48.6 0.0 0.0 -66.8 -25.0 -182.8 -43.9 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 13.0 47.4 48.6 159.7 0.0 0.0 -25.4 -79.1 -36.2 -128.0 0.0 0.0 0.0 0.0\n",
- " -118.9 -25.1 -66.8 -25.4 0.0 0.0 114.9 28.8 70.7 21.8 0.0 0.0 0.0 0.0 1.0 0.0\n",
- " -18.1 -95.3 -25.0 -79.1 0.0 0.0 28.8 125.5 14.4 48.9 0.0 0.0 0.0 0.0 0.0 1.0\n",
- " -91.7 -1.8 -301.6 -61.3 -66.8 -25.4 70.7 14.4 318.6 52.4 70.7 21.8 0.0 0.0 0.0 0.0\n",
- " -1.5 -47.8 -62.1 -223.3 -25.0 -79.1 21.8 48.9 52.4 252.4 14.4 48.9 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -91.7 -1.8 -182.8 -36.2 0.0 0.0 70.7 14.4 203.7 23.6 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -1.5 -47.8 -43.9 -128.0 0.0 0.0 21.8 48.9 23.6 126.9 0.0 0.0 0.0 0.0\n",
- " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n",
- " -6.5 7.6 -25.7 -24.5 -19.1 -32.0 -4.1 20.8 25.7 24.5 29.7 5.7 0.0 0.0 0.0 0.0\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:52:DEBUG:root:Starting iteration 7\n",
- "11-Aug 00:20:52:DEBUG:root:Assembling\n",
- "11-Aug 00:20:52:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n",
- "11-Aug 00:20:52:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n",
- "11-Aug 00:20:52:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "11-Aug 00:20:53:DEBUG:root:dof 1 => 0.0\n",
- "11-Aug 00:20:53:DEBUG:root:dof 2 => 0.0\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 105.18 18.96 58.01 14.76 -69.33 -6.94 -93.85 -26.77\n",
- " 18.96 36.86 19.89 21.5 -7.13 -18.68 -31.72 -39.68\n",
- " 58.01 19.89 135.28 46.75 -141.88 -41.41 -51.41 -25.23\n",
- " 14.76 21.5 46.75 74.5 -36.07 -59.09 -25.44 -36.91\n",
- " -69.33 -7.13 -141.88 -36.07 154.31 27.5 56.9 15.7 \n",
- " -6.94 -18.68 -41.41 -59.09 27.5 56.13 20.86 21.65\n",
- " -93.85 -31.72 -51.41 -25.44 56.9 20.86 88.36 36.3 \n",
- " -26.77 -39.68 -25.23 -36.91 15.7 21.65 36.3 54.93\n",
- "Element stiffness matrix\n",
- "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n",
- " 105.18 18.96 58.01 14.76 -69.33 -6.94 -93.85 -26.77\n",
- " 18.96 36.86 19.89 21.5 -7.13 -18.68 -31.72 -39.68\n",
- " 58.01 19.89 135.28 46.75 -141.88 -41.41 -51.41 -25.23\n",
- " 14.76 21.5 46.75 74.5 -36.07 -59.09 -25.44 -36.91\n",
- " -69.33 -7.13 -141.88 -36.07 154.31 27.5 56.9 15.7 \n",
- " -6.94 -18.68 -41.41 -59.09 27.5 56.13 20.86 21.65\n",
- " -93.85 -31.72 -51.41 -25.44 56.9 20.86 88.36 36.3 \n",
- " -26.77 -39.68 -25.23 -36.91 15.7 21.65 36.3 54.93\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:53:DEBUG:root:dof 7 => 0.0\n",
- "11-Aug 00:20:53:DEBUG:root:dof 8 => 0.0\n",
- "11-Aug 00:20:53:DEBUG:root:Added 4 Lagrange multipliers to model\n",
- "11-Aug 00:20:53:DEBUG:root:Adding Neumann boundary conditions\n",
- "11-Aug 00:20:53:DEBUG:root:Solving system of equations. Total size = 16\n",
- "11-Aug 00:20:53:DEBUG:root:nothing\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n",
- " 105.2 19.0 58.0 14.8 0.0 0.0 -93.9 -26.8 -69.3 -6.9 0.0 0.0 1.0 0.0 0.0 0.0\n",
- " 19.0 36.9 19.9 21.5 0.0 0.0 -31.7 -39.7 -7.1 -18.7 0.0 0.0 0.0 1.0 0.0 0.0\n",
- " 58.0 19.9 240.5 65.7 58.0 14.8 -51.4 -25.2 -235.7 -68.2 -69.3 -6.9 0.0 0.0 0.0 0.0\n",
- " 14.8 21.5 65.7 111.4 19.9 21.5 -25.4 -36.9 -67.8 -98.8 -7.1 -18.7 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 58.0 19.9 135.3 46.7 0.0 0.0 -51.4 -25.2 -141.9 -41.4 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 14.8 21.5 46.7 74.5 0.0 0.0 -25.4 -36.9 -36.1 -59.1 0.0 0.0 0.0 0.0\n",
- " -93.9 -31.7 -51.4 -25.4 0.0 0.0 88.4 36.3 56.9 20.9 0.0 0.0 0.0 0.0 1.0 0.0\n",
- " -26.8 -39.7 -25.2 -36.9 0.0 0.0 36.3 54.9 15.7 21.6 0.0 0.0 0.0 0.0 0.0 1.0\n",
- " -69.3 -7.1 -235.7 -67.8 -51.4 -25.4 56.9 15.7 242.7 63.8 56.9 20.9 0.0 0.0 0.0 0.0\n",
- " -6.9 -18.7 -68.2 -98.8 -25.2 -36.9 20.9 21.6 63.8 111.1 15.7 21.6 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -69.3 -7.1 -141.9 -36.1 0.0 0.0 56.9 15.7 154.3 27.5 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 -6.9 -18.7 -41.4 -59.1 0.0 0.0 20.9 21.6 27.5 56.1 0.0 0.0 0.0 0.0\n",
- " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n",
- "Array(Float64,(1,16)) 1x16 Array{Float64,2}"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "11-Aug 00:20:53:DEBUG:root:nothing\n",
- "11-Aug 00:20:53:DEBUG:root:Solution norm = 2.411610159457492\n",
- "11-Aug 00:20:53:DEBUG:root:Displacement of element = \n",
- "[-3.026501780111713 -5.464687844269877 -4.502220576358782 -2.218831052635469\n",
- " -1.2759688848714141 -6.757003969576775 -7.221835300089658 -1.8649226742660827]\n"
+ "0 facts verified.\n"
]
},
{
@@ -1749,15 +875,6 @@
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- ":\n",
- " 22.9 4.1 28.6 11.8 5.6 7.6 -19.5 -12.4 -28.6 -11.8 -9.0 2.6 0.0 0.0 0.0 0.0\n",
- "0 facts verified.\n"
- ]
}
],
"source": [
@@ -1789,6 +906,8 @@
"end\n",
"\n",
"function solve!(elements, dofmap, neumann_bcs, dirichlet_bcs; ndofs=2, max_iterations=10)\n",
+ "\n",
+ " dbc = \"lagrange\"\n",
" \n",
" Logging.info(\"solve!: dofs per node: $ndofs\")\n",
" pdim = length(dofmap)*ndofs\n",
@@ -1826,29 +945,31 @@
" Logging.debug(\"Assembling\")\n",
" for el in elements\n",
" assemble_element!(ass, el)\n",
- " println(\"Element stiffness matrix\")\n",
- " dump(round(el.attributes[\"displacement tangent stiffness\"], 2))\n",
+ " #println(\"Element stiffness matrix\")\n",
+ " #dump(round(el.attributes[\"displacement tangent stiffness\"], 2))\n",
" end\n",
"\n",
- " Logging.debug(\"Adding Dirichlet boundary conditions\")\n",
- " # Dirichlet boundary conditions\n",
" i = 1\n",
- " for bc in dirichlet_bcs\n",
- " for (dof, val) in zip(bc.dofs, bc.values)\n",
- " Logging.debug(\"dof $dof => $val\")\n",
- " push!(ass.I, dof)\n",
- " push!(ass.J, pdim+i)\n",
- " push!(ass.A, 1)\n",
- " push!(ass.I, pdim+i)\n",
- " push!(ass.J, dof)\n",
- " push!(ass.A, 1)\n",
- " push!(ass.i, pdim+i)\n",
- " push!(ass.b, 0)\n",
- " i += 1\n",
+ " if dbc == \"lagrange\"\n",
+ " Logging.debug(\"Adding Dirichlet boundary conditions using Lagrange multipliers\")\n",
+ " # Dirichlet boundary conditions\n",
+ " for bc in dirichlet_bcs\n",
+ " for (dof, val) in zip(bc.dofs, bc.values)\n",
+ " #Logging.debug(\"dof $dof => $val\")\n",
+ " push!(ass.I, dof)\n",
+ " push!(ass.J, pdim+i)\n",
+ " push!(ass.A, 1)\n",
+ " push!(ass.I, pdim+i)\n",
+ " push!(ass.J, dof)\n",
+ " push!(ass.A, 1)\n",
+ " push!(ass.i, pdim+i)\n",
+ " push!(ass.b, 0)\n",
+ " i += 1\n",
+ " end\n",
" end\n",
+ " Logging.debug(\"Added $i Lagrange multipliers to model\")\n",
" end\n",
" i -= 1\n",
- " Logging.debug(\"Added $i Lagrange multipliers to model\")\n",
"\n",
" Logging.debug(\"Adding Neumann boundary conditions\")\n",
" F = zeros(pdim+i)\n",
@@ -1864,21 +985,38 @@
" K = sparse(ass.I, ass.J, ass.A)\n",
" R = full(sparsevec(ass.i, ass.b))\n",
" R = R - F\n",
- " Logging.debug(dump(round(full(K), 1)))\n",
+ " #Logging.debug(dump(round(full(K), 2)))\n",
" #print_matrix(full(K))\n",
- " Logging.debug(dump(round(R', 1)))\n",
+ " #Logging.debug(dump(round(R', 1)))\n",
"\n",
- " du = K \\ -R\n",
+ " if dbc == \"eliminate\"\n",
+ " Logging.debug(\"Eliminating Dirichlet boundary conditions\")\n",
+ " throw(\"Implement this properly\")\n",
+ " free_dofs = [1, 2, 3, 4, 5, 6, 7, 8]\n",
+ " du = zeros(12)\n",
+ " Logging.debug(\"K norm = $(norm(full(K[free_dofs, free_dofs])))\")\n",
+ " du[free_dofs] = K[free_dofs, free_dofs] \\ -R[free_dofs]\n",
+ " else\n",
+ " du = K \\ -R\n",
+ " end\n",
"\n",
+ " #du = reshape(du, 2, 6)\n",
" solnorm = norm(du[1:pdim])\n",
- " Logging.debug(\"Solution norm = $solnorm\")\n",
+ " #Logging.debug(\"du = $du\")\n",
+ " Logging.debug(\"Solution norm du = $solnorm\")\n",
"\n",
" # update solution back to elements\n",
" for el in elements\n",
- "\n",
+ " #Logging.debug(\"update element $(el.id)\")\n",
+ " eldisp = el.attributes[\"displacement\"]\n",
+ " #Logging.debug(\"displacement before update $(el.id) : \\n$eldisp\")\n",
" eldu = du[ass.gdofs[el.id]]\n",
" eldu = reshape(eldu, (ndofs, round(Int, length(eldu)/ndofs)))\n",
+ " #Logging.debug(\"eldu for element $(el.id) \\n$eldu\")\n",
" el.attributes[\"displacement\"] += eldu\n",
+ " eldisp = el.attributes[\"displacement\"]\n",
+ " #Logging.debug(\"displacement after update $(el.id) : \\n$eldisp\")\n",
+ "\n",
" end\n",
" if solnorm < 1.0e-9\n",
" Logging.debug(\"Converged in $iter iterations.\")\n",
@@ -1890,26 +1028,28 @@
"\n",
"ENV[\"COLUMNS\"] = 160\n",
"\n",
- "facts(\"solve one element problem\") do\n",
- " # Create model\n",
- " Logging.debug(\"Creating nodes\")\n",
- " node_ids = [1, 2, 3, 4]\n",
- " coordinates = [10.0 0.0; 10.0 1.0; 0.0 1.0; 0.0 0.0]'\n",
- " attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n",
- " Logging.debug(\"Creating elements\")\n",
- " el = Element(1, node_ids, coordinates, attributes)\n",
- " elements = [el]\n",
- " dofmap = create_ldof2gdofmap(elements)\n",
- " Logging.debug(dofmap)\n",
- " # Boundary conditions\n",
- " # here we want to create nodal force for third dof, that is, node id 2, second dof\n",
- " bc1 = BC([dofmap[2][2]], [-2.0])\n",
- " # dirichlet bc, set dx=dy=0 on support\n",
- " bc2 = BC([dofmap[3][1], dofmap[3][2], dofmap[4][1], dofmap[4][2]], [0.0, 0.0, 0.0, 0.0])\n",
- " solve!(elements, dofmap, [bc1], [bc2]; max_iterations=7)\n",
- " disp = elements[1].attributes[\"displacement\"]\n",
- " Logging.debug(\"Displacement of element = \\n$disp\")\n",
- " @fact norm(disp) => roughly(3.1292483947150043)\n",
+ "function test1():\n",
+ " facts(\"solve one element problem\") do\n",
+ " # Create model\n",
+ " Logging.debug(\"Creating nodes\")\n",
+ " node_ids = [1, 2, 3, 4]\n",
+ " coordinates = [10.0 0.0; 10.0 1.0; 0.0 1.0; 0.0 0.0]'\n",
+ " attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n",
+ " Logging.debug(\"Creating elements\")\n",
+ " el = Element(1, node_ids, coordinates, attributes)\n",
+ " elements = [el]\n",
+ " dofmap = create_ldof2gdofmap(elements)\n",
+ " Logging.debug(dofmap)\n",
+ " # Boundary conditions\n",
+ " # here we want to create nodal force for third dof, that is, node id 2, second dof\n",
+ " bc1 = BC([dofmap[2][2]], [-2.0])\n",
+ " # dirichlet bc, set dx=dy=0 on support\n",
+ " bc2 = BC([dofmap[3][1], dofmap[3][2], dofmap[4][1], dofmap[4][2]], [0.0, 0.0, 0.0, 0.0])\n",
+ " solve!(elements, dofmap, [bc1], [bc2]; max_iterations=7)\n",
+ " disp = elements[1].attributes[\"displacement\"]\n",
+ " Logging.debug(\"Displacement of element = \\n$disp\")\n",
+ " @fact norm(disp) => roughly(3.1292483947150043)\n",
+ " end\n",
"end\n",
"\n",
"facts(\"solve two element problem\") do\n",
@@ -1917,21 +1057,21 @@
" attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n",
"\n",
" Logging.debug(\"Creating elements\")\n",
- " nids1 = [1, 2, 5, 4]\n",
+ " nids1 = [5, 1, 3, 6]\n",
" coords1 = [0.0 0.0; 5.0 0.0; 5.0 1.0; 0.0 1.0]'\n",
- " el1 = Element(1, nids1, coords1, attributes)\n",
- " nids2 = [2, 3, 6, 5]\n",
+ " el1 = Element(1, nids1, coords1, copy(attributes))\n",
+ " nids2 = [1, 2, 4, 3]\n",
" coords2 = [5.0 0.0; 10.0 0.0; 10.0 1.0; 5.0 1.0]'\n",
- " el2 = Element(2, nids2, coords2, attributes)\n",
+ " el2 = Element(2, nids2, coords2, copy(attributes))\n",
" elements = [el1, el2]\n",
"\n",
" dofmap = create_ldof2gdofmap(elements)\n",
" Logging.debug(dofmap)\n",
" # Boundary conditions\n",
" # here we want to create nodal force for third dof, that is, node id 2, second dof\n",
- " bc1 = BC([dofmap[6][2]], [-2.0])\n",
+ " bc1 = BC([dofmap[4][2]], [-0.1])\n",
" # dirichlet bc, set dx=dy=0 on support\n",
- " bc2 = BC([dofmap[1][1], dofmap[1][2], dofmap[4][1], dofmap[4][2]], [0.0, 0.0, 0.0, 0.0])\n",
+ " bc2 = BC([dofmap[5][1], dofmap[5][2], dofmap[6][1], dofmap[6][2]], [0.0, 0.0, 0.0, 0.0])\n",
" solve!(elements, dofmap, [bc1], [bc2]; max_iterations=7)\n",
" disp = elements[2].attributes[\"displacement\"]\n",
" Logging.debug(\"Displacement of element = \\n$disp\")\n",
@@ -1950,30 +1090,7 @@
},
{
"cell_type": "code",
- "execution_count": 74,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "1x1 sparse matrix with 1 Float64 entries:\n",
- "\t[1, 1] = 2.0"
- ]
- },
- "execution_count": 74,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "sparse([1, 1], [1, 1], [1.0, 1.0])"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 46,
+ "execution_count": 13,
"metadata": {
"collapsed": false
},
@@ -1982,30 +1099,66 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "10-Aug 20:59:55:INFO:root:Registered handlers: Any[\"ELEMENT\",\"NODE\",\"NSET\"]\n",
- "10-Aug 20:59:55:DEBUG:root:Found NODE section\n",
- "10-Aug 20:59:56:DEBUG:root:Found ELEMENT section\n",
- "10-Aug 20:59:57:DEBUG:root:120 elements found\n",
- "10-Aug 20:59:57:INFO:root:Creating ELSET Body1\n",
- "10-Aug 20:59:57:DEBUG:root:Found NSET section\n",
- "10-Aug 20:59:57:DEBUG:root:Creating node set SUPPORT\n",
- "10-Aug 20:59:57:DEBUG:root:Found NSET section\n",
- "10-Aug 20:59:57:DEBUG:root:Creating node set LOAD\n",
- "10-Aug 20:59:57:DEBUG:root:Found NSET section\n",
- "10-Aug 20:59:57:DEBUG:root:Creating node set TOP\n"
+ "\n",
+ "WARNING: deprecated syntax \"{a=>b, ...}\" at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:11.\n",
+ "Use \"Dict{Any,Any}(a=>b, ...)\" instead.\n",
+ "\n",
+ "WARNING: deprecated syntax \"{a=>b, ...}\" at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:32.\n",
+ "Use \"Dict{Any,Any}(a=>b, ...)\" instead.\n",
+ "11-Aug 21:40:01:INFO:root:Registered handlers: Any[\"ELEMENT\",\"NODE\",\"NSET\"]\n",
+ "WARNING: beginswith is deprecated, use startswith instead.\n",
+ " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
+ " in beginswith at deprecated.jl:30\n",
+ " in parse_abaqus at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:113\n",
+ " in include_string at loading.jl:99\n",
+ " in execute_request_0x535c5df2 at /Users/jukka/.julia/v0.4/IJulia/src/execute_request.jl:157\n",
+ " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:123\n",
+ " in anonymous at task.jl:365\n",
+ "while loading In[13], in expression starting on line 3\n",
+ "WARNING: beginswith is deprecated, use startswith instead.\n",
+ " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
+ " in beginswith at deprecated.jl:30\n",
+ " in parse_abaqus at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:113\n",
+ " in include_string at loading.jl:99\n",
+ " in execute_request_0x535c5df2 at /Users/jukka/.julia/v0.4/IJulia/src/execute_request.jl:157\n",
+ " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:123\n",
+ " in anonymous at task.jl:365\n",
+ "while loading In[13], in expression starting on line 3\n",
+ "11-Aug 21:40:01:DEBUG:root:Found NODE section\n",
+ "11-Aug 21:40:01:DEBUG:root:Found ELEMENT section\n",
+ "WARNING: integer(s::AbstractString) is deprecated, use parse(Int,s) instead.\n",
+ " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
+ " in integer at deprecated.jl:49\n",
+ " in map at abstractarray.jl:1251\n",
+ " in parse_element_section at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:59\n",
+ " in process_section at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:108\n",
+ " in parse_abaqus at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:117\n",
+ " in include_string at loading.jl:99\n",
+ " in execute_request_0x535c5df2 at /Users/jukka/.julia/v0.4/IJulia/src/execute_request.jl:157\n",
+ " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:123\n",
+ " in anonymous at task.jl:365\n",
+ "while loading In[13], in expression starting on line 3\n",
+ "11-Aug 21:40:03:DEBUG:root:120 elements found\n",
+ "11-Aug 21:40:03:INFO:root:Creating ELSET Body1\n",
+ "11-Aug 21:40:03:DEBUG:root:Found NSET section\n",
+ "11-Aug 21:40:03:DEBUG:root:Creating node set SUPPORT\n",
+ "11-Aug 21:40:03:DEBUG:root:Found NSET section\n",
+ "11-Aug 21:40:03:DEBUG:root:Creating node set LOAD\n",
+ "11-Aug 21:40:03:DEBUG:root:Found NSET section\n",
+ "11-Aug 21:40:03:DEBUG:root:Creating node set TOP\n"
]
},
{
"data": {
"text/plain": [
"Dict{Any,Any} with 4 entries:\n",
- " \"nodes\" => Dict{Any,Any}(288=>[97.5,7.5,10.0],11=>[92.5,2.5,5.0],134=>[45.…\n",
- " \"elements\" => Dict{Any,Any}(68=>[71,144,149,198,51,150,57,43,50,214],2=>[204,…\n",
- " \"elsets\" => Dict{Any,Any}(\"Body1\"=>[1,2,3,4,5,6,7,8,9,10 … 111,112,113,11…\n",
- " \"nsets\" => Dict{Any,Any}(\"LOAD\"=>[82,84,87,179,197,246,249,256,257],\"SUPPO…"
+ " \"nodes\" => Dict{Any,Any}(288=>[97.5,7.5,10.0],11=>[92.5,2.5,5.0],134=>[45.0,10.0,0.0],158=>[2.5,2.5,0.0],160=>[7.5,7.5,0.0],215=>[60.0,0.0,5.0],29=>[2.5,7…\n",
+ " \"elements\" => Dict{Any,Any}(68=>[71,144,149,198,51,150,57,43,50,214],2=>[204,199,175,130,207,208,209,3,4,176],89=>[95,78,104,52,127,126,106,60,68,67],11=>[15…\n",
+ " \"elsets\" => Dict{Any,Any}(\"Body1\"=>[1,2,3,4,5,6,7,8,9,10 … 111,112,113,114,115,116,117,118,119,120])\n",
+ " \"nsets\" => Dict{Any,Any}(\"LOAD\"=>[82,84,87,179,197,246,249,256,257],\"SUPPORT\"=>[108,109,111,155,162,216,225,281,298],\"TOP\"=>[70,75,76,84,88,90,95,96,98,10…"
]
},
- "execution_count": 46,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -2020,87 +1173,62 @@
},
{
"cell_type": "code",
- "execution_count": 63,
+ "execution_count": 34,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "solve 3d elasticity problem\n"
- ]
- },
{
"name": "stderr",
"output_type": "stream",
"text": [
- "10-Aug 21:16:13:DEBUG:root:Creating elements\n",
- "10-Aug 21:16:13:INFO:root:dofs per node: 3\n",
- "10-Aug 21:16:13:INFO:root:dofs per node: 3\n",
- "10-Aug 21:16:13:DEBUG:root:Problem size = 894\n",
- "10-Aug 21:16:13:DEBUG:root:Starting iteration 1\n",
- "10-Aug 21:16:13:DEBUG:root:Assembling\n",
- "10-Aug 21:16:15:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "10-Aug 21:16:15:DEBUG:root:Added 27 Lagrange multipliers to model\n",
- "10-Aug 21:16:15:DEBUG:root:Adding Neumann boundary conditions\n",
- "10-Aug 21:16:15:DEBUG:root:Solving system of equations. Total size = 921\n",
- "10-Aug 21:16:15:DEBUG:root:Solution norm = 0.2429242363684311\n",
- "10-Aug 21:16:15:DEBUG:root:Starting iteration 2\n",
- "10-Aug 21:16:15:DEBUG:root:Assembling\n",
- "10-Aug 21:16:16:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "10-Aug 21:16:16:DEBUG:root:Added 27 Lagrange multipliers to model\n",
- "10-Aug 21:16:16:DEBUG:root:Adding Neumann boundary conditions\n",
- "10-Aug 21:16:16:DEBUG:root:Solving system of equations. Total size = 921\n",
- "10-Aug 21:16:16:DEBUG:root:Solution norm = 0.220339941648292\n",
- "10-Aug 21:16:16:DEBUG:root:Starting iteration 3\n",
- "10-Aug 21:16:16:DEBUG:root:Assembling\n",
- "10-Aug 21:16:17:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "10-Aug 21:16:17:DEBUG:root:Added 27 Lagrange multipliers to model\n",
- "10-Aug 21:16:17:DEBUG:root:Adding Neumann boundary conditions\n",
- "10-Aug 21:16:17:DEBUG:root:Solving system of equations. Total size = 921\n",
- "10-Aug 21:16:18:DEBUG:root:Solution norm = 31.956186974599095\n",
- "10-Aug 21:16:18:DEBUG:root:Starting iteration 4\n",
- "10-Aug 21:16:18:DEBUG:root:Assembling\n",
- "10-Aug 21:16:19:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "10-Aug 21:16:19:DEBUG:root:Added 27 Lagrange multipliers to model\n",
- "10-Aug 21:16:19:DEBUG:root:Adding Neumann boundary conditions\n",
- "10-Aug 21:16:19:DEBUG:root:Solving system of equations. Total size = 921\n",
- "10-Aug 21:16:19:DEBUG:root:Solution norm = 411.4719431105651\n",
- "10-Aug 21:16:19:DEBUG:root:Starting iteration 5\n",
- "10-Aug 21:16:19:DEBUG:root:Assembling\n",
- "10-Aug 21:16:21:DEBUG:root:Adding Dirichlet boundary conditions\n",
- "10-Aug 21:16:21:DEBUG:root:Added 27 Lagrange multipliers to model\n",
- "10-Aug 21:16:21:DEBUG:root:Adding Neumann boundary conditions\n",
- "10-Aug 21:16:21:DEBUG:root:Solving system of equations. Total size = 921\n",
- "10-Aug 21:16:21:DEBUG:root:Solution norm = 7077.644216187514\n"
+ "11-Aug 22:15:29:DEBUG:root:Creating elements\n",
+ "11-Aug 22:15:29:INFO:root:create_ldof2gdofmap: dofs per node: 3\n",
+ "11-Aug 22:15:29:INFO:root:solve!: dofs per node: 3\n",
+ "11-Aug 22:15:29:DEBUG:root:Problem size = 894\n",
+ "11-Aug 22:15:29:DEBUG:root:Starting iteration 1\n",
+ "11-Aug 22:15:29:DEBUG:root:Assembling\n",
+ "11-Aug 22:15:30:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 22:15:30:DEBUG:root:Added 28 Lagrange multipliers to model\n",
+ "11-Aug 22:15:30:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 22:15:30:DEBUG:root:Solving system of equations. Total size = 921\n",
+ "11-Aug 22:15:30:DEBUG:root:Solution norm du = 72.87727091053921\n",
+ "11-Aug 22:15:30:DEBUG:root:Starting iteration 2\n",
+ "11-Aug 22:15:31:DEBUG:root:Assembling\n",
+ "11-Aug 22:15:32:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 22:15:32:DEBUG:root:Added 28 Lagrange multipliers to model\n",
+ "11-Aug 22:15:32:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 22:15:32:DEBUG:root:Solving system of equations. Total size = 921\n",
+ "11-Aug 22:15:32:DEBUG:root:Solution norm du = 2.737285770100854\n",
+ "11-Aug 22:15:32:DEBUG:root:Starting iteration 3\n",
+ "11-Aug 22:15:32:DEBUG:root:Assembling\n",
+ "11-Aug 22:15:33:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 22:15:34:DEBUG:root:Added 28 Lagrange multipliers to model\n",
+ "11-Aug 22:15:34:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 22:15:34:DEBUG:root:Solving system of equations. Total size = 921\n",
+ "11-Aug 22:15:34:DEBUG:root:Solution norm du = 0.07997112801214978\n",
+ "11-Aug 22:15:34:DEBUG:root:Starting iteration 4\n",
+ "11-Aug 22:15:34:DEBUG:root:Assembling\n",
+ "11-Aug 22:15:35:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 22:15:35:DEBUG:root:Added 28 Lagrange multipliers to model\n",
+ "11-Aug 22:15:35:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 22:15:35:DEBUG:root:Solving system of equations. Total size = 921\n",
+ "11-Aug 22:15:35:DEBUG:root:Solution norm du = 6.406557430235748e-5\n",
+ "11-Aug 22:15:35:DEBUG:root:Starting iteration 5\n",
+ "11-Aug 22:15:35:DEBUG:root:Assembling\n",
+ "11-Aug 22:15:37:DEBUG:root:Adding Dirichlet boundary conditions using Lagrange multipliers\n",
+ "11-Aug 22:15:37:DEBUG:root:Added 28 Lagrange multipliers to model\n",
+ "11-Aug 22:15:37:DEBUG:root:Adding Neumann boundary conditions\n",
+ "11-Aug 22:15:37:DEBUG:root:Solving system of equations. Total size = 921\n",
+ "11-Aug 22:15:37:DEBUG:root:Solution norm du = 6.870072007793185e-11\n",
+ "11-Aug 22:15:37:DEBUG:root:Converged in 5 iterations.\n",
+ "11-Aug 22:15:37:INFO:root:Maximum absolute displacement in y direction: 6.9925206227884695\n"
]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "0 facts verified.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "delayed_handler (generic function with 4 methods)"
- ]
- },
- "execution_count": 63,
- "metadata": {},
- "output_type": "execute_result"
}
],
"source": [
- "facts(\"solve 3d elasticity problem\") do\n",
- "\n",
- " attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n",
- "\n",
+ "function solve_3d_model()\n",
" Logging.debug(\"Creating elements\")\n",
" elements = Element[]\n",
" coordinates = zeros(3, 10)\n",
@@ -2108,6 +1236,7 @@
" for (i, nid) in enumerate(node_ids)\n",
" coordinates[:,i] = model[\"nodes\"][nid]\n",
" end\n",
+ " attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n",
" el = Element(elid, node_ids, coordinates, attributes)\n",
" push!(elements, el)\n",
" end\n",
@@ -2130,355 +1259,42 @@
" bc_load = BC(Int64[], Float64[])\n",
" for nid in model[\"nsets\"][\"LOAD\"]\n",
" push!(bc_load.dofs, dofmap[nid][2])\n",
- " push!(bc_load.values, -0.1)\n",
+ " push!(bc_load.values, -30.0)\n",
" end\n",
"\n",
" #solve!(elements, [bc1], [bc2]; max_iterations=7)\n",
" neumann_bcs = [bc_load]\n",
" dirichlet_bcs = [bc_support]\n",
" # ndofs = dimension of unknown field in nodes\n",
- " solve!(elements, dofmap, neumann_bcs, dirichlet_bcs; ndofs=3, max_iterations=5)\n",
- "# disp = elements[1].attributes[\"displacement\"]\n",
- "# Logging.debug(\"Displacement of element = \\n$disp\")\n",
- "# @fact norm(disp) => roughly(3.1292483947150043)\n",
- "end"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- "\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "WARNING: int(x) is deprecated, use Int(x) instead.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "1015"
- ]
- },
- "execution_count": 4,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
- " in int at deprecated.jl:49\n",
- " in save_file at /Users/jukka/.julia/v0.4/LightXML/src/document.jl:108\n",
- " in xdmf_save_model at /Users/jukka/.julia/v0.4/JuliaFEM/src/xdmf.jl:106\n",
- " in include_string at loading.jl:99\n",
- " in execute_request_0x535c5df2 at /Users/jukka/.julia/v0.4/IJulia/src/execute_request.jl:157\n",
- " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:123\n",
- " in anonymous at task.jl:365\n",
- "while loading In[4], in expression starting on line 7\n"
- ]
- }
- ],
- "source": [
- "xdoc, model = JuliaFEM.xdmf.xdmf_new_model()\n",
- "temporal_collection = JuliaFEM.xdmf.xdmf_new_temporal_collection(model)\n",
- "grid = JuliaFEM.xdmf.xdmf_new_grid(temporal_collection; time=0)\n",
- "JuliaFEM.xdmf.xdmf_new_mesh(grid, X3d, elmap2)\n",
- "JuliaFEM.xdmf.xdmf_new_field(grid, \"Displacement\", \"nodes\", u3d)\n",
- "print(xdoc)\n",
- "JuliaFEM.xdmf.xdmf_save_model(xdoc, \"/tmp/foo.xmf\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "## 3d beam with quadratic elements"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "10x120 Array{Int64,2}:\n",
- " 243 204 259 145 96 96 236 285 … 217 69 154 179 203 96 259\n",
- " 240 199 70 175 88 101 88 179 216 144 114 91 204 267 199\n",
- " 191 175 69 199 236 164 285 178 278 78 278 178 259 95 204\n",
- " 117 130 130 130 178 97 178 83 155 71 218 83 199 97 130\n",
- " 245 207 265 177 141 102 290 12 219 146 20 181 206 268 39\n",
- " 242 208 72 208 290 171 289 182 … 282 152 280 180 263 272 207\n",
- " 244 209 5 202 291 9 287 11 33 79 32 182 262 98 263\n",
- " 1 3 6 174 7 99 237 13 224 74 223 14 205 99 6\n",
- " 2 4 132 176 8 103 8 14 225 51 284 93 207 24 4\n",
- " 196 176 134 4 237 10 11 15 17 80 283 15 39 100 3"
- ]
- },
- "execution_count": 5,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "nnodes = length(model[\"nodes\"])\n",
- "nelements = length(model[\"elements\"])\n",
- "dim = 3\n",
- "E = 90\n",
- "nu = 0.25\n",
- "mu = E/(2*(1+nu))\n",
- "la = E*nu/((1+nu)*(1-2*nu))\n",
+ " solve!(elements, dofmap, neumann_bcs, dirichlet_bcs; ndofs=3, max_iterations=10)\n",
"\n",
- "X = zeros(dim, nnodes)\n",
- "u = zeros(dim, nnodes)\n",
- "du = zeros(dim, nnodes)\n",
- "elmap = zeros(Int, 10, nelements)\n",
- "nodalloads = zeros(3, nnodes)\n",
- "dirichletbc = NaN*ones(3, nnodes)\n",
- "la = la*ones(1, nnodes)\n",
- "mu = mu*ones(1, nnodes)\n",
- "\n",
- "# calculate permutation which maps node ids to matrix indices\n",
- "perm = Dict()\n",
- "for (j, k) in enumerate(keys(model[\"nodes\"]))\n",
- " perm[k] = j\n",
- "end\n",
- "\n",
- "for j=1:nnodes\n",
- " #X[:,j] = model[\"nodes\"][perm[j]]\n",
- " X[:,j] = model[\"nodes\"][j]\n",
- "end\n",
- "\n",
- "for (j, k) in enumerate(keys(model[\"elements\"]))\n",
- " #node_ids = model[\"elements\"][j]\n",
- " elmap[:,j] = model[\"elements\"][j]\n",
- " #for l=1:10\n",
- " # elmap[l, j] = perm[node_ids[l]]\n",
- " #end\n",
- "end\n",
- "\n",
- "elmap"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "3x298 Array{Float64,2}:\n",
- " NaN NaN NaN NaN NaN NaN NaN NaN … NaN NaN NaN NaN NaN NaN NaN\n",
- " NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN\n",
- " NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN"
- ]
- },
- "execution_count": 6,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "# Handle dirichlet boundaries on SUPPORT\n",
- "for j in model[\"nsets\"][\"SUPPORT\"]\n",
- " #dirichletbc[perm[j]] = 0.0\n",
- " dirichletbc[j] = 0.0\n",
- "end\n",
- "dirichletbc"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Shape functions and integration points"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Add point force to LOAD nodeset"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "9-element Array{Int64,1}:\n",
- " 82\n",
- " 84\n",
- " 87\n",
- " 179\n",
- " 197\n",
- " 246\n",
- " 249\n",
- " 256\n",
- " 257"
- ]
- },
- "execution_count": 10,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "model[\"nsets\"][\"LOAD\"]"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "[100.0,10.0,0.0]\n"
- ]
- }
- ],
- "source": [
- "#nodalloads[3, perm[82]] = -0.06\n",
- "nodalloads[3, 82] = -50.0\n",
- "println(model[\"nodes\"][82])"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "iteration 1, norm = 93.13879357262775\n",
- "iteration 2, norm = 14.241640589907869\n",
- "iteration 3, norm = 2.3999534862146534\n",
- "iteration 4, norm = 0.8191634532858331\n",
- "iteration 5, norm = 0.08574651168344295\n",
- "iteration 6, norm = 0.00032306479346201524\n",
- "iteration 7, norm = 8.052462405199464e-9\n",
- "iteration 8, norm = 3.0878906643174355e-14\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "3x298 Array{Float64,2}:\n",
- " -0.0479657 -0.0483971 -0.0497284 … -0.0155295 -0.0150513 -0.0462958\n",
- " -0.474054 -0.418817 -0.254176 -0.229641 -0.283098 -0.694379 \n",
- " 0.232677 0.198051 0.0948355 0.128246 0.162511 0.371043 "
- ]
- },
- "execution_count": 12,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Converged\n"
- ]
- }
- ],
- "source": [
- "u = zeros(dim, nnodes)\n",
- "du = zeros(dim, nnodes)\n",
- "\n",
- "for i=1:10\n",
- " JuliaFEM.elasticity_solver.solve_elasticity_increment!(X, u, du, elmap, nodalloads, dirichletbc,\n",
- " la, mu, Ntet, dNtet, ipoints, iweights)\n",
- " u += du\n",
- " println(\"iteration $i, norm = $(norm(du))\")\n",
- " if norm(du) < 1.0e-9\n",
- " println(\"Converged\")\n",
- " break\n",
+ " # Let's pick maximum absolute displacement in y direction\n",
+ " maxdisp = 0.0\n",
+ " for el in elements\n",
+ " eldisp = el.attributes[\"displacement\"]\n",
+ " eldispy = eldisp[2,:]\n",
+ " maxeldisp = maximum(abs(eldispy))\n",
+ " if maxeldisp > maxdisp\n",
+ " maxdisp = maxeldisp\n",
+ " end\n",
" end\n",
+ " Logging.info(\"Maximum absolute displacement in y direction: $maxdisp\")\n",
+ " return model, elements, dofmap\n",
"end\n",
- "u"
+ "\n",
+ "model, elements, dofmap = solve_3d_model();"
]
},
{
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "15.449170689704438"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
- "maximum(abs(u))"
+ "## Saving results to file"
]
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 49,
"metadata": {
"collapsed": false
},
@@ -2486,680 +1302,81 @@
{
"data": {
"text/plain": [
- "(10,120)"
+ "\n",
+ " \n"
]
},
- "execution_count": 14,
+ "execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
- "source": [
- "size(elmap)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "120"
- ]
- },
- "execution_count": 15,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "nelements"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "11x120 Array{Int64,2}:\n",
- " 38 38 38 38 38 38 38 38 … 38 38 38 38 38 38 38\n",
- " 243 204 259 145 96 96 236 285 217 69 154 179 203 96 259\n",
- " 240 199 70 175 88 101 88 179 216 144 114 91 204 267 199\n",
- " 191 175 69 199 236 164 285 178 278 78 278 178 259 95 204\n",
- " 117 130 130 130 178 97 178 83 155 71 218 83 199 97 130\n",
- " 245 207 265 177 141 102 290 12 … 219 146 20 181 206 268 39\n",
- " 242 208 72 208 290 171 289 182 282 152 280 180 263 272 207\n",
- " 244 209 5 202 291 9 287 11 33 79 32 182 262 98 263\n",
- " 1 3 6 174 7 99 237 13 224 74 223 14 205 99 6\n",
- " 2 4 132 176 8 103 8 14 225 51 284 93 207 24 4\n",
- " 196 176 134 4 237 10 11 15 … 17 80 283 15 39 100 3"
- ]
- },
- "execution_count": 16,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "elcodes = 0x0026*ones(Int, nelements)\n",
- "elmap2 = [elcodes'\n",
- " elmap]"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "WARNING: int(x) is deprecated, use Int(x) instead.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "9568"
- ]
- },
- "execution_count": 17,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
- " in int at deprecated.jl:49\n",
- " in save_file at /Users/jukka/.julia/v0.4/LightXML/src/document.jl:108\n",
- " in xdmf_save_model at /Users/jukka/.julia/v0.4/JuliaFEM/src/xdmf.jl:140\n",
- " in include_string at loading.jl:99\n",
- " in execute_request_0x535c5df2 at /Users/jukka/.julia/v0.4/IJulia/src/execute_request.jl:157\n",
- " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:123\n",
- " in anonymous at task.jl:365\n",
- "while loading In[17], in expression starting on line 7\n"
- ]
- }
- ],
"source": [
"xdoc, xmodel = JuliaFEM.xdmf.xdmf_new_model()\n",
"temporal_collection = JuliaFEM.xdmf.xdmf_new_temporal_collection(xmodel)\n",
- "grid = JuliaFEM.xdmf.xdmf_new_grid(temporal_collection; time=0)\n",
- "JuliaFEM.xdmf.xdmf_new_mesh(grid, X, elmap2)\n",
- "#JuliaFEM.xdmf.xdmf_new_field(grid, \"Displacement\", \"nodes\", u)\n",
- "#print(xdoc)\n",
- "JuliaFEM.xdmf.xdmf_save_model(xdoc, \"/tmp/foo3d2.xmf\")"
+ "grid = JuliaFEM.xdmf.xdmf_new_grid(temporal_collection; time=0)"
]
},
{
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "10x2 Array{Int64,2}:\n",
- " 243 145\n",
- " 240 199\n",
- " 191 69\n",
- " 117 130\n",
- " 245 202\n",
- " 242 47\n",
- " 244 148\n",
- " 1 174\n",
- " 2 4\n",
- " 196 134"
- ]
- },
- "execution_count": 18,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
- "elmap[:,[1, 101]]"
+ "Save geometry to xdmf file"
]
},
{
"cell_type": "code",
- "execution_count": 25,
+ "execution_count": 50,
"metadata": {
"collapsed": false
},
"outputs": [
{
- "data": {
- "text/plain": [
- "3x10 Array{Float64,2}:\n",
- " 20.0 30.0 20.0 20.0 25.0 25.0 20.0 20.0 25.0 20.0\n",
- " 0.0 0.0 0.0 10.0 0.0 0.0 0.0 5.0 5.0 5.0\n",
- " 10.0 10.0 0.0 0.0 10.0 5.0 5.0 5.0 5.0 0.0"
- ]
- },
- "execution_count": 25,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "tmp = elmap[:,[1]]\n",
- "tmp = reshape(tmp, length(tmp))\n",
- "X[:, tmp]"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "11x1 Array{Int64,2}:\n",
- " 38\n",
- " 1\n",
- " 2\n",
- " 3\n",
- " 4\n",
- " 5\n",
- " 6\n",
- " 7\n",
- " 8\n",
- " 9\n",
- " 10"
- ]
- },
- "execution_count": 26,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "#tmpelmap = [38 1 2 3 4 5 6 7 8 9 10; 38 11 12 13 14 15 16 17 18 19 20]'\n",
- "tmpelmap = [38 1 2 3 4 5 6 7 8 9 10]'"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 48,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
+ "name": "stderr",
"output_type": "stream",
"text": [
- "\n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- "\n"
+ "11-Aug 22:38:28:INFO:root:Number of nodes in model: 298\n",
+ "11-Aug 22:38:28:INFO:root:Number of elements in model: 120\n"
]
- },
+ }
+ ],
+ "source": [
+ "nnodes = length(model[\"nodes\"])\n",
+ "Logging.info(\"Number of nodes in model: $nnodes\")\n",
+ "node_ids = Int64[]\n",
+ "for nid in keys(model[\"nodes\"])\n",
+ " push!(node_ids, nid)\n",
+ "end\n",
+ "sort!(node_ids)\n",
+ "X = zeros(3, nnodes)\n",
+ "for (i, nid) in enumerate(node_ids)\n",
+ " X[:,i] = model[\"nodes\"][nid]\n",
+ "end\n",
+ "\n",
+ "nelements = length(model[\"elements\"])\n",
+ "Logging.info(\"Number of elements in model: $nelements\")\n",
+ "elmap = zeros(Int64, 11, nelements)\n",
+ "elmap[1,:] = 0x0026\n",
+ "for elid in 1:nelements\n",
+ " elmap[2:end,elid] = model[\"elements\"][elid]\n",
+ "end"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
{
"data": {
"text/plain": [
- "28476"
+ "true"
]
},
- "execution_count": 48,
+ "execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
@@ -3207,14 +1424,173 @@
" \n",
"end\n",
"\n",
- "xdoc, xmodel = JuliaFEM.xdmf.xdmf_new_model()\n",
- "temporal_collection = JuliaFEM.xdmf.xdmf_new_temporal_collection(xmodel)\n",
- "grid = JuliaFEM.xdmf.xdmf_new_grid(temporal_collection; time=0)\n",
- "xdmf_new_mesh(grid, X, elmap2)\n",
- "JuliaFEM.xdmf.xdmf_new_field(grid, \"Displacement\", \"nodes\", u)\n",
- "print(xdoc)\n",
- "JuliaFEM.xdmf.xdmf_save_model(xdoc, \"/tmp/foo3d.xmf\")"
+ "xdmf_new_mesh(grid, X, elmap)"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "10435"
+ ]
+ },
+ "execution_count": 52,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "JuliaFEM.xdmf.xdmf_save_model(xdoc, \"/tmp/3d_solid_model.xmf\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Save nodal data to model"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Dict{Any,Any} with 298 entries:\n",
+ " 288 => [-0.21784897897079505,-6.64256844921929,0.18339325827190953]\n",
+ " 11 => [-0.17342410820059667,-6.343125806991628,0.17544367431766225]\n",
+ " 158 => [-0.0007723334905839533,-0.2321904799732306,-0.03883691791045858]\n",
+ " 215 => [-0.03299227384130259,-4.2236276356937505,-0.0017757488281830807]\n",
+ " 134 => [-0.06336705102703495,-3.3332586850719337,0.06555932581531249]\n",
+ " 160 => [0.03205303832663507,-0.536361456950779,-0.07291283371223893]\n",
+ " 29 => [-0.01620524134284992,-0.19455583841608232,-0.03838421619811468]\n",
+ " 131 => [0.04015396763870081,-3.5101776818531523,0.10045744211179368]\n",
+ " 249 => [-0.2491004521409732,-6.570813533283954,0.06837890174506163]\n",
+ " 207 => [0.03974407267311282,-3.48588780058722,0.007971846403163977]\n",
+ " 173 => [-0.04472757590353555,-4.582185697159958,-0.04434348606400347]\n",
+ " 289 => [-0.16494613158592017,-6.360857515886982,0.33435404817411213]\n",
+ " 74 => [-0.03449870789750817,-3.947284664599636,0.0692691027146262]\n",
+ " 201 => [-0.00128347996939122,-3.8527236749372054,0.054216444201382656]\n",
+ " 176 => [-0.004729440266412542,-3.132546258410676,0.0036604388995965386]\n",
+ " 57 => [-0.021453552968802154,-4.134921994863808,0.04888988010136468]\n",
+ " 31 => [-0.005045439296021616,-0.3424143474221696,-0.0365148544462663]\n",
+ " 285 => [-0.19371941654927557,-6.446502168659889,0.18022053743770028]\n",
+ " 70 => [0.006277500845425116,-3.802694347992476,0.06251589929767469]\n",
+ " 33 => [-0.02778798411401373,-0.5091869603980016,0.03538255963543149]\n",
+ " 252 => [-0.11915625386204923,-1.2182594899567352,-0.025975085489623087]\n",
+ " 114 => [-0.14643901527350212,-0.4628626545501056,-0.0057156433415159625]\n",
+ " 165 => [-0.07462160313837857,-4.426674712264929,-0.04391022455570823]\n",
+ " 96 => [0.0541064545893336,-5.057801826440659,-0.01669155772495867]\n",
+ " 133 => [0.01615115174975327,-3.140610327091724,0.028951801068022566]\n",
+ " ⋮ => ⋮"
+ ]
+ },
+ "execution_count": 53,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "nodaldisp = Dict()\n",
+ "for el in elements\n",
+ " for (i, nid) in enumerate(el.node_ids)\n",
+ " nodaldisp[nid] = el.attributes[\"displacement\"][:, i]\n",
+ " end\n",
+ "end\n",
+ "nodaldisp"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "3x298 Array{Float64,2}:\n",
+ " -0.202475 -0.17437 0.0131267 -0.0340868 -0.0252162 0.0521758 … -0.054781 -0.169903 0.186936 0.102666 -0.0970747 -0.164397 0.0\n",
+ " -1.34204 -1.66404 -3.20587 -3.27673 -3.68732 -3.36789 -4.33822 -1.03943 -2.27466 -1.67467 -2.91213 -2.52353 0.0\n",
+ " 0.0211856 0.0324162 0.00213878 0.0377156 0.0683502 0.030081 -0.00684333 -0.035509 0.304867 0.26033 0.113802 0.152433 0.0"
+ ]
+ },
+ "execution_count": 54,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "u = zeros(3, nnodes)\n",
+ "for (i, nid) in enumerate(node_ids)\n",
+ " u[:,i] = nodaldisp[nid]\n",
+ "end\n",
+ "u"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "true"
+ ]
+ },
+ "execution_count": 55,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "JuliaFEM.xdmf.xdmf_new_field(grid, \"Displacement\", \"nodes\", u)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "28330"
+ ]
+ },
+ "execution_count": 56,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "JuliaFEM.xdmf.xdmf_save_model(xdoc, \"/tmp/3d_solid_model.xmf\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
}
],
"metadata": {