Skip to content

Commit 26d5050

Browse files
committed
Fix up continuation
1 parent 68ad99e commit 26d5050

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

notebooks/rainier-monolithic.ipynb

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -424,30 +424,8 @@
424424
"id": "4d91d056-05ff-4abb-a702-c1683b6a3718",
425425
"metadata": {},
426426
"source": [
427-
"First, we'll do an initial solve with a linear rheology."
428-
]
429-
},
430-
{
431-
"cell_type": "code",
432-
"execution_count": null,
433-
"id": "b99a1d2c-bdf8-48d7-b450-9155d6276caa",
434-
"metadata": {},
435-
"outputs": [],
436-
"source": [
437-
"n.assign(1.0)\n",
438-
"terms = [fn(**fields, **rheology, test_function=ϕ) for fn, ϕ in fns]\n",
439-
"H = firedrake.Constant(50.0)\n",
440-
"terms[0] = firedrake.replace(terms[0], {h: H})\n",
441-
"F = sum(terms)\n",
442-
"firedrake.solve(F == 0, z, **pparams, **sparams)"
443-
]
444-
},
445-
{
446-
"cell_type": "markdown",
447-
"id": "c545438e-e0f2-4224-be60-cce046bfa0a6",
448-
"metadata": {},
449-
"source": [
450-
"Now we'll gradually step the flow law exponent from 1.0 up to 3.0."
427+
"First, we'll do an initial solve with a linear rheology.\n",
428+
"Then we'll gradually step the flow law exponent from 1.0 up to 3.0."
451429
]
452430
},
453431
{
@@ -457,7 +435,6 @@
457435
"metadata": {},
458436
"outputs": [],
459437
"source": [
460-
"n.assign(1.1)\n",
461438
"terms = [fn(**fields, **rheology, test_function=ϕ) for fn, ϕ in fns]\n",
462439
"terms[0] = firedrake.replace(terms[0], {h: H})\n",
463440
"F = sum(terms)\n",
@@ -482,7 +459,7 @@
482459
"outputs": [],
483460
"source": [
484461
"num_continuation_steps = 5\n",
485-
"for exponent in np.linspace(1.0, 3.0, num_continuation_steps)[1:]:\n",
462+
"for exponent in np.linspace(1.0, 3.0, num_continuation_steps):\n",
486463
" n.assign(exponent)\n",
487464
" momentum_solver.solve()"
488465
]

0 commit comments

Comments
 (0)