diff --git a/examples/PyMPDATA_examples/trixi_comparison/advection_comparison.ipynb b/examples/PyMPDATA_examples/trixi_comparison/advection_comparison.ipynb index 008dfac5..23344c75 100644 --- a/examples/PyMPDATA_examples/trixi_comparison/advection_comparison.ipynb +++ b/examples/PyMPDATA_examples/trixi_comparison/advection_comparison.ipynb @@ -46,8 +46,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:15.271395Z", - "start_time": "2024-10-10T19:47:15.265003Z" + "end_time": "2024-10-15T11:12:13.173162Z", + "start_time": "2024-10-15T11:12:13.167042Z" } }, "cell_type": "code", @@ -70,6 +70,7 @@ "assert SETUP[\"nx\"] == SETUP[\"ny\"]\n", "\n", "import json\n", + "import subprocess\n", "with open('setup.json', 'w', encoding='UTF-8') as f:\n", " json.dump(SETUP, f)" ], @@ -88,8 +89,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:15.294977Z", - "start_time": "2024-10-10T19:47:15.287908Z" + "end_time": "2024-10-15T11:12:13.223789Z", + "start_time": "2024-10-15T11:12:13.218476Z" } }, "cell_type": "code", @@ -153,14 +154,25 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:51.832380Z", - "start_time": "2024-10-10T19:47:15.295974Z" + "end_time": "2024-10-15T11:13:12.407588Z", + "start_time": "2024-10-15T11:12:13.237811Z" } }, "cell_type": "code", - "source": "_ = !julia trixi.jl ", + "source": "subprocess.run([\"julia\", \"trixi.jl\"], check=True)", "id": "56fb8302adfc01e7", - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "CompletedProcess(args=['julia', 'trixi.jl'], returncode=0)" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], "execution_count": 3 }, { @@ -172,8 +184,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:52.827392Z", - "start_time": "2024-10-10T19:47:51.833392Z" + "end_time": "2024-10-15T11:13:14.552172Z", + "start_time": "2024-10-15T11:13:12.408591Z" } }, "cell_type": "code", @@ -193,8 +205,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:52.832399Z", - "start_time": "2024-10-10T19:47:52.827392Z" + "end_time": "2024-10-15T11:13:14.557254Z", + "start_time": "2024-10-15T11:13:14.553174Z" } }, "cell_type": "code", @@ -227,8 +239,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:52.865693Z", - "start_time": "2024-10-10T19:47:52.834406Z" + "end_time": "2024-10-15T11:13:14.568856Z", + "start_time": "2024-10-15T11:13:14.558259Z" } }, "cell_type": "code", @@ -243,8 +255,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:52.880842Z", - "start_time": "2024-10-10T19:47:52.866692Z" + "end_time": "2024-10-15T11:13:14.585089Z", + "start_time": "2024-10-15T11:13:14.569861Z" } }, "cell_type": "code", @@ -267,8 +279,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:52.890215Z", - "start_time": "2024-10-10T19:47:52.881847Z" + "end_time": "2024-10-15T11:13:14.594072Z", + "start_time": "2024-10-15T11:13:14.585089Z" } }, "cell_type": "code", @@ -289,8 +301,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:53.403813Z", - "start_time": "2024-10-10T19:47:52.891218Z" + "end_time": "2024-10-15T11:13:15.952188Z", + "start_time": "2024-10-15T11:13:14.595068Z" } }, "cell_type": "code", @@ -305,8 +317,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:47:53.407866Z", - "start_time": "2024-10-10T19:47:53.404814Z" + "end_time": "2024-10-15T11:13:15.956173Z", + "start_time": "2024-10-15T11:13:15.952188Z" } }, "cell_type": "code", @@ -321,8 +333,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:22.678648Z", - "start_time": "2024-10-10T19:47:53.408873Z" + "end_time": "2024-10-15T11:13:45.581913Z", + "start_time": "2024-10-15T11:13:15.957178Z" } }, "cell_type": "code", @@ -334,8 +346,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:22.684649Z", - "start_time": "2024-10-10T19:48:22.680648Z" + "end_time": "2024-10-15T11:13:45.586629Z", + "start_time": "2024-10-15T11:13:45.583902Z" } }, "cell_type": "code", @@ -347,8 +359,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:23.373135Z", - "start_time": "2024-10-10T19:48:22.685648Z" + "end_time": "2024-10-15T11:13:46.387282Z", + "start_time": "2024-10-15T11:13:45.587623Z" } }, "cell_type": "code", @@ -367,7 +379,7 @@ "text/plain": [ "
" ], - "image/svg+xml": "\n\n\n \n \n \n \n 2024-10-10T21:48:23.325627\n image/svg+xml\n \n \n Matplotlib v3.9.1, https://matplotlib.org/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n" + "image/svg+xml": "\n\n\n \n \n \n \n 2024-10-15T13:13:46.341772\n image/svg+xml\n \n \n Matplotlib v3.9.1, https://matplotlib.org/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n" }, "metadata": {}, "output_type": "display_data" @@ -375,12 +387,12 @@ { "data": { "text/plain": [ - "HTML(value=\".\\\\tmpc4rgpf1d.pdf
\")" + "HTML(value=\".\\\\tmpe87tyq36.pdf
\")" ], "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, - "model_id": "c711659293f243e3a9bb6ad0b7d54ccf" + "model_id": "675ad169418947df8509614efdb3edce" } }, "metadata": {}, @@ -392,8 +404,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:23.377610Z", - "start_time": "2024-10-10T19:48:23.374146Z" + "end_time": "2024-10-15T11:13:46.390952Z", + "start_time": "2024-10-15T11:13:46.387282Z" } }, "cell_type": "code", @@ -405,8 +417,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:23.389269Z", - "start_time": "2024-10-10T19:48:23.378611Z" + "end_time": "2024-10-15T11:13:46.403148Z", + "start_time": "2024-10-15T11:13:46.391956Z" } }, "cell_type": "code", @@ -430,21 +442,32 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:34.398591Z", - "start_time": "2024-10-10T19:48:23.390272Z" + "end_time": "2024-10-15T11:13:57.760570Z", + "start_time": "2024-10-15T11:13:46.403148Z" } }, "cell_type": "code", - "source": "_ = !julia to_vtk.jl {solution_filename}", + "source": "subprocess.run([\"julia\", \"to_vtk.jl\", solution_filename], check=True)", "id": "960cee65b6c01544", - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "CompletedProcess(args=['julia', 'to_vtk.jl', 'solution_000030.h5'], returncode=0)" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], "execution_count": 16 }, { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:34.407960Z", - "start_time": "2024-10-10T19:48:34.399598Z" + "end_time": "2024-10-15T11:13:57.770744Z", + "start_time": "2024-10-15T11:13:57.761587Z" } }, "cell_type": "code", @@ -465,16 +488,14 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:34.421994Z", - "start_time": "2024-10-10T19:48:34.408962Z" + "end_time": "2024-10-15T11:13:57.784545Z", + "start_time": "2024-10-15T11:13:57.771744Z" } }, "cell_type": "code", "source": [ "trixi_output = np.zeros(pympdata_result_state.shape)\n", - "print(trixi_points.shape)\n", "for i in range(trixi_points.shape[0]):\n", - " print(mesh.point_data.keys())\n", " trixi_output[trixi_points[i][0], trixi_points[i][1]] = mesh.point_data['scalar'][i][0]" ], "id": "58595cff705f196c", @@ -484,8 +505,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:34.699704Z", - "start_time": "2024-10-10T19:48:34.422990Z" + "end_time": "2024-10-15T11:13:58.058042Z", + "start_time": "2024-10-15T11:13:57.785550Z" } }, "cell_type": "code", @@ -504,7 +525,7 @@ "text/plain": [ "
" ], - "image/svg+xml": "\n\n\n \n \n \n \n 2024-10-10T21:48:34.652044\n image/svg+xml\n \n \n Matplotlib v3.9.1, https://matplotlib.org/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n" + "image/svg+xml": "\n\n\n \n \n \n \n 2024-10-15T13:13:58.011584\n image/svg+xml\n \n \n Matplotlib v3.9.1, https://matplotlib.org/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n" }, "metadata": {}, "output_type": "display_data" @@ -512,12 +533,12 @@ { "data": { "text/plain": [ - "HTML(value=\".\\\\tmprphi9r0e.pdf
\")" + "HTML(value=\".\\\\tmp9i_l1kcg.pdf
\")" ], "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, - "model_id": "ac0a31d47e124f8a9bd614d9412e83bf" + "model_id": "5f4c37bbeb3f42feaeb1dca1ed50cffa" } }, "metadata": {}, @@ -529,8 +550,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:34.704717Z", - "start_time": "2024-10-10T19:48:34.700721Z" + "end_time": "2024-10-15T11:13:58.063266Z", + "start_time": "2024-10-15T11:13:58.059056Z" } }, "cell_type": "code", @@ -548,8 +569,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:34.759745Z", - "start_time": "2024-10-10T19:48:34.705752Z" + "end_time": "2024-10-15T11:13:58.073023Z", + "start_time": "2024-10-15T11:13:58.064280Z" } }, "cell_type": "code", @@ -566,8 +587,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-10-10T19:48:34.762748Z", - "start_time": "2024-10-10T19:48:34.760746Z" + "end_time": "2024-10-15T11:13:58.075711Z", + "start_time": "2024-10-15T11:13:58.073023Z" } }, "cell_type": "code",