|
12 | 12 | },
|
13 | 13 | {
|
14 | 14 | "cell_type": "code",
|
15 |
| - "execution_count": 1, |
| 15 | + "execution_count": 7, |
16 | 16 | "id": "occupied-accuracy",
|
17 | 17 | "metadata": {},
|
18 | 18 | "outputs": [
|
|
38 | 38 | "source": [
|
39 | 39 | "from pfhub.main import line_plot, levelset_plot, get_table_data_style, plot_order_of_accuracy, get_result_data\n",
|
40 | 40 | "from itables import init_notebook_mode\n",
|
41 |
| - "init_notebook_mode(all_interactive=True);" |
| 41 | + "init_notebook_mode(all_interactive=True);\n", |
| 42 | + "\n", |
| 43 | + "from pathlib import Path\n", |
| 44 | + "\n", |
| 45 | + "cwd = Path().resolve()\n", |
| 46 | + "benchmark_path = f'{cwd}/../../simulation_list.yaml'" |
42 | 47 | ]
|
43 | 48 | },
|
44 | 49 | {
|
|
7072 | 7077 | " x='time (s)',\n",
|
7073 | 7078 | " y='Free Energy',\n",
|
7074 | 7079 | " title=\"Free Energy, <i>r</i><sub>0</sub>=0.99<i>r</i><sup>*</sup>\"\n",
|
7075 |
| - " )\n", |
| 7080 | + " ),\n", |
| 7081 | + " benchmark_path=benchmark_path\n", |
7076 | 7082 | ")"
|
7077 | 7083 | ]
|
7078 | 7084 | },
|
|
14078 | 14084 | " x='time (s)',\n",
|
14079 | 14085 | " y='Solid Fraction',\n",
|
14080 | 14086 | " title=\"Solid Fraction, <i>r</i><sub>0</sub>=0.99<i>r</i><sup>*</sup>\"\n",
|
14081 |
| - " )\n", |
| 14087 | + " ),\n", |
| 14088 | + " benchmark_path=benchmark_path\n", |
14082 | 14089 | ")"
|
14083 | 14090 | ]
|
14084 | 14091 | },
|
|
21084 | 21091 | " x='time (s)',\n",
|
21085 | 21092 | " y='Free Energy',\n",
|
21086 | 21093 | " title=\"Free Energy, <i>r</i><sub>0</sub>=<i>r</i><sup>*</sup>\"\n",
|
21087 |
| - " )\n", |
| 21094 | + " ),\n", |
| 21095 | + " benchmark_path=benchmark_path\n", |
21088 | 21096 | ")"
|
21089 | 21097 | ]
|
21090 | 21098 | },
|
|
28090 | 28098 | " x='time (s)',\n",
|
28091 | 28099 | " y='Solid Fraction',\n",
|
28092 | 28100 | " title=\"Solid Fraction, <i>r</i><sub>0</sub>=<i>r</i><sup>*</sup>\"\n",
|
28093 |
| - " )\n", |
| 28101 | + " ),\n", |
| 28102 | + " benchmark_path=benchmark_path\n", |
28094 | 28103 | ")"
|
28095 | 28104 | ]
|
28096 | 28105 | },
|
|
35096 | 35105 | " x='time (s)',\n",
|
35097 | 35106 | " y='Free Energy',\n",
|
35098 | 35107 | " title=\"Free Energy, <i>r</i><sub>0</sub>=1.01<i>r</i><sup>*</sup>\"\n",
|
35099 |
| - " )\n", |
| 35108 | + " ),\n", |
| 35109 | + " benchmark_path=benchmark_path\n", |
35100 | 35110 | ")"
|
35101 | 35111 | ]
|
35102 | 35112 | },
|
|
42102 | 42112 | " x='time (s)',\n",
|
42103 | 42113 | " y='Solid Fraction',\n",
|
42104 | 42114 | " title=\"Solid Fraction, <i>r</i><sub>0</sub>=1.01<i>r</i><sup>*</sup>\"\n",
|
42105 |
| - " )\n", |
| 42115 | + " ),\n", |
| 42116 | + " benchmark_path=benchmark_path\n", |
42106 | 42117 | ")"
|
42107 | 42118 | ]
|
42108 | 42119 | },
|
|
48558 | 48569 | "source": [
|
48559 | 48570 | "#PYTEST_VALIDATE_IGNORE_OUTPUT\n",
|
48560 | 48571 | "\n",
|
48561 |
| - "data = get_result_data(['phase_field_1'], ['8a.1'], ['x', 'y', 'z'])\n", |
| 48572 | + "data = get_result_data(['phase_field_1'], ['8a.1'], ['x', 'y', 'z'], benchmark_path=benchmark_path)\n", |
48562 | 48573 | "\n",
|
48563 | 48574 | "levelset_plot(\n",
|
48564 | 48575 | " data,\n",
|
|
55022 | 55033 | }
|
55023 | 55034 | ],
|
55024 | 55035 | "source": [
|
55025 |
| - "data = get_result_data(['phase_field_2'], ['8a.1'], ['x', 'y', 'z'])\n", |
| 55036 | + "data = get_result_data(['phase_field_2'], ['8a.1'], ['x', 'y', 'z'], benchmark_path=benchmark_path)\n", |
55026 | 55037 | "\n",
|
55027 | 55038 | "levelset_plot(\n",
|
55028 | 55039 | " data,\n",
|
|
78333 | 78344 | }
|
78334 | 78345 | ],
|
78335 | 78346 | "source": [
|
78336 |
| - "data = get_result_data(['phase_field_3'], ['8a.1'], ['x', 'y', 'z'])\n", |
| 78347 | + "data = get_result_data(['phase_field_3'], ['8a.1'], ['x', 'y', 'z'], benchmark_path=benchmark_path)\n", |
78337 | 78348 | "\n",
|
78338 | 78349 | "levelset_plot(\n",
|
78339 | 78350 | " data,\n",
|
|
79354 | 79365 | "keys = ['x', 'y', 'z']\n",
|
79355 | 79366 | "\n",
|
79356 | 79367 | "data_names = ['phase_field_3', 'phase_field_4', 'phase_field_5']\n",
|
79357 |
| - "df = get_result_data(data_names, ['8a.1'], keys=keys)\n", |
| 79368 | + "df = get_result_data(data_names, ['8a.1'], keys=keys, benchmark_path=benchmark_path)\n", |
79358 | 79369 | "\n",
|
79359 | 79370 | "plot_order_of_accuracy(\n",
|
79360 | 79371 | " df,\n",
|
|
79455 | 79466 | "#PYTEST_VALIDATE_IGNORE_OUTPUT\n",
|
79456 | 79467 | "\n",
|
79457 | 79468 | "init_notebook_mode(False)\n",
|
79458 |
| - "get_table_data_style('8a.1')" |
| 79469 | + "get_table_data_style('8a.1', benchmark_path=benchmark_path)" |
79459 | 79470 | ]
|
79460 | 79471 | },
|
79461 | 79472 | {
|
|
0 commit comments