Skip to content

Commit

Permalink
examples: made the 2nd-order elastic notebooks consistent with one an…
Browse files Browse the repository at this point in the history
…other and tidied up
  • Loading branch information
EdCaunt committed Aug 23, 2023
1 parent 765df1d commit 64b9950
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 80 deletions.
32 changes: 10 additions & 22 deletions examples/19_elastic_2nd_order_sinusoid.ipynb

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions examples/20_elastic_vti_2nd_order.ipynb

Large diffs are not rendered by default.

55 changes: 6 additions & 49 deletions examples/21_elastic_tti_2nd_order.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -434,16 +434,16 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Operator `Kernel` ran in 4.49 s\n"
"Operator `Kernel` ran in 5.40 s\n"
]
},
{
"data": {
"text/plain": [
"PerformanceSummary([(PerfKey(name='section0', rank=None),\n",
" PerfEntry(time=4.486431, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[])),\n",
" PerfEntry(time=5.390113000000004, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[])),\n",
" (PerfKey(name='section1', rank=None),\n",
" PerfEntry(time=0.00020299999999999957, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[]))])"
" PerfEntry(time=0.0003120000000000008, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[]))])"
]
},
"execution_count": 10,
Expand Down Expand Up @@ -509,54 +509,11 @@
"execution_count": 13,
"id": "8ad5d55b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Data(2.4574206, dtype=float32)"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.amax(ux.data)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "d66e9599",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1.50000000000000,\n",
" 0.247579286353488,\n",
" 0.247579286353488,\n",
" 1.00000000000000,\n",
" 0.422500000000000]"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"[term for term in C.flat() if term != 0]"
"assert np.isclose(np.linalg.norm(ux.data), 125.24704)\n",
"assert np.isclose(np.linalg.norm(uy.data), 84.02643)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a0debd27",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 64b9950

Please sign in to comment.