|
424 | 424 | "id": "4d91d056-05ff-4abb-a702-c1683b6a3718", |
425 | 425 | "metadata": {}, |
426 | 426 | "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." |
451 | 429 | ] |
452 | 430 | }, |
453 | 431 | { |
|
457 | 435 | "metadata": {}, |
458 | 436 | "outputs": [], |
459 | 437 | "source": [ |
460 | | - "n.assign(1.1)\n", |
461 | 438 | "terms = [fn(**fields, **rheology, test_function=ϕ) for fn, ϕ in fns]\n", |
462 | 439 | "terms[0] = firedrake.replace(terms[0], {h: H})\n", |
463 | 440 | "F = sum(terms)\n", |
|
482 | 459 | "outputs": [], |
483 | 460 | "source": [ |
484 | 461 | "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", |
486 | 463 | " n.assign(exponent)\n", |
487 | 464 | " momentum_solver.solve()" |
488 | 465 | ] |
|
0 commit comments