From 38817275c59e8502dba8d3beb7ae442b8ba0f24c Mon Sep 17 00:00:00 2001 From: jan-janssen Date: Sun, 8 Feb 2026 16:29:41 +0100 Subject: [PATCH 1/5] add pyiron_core example --- .github/workflows/pipeline.yml | 2 + binder/postBuild | 2 + book/_toc.yml | 3 +- executorlib.ipynb | 2063 +++++++++++++++++++++++++++- pyiron_base.ipynb | 1908 +++++++++++++++++++++++++- pyiron_core.ipynb | 2342 ++++++++++++++++++++++++++++++++ pyiron_workflow.ipynb | 2094 +++++++++++++++++++++++++++- 7 files changed, 8410 insertions(+), 4 deletions(-) create mode 100644 pyiron_core.ipynb diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ec8b102..c1006bf 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -23,6 +23,7 @@ jobs: run: | conda install -c conda-forge jupyter papermill sudo apt-get install -y $(cat binder/apt.txt) + pip install git+https://github.com/pyiron/pyiron_core.git --no-deps --no-build-isolation - name: Create Additional Conda Environments shell: bash -l {0} run: | @@ -33,6 +34,7 @@ jobs: shell: bash -l {0} run: | papermill pyiron_base.ipynb pyiron_base_out.ipynb -k "python3" + papermill pyiron_core.ipynb pyiron_core_out.ipynb -k "python3" papermill pyiron_workflow.ipynb pyiron_workflow_out.ipynb -k "python3" papermill executorlib.ipynb executorlib_out.ipynb -k "python3" diff --git a/binder/postBuild b/binder/postBuild index 673d8f5..efa5c58 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -1,3 +1,5 @@ conda env create -n preprocessing -f source/envs/preprocessing.yaml -y conda env create -n processing -f source/envs/processing.yaml -y conda env create -n postprocessing -f source/envs/postprocessing.yaml -y + +pip install git+https://github.com/pyiron/pyiron_core.git --no-deps --no-build-isolation diff --git a/book/_toc.yml b/book/_toc.yml index 9e71ea9..85034f3 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -1,6 +1,7 @@ format: jb-book root: README chapters: +- file: executorlib.ipynb - file: pyiron_base.ipynb +- file: pyiron_core.ipynb - file: pyiron_workflow.ipynb -- file: executorlib.ipynb diff --git a/executorlib.ipynb b/executorlib.ipynb index eeff597..a85942a 100644 --- a/executorlib.ipynb +++ b/executorlib.ipynb @@ -1 +1,2062 @@ -{"metadata":{"kernelspec":{"display_name":"Python 3 (ipykernel)","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.12.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":5,"nbformat":4,"cells":[{"id":"947480d0","cell_type":"markdown","source":"# executorlib\n\nhttps://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements","metadata":{}},{"id":"fd0c3bc6","cell_type":"markdown","source":"## Define workflow with executorlib","metadata":{}},{"id":"dbb45106","cell_type":"code","source":"import os\nfrom executorlib import SingleNodeExecutor, get_item_from_future","metadata":{"trusted":true},"outputs":[],"execution_count":1},{"id":"79c4129c","cell_type":"code","source":"from workflow import (\n generate_mesh, \n convert_to_xdmf,\n poisson,\n plot_over_line,\n substitute_macros,\n compile_paper,\n)","metadata":{"trusted":true},"outputs":[],"execution_count":2},{"id":"6c336eb0","cell_type":"code","source":"workflow_json_filename = \"workflow_executorlib.json\"","metadata":{"trusted":true},"outputs":[],"execution_count":3},{"id":"8eaa67ef-e59a-4c1d-af0a-0b2f444a89fb","cell_type":"code","source":"domain_size = 2.0\nsource_directory = os.path.abspath(os.path.join(os.curdir, \"source\"))\n\nwith SingleNodeExecutor(export_workflow_filename=workflow_json_filename) as exe:\n gmsh_output_file = exe.submit(\n generate_mesh,\n domain_size=domain_size,\n source_directory=source_directory,\n )\n meshio_output_dict = exe.submit(\n convert_to_xdmf,\n gmsh_output_file=gmsh_output_file,\n )\n poisson_dict = exe.submit(\n poisson,\n meshio_output_xdmf=get_item_from_future(meshio_output_dict, key=\"xdmf_file\"), \n meshio_output_h5=get_item_from_future(meshio_output_dict, key=\"h5_file\"),\n source_directory=source_directory,\n )\n pvbatch_output_file = exe.submit(\n plot_over_line,\n poisson_output_pvd_file=get_item_from_future(poisson_dict, key=\"pvd_file\"), \n poisson_output_vtu_file=get_item_from_future(poisson_dict, key=\"vtu_file\"),\n source_directory=source_directory,\n )\n macros_tex_file = exe.submit(\n substitute_macros,\n pvbatch_output_file=pvbatch_output_file, \n ndofs=get_item_from_future(poisson_dict, key=\"numdofs\"), \n domain_size=domain_size,\n source_directory=source_directory,\n )\n paper_output = exe.submit(\n compile_paper,\n macros_tex=macros_tex_file, \n plot_file=pvbatch_output_file,\n source_directory=source_directory,\n )\n task_hash_dict = exe._task_scheduler._task_hash_dict.copy()\n future_hash_dict = exe._task_scheduler._future_hash_dict.copy()","metadata":{"scrolled":true,"trusted":true},"outputs":[],"execution_count":4},{"id":"e56de781-7157-4384-afb4-666ba9273528","cell_type":"markdown","source":"## Load Workflow with pyiron_base","metadata":{}},{"id":"217c2572","cell_type":"code","source":"from python_workflow_definition.pyiron_base import load_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":5},{"id":"e2bb5b53","cell_type":"code","source":"delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\ndelayed_object_lst[-1].draw()","metadata":{"trusted":true},"outputs":[{"output_type":"display_data","data":{"text/plain":"","image/svg+xml":"\n\n\n\n\ncreate_function_job_3f5acff9e454c0d1b3373172bac8c6bd\n\ncreate_function_job=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f6847680>\n\n\n\nmacros_tex_9baa6f5c79fc197fa59e906c683cba4b\n\nmacros_tex=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f6847410>\n\n\n\nmacros_tex_9baa6f5c79fc197fa59e906c683cba4b->create_function_job_3f5acff9e454c0d1b3373172bac8c6bd\n\n\n\n\n\npvbatch_output_file_e5b316beb6fc4b5ad12b75611e47b0cb\n\npvbatch_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f68470e0>\n\n\n\npvbatch_output_file_e5b316beb6fc4b5ad12b75611e47b0cb->macros_tex_9baa6f5c79fc197fa59e906c683cba4b\n\n\n\n\n\npoisson_output_pvd_file_56933fd5422d938029ae870d96be986b\n\npoisson_output_pvd_file=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f6846d80>\n\n\n\npoisson_output_pvd_file_56933fd5422d938029ae870d96be986b->pvbatch_output_file_e5b316beb6fc4b5ad12b75611e47b0cb\n\n\n\n\n\nplot_file_e5b316beb6fc4b5ad12b75611e47b0cb\n\nplot_file=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f68470e0>\n\n\n\npoisson_output_pvd_file_56933fd5422d938029ae870d96be986b->plot_file_e5b316beb6fc4b5ad12b75611e47b0cb\n\n\n\n\n\nplot_file_e5b316beb6fc4b5ad12b75611e47b0cb->create_function_job_3f5acff9e454c0d1b3373172bac8c6bd\n\n\n\n\n\nmeshio_output_xdmf_4689182a74107bf28b57befbd74c94c9\n\nmeshio_output_xdmf=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f7368b30>\n\n\n\nmeshio_output_xdmf_4689182a74107bf28b57befbd74c94c9->poisson_output_pvd_file_56933fd5422d938029ae870d96be986b\n\n\n\n\n\npoisson_output_vtu_file_c73331171a859a678d7b7ebb4811e381\n\npoisson_output_vtu_file=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f6846d50>\n\n\n\nmeshio_output_xdmf_4689182a74107bf28b57befbd74c94c9->poisson_output_vtu_file_c73331171a859a678d7b7ebb4811e381\n\n\n\n\n\nndofs_11224144a112030e3250f7b0b09e59ab\n\nndofs=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f6847170>\n\n\n\nmeshio_output_xdmf_4689182a74107bf28b57befbd74c94c9->ndofs_11224144a112030e3250f7b0b09e59ab\n\n\n\n\n\npoisson_output_vtu_file_c73331171a859a678d7b7ebb4811e381->pvbatch_output_file_e5b316beb6fc4b5ad12b75611e47b0cb\n\n\n\n\n\npoisson_output_vtu_file_c73331171a859a678d7b7ebb4811e381->plot_file_e5b316beb6fc4b5ad12b75611e47b0cb\n\n\n\n\n\nndofs_11224144a112030e3250f7b0b09e59ab->macros_tex_9baa6f5c79fc197fa59e906c683cba4b\n\n\n\n\n\ngmsh_output_file_ee4dd4630cc01f75bd22a2e6ba3a1197\n\ngmsh_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f68467b0>\n\n\n\ngmsh_output_file_ee4dd4630cc01f75bd22a2e6ba3a1197->meshio_output_xdmf_4689182a74107bf28b57befbd74c94c9\n\n\n\n\n\nmeshio_output_h5_ae7e8f51b534aff9ebf5e67c64a93d13\n\nmeshio_output_h5=<pyiron_base.project.delayed.DelayedObject object at 0x7e68f6846990>\n\n\n\ngmsh_output_file_ee4dd4630cc01f75bd22a2e6ba3a1197->meshio_output_h5_ae7e8f51b534aff9ebf5e67c64a93d13\n\n\n\n\n\nmeshio_output_h5_ae7e8f51b534aff9ebf5e67c64a93d13->poisson_output_pvd_file_56933fd5422d938029ae870d96be986b\n\n\n\n\n\nmeshio_output_h5_ae7e8f51b534aff9ebf5e67c64a93d13->poisson_output_vtu_file_c73331171a859a678d7b7ebb4811e381\n\n\n\n\n\nmeshio_output_h5_ae7e8f51b534aff9ebf5e67c64a93d13->ndofs_11224144a112030e3250f7b0b09e59ab\n\n\n\n\n\ndomain_size_f12a7f1986b9dd058dfc666dbe230b20\n\ndomain_size=2.0\n\n\n\ndomain_size_f12a7f1986b9dd058dfc666dbe230b20->macros_tex_9baa6f5c79fc197fa59e906c683cba4b\n\n\n\n\n\ndomain_size_f12a7f1986b9dd058dfc666dbe230b20->gmsh_output_file_ee4dd4630cc01f75bd22a2e6ba3a1197\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3\n\nsource_directory=/home/jovyan/source\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->create_function_job_3f5acff9e454c0d1b3373172bac8c6bd\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->macros_tex_9baa6f5c79fc197fa59e906c683cba4b\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->pvbatch_output_file_e5b316beb6fc4b5ad12b75611e47b0cb\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->poisson_output_pvd_file_56933fd5422d938029ae870d96be986b\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->plot_file_e5b316beb6fc4b5ad12b75611e47b0cb\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->poisson_output_vtu_file_c73331171a859a678d7b7ebb4811e381\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->ndofs_11224144a112030e3250f7b0b09e59ab\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->gmsh_output_file_ee4dd4630cc01f75bd22a2e6ba3a1197\n\n\n\n\n"},"metadata":{}}],"execution_count":6},{"id":"ec40947a","cell_type":"code","source":"delayed_object_lst[-1].pull()","metadata":{"trusted":true},"outputs":[{"name":"stdout","output_type":"stream","text":"The job generate_mesh_125ce05ece0fc0d66618512ba1d77668 was saved and received the ID: 1\nThe job convert_to_xdmf_3f3f6eedbec11ddbadd12a29bba73645 was saved and received the ID: 2\nThe job poisson_4ac637289ca3e887f9c9d5c8930988b7 was saved and received the ID: 3\n"},{"name":"stderr","output_type":"stream","text":"/srv/conda/envs/notebook/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n import pkg_resources\n"},{"name":"stdout","output_type":"stream","text":"The job plot_over_line_fd8a60d7c4699d5c6b315f7aa2676e18 was saved and received the ID: 4\nThe job substitute_macros_f5b8e73356e1fa2caf0e44eaaad30177 was saved and received the ID: 5\nThe job compile_paper_1f9a009abf2ecd1cd23f9d8669659b16 was saved and received the ID: 6\n"},{"execution_count":7,"output_type":"execute_result","data":{"text/plain":"'/home/jovyan/postprocessing/paper.pdf'"},"metadata":{}}],"execution_count":7},{"id":"e8335e4e","cell_type":"markdown","source":"## Load Workflow with pyiron_workflow","metadata":{}},{"id":"b2f50774","cell_type":"code","source":"from python_workflow_definition.pyiron_workflow import load_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":8},{"id":"b39fac43","cell_type":"code","source":"wf = load_workflow_json(file_name=workflow_json_filename)","metadata":{"trusted":true},"outputs":[],"execution_count":9},{"id":"960a8158","cell_type":"code","source":"wf.draw(size=(10,10))","metadata":{"trusted":true},"outputs":[{"execution_count":10,"output_type":"execute_result","data":{"image/svg+xml":"\n\n\n\n\n\nclusterworkflow_executorlib\n\nworkflow_executorlib: Workflow\n\nclusterworkflow_executorlibInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibgenerate_mesh\n\n\n\n\n\n\n\ngenerate_mesh: generate_mesh\n\n\nclusterworkflow_executorlibgenerate_meshInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibgenerate_meshOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibconvert_to_xdmf\n\n\n\n\n\n\n\nconvert_to_xdmf: convert_to_xdmf\n\n\nclusterworkflow_executorlibconvert_to_xdmfInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibconvert_to_xdmfOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibpoisson\n\n\n\n\n\n\n\npoisson: poisson\n\n\nclusterworkflow_executorlibpoissonInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibpoissonOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibplot_over_line\n\n\n\n\n\n\n\nplot_over_line: plot_over_line\n\n\nclusterworkflow_executorlibplot_over_lineInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibplot_over_lineOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibsubstitute_macros\n\n\n\n\n\n\n\nsubstitute_macros: substitute_macros\n\n\nclusterworkflow_executorlibsubstitute_macrosInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibsubstitute_macrosOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibcompile_paper\n\n\n\n\n\n\n\ncompile_paper: compile_paper\n\n\nclusterworkflow_executorlibcompile_paperInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibcompile_paperOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537\n\n\n\n\n\n\n\ninjected_GetItem_5251388959329362537: GetItem\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591\n\n\n\n\n\n\n\ninjected_GetItem_m9088462211518952591: GetItem\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417\n\n\n\n\n\n\n\ninjected_GetItem_m3580614972376308417: GetItem\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855\n\n\n\n\n\n\n\ninjected_GetItem_2123578857541870855: GetItem\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933\n\n\n\n\n\n\n\ninjected_GetItem_6792725409926666933: GetItem\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\n\nclusterworkflow_executorlibInputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibOutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibInputsgenerate_mesh__domain_size\n\ngenerate_mesh__domain_size: float\n\n\n\nclusterworkflow_executorlibgenerate_meshInputsdomain_size\n\ndomain_size: float\n\n\n\nclusterworkflow_executorlibInputsgenerate_mesh__domain_size->clusterworkflow_executorlibgenerate_meshInputsdomain_size\n\n\n\n\n\n\nclusterworkflow_executorlibInputsgenerate_mesh__source_directory\n\ngenerate_mesh__source_directory: str\n\n\n\nclusterworkflow_executorlibgenerate_meshInputssource_directory\n\nsource_directory: str\n\n\n\nclusterworkflow_executorlibInputsgenerate_mesh__source_directory->clusterworkflow_executorlibgenerate_meshInputssource_directory\n\n\n\n\n\n\nclusterworkflow_executorlibInputspoisson__source_directory\n\npoisson__source_directory: str\n\n\n\nclusterworkflow_executorlibpoissonInputssource_directory\n\nsource_directory: str\n\n\n\nclusterworkflow_executorlibInputspoisson__source_directory->clusterworkflow_executorlibpoissonInputssource_directory\n\n\n\n\n\n\nclusterworkflow_executorlibInputsplot_over_line__source_directory\n\nplot_over_line__source_directory: str\n\n\n\nclusterworkflow_executorlibplot_over_lineInputssource_directory\n\nsource_directory: str\n\n\n\nclusterworkflow_executorlibInputsplot_over_line__source_directory->clusterworkflow_executorlibplot_over_lineInputssource_directory\n\n\n\n\n\n\nclusterworkflow_executorlibInputssubstitute_macros__domain_size\n\nsubstitute_macros__domain_size: float\n\n\n\nclusterworkflow_executorlibsubstitute_macrosInputsdomain_size\n\ndomain_size: float\n\n\n\nclusterworkflow_executorlibInputssubstitute_macros__domain_size->clusterworkflow_executorlibsubstitute_macrosInputsdomain_size\n\n\n\n\n\n\nclusterworkflow_executorlibInputssubstitute_macros__source_directory\n\nsubstitute_macros__source_directory: str\n\n\n\nclusterworkflow_executorlibsubstitute_macrosInputssource_directory\n\nsource_directory: str\n\n\n\nclusterworkflow_executorlibInputssubstitute_macros__source_directory->clusterworkflow_executorlibsubstitute_macrosInputssource_directory\n\n\n\n\n\n\nclusterworkflow_executorlibInputscompile_paper__source_directory\n\ncompile_paper__source_directory: str\n\n\n\nclusterworkflow_executorlibcompile_paperInputssource_directory\n\nsource_directory: str\n\n\n\nclusterworkflow_executorlibInputscompile_paper__source_directory->clusterworkflow_executorlibcompile_paperInputssource_directory\n\n\n\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_5251388959329362537__item\n\ninjected_GetItem_5251388959329362537__item\n\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537Inputsitem\n\nitem\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_5251388959329362537__item->clusterworkflow_executorlibinjected_GetItem_5251388959329362537Inputsitem\n\n\n\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_m9088462211518952591__item\n\ninjected_GetItem_m9088462211518952591__item\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591Inputsitem\n\nitem\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_m9088462211518952591__item->clusterworkflow_executorlibinjected_GetItem_m9088462211518952591Inputsitem\n\n\n\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_m3580614972376308417__item\n\ninjected_GetItem_m3580614972376308417__item\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417Inputsitem\n\nitem\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_m3580614972376308417__item->clusterworkflow_executorlibinjected_GetItem_m3580614972376308417Inputsitem\n\n\n\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_2123578857541870855__item\n\ninjected_GetItem_2123578857541870855__item\n\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855Inputsitem\n\nitem\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_2123578857541870855__item->clusterworkflow_executorlibinjected_GetItem_2123578857541870855Inputsitem\n\n\n\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_6792725409926666933__item\n\ninjected_GetItem_6792725409926666933__item\n\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933Inputsitem\n\nitem\n\n\n\nclusterworkflow_executorlibInputsinjected_GetItem_6792725409926666933__item->clusterworkflow_executorlibinjected_GetItem_6792725409926666933Inputsitem\n\n\n\n\n\n\nclusterworkflow_executorlibOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibOutputsWithInjectioncompile_paper__compile_paper\n\ncompile_paper__compile_paper: str\n\n\n\nclusterworkflow_executorlibgenerate_meshInputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibgenerate_meshOutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibgenerate_meshInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibgenerate_meshOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibgenerate_meshOutputsWithInjectiongenerate_mesh\n\ngenerate_mesh: str\n\n\n\nclusterworkflow_executorlibconvert_to_xdmfInputsgmsh_output_file\n\ngmsh_output_file: str\n\n\n\nclusterworkflow_executorlibgenerate_meshOutputsWithInjectiongenerate_mesh->clusterworkflow_executorlibconvert_to_xdmfInputsgmsh_output_file\n\n\n\n\n\n\nclusterworkflow_executorlibconvert_to_xdmfInputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibconvert_to_xdmfInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf\n\nconvert_to_xdmf: dict\n\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537Inputsobj\n\nobj\n\n\n\nclusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterworkflow_executorlibinjected_GetItem_5251388959329362537Inputsobj\n\n\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591Inputsobj\n\nobj\n\n\n\nclusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterworkflow_executorlibinjected_GetItem_m9088462211518952591Inputsobj\n\n\n\n\n\n\nclusterworkflow_executorlibpoissonInputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibpoissonOutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibpoissonInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibpoissonInputsmeshio_output_xdmf\n\nmeshio_output_xdmf: str\n\n\n\nclusterworkflow_executorlibpoissonInputsmeshio_output_h5\n\nmeshio_output_h5: str\n\n\n\nclusterworkflow_executorlibpoissonOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibpoissonOutputsWithInjectionpoisson\n\npoisson: dict\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417Inputsobj\n\nobj\n\n\n\nclusterworkflow_executorlibpoissonOutputsWithInjectionpoisson->clusterworkflow_executorlibinjected_GetItem_m3580614972376308417Inputsobj\n\n\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855Inputsobj\n\nobj\n\n\n\nclusterworkflow_executorlibpoissonOutputsWithInjectionpoisson->clusterworkflow_executorlibinjected_GetItem_2123578857541870855Inputsobj\n\n\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933Inputsobj\n\nobj\n\n\n\nclusterworkflow_executorlibpoissonOutputsWithInjectionpoisson->clusterworkflow_executorlibinjected_GetItem_6792725409926666933Inputsobj\n\n\n\n\n\n\nclusterworkflow_executorlibplot_over_lineInputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibplot_over_lineOutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibplot_over_lineInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibplot_over_lineInputspoisson_output_pvd_file\n\npoisson_output_pvd_file: str\n\n\n\nclusterworkflow_executorlibplot_over_lineInputspoisson_output_vtu_file\n\npoisson_output_vtu_file: str\n\n\n\nclusterworkflow_executorlibplot_over_lineOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibplot_over_lineOutputsWithInjectionplot_over_line\n\nplot_over_line: str\n\n\n\nclusterworkflow_executorlibsubstitute_macrosInputspvbatch_output_file\n\npvbatch_output_file: str\n\n\n\nclusterworkflow_executorlibplot_over_lineOutputsWithInjectionplot_over_line->clusterworkflow_executorlibsubstitute_macrosInputspvbatch_output_file\n\n\n\n\n\n\nclusterworkflow_executorlibcompile_paperInputsplot_file\n\nplot_file: str\n\n\n\nclusterworkflow_executorlibplot_over_lineOutputsWithInjectionplot_over_line->clusterworkflow_executorlibcompile_paperInputsplot_file\n\n\n\n\n\n\nclusterworkflow_executorlibsubstitute_macrosInputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibsubstitute_macrosOutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibsubstitute_macrosInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibsubstitute_macrosInputsndofs\n\nndofs: int\n\n\n\nclusterworkflow_executorlibsubstitute_macrosOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibsubstitute_macrosOutputsWithInjectionsubstitute_macros\n\nsubstitute_macros: str\n\n\n\nclusterworkflow_executorlibcompile_paperInputsmacros_tex\n\nmacros_tex: str\n\n\n\nclusterworkflow_executorlibsubstitute_macrosOutputsWithInjectionsubstitute_macros->clusterworkflow_executorlibcompile_paperInputsmacros_tex\n\n\n\n\n\n\nclusterworkflow_executorlibcompile_paperInputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibcompile_paperOutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibcompile_paperInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibcompile_paperOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibcompile_paperOutputsWithInjectioncompile_paper\n\ncompile_paper: str\n\n\n\nclusterworkflow_executorlibcompile_paperOutputsWithInjectioncompile_paper->clusterworkflow_executorlibOutputsWithInjectioncompile_paper__compile_paper\n\n\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537Inputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537OutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterworkflow_executorlibinjected_GetItem_5251388959329362537OutputsWithInjectiongetitem->clusterworkflow_executorlibpoissonInputsmeshio_output_xdmf\n\n\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591Inputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591OutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m9088462211518952591OutputsWithInjectiongetitem->clusterworkflow_executorlibpoissonInputsmeshio_output_h5\n\n\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417Inputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417OutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterworkflow_executorlibinjected_GetItem_m3580614972376308417OutputsWithInjectiongetitem->clusterworkflow_executorlibplot_over_lineInputspoisson_output_pvd_file\n\n\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855Inputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855OutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterworkflow_executorlibinjected_GetItem_2123578857541870855OutputsWithInjectiongetitem->clusterworkflow_executorlibplot_over_lineInputspoisson_output_vtu_file\n\n\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933Inputsrun\n\nrun\n\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933OutputsWithInjectionran\n\nran\n\n\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterworkflow_executorlibinjected_GetItem_6792725409926666933OutputsWithInjectiongetitem->clusterworkflow_executorlibsubstitute_macrosInputsndofs\n\n\n\n\n\n\n","text/plain":""},"metadata":{}}],"execution_count":10},{"id":"02566c31","cell_type":"code","source":"wf.run()","metadata":{"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":"/srv/conda/envs/notebook/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n import pkg_resources\n"},{"execution_count":11,"output_type":"execute_result","data":{"text/plain":"{'compile_paper__compile_paper': '/home/jovyan/postprocessing/paper.pdf'}"},"metadata":{}}],"execution_count":11}]} +{ + "cells": [ + { + "cell_type": "markdown", + "id": "947480d0", + "metadata": {}, + "source": [ + "# executorlib\n", + "\n", + "https://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements" + ] + }, + { + "cell_type": "markdown", + "id": "fd0c3bc6", + "metadata": {}, + "source": [ + "## Define workflow with executorlib" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "dbb45106", + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "from executorlib import SingleNodeExecutor, get_item_from_future" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "79c4129c", + "metadata": {}, + "outputs": [], + "source": [ + "from workflow import (\n", + " generate_mesh, \n", + " convert_to_xdmf,\n", + " poisson,\n", + " plot_over_line,\n", + " substitute_macros,\n", + " compile_paper,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "6c336eb0", + "metadata": {}, + "outputs": [], + "source": [ + "workflow_json_filename = \"workflow_executorlib.json\"" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "8eaa67ef-e59a-4c1d-af0a-0b2f444a89fb", + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "domain_size = 2.0\n", + "source_directory = os.path.abspath(os.path.join(os.curdir, \"source\"))\n", + "\n", + "with SingleNodeExecutor(export_workflow_filename=workflow_json_filename) as exe:\n", + " gmsh_output_file = exe.submit(\n", + " generate_mesh,\n", + " domain_size=domain_size,\n", + " source_directory=source_directory,\n", + " )\n", + " meshio_output_dict = exe.submit(\n", + " convert_to_xdmf,\n", + " gmsh_output_file=gmsh_output_file,\n", + " )\n", + " poisson_dict = exe.submit(\n", + " poisson,\n", + " meshio_output_xdmf=get_item_from_future(meshio_output_dict, key=\"xdmf_file\"), \n", + " meshio_output_h5=get_item_from_future(meshio_output_dict, key=\"h5_file\"),\n", + " source_directory=source_directory,\n", + " )\n", + " pvbatch_output_file = exe.submit(\n", + " plot_over_line,\n", + " poisson_output_pvd_file=get_item_from_future(poisson_dict, key=\"pvd_file\"), \n", + " poisson_output_vtu_file=get_item_from_future(poisson_dict, key=\"vtu_file\"),\n", + " source_directory=source_directory,\n", + " )\n", + " macros_tex_file = exe.submit(\n", + " substitute_macros,\n", + " pvbatch_output_file=pvbatch_output_file, \n", + " ndofs=get_item_from_future(poisson_dict, key=\"numdofs\"), \n", + " domain_size=domain_size,\n", + " source_directory=source_directory,\n", + " )\n", + " paper_output = exe.submit(\n", + " compile_paper,\n", + " macros_tex=macros_tex_file, \n", + " plot_file=pvbatch_output_file,\n", + " source_directory=source_directory,\n", + " )\n", + " task_hash_dict = exe._task_scheduler._task_hash_dict.copy()\n", + " future_hash_dict = exe._task_scheduler._future_hash_dict.copy()" + ] + }, + { + "cell_type": "markdown", + "id": "e56de781-7157-4384-afb4-666ba9273528", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_base" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "217c2572", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.pyiron_base import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "e2bb5b53", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "create_function_job_3b0b3c7e99aa919b6c6234471692ccd3\n", + "\n", + "create_function_job=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1793245f0>\n", + "\n", + "\n", + "\n", + "macros_tex_8ec7c7bf81d8a44133777ab4cfbdf43e\n", + "\n", + "macros_tex=<pyiron_base.project.delayed.DelayedObject object at 0x7fb179324380>\n", + "\n", + "\n", + "\n", + "macros_tex_8ec7c7bf81d8a44133777ab4cfbdf43e->create_function_job_3b0b3c7e99aa919b6c6234471692ccd3\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "pvbatch_output_file_4428106f96ecbd4b7feef53352883dbe\n", + "\n", + "pvbatch_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1794efe00>\n", + "\n", + "\n", + "\n", + "pvbatch_output_file_4428106f96ecbd4b7feef53352883dbe->macros_tex_8ec7c7bf81d8a44133777ab4cfbdf43e\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_51fb273a2718fa4cd57f2d3996708d6a\n", + "\n", + "poisson_output_pvd_file=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1794efce0>\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_51fb273a2718fa4cd57f2d3996708d6a->pvbatch_output_file_4428106f96ecbd4b7feef53352883dbe\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "plot_file_4428106f96ecbd4b7feef53352883dbe\n", + "\n", + "plot_file=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1794efe00>\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_51fb273a2718fa4cd57f2d3996708d6a->plot_file_4428106f96ecbd4b7feef53352883dbe\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "plot_file_4428106f96ecbd4b7feef53352883dbe->create_function_job_3b0b3c7e99aa919b6c6234471692ccd3\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_45057ab594156f780320433a448fcf40\n", + "\n", + "meshio_output_xdmf=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1794ef8c0>\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_45057ab594156f780320433a448fcf40->poisson_output_pvd_file_51fb273a2718fa4cd57f2d3996708d6a\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_14c7f4a52756d5300effad3200f884be\n", + "\n", + "poisson_output_vtu_file=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1794efb90>\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_45057ab594156f780320433a448fcf40->poisson_output_vtu_file_14c7f4a52756d5300effad3200f884be\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "ndofs_4d512de646100b72b98d6728defdbfa2\n", + "\n", + "ndofs=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1794efdd0>\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_45057ab594156f780320433a448fcf40->ndofs_4d512de646100b72b98d6728defdbfa2\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_14c7f4a52756d5300effad3200f884be->pvbatch_output_file_4428106f96ecbd4b7feef53352883dbe\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_14c7f4a52756d5300effad3200f884be->plot_file_4428106f96ecbd4b7feef53352883dbe\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "ndofs_4d512de646100b72b98d6728defdbfa2->macros_tex_8ec7c7bf81d8a44133777ab4cfbdf43e\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "gmsh_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1794ef620>\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5->meshio_output_xdmf_45057ab594156f780320433a448fcf40\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_5cbf39f801faa543229952d8c7022a06\n", + "\n", + "meshio_output_h5=<pyiron_base.project.delayed.DelayedObject object at 0x7fb1794ef710>\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5->meshio_output_h5_5cbf39f801faa543229952d8c7022a06\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_5cbf39f801faa543229952d8c7022a06->poisson_output_pvd_file_51fb273a2718fa4cd57f2d3996708d6a\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_5cbf39f801faa543229952d8c7022a06->poisson_output_vtu_file_14c7f4a52756d5300effad3200f884be\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_5cbf39f801faa543229952d8c7022a06->ndofs_4d512de646100b72b98d6728defdbfa2\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20\n", + "\n", + "domain_size=2.0\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20->macros_tex_8ec7c7bf81d8a44133777ab4cfbdf43e\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20->gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba\n", + "\n", + "source_directory=/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/source\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->create_function_job_3b0b3c7e99aa919b6c6234471692ccd3\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->macros_tex_8ec7c7bf81d8a44133777ab4cfbdf43e\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->pvbatch_output_file_4428106f96ecbd4b7feef53352883dbe\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->poisson_output_pvd_file_51fb273a2718fa4cd57f2d3996708d6a\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->plot_file_4428106f96ecbd4b7feef53352883dbe\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->poisson_output_vtu_file_14c7f4a52756d5300effad3200f884be\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->ndofs_4d512de646100b72b98d6728defdbfa2\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\n", + "delayed_object_lst[-1].draw()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "ec40947a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job generate_mesh_efefecc1e0b6f0c722299e0e3006ac35 was saved and received the ID: 57\n", + "The job convert_to_xdmf_0ad4672b75fea34088b0c70a550b4240 was saved and received the ID: 58\n", + "The job poisson_20cb224cd32355381872a81936a7d8f0 was saved and received the ID: 59\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job plot_over_line_3dce48c8db062af151a2bef63dc24e36 was saved and received the ID: 60\n", + "The job substitute_macros_cdc660861030d9ca17195b5db4616d5c was saved and received the ID: 61\n", + "The job compile_paper_de1b620df0f0da260aa27ab0316988ba was saved and received the ID: 62\n" + ] + }, + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "delayed_object_lst[-1].pull()" + ] + }, + { + "cell_type": "markdown", + "id": "dadd5db0-30e4-49a0-b2ba-f1dae9530a48", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_core" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "9a84041c-761c-44ab-b9b9-3e96cd9c892b", + "metadata": {}, + "outputs": [], + "source": [ + "from importlib import import_module\n", + "import json" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "4e54a406-a1ca-4766-b914-805975548ebb", + "metadata": {}, + "outputs": [], + "source": [ + "from pyiron_core import Workflow, as_function_node\n", + "from pyiron_core.pyiron_nodes.utilities import GetItem\n", + "import pyiron_core.pyironflow.api as pyironflow\n", + "from pyiron_core.pyiron_workflow.simple_workflow import Node\n", + "from pyiron_core.pyiron_workflow.wf_graph_tools import _different_indices, _edges_from_dict, _nodes_from_dict, _filter_and_flatten_nested_dict_keys, _rename_keys, _get_node_labels, _find_input_nodes, get_nodes_from_wf, topological_sort, WorkflowGraph" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "8f1ff7d3-c0ea-4c82-9770-02c8ef2cabae", + "metadata": {}, + "outputs": [], + "source": [ + "def get_graph_from_wf(wf: \"Workflow\") -> WorkflowGraph:\n", + " # get edges between nodes\n", + " keys_to_keep = [\"target\", \"targetHandle\", \"source\", \"sourceHandle\"]\n", + " edges = _filter_and_flatten_nested_dict_keys(pyironflow.get_edges(wf), keys_to_keep)\n", + "\n", + " # add edges for non-default inputs\n", + " nodes = get_nodes_from_wf(\n", + " wf,\n", + " keys_to_keep=[\n", + " \"data/label\",\n", + " \"data/import_path\",\n", + " \"data/target_values\",\n", + " \"data/target_labels\",\n", + " \"data/source_values\",\n", + " \"data/source_labels\",\n", + " ],\n", + " )\n", + " nodes_non_default_inp_param = []\n", + " for node in nodes:\n", + " label = node[\"label\"]\n", + " import_path = node[\"import_path\"]\n", + " try:\n", + " node_obj = pyironflow.get_node_from_path(import_path)()\n", + " except TypeError:\n", + " node_obj = as_function_node(pyironflow.get_node_from_path(import_path), labels=node[\"data__source_labels\"])()\n", + " changed_args = _different_indices(\n", + " node_obj.inputs.data[\"default\"], node[\"data__target_values\"]\n", + " )\n", + " for i in changed_args:\n", + " value = node[\"data__target_values\"][i]\n", + " handle = node[\"data__target_labels\"][i]\n", + " if value not in (\"NonPrimitive\", \"NotData\"):\n", + " inp_node_label = f\"var_{label}__{handle}\"\n", + " edge = {\n", + " \"target\": label,\n", + " \"targetHandle\": handle,\n", + " \"source\": inp_node_label,\n", + " \"sourceHandle\": value,\n", + " }\n", + "\n", + " edges.append(edge)\n", + " inp_node = {\"label\": inp_node_label, \"data__import_path\": value}\n", + " nodes_non_default_inp_param.append(inp_node)\n", + "\n", + " nodes = get_nodes_from_wf(\n", + " wf,\n", + " keys_to_keep=[\"data/label\", \"data/import_path\"],\n", + " )\n", + "\n", + " key_mapping = {\"data__label\": \"label\", \"data__import_path\": \"import_path\"}\n", + " nodes = _rename_keys(nodes_non_default_inp_param + nodes, key_mapping=key_mapping)\n", + "\n", + " graph = WorkflowGraph(\n", + " nodes=_nodes_from_dict(nodes), edges=_edges_from_dict(edges), label=wf.label\n", + " )\n", + " sorted_graph = topological_sort(graph)\n", + "\n", + " return sorted_graph" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "06dca67d-82ea-474d-90c7-eb16aff84659", + "metadata": {}, + "outputs": [], + "source": [ + "def pull_node(wf: \"Workflow\", node_label: str):\n", + " \"\"\"\n", + " Pull a node from the workflow graph and run it. Execute only nodes that\n", + " are required as input to run the node.\n", + "\n", + " Args:\n", + " wf (Workflow): The workflow containing the node.\n", + " node_label (str): The label of the node to pull.\n", + " \"\"\"\n", + " graph = get_graph_from_wf(wf)\n", + " node_labels = _get_node_labels(graph)\n", + " if node_label not in node_labels:\n", + " raise ValueError(f\"Node label '{node_label}' not found in the workflow graph.\")\n", + " node_index = node_labels.index(node_label)\n", + " input_nodes = _find_input_nodes(graph, node_index)\n", + " input_nodes_labels = [node_labels[i] for i in input_nodes]\n", + "\n", + " for input_node_label in input_nodes_labels:\n", + " out = wf._nodes[input_node_label].run()\n", + " return out\n" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "09911f03-1a1b-4cc4-aa84-ad8be749c81e", + "metadata": {}, + "outputs": [], + "source": [ + "def get_input_parameter_dict(content):\n", + " input_parameter_dict = {}\n", + " for node in content[\"nodes\"]:\n", + " if node[\"type\"] == \"input\":\n", + " input_parameter_dict[node[\"id\"]] = node[\"value\"]\n", + " \n", + " return input_parameter_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "b968d078-d40a-4881-aa60-951ed052fc5f", + "metadata": {}, + "outputs": [], + "source": [ + "def set_workflow(workflow, content):\n", + " node_lst = []\n", + " input_parameter_dict = get_input_parameter_dict(content=content)\n", + " for node in content[\"nodes\"]:\n", + " \n", + " if node['type'] == 'function':\n", + " p, m = node['value'].rsplit('.', 1)\n", + " mod = import_module(p)\n", + " met = as_function_node(getattr(mod, m), labels=[\"result\"])\n", + " \n", + " input_dict = {}\n", + " for edge in content['edges']:\n", + " if edge[\"target\"] == node[\"id\"]:\n", + " if edge[\"source\"] in input_parameter_dict:\n", + " input_dict[edge['targetPort']] = input_parameter_dict[edge[\"source\"]]\n", + " elif edge[\"source\"] in node_lst and edge[\"sourcePort\"] is None:\n", + " input_dict[edge['targetPort']] = getattr(workflow, \"node_\" + str(edge[\"source\"]))\n", + " elif edge[\"source\"] in node_lst and edge[\"sourcePort\"] is not None:\n", + " label = \"node_\" + str(edge[\"source\"]) + \"_\" + edge[\"sourcePort\"]\n", + " setattr(workflow, label, GetItem(getattr(workflow, \"node_\" + str(edge[\"source\"])), edge[\"sourcePort\"])) \n", + " input_dict[edge['targetPort']] = getattr(workflow, label)\n", + " else:\n", + " raise TypeError()\n", + " \n", + " label = \"node_\" + str(node[\"id\"])\n", + " setattr(workflow, label, met(**input_dict))\n", + " node_lst.append(node[\"id\"])\n", + "\n", + " return workflow" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "07c2ffa2-5839-4a89-828c-c0c4badba6d8", + "metadata": {}, + "outputs": [], + "source": [ + "with open(workflow_json_filename, \"r\") as f:\n", + " content = json.load(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "977a5113-3d68-4912-91eb-2d4c5099f692", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" + ] + }, + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf = Workflow(\"test\")\n", + "wf = set_workflow(workflow=wf, content=content)\n", + "pull_node(wf, list(wf.child_labels)[-1])" + ] + }, + { + "cell_type": "markdown", + "id": "e8335e4e", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_workflow" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "b2f50774", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.pyiron_workflow import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "b39fac43", + "metadata": {}, + "outputs": [], + "source": [ + "wf = load_workflow_json(file_name=workflow_json_filename)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "960a8158", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "INFO:pyiron_log:Assigning a channel with the label compile_paper to the io key compile_paper__compile_paper\n" + ] + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlib\n", + "\n", + "workflow_executorlib: Workflow\n", + "\n", + "clusterworkflow_executorlibInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_mesh\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "generate_mesh: generate_mesh\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmf\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "convert_to_xdmf: convert_to_xdmf\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibpoisson\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson: poisson\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_line\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "plot_over_line: plot_over_line\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macros\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "substitute_macros: substitute_macros\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paper\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "compile_paper: compile_paper\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_1953717273699184182: GetItem\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_2677739504880214383: GetItem\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m4368142800884841899: GetItem\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_848083497153084746: GetItem\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m8706731420586939498: GetItem\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsgenerate_mesh__domain_size\n", + "\n", + "generate_mesh__domain_size: float\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshInputsdomain_size\n", + "\n", + "domain_size: float\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsgenerate_mesh__domain_size->clusterworkflow_executorlibgenerate_meshInputsdomain_size\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsgenerate_mesh__source_directory\n", + "\n", + "generate_mesh__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsgenerate_mesh__source_directory->clusterworkflow_executorlibgenerate_meshInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputspoisson__source_directory\n", + "\n", + "poisson__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputspoisson__source_directory->clusterworkflow_executorlibpoissonInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsplot_over_line__source_directory\n", + "\n", + "plot_over_line__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsplot_over_line__source_directory->clusterworkflow_executorlibplot_over_lineInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputssubstitute_macros__domain_size\n", + "\n", + "substitute_macros__domain_size: float\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosInputsdomain_size\n", + "\n", + "domain_size: float\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputssubstitute_macros__domain_size->clusterworkflow_executorlibsubstitute_macrosInputsdomain_size\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputssubstitute_macros__source_directory\n", + "\n", + "substitute_macros__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputssubstitute_macros__source_directory->clusterworkflow_executorlibsubstitute_macrosInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputscompile_paper__source_directory\n", + "\n", + "compile_paper__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputscompile_paper__source_directory->clusterworkflow_executorlibcompile_paperInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_1953717273699184182__item\n", + "\n", + "injected_GetItem_1953717273699184182__item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_1953717273699184182__item->clusterworkflow_executorlibinjected_GetItem_1953717273699184182Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_2677739504880214383__item\n", + "\n", + "injected_GetItem_2677739504880214383__item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_2677739504880214383__item->clusterworkflow_executorlibinjected_GetItem_2677739504880214383Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_m4368142800884841899__item\n", + "\n", + "injected_GetItem_m4368142800884841899__item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_m4368142800884841899__item->clusterworkflow_executorlibinjected_GetItem_m4368142800884841899Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_848083497153084746__item\n", + "\n", + "injected_GetItem_848083497153084746__item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_848083497153084746__item->clusterworkflow_executorlibinjected_GetItem_848083497153084746Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_m8706731420586939498__item\n", + "\n", + "injected_GetItem_m8706731420586939498__item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibInputsinjected_GetItem_m8706731420586939498__item->clusterworkflow_executorlibinjected_GetItem_m8706731420586939498Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibOutputsWithInjectioncompile_paper__compile_paper\n", + "\n", + "compile_paper__compile_paper: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshOutputsWithInjectiongenerate_mesh\n", + "\n", + "generate_mesh: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfInputsgmsh_output_file\n", + "\n", + "gmsh_output_file: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibgenerate_meshOutputsWithInjectiongenerate_mesh->clusterworkflow_executorlibconvert_to_xdmfInputsgmsh_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf\n", + "\n", + "convert_to_xdmf: dict\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterworkflow_executorlibinjected_GetItem_1953717273699184182Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterworkflow_executorlibinjected_GetItem_2677739504880214383Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonInputsmeshio_output_xdmf\n", + "\n", + "meshio_output_xdmf: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonInputsmeshio_output_h5\n", + "\n", + "meshio_output_h5: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonOutputsWithInjectionpoisson\n", + "\n", + "poisson: dict\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonOutputsWithInjectionpoisson->clusterworkflow_executorlibinjected_GetItem_m4368142800884841899Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonOutputsWithInjectionpoisson->clusterworkflow_executorlibinjected_GetItem_848083497153084746Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibpoissonOutputsWithInjectionpoisson->clusterworkflow_executorlibinjected_GetItem_m8706731420586939498Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineInputspoisson_output_pvd_file\n", + "\n", + "poisson_output_pvd_file: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineInputspoisson_output_vtu_file\n", + "\n", + "poisson_output_vtu_file: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineOutputsWithInjectionplot_over_line\n", + "\n", + "plot_over_line: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosInputspvbatch_output_file\n", + "\n", + "pvbatch_output_file: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineOutputsWithInjectionplot_over_line->clusterworkflow_executorlibsubstitute_macrosInputspvbatch_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperInputsplot_file\n", + "\n", + "plot_file: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibplot_over_lineOutputsWithInjectionplot_over_line->clusterworkflow_executorlibcompile_paperInputsplot_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosInputsndofs\n", + "\n", + "ndofs: int\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosOutputsWithInjectionsubstitute_macros\n", + "\n", + "substitute_macros: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperInputsmacros_tex\n", + "\n", + "macros_tex: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibsubstitute_macrosOutputsWithInjectionsubstitute_macros->clusterworkflow_executorlibcompile_paperInputsmacros_tex\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperOutputsWithInjectioncompile_paper\n", + "\n", + "compile_paper: str\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibcompile_paperOutputsWithInjectioncompile_paper->clusterworkflow_executorlibOutputsWithInjectioncompile_paper__compile_paper\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_1953717273699184182OutputsWithInjectiongetitem->clusterworkflow_executorlibpoissonInputsmeshio_output_xdmf\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_2677739504880214383OutputsWithInjectiongetitem->clusterworkflow_executorlibpoissonInputsmeshio_output_h5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m4368142800884841899OutputsWithInjectiongetitem->clusterworkflow_executorlibplot_over_lineInputspoisson_output_pvd_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_848083497153084746OutputsWithInjectiongetitem->clusterworkflow_executorlibplot_over_lineInputspoisson_output_vtu_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterworkflow_executorlibinjected_GetItem_m8706731420586939498OutputsWithInjectiongetitem->clusterworkflow_executorlibsubstitute_macrosInputsndofs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf.draw(size=(10,10))" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "02566c31", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_1953717273699184182__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_2677739504880214383__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4368142800884841899__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_848083497153084746__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m8706731420586939498__item\n", + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n", + "INFO:pyiron_log:Assigning a channel with the label compile_paper to the io key compile_paper__compile_paper\n" + ] + }, + { + "data": { + "text/plain": [ + "{'compile_paper__compile_paper': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'}" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf.run()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/pyiron_base.ipynb b/pyiron_base.ipynb index 3a8bbef..600155d 100644 --- a/pyiron_base.ipynb +++ b/pyiron_base.ipynb @@ -1 +1,1907 @@ -{"metadata":{"kernelspec":{"display_name":"Python 3 (ipykernel)","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.12.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":5,"nbformat":4,"cells":[{"id":"106ded66-d202-46ac-82b0-2755ca309bdd","cell_type":"markdown","source":"# pyiron_base\n\nhttps://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements","metadata":{}},{"id":"91dd48ea-aa7e-4937-a68e-59fc5017eb1e","cell_type":"markdown","source":"## Define workflow with pyiron_base","metadata":{}},{"id":"2c9622f5-ab7e-460e-b8e4-8d21413eda77","cell_type":"code","source":"import os","metadata":{"trusted":true},"outputs":[],"execution_count":1},{"id":"d265bb5aa6af79d6","cell_type":"code","source":"from workflow import (\n generate_mesh as _generate_mesh, \n convert_to_xdmf as _convert_to_xdmf,\n poisson as _poisson,\n plot_over_line as _plot_over_line,\n substitute_macros as _substitute_macros,\n compile_paper as _compile_paper,\n)","metadata":{"trusted":true},"outputs":[],"execution_count":2},{"id":"2dced28725813fc1","cell_type":"code","source":"from pyiron_base import job\n\nfrom python_workflow_definition.pyiron_base import write_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":3},{"id":"549ecf27-88ef-4e77-8bd4-b616cfdda2e4","cell_type":"code","source":"generate_mesh = job(_generate_mesh)\nconvert_to_xdmf = job(_convert_to_xdmf, output_key_lst=[\"xdmf_file\", \"h5_file\"])\npoisson = job(_poisson, output_key_lst=[\"numdofs\", \"pvd_file\", \"vtu_file\"])\nplot_over_line = job(_plot_over_line)\nsubstitute_macros = job(_substitute_macros)\ncompile_paper = job(_compile_paper)","metadata":{"trusted":true},"outputs":[],"execution_count":4},{"id":"8d911f98-3b80-457f-a0f4-3cb37ebf1691","cell_type":"code","source":"domain_size = 2.0","metadata":{"trusted":true},"outputs":[],"execution_count":5},{"id":"c6ea980b-6761-4191-8407-7b1f78a4c3ea","cell_type":"code","source":"source_directory = os.path.abspath(os.path.join(os.curdir, \"source\"))","metadata":{"trusted":true},"outputs":[],"execution_count":6},{"id":"71d411b6-cbec-489e-99e3-ba71680bcb5b","cell_type":"code","source":"gmsh_output_file = generate_mesh(\n domain_size=domain_size,\n source_directory=source_directory,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":7},{"id":"1d0d9804-f250-48b3-a5d0-a546d520f79b","cell_type":"code","source":"meshio_output_dict = convert_to_xdmf(\n gmsh_output_file=gmsh_output_file,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":8},{"id":"7b69bcff-e2b1-4d4a-b62c-6a1c86eeb590","cell_type":"code","source":"poisson_dict = poisson(\n meshio_output_xdmf=meshio_output_dict.output.xdmf_file, \n meshio_output_h5=meshio_output_dict.output.h5_file,\n source_directory=source_directory,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":9},{"id":"3c4a29b0-eb1e-490a-8be0-e03cfff15e0a","cell_type":"code","source":"pvbatch_output_file = plot_over_line(\n poisson_output_pvd_file=poisson_dict.output.pvd_file, \n poisson_output_vtu_file=poisson_dict.output.vtu_file,\n source_directory=source_directory,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":10},{"id":"a0a4c233-322d-4723-9627-62ca2487bfa9","cell_type":"code","source":"macros_tex_file = substitute_macros( \n pvbatch_output_file=pvbatch_output_file, \n ndofs=poisson_dict.output.numdofs, \n domain_size=domain_size,\n source_directory=source_directory,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":11},{"id":"c281408f-e63d-4380-a7e6-c595d49fbb8f","cell_type":"code","source":"paper_output = compile_paper(\n macros_tex=macros_tex_file, \n plot_file=pvbatch_output_file,\n source_directory=source_directory,\n)","metadata":{"trusted":true},"outputs":[],"execution_count":12},{"id":"63f29646-3846-4a97-a033-20e9df0ac214","cell_type":"code","source":"workflow_json_filename = \"pyiron_base_nfdi.json\"","metadata":{"trusted":true},"outputs":[],"execution_count":13},{"id":"f62111ba-9271-4987-9c7e-3b1c9f9eae7a","cell_type":"code","source":"write_workflow_json(delayed_object=paper_output, file_name=workflow_json_filename)","metadata":{"trusted":true},"outputs":[],"execution_count":14},{"id":"385acbf585763632","cell_type":"markdown","source":"## Load Workflow with pyiron_workflow","metadata":{}},{"id":"927d0118cc4edfba","cell_type":"code","source":"from python_workflow_definition.pyiron_workflow import load_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":15},{"id":"50055483ca2c9909","cell_type":"code","source":"wf = load_workflow_json(file_name=workflow_json_filename)","metadata":{"trusted":true},"outputs":[],"execution_count":16},{"id":"7d25a578c431e0f5","cell_type":"code","source":"wf.draw(size=(10,10))","metadata":{"trusted":true},"outputs":[{"execution_count":17,"output_type":"execute_result","data":{"image/svg+xml":"\n\n\n\n\n\nclusterpyiron_base_nfdi\n\npyiron_base_nfdi: Workflow\n\nclusterpyiron_base_nfdiInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdiOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdicompile_paper\n\n\n\n\n\n\n\ncompile_paper: compile_paper\n\n\nclusterpyiron_base_nfdicompile_paperInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdicompile_paperOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdisubstitute_macros\n\n\n\n\n\n\n\nsubstitute_macros: substitute_macros\n\n\nclusterpyiron_base_nfdisubstitute_macrosInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdisubstitute_macrosOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdiplot_over_line\n\n\n\n\n\n\n\nplot_over_line: plot_over_line\n\n\nclusterpyiron_base_nfdiplot_over_lineInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdiplot_over_lineOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdipoisson\n\n\n\n\n\n\n\npoisson: poisson\n\n\nclusterpyiron_base_nfdipoissonInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdipoissonOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdiconvert_to_xdmf\n\n\n\n\n\n\n\nconvert_to_xdmf: convert_to_xdmf\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdigenerate_mesh\n\n\n\n\n\n\n\ngenerate_mesh: generate_mesh\n\n\nclusterpyiron_base_nfdigenerate_meshInputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdigenerate_meshOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848\n\n\n\n\n\n\n\ninjected_GetItem_7421791025956105848: GetItem\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581\n\n\n\n\n\n\n\ninjected_GetItem_m4539059900611598581: GetItem\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990\n\n\n\n\n\n\n\ninjected_GetItem_2730767276543991990: GetItem\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983\n\n\n\n\n\n\n\ninjected_GetItem_m8723434089450500983: GetItem\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969\n\n\n\n\n\n\n\ninjected_GetItem_318539641731226969: GetItem\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\n\nclusterpyiron_base_nfdiInputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdiOutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdiInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdiInputscompile_paper__source_directory\n\ncompile_paper__source_directory: str\n\n\n\nclusterpyiron_base_nfdicompile_paperInputssource_directory\n\nsource_directory: str\n\n\n\nclusterpyiron_base_nfdiInputscompile_paper__source_directory->clusterpyiron_base_nfdicompile_paperInputssource_directory\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputssubstitute_macros__domain_size\n\nsubstitute_macros__domain_size: float\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosInputsdomain_size\n\ndomain_size: float\n\n\n\nclusterpyiron_base_nfdiInputssubstitute_macros__domain_size->clusterpyiron_base_nfdisubstitute_macrosInputsdomain_size\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputssubstitute_macros__source_directory\n\nsubstitute_macros__source_directory: str\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosInputssource_directory\n\nsource_directory: str\n\n\n\nclusterpyiron_base_nfdiInputssubstitute_macros__source_directory->clusterpyiron_base_nfdisubstitute_macrosInputssource_directory\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputsplot_over_line__source_directory\n\nplot_over_line__source_directory: str\n\n\n\nclusterpyiron_base_nfdiplot_over_lineInputssource_directory\n\nsource_directory: str\n\n\n\nclusterpyiron_base_nfdiInputsplot_over_line__source_directory->clusterpyiron_base_nfdiplot_over_lineInputssource_directory\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputspoisson__source_directory\n\npoisson__source_directory: str\n\n\n\nclusterpyiron_base_nfdipoissonInputssource_directory\n\nsource_directory: str\n\n\n\nclusterpyiron_base_nfdiInputspoisson__source_directory->clusterpyiron_base_nfdipoissonInputssource_directory\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputsgenerate_mesh__domain_size\n\ngenerate_mesh__domain_size: float\n\n\n\nclusterpyiron_base_nfdigenerate_meshInputsdomain_size\n\ndomain_size: float\n\n\n\nclusterpyiron_base_nfdiInputsgenerate_mesh__domain_size->clusterpyiron_base_nfdigenerate_meshInputsdomain_size\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputsgenerate_mesh__source_directory\n\ngenerate_mesh__source_directory: str\n\n\n\nclusterpyiron_base_nfdigenerate_meshInputssource_directory\n\nsource_directory: str\n\n\n\nclusterpyiron_base_nfdiInputsgenerate_mesh__source_directory->clusterpyiron_base_nfdigenerate_meshInputssource_directory\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_7421791025956105848__item\n\ninjected_GetItem_7421791025956105848__item\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848Inputsitem\n\nitem\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_7421791025956105848__item->clusterpyiron_base_nfdiinjected_GetItem_7421791025956105848Inputsitem\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_m4539059900611598581__item\n\ninjected_GetItem_m4539059900611598581__item\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581Inputsitem\n\nitem\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_m4539059900611598581__item->clusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581Inputsitem\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_2730767276543991990__item\n\ninjected_GetItem_2730767276543991990__item\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990Inputsitem\n\nitem\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_2730767276543991990__item->clusterpyiron_base_nfdiinjected_GetItem_2730767276543991990Inputsitem\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_m8723434089450500983__item\n\ninjected_GetItem_m8723434089450500983__item\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983Inputsitem\n\nitem\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_m8723434089450500983__item->clusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983Inputsitem\n\n\n\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_318539641731226969__item\n\ninjected_GetItem_318539641731226969__item\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969Inputsitem\n\nitem\n\n\n\nclusterpyiron_base_nfdiInputsinjected_GetItem_318539641731226969__item->clusterpyiron_base_nfdiinjected_GetItem_318539641731226969Inputsitem\n\n\n\n\n\n\nclusterpyiron_base_nfdiOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdiOutputsWithInjectioncompile_paper__compile_paper\n\ncompile_paper__compile_paper: str\n\n\n\nclusterpyiron_base_nfdicompile_paperInputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdicompile_paperOutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdicompile_paperInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdicompile_paperInputsmacros_tex\n\nmacros_tex: str\n\n\n\nclusterpyiron_base_nfdicompile_paperInputsplot_file\n\nplot_file: str\n\n\n\nclusterpyiron_base_nfdicompile_paperOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdicompile_paperOutputsWithInjectioncompile_paper\n\ncompile_paper: str\n\n\n\nclusterpyiron_base_nfdicompile_paperOutputsWithInjectioncompile_paper->clusterpyiron_base_nfdiOutputsWithInjectioncompile_paper__compile_paper\n\n\n\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosInputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosOutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosInputspvbatch_output_file\n\npvbatch_output_file: str\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosInputsndofs\n\nndofs: int\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosOutputsWithInjectionsubstitute_macros\n\nsubstitute_macros: str\n\n\n\nclusterpyiron_base_nfdisubstitute_macrosOutputsWithInjectionsubstitute_macros->clusterpyiron_base_nfdicompile_paperInputsmacros_tex\n\n\n\n\n\n\nclusterpyiron_base_nfdiplot_over_lineInputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdiplot_over_lineInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdiplot_over_lineInputspoisson_output_pvd_file\n\npoisson_output_pvd_file: str\n\n\n\nclusterpyiron_base_nfdiplot_over_lineInputspoisson_output_vtu_file\n\npoisson_output_vtu_file: str\n\n\n\nclusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionplot_over_line\n\nplot_over_line: str\n\n\n\nclusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionplot_over_line->clusterpyiron_base_nfdicompile_paperInputsplot_file\n\n\n\n\n\n\nclusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionplot_over_line->clusterpyiron_base_nfdisubstitute_macrosInputspvbatch_output_file\n\n\n\n\n\n\nclusterpyiron_base_nfdipoissonInputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdipoissonOutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdipoissonInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdipoissonInputsmeshio_output_xdmf\n\nmeshio_output_xdmf: str\n\n\n\nclusterpyiron_base_nfdipoissonInputsmeshio_output_h5\n\nmeshio_output_h5: str\n\n\n\nclusterpyiron_base_nfdipoissonOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdipoissonOutputsWithInjectionpoisson\n\npoisson: dict\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848Inputsobj\n\nobj\n\n\n\nclusterpyiron_base_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_base_nfdiinjected_GetItem_7421791025956105848Inputsobj\n\n\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983Inputsobj\n\nobj\n\n\n\nclusterpyiron_base_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983Inputsobj\n\n\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969Inputsobj\n\nobj\n\n\n\nclusterpyiron_base_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_base_nfdiinjected_GetItem_318539641731226969Inputsobj\n\n\n\n\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfInputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfInputsgmsh_output_file\n\ngmsh_output_file: str\n\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf\n\nconvert_to_xdmf: dict\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581Inputsobj\n\nobj\n\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581Inputsobj\n\n\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990Inputsobj\n\nobj\n\n\n\nclusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterpyiron_base_nfdiinjected_GetItem_2730767276543991990Inputsobj\n\n\n\n\n\n\nclusterpyiron_base_nfdigenerate_meshInputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdigenerate_meshOutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdigenerate_meshInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdigenerate_meshOutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdigenerate_meshOutputsWithInjectiongenerate_mesh\n\ngenerate_mesh: str\n\n\n\nclusterpyiron_base_nfdigenerate_meshOutputsWithInjectiongenerate_mesh->clusterpyiron_base_nfdiconvert_to_xdmfInputsgmsh_output_file\n\n\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848Inputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848OutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_7421791025956105848OutputsWithInjectiongetitem->clusterpyiron_base_nfdiplot_over_lineInputspoisson_output_pvd_file\n\n\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581Inputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581OutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m4539059900611598581OutputsWithInjectiongetitem->clusterpyiron_base_nfdipoissonInputsmeshio_output_xdmf\n\n\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990Inputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990OutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_2730767276543991990OutputsWithInjectiongetitem->clusterpyiron_base_nfdipoissonInputsmeshio_output_h5\n\n\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983Inputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983OutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_m8723434089450500983OutputsWithInjectiongetitem->clusterpyiron_base_nfdiplot_over_lineInputspoisson_output_vtu_file\n\n\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969Inputsrun\n\nrun\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969OutputsWithInjectionran\n\nran\n\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969OutputsWithInjectionfailed\n\nfailed\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclusterpyiron_base_nfdiinjected_GetItem_318539641731226969OutputsWithInjectiongetitem->clusterpyiron_base_nfdisubstitute_macrosInputsndofs\n\n\n\n\n\n\n","text/plain":""},"metadata":{}}],"execution_count":17},{"id":"fff9513c4a127a96","cell_type":"code","source":"wf.run()","metadata":{"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":"/srv/conda/envs/notebook/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n import pkg_resources\n"},{"execution_count":18,"output_type":"execute_result","data":{"text/plain":"{'compile_paper__compile_paper': '/home/jovyan/postprocessing/paper.pdf'}"},"metadata":{}}],"execution_count":18},{"id":"ee1c428f","cell_type":"markdown","source":"## Load Workflow with executorlib","metadata":{}},{"id":"82515656","cell_type":"code","source":"from executorlib import SingleNodeExecutor","metadata":{"trusted":true},"outputs":[],"execution_count":19},{"id":"785be307","cell_type":"code","source":"from python_workflow_definition.executorlib import load_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":20},{"id":"f7e9cc3f","cell_type":"code","source":"with SingleNodeExecutor(max_workers=1) as exe:\n result = load_workflow_json(file_name=workflow_json_filename, exe=exe).result()","metadata":{"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":"/srv/conda/envs/notebook/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n import pkg_resources\n"}],"execution_count":21},{"id":"5f41dfa1","cell_type":"code","source":"result","metadata":{"trusted":true},"outputs":[{"execution_count":22,"output_type":"execute_result","data":{"text/plain":"'/home/jovyan/postprocessing/paper.pdf'"},"metadata":{}}],"execution_count":22}]} \ No newline at end of file +{ + "cells": [ + { + "cell_type": "markdown", + "id": "106ded66-d202-46ac-82b0-2755ca309bdd", + "metadata": {}, + "source": [ + "# pyiron_base\n", + "\n", + "https://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements" + ] + }, + { + "cell_type": "markdown", + "id": "91dd48ea-aa7e-4937-a68e-59fc5017eb1e", + "metadata": {}, + "source": [ + "## Define workflow with pyiron_base" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "2c9622f5-ab7e-460e-b8e4-8d21413eda77", + "metadata": {}, + "outputs": [], + "source": [ + "import os" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "d265bb5aa6af79d6", + "metadata": {}, + "outputs": [], + "source": [ + "from workflow import (\n", + " generate_mesh as _generate_mesh, \n", + " convert_to_xdmf as _convert_to_xdmf,\n", + " poisson as _poisson,\n", + " plot_over_line as _plot_over_line,\n", + " substitute_macros as _substitute_macros,\n", + " compile_paper as _compile_paper,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "2dced28725813fc1", + "metadata": {}, + "outputs": [], + "source": [ + "from pyiron_base import job\n", + "\n", + "from python_workflow_definition.pyiron_base import write_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "549ecf27-88ef-4e77-8bd4-b616cfdda2e4", + "metadata": {}, + "outputs": [], + "source": [ + "generate_mesh = job(_generate_mesh)\n", + "convert_to_xdmf = job(_convert_to_xdmf, output_key_lst=[\"xdmf_file\", \"h5_file\"])\n", + "poisson = job(_poisson, output_key_lst=[\"numdofs\", \"pvd_file\", \"vtu_file\"])\n", + "plot_over_line = job(_plot_over_line)\n", + "substitute_macros = job(_substitute_macros)\n", + "compile_paper = job(_compile_paper)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "8d911f98-3b80-457f-a0f4-3cb37ebf1691", + "metadata": {}, + "outputs": [], + "source": [ + "domain_size = 2.0" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "c6ea980b-6761-4191-8407-7b1f78a4c3ea", + "metadata": {}, + "outputs": [], + "source": [ + "source_directory = os.path.abspath(os.path.join(os.curdir, \"source\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "71d411b6-cbec-489e-99e3-ba71680bcb5b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "gmsh_output_file = generate_mesh(\n", + " domain_size=domain_size,\n", + " source_directory=source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "1d0d9804-f250-48b3-a5d0-a546d520f79b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "meshio_output_dict = convert_to_xdmf(\n", + " gmsh_output_file=gmsh_output_file,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "7b69bcff-e2b1-4d4a-b62c-6a1c86eeb590", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "poisson_dict = poisson(\n", + " meshio_output_xdmf=meshio_output_dict.output.xdmf_file, \n", + " meshio_output_h5=meshio_output_dict.output.h5_file,\n", + " source_directory=source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "3c4a29b0-eb1e-490a-8be0-e03cfff15e0a", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "pvbatch_output_file = plot_over_line(\n", + " poisson_output_pvd_file=poisson_dict.output.pvd_file, \n", + " poisson_output_vtu_file=poisson_dict.output.vtu_file,\n", + " source_directory=source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "a0a4c233-322d-4723-9627-62ca2487bfa9", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "macros_tex_file = substitute_macros( \n", + " pvbatch_output_file=pvbatch_output_file, \n", + " ndofs=poisson_dict.output.numdofs, \n", + " domain_size=domain_size,\n", + " source_directory=source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "c281408f-e63d-4380-a7e6-c595d49fbb8f", + "metadata": {}, + "outputs": [], + "source": [ + "paper_output = compile_paper(\n", + " macros_tex=macros_tex_file, \n", + " plot_file=pvbatch_output_file,\n", + " source_directory=source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "63f29646-3846-4a97-a033-20e9df0ac214", + "metadata": {}, + "outputs": [], + "source": [ + "workflow_json_filename = \"pyiron_base_nfdi.json\"" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "f62111ba-9271-4987-9c7e-3b1c9f9eae7a", + "metadata": {}, + "outputs": [], + "source": [ + "write_workflow_json(delayed_object=paper_output, file_name=workflow_json_filename)" + ] + }, + { + "cell_type": "markdown", + "id": "ee1c428f", + "metadata": {}, + "source": [ + "## Load Workflow with executorlib" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "82515656", + "metadata": {}, + "outputs": [], + "source": [ + "from executorlib import SingleNodeExecutor" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "785be307", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.executorlib import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "f7e9cc3f", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" + ] + } + ], + "source": [ + "with SingleNodeExecutor(max_workers=1) as exe:\n", + " result = load_workflow_json(file_name=workflow_json_filename, exe=exe).result()" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "5f41dfa1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result" + ] + }, + { + "cell_type": "markdown", + "id": "e0c34e8a-f1ef-4d82-9366-af934bb93d4a", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_core" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "56485300-c4ad-4bdb-a485-5aab467dc30c", + "metadata": {}, + "outputs": [], + "source": [ + "from importlib import import_module\n", + "import json" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "591c7921-7202-4bfc-b6a3-dadd7e310e4b", + "metadata": {}, + "outputs": [], + "source": [ + "from pyiron_core import Workflow, as_function_node\n", + "from pyiron_core.pyiron_nodes.utilities import GetItem\n", + "import pyiron_core.pyironflow.api as pyironflow\n", + "from pyiron_core.pyiron_workflow.simple_workflow import Node\n", + "from pyiron_core.pyiron_workflow.wf_graph_tools import _different_indices, _edges_from_dict, _nodes_from_dict, _filter_and_flatten_nested_dict_keys, _rename_keys, _get_node_labels, _find_input_nodes, get_nodes_from_wf, topological_sort, WorkflowGraph" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "9817f0e2-3fc7-4fcc-80ba-631910ab4f1a", + "metadata": {}, + "outputs": [], + "source": [ + "def get_graph_from_wf(wf: \"Workflow\") -> WorkflowGraph:\n", + " # get edges between nodes\n", + " keys_to_keep = [\"target\", \"targetHandle\", \"source\", \"sourceHandle\"]\n", + " edges = _filter_and_flatten_nested_dict_keys(pyironflow.get_edges(wf), keys_to_keep)\n", + "\n", + " # add edges for non-default inputs\n", + " nodes = get_nodes_from_wf(\n", + " wf,\n", + " keys_to_keep=[\n", + " \"data/label\",\n", + " \"data/import_path\",\n", + " \"data/target_values\",\n", + " \"data/target_labels\",\n", + " \"data/source_values\",\n", + " \"data/source_labels\",\n", + " ],\n", + " )\n", + " nodes_non_default_inp_param = []\n", + " for node in nodes:\n", + " label = node[\"label\"]\n", + " import_path = node[\"import_path\"]\n", + " try:\n", + " node_obj = pyironflow.get_node_from_path(import_path)()\n", + " except TypeError:\n", + " node_obj = as_function_node(pyironflow.get_node_from_path(import_path), labels=node[\"data__source_labels\"])()\n", + " changed_args = _different_indices(\n", + " node_obj.inputs.data[\"default\"], node[\"data__target_values\"]\n", + " )\n", + " for i in changed_args:\n", + " value = node[\"data__target_values\"][i]\n", + " handle = node[\"data__target_labels\"][i]\n", + " if value not in (\"NonPrimitive\", \"NotData\"):\n", + " inp_node_label = f\"var_{label}__{handle}\"\n", + " edge = {\n", + " \"target\": label,\n", + " \"targetHandle\": handle,\n", + " \"source\": inp_node_label,\n", + " \"sourceHandle\": value,\n", + " }\n", + "\n", + " edges.append(edge)\n", + " inp_node = {\"label\": inp_node_label, \"data__import_path\": value}\n", + " nodes_non_default_inp_param.append(inp_node)\n", + "\n", + " nodes = get_nodes_from_wf(\n", + " wf,\n", + " keys_to_keep=[\"data/label\", \"data/import_path\"],\n", + " )\n", + "\n", + " key_mapping = {\"data__label\": \"label\", \"data__import_path\": \"import_path\"}\n", + " nodes = _rename_keys(nodes_non_default_inp_param + nodes, key_mapping=key_mapping)\n", + "\n", + " graph = WorkflowGraph(\n", + " nodes=_nodes_from_dict(nodes), edges=_edges_from_dict(edges), label=wf.label\n", + " )\n", + " sorted_graph = topological_sort(graph)\n", + "\n", + " return sorted_graph" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "29d85e29-590a-4329-a372-c40408a5d573", + "metadata": {}, + "outputs": [], + "source": [ + "def pull_node(wf: \"Workflow\", node_label: str):\n", + " \"\"\"\n", + " Pull a node from the workflow graph and run it. Execute only nodes that\n", + " are required as input to run the node.\n", + "\n", + " Args:\n", + " wf (Workflow): The workflow containing the node.\n", + " node_label (str): The label of the node to pull.\n", + " \"\"\"\n", + " graph = get_graph_from_wf(wf)\n", + " node_labels = _get_node_labels(graph)\n", + " if node_label not in node_labels:\n", + " raise ValueError(f\"Node label '{node_label}' not found in the workflow graph.\")\n", + " node_index = node_labels.index(node_label)\n", + " input_nodes = _find_input_nodes(graph, node_index)\n", + " input_nodes_labels = [node_labels[i] for i in input_nodes]\n", + "\n", + " for input_node_label in input_nodes_labels:\n", + " out = wf._nodes[input_node_label].run()\n", + " return out\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "0255c1c1-5be8-4331-b059-54da13e9320c", + "metadata": {}, + "outputs": [], + "source": [ + "def get_input_parameter_dict(content):\n", + " input_parameter_dict = {}\n", + " for node in content[\"nodes\"]:\n", + " if node[\"type\"] == \"input\":\n", + " input_parameter_dict[node[\"id\"]] = node[\"value\"]\n", + " \n", + " return input_parameter_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "9bf36c8c-0bde-4e91-aedd-17d5836fb69c", + "metadata": {}, + "outputs": [], + "source": [ + "def set_workflow(workflow, content):\n", + " node_lst = []\n", + " input_parameter_dict = get_input_parameter_dict(content=content)\n", + " for node in content[\"nodes\"][::-1]: # pyiron_base returns the nodes in inverse order - this is a work around\n", + " \n", + " if node['type'] == 'function':\n", + " p, m = node['value'].rsplit('.', 1)\n", + " mod = import_module(p)\n", + " met = as_function_node(getattr(mod, m), labels=[\"result\"])\n", + " \n", + " input_dict = {}\n", + " for edge in content['edges']:\n", + " if edge[\"target\"] == node[\"id\"]:\n", + " if edge[\"source\"] in input_parameter_dict:\n", + " input_dict[edge['targetPort']] = input_parameter_dict[edge[\"source\"]]\n", + " elif edge[\"source\"] in node_lst and edge[\"sourcePort\"] is None:\n", + " input_dict[edge['targetPort']] = getattr(workflow, \"node_\" + str(edge[\"source\"]))\n", + " elif edge[\"source\"] in node_lst and edge[\"sourcePort\"] is not None:\n", + " label = \"node_\" + str(edge[\"source\"]) + \"_\" + edge[\"sourcePort\"]\n", + " setattr(workflow, label, GetItem(getattr(workflow, \"node_\" + str(edge[\"source\"])), edge[\"sourcePort\"])) \n", + " input_dict[edge['targetPort']] = getattr(workflow, label)\n", + " else:\n", + " raise TypeError()\n", + " \n", + " label = \"node_\" + str(node[\"id\"])\n", + " setattr(workflow, label, met(**input_dict))\n", + " node_lst.append(node[\"id\"])\n", + "\n", + " return workflow" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "0117ca3a-73ce-45d0-b557-acc9f2971994", + "metadata": {}, + "outputs": [], + "source": [ + "with open(workflow_json_filename, \"r\") as f:\n", + " content = json.load(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "ace1a6bd-4c5a-4cf3-be4f-23c0e0e3d075", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" + ] + }, + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf = Workflow(\"test\")\n", + "wf = set_workflow(workflow=wf, content=content)\n", + "pull_node(wf, list(wf.child_labels)[-1])" + ] + }, + { + "cell_type": "markdown", + "id": "385acbf585763632", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_workflow" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "927d0118cc4edfba", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.pyiron_workflow import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "50055483ca2c9909", + "metadata": {}, + "outputs": [], + "source": [ + "wf = load_workflow_json(file_name=workflow_json_filename)" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "7d25a578c431e0f5", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "INFO:pyiron_log:Assigning a channel with the label compile_paper to the io key compile_paper__compile_paper\n" + ] + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdi\n", + "\n", + "pyiron_base_nfdi: Workflow\n", + "\n", + "clusterpyiron_base_nfdiInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdiOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paper\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "compile_paper: compile_paper\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macros\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "substitute_macros: substitute_macros\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_line\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "plot_over_line: plot_over_line\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoisson\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson: poisson\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmf\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "convert_to_xdmf: convert_to_xdmf\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_mesh\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "generate_mesh: generate_mesh\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m4540075314237926928: GetItem\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m1102273834810532003: GetItem\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_8491837778604764886: GetItem\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_48600902242725429: GetItem\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_3710399560155037347: GetItem\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputscompile_paper__source_directory\n", + "\n", + "compile_paper__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputscompile_paper__source_directory->clusterpyiron_base_nfdicompile_paperInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputssubstitute_macros__domain_size\n", + "\n", + "substitute_macros__domain_size: float\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosInputsdomain_size\n", + "\n", + "domain_size: float\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputssubstitute_macros__domain_size->clusterpyiron_base_nfdisubstitute_macrosInputsdomain_size\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputssubstitute_macros__source_directory\n", + "\n", + "substitute_macros__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputssubstitute_macros__source_directory->clusterpyiron_base_nfdisubstitute_macrosInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsplot_over_line__source_directory\n", + "\n", + "plot_over_line__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsplot_over_line__source_directory->clusterpyiron_base_nfdiplot_over_lineInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputspoisson__source_directory\n", + "\n", + "poisson__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputspoisson__source_directory->clusterpyiron_base_nfdipoissonInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsgenerate_mesh__domain_size\n", + "\n", + "generate_mesh__domain_size: float\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshInputsdomain_size\n", + "\n", + "domain_size: float\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsgenerate_mesh__domain_size->clusterpyiron_base_nfdigenerate_meshInputsdomain_size\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsgenerate_mesh__source_directory\n", + "\n", + "generate_mesh__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsgenerate_mesh__source_directory->clusterpyiron_base_nfdigenerate_meshInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_m4540075314237926928__item\n", + "\n", + "injected_GetItem_m4540075314237926928__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_m4540075314237926928__item->clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_m1102273834810532003__item\n", + "\n", + "injected_GetItem_m1102273834810532003__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_m1102273834810532003__item->clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_8491837778604764886__item\n", + "\n", + "injected_GetItem_8491837778604764886__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_8491837778604764886__item->clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_48600902242725429__item\n", + "\n", + "injected_GetItem_48600902242725429__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_48600902242725429__item->clusterpyiron_base_nfdiinjected_GetItem_48600902242725429Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_3710399560155037347__item\n", + "\n", + "injected_GetItem_3710399560155037347__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiInputsinjected_GetItem_3710399560155037347__item->clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiOutputsWithInjectioncompile_paper__compile_paper\n", + "\n", + "compile_paper__compile_paper: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperInputsmacros_tex\n", + "\n", + "macros_tex: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperInputsplot_file\n", + "\n", + "plot_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperOutputsWithInjectioncompile_paper\n", + "\n", + "compile_paper: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdicompile_paperOutputsWithInjectioncompile_paper->clusterpyiron_base_nfdiOutputsWithInjectioncompile_paper__compile_paper\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosInputspvbatch_output_file\n", + "\n", + "pvbatch_output_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosInputsndofs\n", + "\n", + "ndofs: int\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosOutputsWithInjectionsubstitute_macros\n", + "\n", + "substitute_macros: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdisubstitute_macrosOutputsWithInjectionsubstitute_macros->clusterpyiron_base_nfdicompile_paperInputsmacros_tex\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineInputspoisson_output_pvd_file\n", + "\n", + "poisson_output_pvd_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineInputspoisson_output_vtu_file\n", + "\n", + "poisson_output_vtu_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionplot_over_line\n", + "\n", + "plot_over_line: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionplot_over_line->clusterpyiron_base_nfdicompile_paperInputsplot_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiplot_over_lineOutputsWithInjectionplot_over_line->clusterpyiron_base_nfdisubstitute_macrosInputspvbatch_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonInputsmeshio_output_xdmf\n", + "\n", + "meshio_output_xdmf: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonInputsmeshio_output_h5\n", + "\n", + "meshio_output_h5: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonOutputsWithInjectionpoisson\n", + "\n", + "poisson: dict\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_base_nfdiinjected_GetItem_48600902242725429Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfInputsgmsh_output_file\n", + "\n", + "gmsh_output_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf\n", + "\n", + "convert_to_xdmf: dict\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshOutputsWithInjectiongenerate_mesh\n", + "\n", + "generate_mesh: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdigenerate_meshOutputsWithInjectiongenerate_mesh->clusterpyiron_base_nfdiconvert_to_xdmfInputsgmsh_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m4540075314237926928OutputsWithInjectiongetitem->clusterpyiron_base_nfdiplot_over_lineInputspoisson_output_pvd_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_m1102273834810532003OutputsWithInjectiongetitem->clusterpyiron_base_nfdipoissonInputsmeshio_output_xdmf\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_8491837778604764886OutputsWithInjectiongetitem->clusterpyiron_base_nfdipoissonInputsmeshio_output_h5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_48600902242725429OutputsWithInjectiongetitem->clusterpyiron_base_nfdiplot_over_lineInputspoisson_output_vtu_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_base_nfdiinjected_GetItem_3710399560155037347OutputsWithInjectiongetitem->clusterpyiron_base_nfdisubstitute_macrosInputsndofs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf.draw(size=(10,10))" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "fff9513c4a127a96", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m4540075314237926928__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m1102273834810532003__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_8491837778604764886__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_48600902242725429__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_3710399560155037347__item\n", + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n", + "INFO:pyiron_log:Assigning a channel with the label compile_paper to the io key compile_paper__compile_paper\n" + ] + }, + { + "data": { + "text/plain": [ + "{'compile_paper__compile_paper': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'}" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf.run()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/pyiron_core.ipynb b/pyiron_core.ipynb new file mode 100644 index 0000000..5b98271 --- /dev/null +++ b/pyiron_core.ipynb @@ -0,0 +1,2342 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "bda97535-cd70-4eb6-8322-fee7edfe795a", + "metadata": {}, + "source": [ + "# pyiron_core\n", + "https://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements" + ] + }, + { + "cell_type": "markdown", + "id": "944b24b0-b951-4b18-a4d1-40b28f633ce7", + "metadata": {}, + "source": [ + "## Define workflow with pyiron_core" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "f4f82331-28bc-459f-9959-689067555058", + "metadata": {}, + "outputs": [], + "source": [ + "import ast\n", + "import functools\n", + "import os\n", + "import inspect" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "72b6aae8-2129-492e-9223-e68201ee3916", + "metadata": {}, + "outputs": [], + "source": [ + "from pyiron_core import Workflow, as_function_node\n", + "import pyiron_core.pyironflow.api as pyironflow\n", + "from pyiron_core.pyiron_nodes.utilities import GetItem\n", + "from pyiron_core.pyiron_workflow.simple_workflow import Node\n", + "from pyiron_core.pyiron_workflow.wf_graph_tools import _different_indices, _edges_from_dict, _nodes_from_dict, _filter_and_flatten_nested_dict_keys, _rename_keys, _get_node_labels, _find_input_nodes, get_nodes_from_wf, topological_sort, WorkflowGraph" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "589a67e9-7323-423e-96e2-9b7eb5216935", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.models import PythonWorkflowDefinitionWorkflow\n", + "from python_workflow_definition.shared import (\n", + " NODES_LABEL,\n", + " EDGES_LABEL,\n", + " SOURCE_LABEL,\n", + " SOURCE_PORT_LABEL,\n", + " TARGET_LABEL,\n", + " TARGET_PORT_LABEL,\n", + " VERSION_LABEL,\n", + " VERSION_NUMBER,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "2cb762bc-592f-4a69-a945-2b6b5d3e4d27", + "metadata": {}, + "outputs": [], + "source": [ + "def get_graph_from_wf(wf: \"Workflow\") -> WorkflowGraph:\n", + " # get edges between nodes\n", + " keys_to_keep = [\"target\", \"targetHandle\", \"source\", \"sourceHandle\"]\n", + " edges = _filter_and_flatten_nested_dict_keys(pyironflow.get_edges(wf), keys_to_keep)\n", + "\n", + " # add edges for non-default inputs\n", + " nodes = get_nodes_from_wf(\n", + " wf,\n", + " keys_to_keep=[\n", + " \"data/label\",\n", + " \"data/import_path\",\n", + " \"data/target_values\",\n", + " \"data/target_labels\",\n", + " \"data/source_values\",\n", + " \"data/source_labels\",\n", + " ],\n", + " )\n", + " nodes_non_default_inp_param = []\n", + " for node in nodes:\n", + " label = node[\"label\"]\n", + " import_path = node[\"import_path\"]\n", + " try:\n", + " node_obj = pyironflow.get_node_from_path(import_path)()\n", + " except TypeError:\n", + " node_obj = as_function_node(pyironflow.get_node_from_path(import_path), labels=node[\"data__source_labels\"])()\n", + " changed_args = _different_indices(\n", + " node_obj.inputs.data[\"default\"], node[\"data__target_values\"]\n", + " )\n", + " for i in changed_args:\n", + " value = node[\"data__target_values\"][i]\n", + " handle = node[\"data__target_labels\"][i]\n", + " if value not in (\"NonPrimitive\", \"NotData\"):\n", + " inp_node_label = f\"var_{label}__{handle}\"\n", + " edge = {\n", + " \"target\": label,\n", + " \"targetHandle\": handle,\n", + " \"source\": inp_node_label,\n", + " \"sourceHandle\": value,\n", + " }\n", + "\n", + " edges.append(edge)\n", + " inp_node = {\"label\": inp_node_label, \"data__import_path\": value}\n", + " nodes_non_default_inp_param.append(inp_node)\n", + "\n", + " nodes = get_nodes_from_wf(\n", + " wf,\n", + " keys_to_keep=[\"data/label\", \"data/import_path\"],\n", + " )\n", + "\n", + " key_mapping = {\"data__label\": \"label\", \"data__import_path\": \"import_path\"}\n", + " nodes = _rename_keys(nodes_non_default_inp_param + nodes, key_mapping=key_mapping)\n", + "\n", + " graph = WorkflowGraph(\n", + " nodes=_nodes_from_dict(nodes), edges=_edges_from_dict(edges), label=wf.label\n", + " )\n", + " sorted_graph = topological_sort(graph)\n", + "\n", + " return sorted_graph" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "07b5a642-de4f-4b52-9cb2-a4a1a4905889", + "metadata": {}, + "outputs": [], + "source": [ + "def pull_node(wf: \"Workflow\", node_label: str):\n", + " \"\"\"\n", + " Pull a node from the workflow graph and run it. Execute only nodes that\n", + " are required as input to run the node.\n", + "\n", + " Args:\n", + " wf (Workflow): The workflow containing the node.\n", + " node_label (str): The label of the node to pull.\n", + " \"\"\"\n", + " graph = get_graph_from_wf(wf)\n", + " node_labels = _get_node_labels(graph)\n", + " if node_label not in node_labels:\n", + " raise ValueError(f\"Node label '{node_label}' not found in the workflow graph.\")\n", + " node_index = node_labels.index(node_label)\n", + " input_nodes = _find_input_nodes(graph, node_index)\n", + " input_nodes_labels = [node_labels[i] for i in input_nodes]\n", + "\n", + " for input_node_label in input_nodes_labels:\n", + " out = wf._nodes[input_node_label].run()\n", + " return out\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "c3df8697-e75f-4167-9c37-84405bcbc8aa", + "metadata": {}, + "outputs": [], + "source": [ + "def get_inputs(node):\n", + " return {key: getattr(node.inputs, key).value for key in dir(node.inputs) if not isinstance(getattr(node.inputs, key).value, Node)}" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "59888275-26b9-4032-860a-67f980d96911", + "metadata": {}, + "outputs": [], + "source": [ + "def get_links(node):\n", + " return {key: getattr(node.inputs, key).value.label for key in dir(node.inputs) if isinstance(getattr(node.inputs, key).value, Node)}" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "25ffe9e0-b10e-4790-90b3-53908e41115f", + "metadata": {}, + "outputs": [], + "source": [ + "def get_node_dict(wf):\n", + " node_dict = {}\n", + " for key in wf.child_labels:\n", + " value = getattr(wf, key)\n", + " node_dict[key] = {\n", + " \"inputs\": get_inputs(node=value),\n", + " \"links\": get_links(node=value),\n", + " \"function\": value._func.__module__ + \".\" + value._func.__name__,\n", + " }\n", + " return node_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "0e11cff8-fc27-4232-ab1a-aa726d4386c1", + "metadata": {}, + "outputs": [], + "source": [ + "def get_nodes_and_edges(node_dict):\n", + " input_nodes_lst = []\n", + " nodes_lst = []\n", + " translate_dict = {}\n", + " link_dict = {}\n", + " edge_lst = []\n", + " for k, v in node_dict.items():\n", + " node_id = len(nodes_lst)\n", + " if \"inputs\" in v:\n", + " for key, value in v[\"inputs\"].items():\n", + " link_dict[len(input_nodes_lst)] = {\n", + " TARGET_LABEL: node_id, TARGET_PORT_LABEL: key, SOURCE_PORT_LABEL: None\n", + " }\n", + " input_nodes_lst.append({\"type\": \"input\", \"value\": value, \"name\": key})\n", + " if \"links\" in v:\n", + " for key, value in v['links'].items():\n", + " edge_lst.append({TARGET_LABEL: node_id, TARGET_PORT_LABEL: key, SOURCE_LABEL: translate_dict[value], SOURCE_PORT_LABEL: None})\n", + " nodes_lst.append({\"id\": node_id, \"type\": \"function\", \"value\": v['function']})\n", + " translate_dict[k] = node_id\n", + " \n", + " for i, node in enumerate(input_nodes_lst):\n", + " node_id = len(nodes_lst)\n", + " edge_lst.append({SOURCE_LABEL: node_id} | link_dict[i])\n", + " nodes_lst.append({\"id\": node_id, \"type\": \"input\", \"value\": node[\"value\"], \"name\": node[\"name\"]})\n", + "\n", + " return nodes_lst, edge_lst" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "0a7b62fd-c374-42f7-a899-b5e895cc8477", + "metadata": {}, + "outputs": [], + "source": [ + "def remove_helper_nodes(nodes_lst, edge_lst):\n", + " nodes_to_remove = [n[\"id\"] for n in nodes_lst if n[\"value\"] == 'pyiron_core.pyiron_nodes.utilities.GetItem']\n", + "\n", + " new_edge_lst = []\n", + " new_nodes_lst = []\n", + " edge_remove_lst = []\n", + " nodes_total_to_remove = nodes_to_remove[:]\n", + " for n in nodes_to_remove:\n", + " new_edge_dict = {}\n", + " for i, e in enumerate(edge_lst):\n", + " if e[TARGET_LABEL] == n and e[TARGET_PORT_LABEL] == \"obj\":\n", + " edge_remove_lst.append(i)\n", + " new_edge_dict[SOURCE_LABEL] = e[SOURCE_LABEL]\n", + " elif e[TARGET_LABEL] == n and e[TARGET_PORT_LABEL] == 'index':\n", + " edge_remove_lst.append(i)\n", + " new_edge_dict[SOURCE_PORT_LABEL] = [node['value'] for node in nodes_lst if node[\"id\"] == e[SOURCE_LABEL]][0]\n", + " nodes_total_to_remove.append(e[SOURCE_LABEL])\n", + " elif e[SOURCE_LABEL] == n:\n", + " edge_remove_lst.append(i)\n", + " new_edge_dict[TARGET_PORT_LABEL] = e[TARGET_PORT_LABEL]\n", + " new_edge_dict[TARGET_LABEL] = e[TARGET_LABEL]\n", + " new_edge_lst.append(new_edge_dict)\n", + " \n", + " for i, e in enumerate(edge_lst):\n", + " if i not in edge_remove_lst:\n", + " new_edge_lst.append(e)\n", + " \n", + " for n in nodes_lst:\n", + " if n[\"id\"] not in nodes_total_to_remove:\n", + " new_nodes_lst.append(n)\n", + "\n", + " return new_nodes_lst, new_edge_lst" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "3ba1cb97-a0df-4c30-9f8e-bccfb0485620", + "metadata": {}, + "outputs": [], + "source": [ + "def reorder(nodes_lst, edge_lst):\n", + " translate_dict = {k[\"id\"]:v for v,k in enumerate(nodes_lst)}\n", + " \n", + " final_nodes_lst = []\n", + " for node in nodes_lst:\n", + " node[\"id\"] = translate_dict[node[\"id\"]]\n", + " final_nodes_lst.append(node)\n", + " \n", + " final_edge_lst = []\n", + " for edge in edge_lst:\n", + " edge[TARGET_LABEL] = translate_dict[edge[TARGET_LABEL]]\n", + " edge[SOURCE_LABEL] = translate_dict[edge[SOURCE_LABEL]]\n", + " final_edge_lst.append(edge)\n", + " \n", + " return final_nodes_lst, final_edge_lst" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "c3a6c554-fa0f-4be2-abbc-35ca1eb4191a", + "metadata": {}, + "outputs": [], + "source": [ + "def add_result_node(nodes_lst, edge_lst, final_node_id):\n", + " edge_lst += [{TARGET_LABEL: final_node_id, TARGET_PORT_LABEL: None, SOURCE_LABEL: [n[\"id\"] for n in nodes_lst if n[\"type\"] == \"function\"][-1], SOURCE_PORT_LABEL: None}]\n", + " nodes_lst += [{\"id\": final_node_id, \"type\": \"output\", \"name\": \"result\"}]\n", + " return nodes_lst, edge_lst" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "d5042fe0-d026-4844-ad27-2ad132c62c4e", + "metadata": {}, + "outputs": [], + "source": [ + "from workflow import (\n", + " generate_mesh as _generate_mesh, \n", + " convert_to_xdmf as _convert_to_xdmf,\n", + " poisson as _poisson,\n", + " plot_over_line as _plot_over_line,\n", + " substitute_macros as _substitute_macros,\n", + " compile_paper as _compile_paper,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "1a352273-a585-4cf7-8020-fdde652ccb57", + "metadata": {}, + "outputs": [], + "source": [ + "domain_size = 2.0" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "35899d9b-6f1f-47bd-9fa8-69836680b5a0", + "metadata": {}, + "outputs": [], + "source": [ + "source_directory = os.path.abspath(os.path.join(os.curdir, \"source\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "9e9f67fb-f1ad-471c-82b2-3df0a029e412", + "metadata": {}, + "outputs": [], + "source": [ + "generate_mesh = as_function_node(_generate_mesh, labels=[\"result\"])\n", + "convert_to_xdmf = as_function_node(_convert_to_xdmf, labels=[\"result\"])\n", + "poisson = as_function_node(_poisson, labels=[\"result\"])\n", + "plot_over_line = as_function_node(_plot_over_line, labels=[\"result\"])\n", + "substitute_macros = as_function_node(_substitute_macros, labels=[\"result\"])\n", + "compile_paper = as_function_node(_compile_paper, labels=[\"result\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "b6551260-795c-4f08-9ed6-f191192daf06", + "metadata": {}, + "outputs": [], + "source": [ + "wf = Workflow(\"nfdi4ing\")\n", + "wf.gmsh_output_file = generate_mesh(\n", + " domain_size=domain_size,\n", + " source_directory=source_directory,\n", + ")\n", + "wf.meshio_output_dict = convert_to_xdmf(\n", + " gmsh_output_file=wf.gmsh_output_file,\n", + ")\n", + "wf.meshio_output_dict_xdmf_file = GetItem(wf.meshio_output_dict, \"xdmf_file\")\n", + "wf.meshio_output_dict_h5_file = GetItem(wf.meshio_output_dict, \"h5_file\")\n", + "wf.poisson_dict = poisson(\n", + " meshio_output_xdmf=wf.meshio_output_dict_xdmf_file, \n", + " meshio_output_h5=wf.meshio_output_dict_h5_file,\n", + " source_directory=source_directory,\n", + ")\n", + "wf.poisson_dict_pvd_file = GetItem(wf.poisson_dict, \"pvd_file\")\n", + "wf.poisson_dict_vtu_file = GetItem(wf.poisson_dict, \"vtu_file\")\n", + "wf.poisson_dict_numdofs = GetItem(wf.poisson_dict, \"numdofs\")\n", + "wf.pvbatch_output_file = plot_over_line(\n", + " poisson_output_pvd_file=wf.poisson_dict_pvd_file, \n", + " poisson_output_vtu_file=wf.poisson_dict_vtu_file,\n", + " source_directory=source_directory,\n", + ")\n", + "wf.macros_tex_file = substitute_macros( \n", + " pvbatch_output_file=wf.pvbatch_output_file, \n", + " ndofs=wf.poisson_dict_numdofs, \n", + " domain_size=domain_size,\n", + " source_directory=source_directory,\n", + ")\n", + "wf.paper_output = compile_paper(\n", + " macros_tex=wf.macros_tex_file, \n", + " plot_file=wf.pvbatch_output_file,\n", + " source_directory=source_directory,\n", + ")" + ] + }, + { + "cell_type": "raw", + "id": "4e2c7675-b038-4819-aa86-c37c9bb3ad86", + "metadata": {}, + "source": [ + "pull_node(wf, wf.square_result.label)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "7e1432fe-f2c2-41f2-b8c8-b33ec46c9877", + "metadata": {}, + "outputs": [], + "source": [ + "workflow_json_filename = \"pyiron_core_nfdi.json\"" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "678b7fbc-efcd-4088-a1a6-d7f2baa00c7a", + "metadata": {}, + "outputs": [], + "source": [ + "nodes_lst, edge_lst = get_nodes_and_edges(node_dict=get_node_dict(wf=wf))\n", + "new_nodes_lst, new_edge_lst = remove_helper_nodes(nodes_lst=nodes_lst, edge_lst=edge_lst)\n", + "new_nodes_lst, new_edge_lst = add_result_node(nodes_lst=new_nodes_lst, edge_lst=new_edge_lst, final_node_id=len(nodes_lst))\n", + "final_nodes_lst, final_edge_lst = reorder(nodes_lst=new_nodes_lst, edge_lst=new_edge_lst)\n", + "PythonWorkflowDefinitionWorkflow(\n", + " **{\n", + " VERSION_LABEL: VERSION_NUMBER,\n", + " NODES_LABEL: final_nodes_lst,\n", + " EDGES_LABEL: final_edge_lst,\n", + " }\n", + ").dump_json_file(file_name=workflow_json_filename, indent=2)" + ] + }, + { + "cell_type": "markdown", + "id": "9f72c72d-0ee9-4d9a-a466-d6867793522c", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_base" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "4047bcc6-d86b-4fa4-a01d-7a5067340f4b", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.pyiron_base import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "4b5d3ccb-2766-4712-9c8b-ec1264e25ad1", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "create_function_job_e3fac4b89a53d655dd088c83cb81c1d9\n", + "\n", + "create_function_job=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb186b43e0>\n", + "\n", + "\n", + "\n", + "macros_tex_5b86ba422536ee5712bdbb8c38800aa5\n", + "\n", + "macros_tex=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb186b4350>\n", + "\n", + "\n", + "\n", + "macros_tex_5b86ba422536ee5712bdbb8c38800aa5->create_function_job_e3fac4b89a53d655dd088c83cb81c1d9\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "ndofs_b39889d9d22db236d350e5479281b6e4\n", + "\n", + "ndofs=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb181bce60>\n", + "\n", + "\n", + "\n", + "ndofs_b39889d9d22db236d350e5479281b6e4->macros_tex_5b86ba422536ee5712bdbb8c38800aa5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_45057ab594156f780320433a448fcf40\n", + "\n", + "meshio_output_xdmf=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb18666570>\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_45057ab594156f780320433a448fcf40->ndofs_b39889d9d22db236d350e5479281b6e4\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_471f88a43a0ff7bfaeb5b323ae32a65e\n", + "\n", + "poisson_output_pvd_file=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb1806ef30>\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_45057ab594156f780320433a448fcf40->poisson_output_pvd_file_471f88a43a0ff7bfaeb5b323ae32a65e\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_33742eeb48ec00dd4c907e65e32f434b\n", + "\n", + "poisson_output_vtu_file=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb1806f530>\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_45057ab594156f780320433a448fcf40->poisson_output_vtu_file_33742eeb48ec00dd4c907e65e32f434b\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "pvbatch_output_file_c5ac2ca846d6178dea1370e0d886e3dc\n", + "\n", + "pvbatch_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb1806ee40>\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_471f88a43a0ff7bfaeb5b323ae32a65e->pvbatch_output_file_c5ac2ca846d6178dea1370e0d886e3dc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "plot_file_c5ac2ca846d6178dea1370e0d886e3dc\n", + "\n", + "plot_file=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb1806ee40>\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_471f88a43a0ff7bfaeb5b323ae32a65e->plot_file_c5ac2ca846d6178dea1370e0d886e3dc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_33742eeb48ec00dd4c907e65e32f434b->pvbatch_output_file_c5ac2ca846d6178dea1370e0d886e3dc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_33742eeb48ec00dd4c907e65e32f434b->plot_file_c5ac2ca846d6178dea1370e0d886e3dc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "gmsh_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb6c669640>\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5->meshio_output_xdmf_45057ab594156f780320433a448fcf40\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_5cbf39f801faa543229952d8c7022a06\n", + "\n", + "meshio_output_h5=<pyiron_base.project.delayed.DelayedObject object at 0x7ffb18666a50>\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5->meshio_output_h5_5cbf39f801faa543229952d8c7022a06\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_5cbf39f801faa543229952d8c7022a06->ndofs_b39889d9d22db236d350e5479281b6e4\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_5cbf39f801faa543229952d8c7022a06->poisson_output_pvd_file_471f88a43a0ff7bfaeb5b323ae32a65e\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_5cbf39f801faa543229952d8c7022a06->poisson_output_vtu_file_33742eeb48ec00dd4c907e65e32f434b\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20\n", + "\n", + "domain_size=2.0\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20->macros_tex_5b86ba422536ee5712bdbb8c38800aa5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20->gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba\n", + "\n", + "source_directory=/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/source\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->create_function_job_e3fac4b89a53d655dd088c83cb81c1d9\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->macros_tex_5b86ba422536ee5712bdbb8c38800aa5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->ndofs_b39889d9d22db236d350e5479281b6e4\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->poisson_output_pvd_file_471f88a43a0ff7bfaeb5b323ae32a65e\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->poisson_output_vtu_file_33742eeb48ec00dd4c907e65e32f434b\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->pvbatch_output_file_c5ac2ca846d6178dea1370e0d886e3dc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->plot_file_c5ac2ca846d6178dea1370e0d886e3dc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "pvbatch_output_file_c5ac2ca846d6178dea1370e0d886e3dc->macros_tex_5b86ba422536ee5712bdbb8c38800aa5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "plot_file_c5ac2ca846d6178dea1370e0d886e3dc->create_function_job_e3fac4b89a53d655dd088c83cb81c1d9\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\n", + "delayed_object_lst[-1].draw()" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "7bbc231c-2b3f-4b26-9fa8-f65d813db80d", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:run job: generate_mesh id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'generate_mesh', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'generate_mesh', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: generate_mesh_efefecc1e0b6f0c722299e0e3006ac35 id: 57, status: created\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job generate_mesh_efefecc1e0b6f0c722299e0e3006ac35 was saved and received the ID: 57\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:run job: convert_to_xdmf id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'convert_to_xdmf', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'convert_to_xdmf', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: convert_to_xdmf_0ad4672b75fea34088b0c70a550b4240 id: 58, status: created\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job convert_to_xdmf_0ad4672b75fea34088b0c70a550b4240 was saved and received the ID: 58\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:run job: convert_to_xdmf id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'convert_to_xdmf', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'convert_to_xdmf', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: poisson id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'poisson', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'poisson', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: poisson_20cb224cd32355381872a81936a7d8f0 id: 59, status: created\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job poisson_20cb224cd32355381872a81936a7d8f0 was saved and received the ID: 59\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n", + "INFO:pyiron_log:run job: poisson id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'poisson', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'poisson', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: poisson id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'poisson', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'poisson', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: plot_over_line id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'plot_over_line', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'plot_over_line', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: plot_over_line_3dce48c8db062af151a2bef63dc24e36 id: 60, status: created\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job plot_over_line_3dce48c8db062af151a2bef63dc24e36 was saved and received the ID: 60\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:run job: substitute_macros id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'substitute_macros', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'substitute_macros', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: substitute_macros_cdc660861030d9ca17195b5db4616d5c id: 61, status: created\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job substitute_macros_cdc660861030d9ca17195b5db4616d5c was saved and received the ID: 61\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:run job: compile_paper id: None, status: initialized\n", + "DEBUG:pyiron_log:sql_query: {'job': 'compile_paper', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "DEBUG:pyiron_log:sql_query: {'job': 'compile_paper', 'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/%'}\n", + "DEBUG:pyiron_log:sql_query: {'project': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/'}\n", + "INFO:pyiron_log:run job: compile_paper_de1b620df0f0da260aa27ab0316988ba id: 62, status: created\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job compile_paper_de1b620df0f0da260aa27ab0316988ba was saved and received the ID: 62\n" + ] + }, + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "delayed_object_lst[-1].pull()" + ] + }, + { + "cell_type": "markdown", + "id": "caf39dcb-bc5d-4e88-bcbb-e14f1a6a9d31", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_workflow" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "1216f919-7529-43ef-b164-d302f126ea79", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.pyiron_workflow import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "ff07175d-eb34-4d17-8591-2ad52029581d", + "metadata": {}, + "outputs": [], + "source": [ + "wf = load_workflow_json(file_name=workflow_json_filename)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "1ea602ad-901a-4482-8caa-ead25da72a37", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "INFO:pyiron_log:Assigning a channel with the label compile_paper to the io key compile_paper__compile_paper\n" + ] + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdi\n", + "\n", + "pyiron_core_nfdi: Workflow\n", + "\n", + "clusterpyiron_core_nfdiInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdiOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_mesh\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "generate_mesh: generate_mesh\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmf\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "convert_to_xdmf: convert_to_xdmf\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoisson\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson: poisson\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_line\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "plot_over_line: plot_over_line\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macros\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "substitute_macros: substitute_macros\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paper\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "compile_paper: compile_paper\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m2023877963071051148: GetItem\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m3764593794795471127: GetItem\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m7121962150525347332: GetItem\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_6550044410536228124: GetItem\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m9140868199050516944: GetItem\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsgenerate_mesh__domain_size\n", + "\n", + "generate_mesh__domain_size: float\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshInputsdomain_size\n", + "\n", + "domain_size: float\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsgenerate_mesh__domain_size->clusterpyiron_core_nfdigenerate_meshInputsdomain_size\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsgenerate_mesh__source_directory\n", + "\n", + "generate_mesh__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsgenerate_mesh__source_directory->clusterpyiron_core_nfdigenerate_meshInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputspoisson__source_directory\n", + "\n", + "poisson__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputspoisson__source_directory->clusterpyiron_core_nfdipoissonInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsplot_over_line__source_directory\n", + "\n", + "plot_over_line__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsplot_over_line__source_directory->clusterpyiron_core_nfdiplot_over_lineInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputssubstitute_macros__domain_size\n", + "\n", + "substitute_macros__domain_size: float\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosInputsdomain_size\n", + "\n", + "domain_size: float\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputssubstitute_macros__domain_size->clusterpyiron_core_nfdisubstitute_macrosInputsdomain_size\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputssubstitute_macros__source_directory\n", + "\n", + "substitute_macros__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputssubstitute_macros__source_directory->clusterpyiron_core_nfdisubstitute_macrosInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputscompile_paper__source_directory\n", + "\n", + "compile_paper__source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputscompile_paper__source_directory->clusterpyiron_core_nfdicompile_paperInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_m2023877963071051148__item\n", + "\n", + "injected_GetItem_m2023877963071051148__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_m2023877963071051148__item->clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_m3764593794795471127__item\n", + "\n", + "injected_GetItem_m3764593794795471127__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_m3764593794795471127__item->clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_m7121962150525347332__item\n", + "\n", + "injected_GetItem_m7121962150525347332__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_m7121962150525347332__item->clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_6550044410536228124__item\n", + "\n", + "injected_GetItem_6550044410536228124__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_6550044410536228124__item->clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_m9140868199050516944__item\n", + "\n", + "injected_GetItem_m9140868199050516944__item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiInputsinjected_GetItem_m9140868199050516944__item->clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiOutputsWithInjectioncompile_paper__compile_paper\n", + "\n", + "compile_paper__compile_paper: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshOutputsWithInjectiongenerate_mesh\n", + "\n", + "generate_mesh: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfInputsgmsh_output_file\n", + "\n", + "gmsh_output_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdigenerate_meshOutputsWithInjectiongenerate_mesh->clusterpyiron_core_nfdiconvert_to_xdmfInputsgmsh_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf\n", + "\n", + "convert_to_xdmf: dict\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiconvert_to_xdmfOutputsWithInjectionconvert_to_xdmf->clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonInputsmeshio_output_xdmf\n", + "\n", + "meshio_output_xdmf: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonInputsmeshio_output_h5\n", + "\n", + "meshio_output_h5: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonOutputsWithInjectionpoisson\n", + "\n", + "poisson: dict\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdipoissonOutputsWithInjectionpoisson->clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineInputspoisson_output_pvd_file\n", + "\n", + "poisson_output_pvd_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineInputspoisson_output_vtu_file\n", + "\n", + "poisson_output_vtu_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineOutputsWithInjectionplot_over_line\n", + "\n", + "plot_over_line: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosInputspvbatch_output_file\n", + "\n", + "pvbatch_output_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineOutputsWithInjectionplot_over_line->clusterpyiron_core_nfdisubstitute_macrosInputspvbatch_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperInputsplot_file\n", + "\n", + "plot_file: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiplot_over_lineOutputsWithInjectionplot_over_line->clusterpyiron_core_nfdicompile_paperInputsplot_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosInputsndofs\n", + "\n", + "ndofs: int\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosOutputsWithInjectionsubstitute_macros\n", + "\n", + "substitute_macros: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperInputsmacros_tex\n", + "\n", + "macros_tex: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdisubstitute_macrosOutputsWithInjectionsubstitute_macros->clusterpyiron_core_nfdicompile_paperInputsmacros_tex\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperOutputsWithInjectioncompile_paper\n", + "\n", + "compile_paper: str\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdicompile_paperOutputsWithInjectioncompile_paper->clusterpyiron_core_nfdiOutputsWithInjectioncompile_paper__compile_paper\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m2023877963071051148OutputsWithInjectiongetitem->clusterpyiron_core_nfdipoissonInputsmeshio_output_xdmf\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m3764593794795471127OutputsWithInjectiongetitem->clusterpyiron_core_nfdipoissonInputsmeshio_output_h5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m7121962150525347332OutputsWithInjectiongetitem->clusterpyiron_core_nfdiplot_over_lineInputspoisson_output_pvd_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_6550044410536228124OutputsWithInjectiongetitem->clusterpyiron_core_nfdiplot_over_lineInputspoisson_output_vtu_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clusterpyiron_core_nfdiinjected_GetItem_m9140868199050516944OutputsWithInjectiongetitem->clusterpyiron_core_nfdisubstitute_macrosInputsndofs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf.draw(size=(10,10))" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "3fe5629b-5599-4694-a583-89e171c8749d", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key generate_mesh__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key generate_mesh__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key poisson__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key plot_over_line__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label domain_size to the io key substitute_macros__domain_size\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key substitute_macros__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label source_directory to the io key compile_paper__source_directory\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m2023877963071051148__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m3764593794795471127__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m7121962150525347332__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_6550044410536228124__item\n", + "INFO:pyiron_log:Assigning a channel with the label item to the io key injected_GetItem_m9140868199050516944__item\n", + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n", + "INFO:pyiron_log:Assigning a channel with the label compile_paper to the io key compile_paper__compile_paper\n" + ] + }, + { + "data": { + "text/plain": [ + "{'compile_paper__compile_paper': '/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'}" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf.run()" + ] + }, + { + "cell_type": "markdown", + "id": "7869f332-bedf-43fd-9bae-59b89c288676", + "metadata": {}, + "source": [ + "## Load Workflow with executorlib" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "aa1f0138-d612-4a8b-a60e-16e37398a4c2", + "metadata": {}, + "outputs": [], + "source": [ + "from executorlib import SingleNodeExecutor" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "fdda470b-bde8-4203-822b-bfa2184cf2fa", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.executorlib import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "2d2f1773-fd8a-44aa-bca5-b88c2c9432f8", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" + ] + } + ], + "source": [ + "with SingleNodeExecutor(max_workers=1) as exe:\n", + " result = load_workflow_json(file_name=workflow_json_filename, exe=exe).result()" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "ff9c81c6-e2c4-4e19-9873-4150ac4529c8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/pyiron_workflow.ipynb b/pyiron_workflow.ipynb index 8bec369..576f4c5 100644 --- a/pyiron_workflow.ipynb +++ b/pyiron_workflow.ipynb @@ -1 +1,2093 @@ -{"metadata":{"kernelspec":{"display_name":"Python 3 (ipykernel)","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.12.12"}},"nbformat_minor":5,"nbformat":4,"cells":[{"id":"106ded66-d202-46ac-82b0-2755ca309bdd","cell_type":"markdown","source":"# pyiron_workflow\n\nhttps://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements","metadata":{}},{"id":"91dd48ea-aa7e-4937-a68e-59fc5017eb1e","cell_type":"markdown","source":"## Define workflow with pyiron_workflow","metadata":{}},{"id":"2c9622f5-ab7e-460e-b8e4-8d21413eda77","cell_type":"code","source":"import os","metadata":{"trusted":true},"outputs":[],"execution_count":1},{"id":"d265bb5aa6af79d6","cell_type":"code","source":"from workflow import (\n generate_mesh as _generate_mesh, \n convert_to_xdmf as _convert_to_xdmf,\n poisson as _poisson,\n plot_over_line as _plot_over_line,\n substitute_macros as _substitute_macros,\n compile_paper as _compile_paper,\n)","metadata":{"trusted":true},"outputs":[],"execution_count":2},{"id":"2dced28725813fc1","cell_type":"code","source":"from pyiron_workflow import Workflow, to_function_node\nfrom pyironflow import PyironFlow\n\nfrom python_workflow_definition.pyiron_workflow import write_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":3},{"id":"549ecf27-88ef-4e77-8bd4-b616cfdda2e4","cell_type":"code","source":"generate_mesh = to_function_node(\"generate_mesh\", _generate_mesh, \"generate_mesh\")\nconvert_to_xdmf = to_function_node(\"convert_to_xdmf\", _convert_to_xdmf, \"convert_to_xdmf\")\npoisson = to_function_node(\"poisson\", _poisson, \"poisson\")\nplot_over_line = to_function_node(\"plot_over_line\", _plot_over_line, \"plot_over_line\")\nsubstitute_macros = to_function_node(\"substitute_macros\", _substitute_macros, \"substitute_macros\")\ncompile_paper = to_function_node(\"compile_paper\", _compile_paper, \"compile_paper\")","metadata":{"trusted":true},"outputs":[],"execution_count":4},{"id":"3a75428e-18c7-49cf-8256-23cff58b9d6e","cell_type":"code","source":"wf = Workflow(\"my_workflow\")","metadata":{"trusted":true},"outputs":[],"execution_count":5},{"id":"8d911f98-3b80-457f-a0f4-3cb37ebf1691","cell_type":"code","source":"wf.domain_size = 2.0","metadata":{"trusted":true},"outputs":[],"execution_count":6},{"id":"c6ea980b-6761-4191-8407-7b1f78a4c3ea","cell_type":"code","source":"wf.source_directory = os.path.abspath(os.path.join(os.curdir, \"source\"))","metadata":{"trusted":true},"outputs":[],"execution_count":7},{"id":"71d411b6-cbec-489e-99e3-ba71680bcb5b","cell_type":"code","source":"wf.gmsh_output_file = generate_mesh(\n domain_size=wf.domain_size,\n source_directory=wf.source_directory,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":8},{"id":"1d0d9804-f250-48b3-a5d0-a546d520f79b","cell_type":"code","source":"wf.meshio_output_dict = convert_to_xdmf(\n gmsh_output_file=wf.gmsh_output_file,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":9},{"id":"7b69bcff-e2b1-4d4a-b62c-6a1c86eeb590","cell_type":"code","source":"wf.poisson_dict = poisson(\n meshio_output_xdmf=wf.meshio_output_dict[\"xdmf_file\"], \n meshio_output_h5=wf.meshio_output_dict[\"h5_file\"],\n source_directory=wf.source_directory,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":10},{"id":"3c4a29b0-eb1e-490a-8be0-e03cfff15e0a","cell_type":"code","source":"wf.pvbatch_output_file = plot_over_line(\n poisson_output_pvd_file=wf.poisson_dict[\"pvd_file\"], \n poisson_output_vtu_file=wf.poisson_dict[\"vtu_file\"],\n source_directory=wf.source_directory,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":11},{"id":"a0a4c233-322d-4723-9627-62ca2487bfa9","cell_type":"code","source":"wf.macros_tex_file = substitute_macros( \n pvbatch_output_file=wf.pvbatch_output_file, \n ndofs=wf.poisson_dict[\"numdofs\"], \n domain_size=wf.domain_size,\n source_directory=wf.source_directory,\n)","metadata":{"tags":[],"trusted":true},"outputs":[],"execution_count":12},{"id":"c281408f-e63d-4380-a7e6-c595d49fbb8f","cell_type":"code","source":"wf.paper_output = compile_paper(\n macros_tex=wf.macros_tex_file, \n plot_file=wf.pvbatch_output_file,\n source_directory=wf.source_directory,\n)","metadata":{"trusted":true},"outputs":[],"execution_count":13},{"id":"db4f1e15-3710-4e24-abc2-0fef417043e8","cell_type":"code","source":"wf.draw(size=(10,10))","metadata":{"trusted":true},"outputs":[{"execution_count":14,"output_type":"execute_result","data":{"image/svg+xml":"\n\n\n\n\n\nclustermy_workflow\n\nmy_workflow: Workflow\n\nclustermy_workflowInputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowgmsh_output_file\n\n\n\n\n\n\n\ngmsh_output_file: generate_mesh\n\n\nclustermy_workflowgmsh_output_fileInputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowgmsh_output_fileOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowmeshio_output_dict\n\n\n\n\n\n\n\nmeshio_output_dict: convert_to_xdmf\n\n\nclustermy_workflowmeshio_output_dictInputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowmeshio_output_dictOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690\n\n\n\n\n\n\n\ninjected_GetItem_m1447514694666833690: GetItem\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowinjected_GetItem_928722518005492814\n\n\n\n\n\n\n\ninjected_GetItem_928722518005492814: GetItem\n\n\nclustermy_workflowinjected_GetItem_928722518005492814Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowinjected_GetItem_928722518005492814OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowpoisson_dict\n\n\n\n\n\n\n\npoisson_dict: poisson\n\n\nclustermy_workflowpoisson_dictInputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowpoisson_dictOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674\n\n\n\n\n\n\n\ninjected_GetItem_m2598280094430610674: GetItem\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697\n\n\n\n\n\n\n\ninjected_GetItem_2728036318332199697: GetItem\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowpvbatch_output_file\n\n\n\n\n\n\n\npvbatch_output_file: plot_over_line\n\n\nclustermy_workflowpvbatch_output_fileInputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowpvbatch_output_fileOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040\n\n\n\n\n\n\n\ninjected_GetItem_5383279001933364040: GetItem\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040Inputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040OutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowmacros_tex_file\n\n\n\n\n\n\n\nmacros_tex_file: substitute_macros\n\n\nclustermy_workflowmacros_tex_fileInputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowmacros_tex_fileOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\nclustermy_workflowpaper_output\n\n\n\n\n\n\n\npaper_output: compile_paper\n\n\nclustermy_workflowpaper_outputInputs\n\n\n\n\n\n\n\nInputs\n\n\nclustermy_workflowpaper_outputOutputsWithInjection\n\n\n\n\n\n\n\nOutputsWithInjection\n\n\n\nclustermy_workflowInputsrun\n\nrun\n\n\n\nclustermy_workflowOutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowInputsgmsh_output_file__domain_size\n\ngmsh_output_file__domain_size: float\n\n\n\nclustermy_workflowgmsh_output_fileInputsdomain_size\n\ndomain_size: float\n\n\n\nclustermy_workflowInputsgmsh_output_file__domain_size->clustermy_workflowgmsh_output_fileInputsdomain_size\n\n\n\n\n\n\nclustermy_workflowInputsgmsh_output_file__source_directory\n\ngmsh_output_file__source_directory: str\n\n\n\nclustermy_workflowgmsh_output_fileInputssource_directory\n\nsource_directory: str\n\n\n\nclustermy_workflowInputsgmsh_output_file__source_directory->clustermy_workflowgmsh_output_fileInputssource_directory\n\n\n\n\n\n\nclustermy_workflowInputsinjected_GetItem_m1447514694666833690__item\n\ninjected_GetItem_m1447514694666833690__item\n\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690Inputsitem\n\nitem\n\n\n\nclustermy_workflowInputsinjected_GetItem_m1447514694666833690__item->clustermy_workflowinjected_GetItem_m1447514694666833690Inputsitem\n\n\n\n\n\n\nclustermy_workflowInputsinjected_GetItem_928722518005492814__item\n\ninjected_GetItem_928722518005492814__item\n\n\n\nclustermy_workflowinjected_GetItem_928722518005492814Inputsitem\n\nitem\n\n\n\nclustermy_workflowInputsinjected_GetItem_928722518005492814__item->clustermy_workflowinjected_GetItem_928722518005492814Inputsitem\n\n\n\n\n\n\nclustermy_workflowInputspoisson_dict__source_directory\n\npoisson_dict__source_directory: str\n\n\n\nclustermy_workflowpoisson_dictInputssource_directory\n\nsource_directory: str\n\n\n\nclustermy_workflowInputspoisson_dict__source_directory->clustermy_workflowpoisson_dictInputssource_directory\n\n\n\n\n\n\nclustermy_workflowInputsinjected_GetItem_m2598280094430610674__item\n\ninjected_GetItem_m2598280094430610674__item\n\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674Inputsitem\n\nitem\n\n\n\nclustermy_workflowInputsinjected_GetItem_m2598280094430610674__item->clustermy_workflowinjected_GetItem_m2598280094430610674Inputsitem\n\n\n\n\n\n\nclustermy_workflowInputsinjected_GetItem_2728036318332199697__item\n\ninjected_GetItem_2728036318332199697__item\n\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697Inputsitem\n\nitem\n\n\n\nclustermy_workflowInputsinjected_GetItem_2728036318332199697__item->clustermy_workflowinjected_GetItem_2728036318332199697Inputsitem\n\n\n\n\n\n\nclustermy_workflowInputspvbatch_output_file__source_directory\n\npvbatch_output_file__source_directory: str\n\n\n\nclustermy_workflowpvbatch_output_fileInputssource_directory\n\nsource_directory: str\n\n\n\nclustermy_workflowInputspvbatch_output_file__source_directory->clustermy_workflowpvbatch_output_fileInputssource_directory\n\n\n\n\n\n\nclustermy_workflowInputsinjected_GetItem_5383279001933364040__item\n\ninjected_GetItem_5383279001933364040__item\n\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040Inputsitem\n\nitem\n\n\n\nclustermy_workflowInputsinjected_GetItem_5383279001933364040__item->clustermy_workflowinjected_GetItem_5383279001933364040Inputsitem\n\n\n\n\n\n\nclustermy_workflowInputsmacros_tex_file__domain_size\n\nmacros_tex_file__domain_size: float\n\n\n\nclustermy_workflowmacros_tex_fileInputsdomain_size\n\ndomain_size: float\n\n\n\nclustermy_workflowInputsmacros_tex_file__domain_size->clustermy_workflowmacros_tex_fileInputsdomain_size\n\n\n\n\n\n\nclustermy_workflowInputsmacros_tex_file__source_directory\n\nmacros_tex_file__source_directory: str\n\n\n\nclustermy_workflowmacros_tex_fileInputssource_directory\n\nsource_directory: str\n\n\n\nclustermy_workflowInputsmacros_tex_file__source_directory->clustermy_workflowmacros_tex_fileInputssource_directory\n\n\n\n\n\n\nclustermy_workflowInputspaper_output__source_directory\n\npaper_output__source_directory: str\n\n\n\nclustermy_workflowpaper_outputInputssource_directory\n\nsource_directory: str\n\n\n\nclustermy_workflowInputspaper_output__source_directory->clustermy_workflowpaper_outputInputssource_directory\n\n\n\n\n\n\nclustermy_workflowOutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowOutputsWithInjectionpaper_output__compile_paper\n\npaper_output__compile_paper: str\n\n\n\nclustermy_workflowgmsh_output_fileInputsrun\n\nrun\n\n\n\nclustermy_workflowgmsh_output_fileOutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowgmsh_output_fileInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowgmsh_output_fileOutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowgmsh_output_fileOutputsWithInjectiongenerate_mesh\n\ngenerate_mesh: str\n\n\n\nclustermy_workflowmeshio_output_dictInputsgmsh_output_file\n\ngmsh_output_file: str\n\n\n\nclustermy_workflowgmsh_output_fileOutputsWithInjectiongenerate_mesh->clustermy_workflowmeshio_output_dictInputsgmsh_output_file\n\n\n\n\n\n\nclustermy_workflowmeshio_output_dictInputsrun\n\nrun\n\n\n\nclustermy_workflowmeshio_output_dictOutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowmeshio_output_dictInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowmeshio_output_dictOutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowmeshio_output_dictOutputsWithInjectionconvert_to_xdmf\n\nconvert_to_xdmf: dict\n\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690Inputsobj\n\nobj\n\n\n\nclustermy_workflowmeshio_output_dictOutputsWithInjectionconvert_to_xdmf->clustermy_workflowinjected_GetItem_m1447514694666833690Inputsobj\n\n\n\n\n\n\nclustermy_workflowinjected_GetItem_928722518005492814Inputsobj\n\nobj\n\n\n\nclustermy_workflowmeshio_output_dictOutputsWithInjectionconvert_to_xdmf->clustermy_workflowinjected_GetItem_928722518005492814Inputsobj\n\n\n\n\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690Inputsrun\n\nrun\n\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690OutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690OutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclustermy_workflowpoisson_dictInputsmeshio_output_xdmf\n\nmeshio_output_xdmf: str\n\n\n\nclustermy_workflowinjected_GetItem_m1447514694666833690OutputsWithInjectiongetitem->clustermy_workflowpoisson_dictInputsmeshio_output_xdmf\n\n\n\n\n\n\nclustermy_workflowinjected_GetItem_928722518005492814Inputsrun\n\nrun\n\n\n\nclustermy_workflowinjected_GetItem_928722518005492814OutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowinjected_GetItem_928722518005492814Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowinjected_GetItem_928722518005492814OutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowinjected_GetItem_928722518005492814OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclustermy_workflowpoisson_dictInputsmeshio_output_h5\n\nmeshio_output_h5: str\n\n\n\nclustermy_workflowinjected_GetItem_928722518005492814OutputsWithInjectiongetitem->clustermy_workflowpoisson_dictInputsmeshio_output_h5\n\n\n\n\n\n\nclustermy_workflowpoisson_dictInputsrun\n\nrun\n\n\n\nclustermy_workflowpoisson_dictOutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowpoisson_dictInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowpoisson_dictOutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowpoisson_dictOutputsWithInjectionpoisson\n\npoisson: dict\n\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674Inputsobj\n\nobj\n\n\n\nclustermy_workflowpoisson_dictOutputsWithInjectionpoisson->clustermy_workflowinjected_GetItem_m2598280094430610674Inputsobj\n\n\n\n\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697Inputsobj\n\nobj\n\n\n\nclustermy_workflowpoisson_dictOutputsWithInjectionpoisson->clustermy_workflowinjected_GetItem_2728036318332199697Inputsobj\n\n\n\n\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040Inputsobj\n\nobj\n\n\n\nclustermy_workflowpoisson_dictOutputsWithInjectionpoisson->clustermy_workflowinjected_GetItem_5383279001933364040Inputsobj\n\n\n\n\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674Inputsrun\n\nrun\n\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674OutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674OutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclustermy_workflowpvbatch_output_fileInputspoisson_output_pvd_file\n\npoisson_output_pvd_file: str\n\n\n\nclustermy_workflowinjected_GetItem_m2598280094430610674OutputsWithInjectiongetitem->clustermy_workflowpvbatch_output_fileInputspoisson_output_pvd_file\n\n\n\n\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697Inputsrun\n\nrun\n\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697OutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697OutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclustermy_workflowpvbatch_output_fileInputspoisson_output_vtu_file\n\npoisson_output_vtu_file: str\n\n\n\nclustermy_workflowinjected_GetItem_2728036318332199697OutputsWithInjectiongetitem->clustermy_workflowpvbatch_output_fileInputspoisson_output_vtu_file\n\n\n\n\n\n\nclustermy_workflowpvbatch_output_fileInputsrun\n\nrun\n\n\n\nclustermy_workflowpvbatch_output_fileOutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowpvbatch_output_fileInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowpvbatch_output_fileOutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowpvbatch_output_fileOutputsWithInjectionplot_over_line\n\nplot_over_line: str\n\n\n\nclustermy_workflowmacros_tex_fileInputspvbatch_output_file\n\npvbatch_output_file: str\n\n\n\nclustermy_workflowpvbatch_output_fileOutputsWithInjectionplot_over_line->clustermy_workflowmacros_tex_fileInputspvbatch_output_file\n\n\n\n\n\n\nclustermy_workflowpaper_outputInputsplot_file\n\nplot_file: str\n\n\n\nclustermy_workflowpvbatch_output_fileOutputsWithInjectionplot_over_line->clustermy_workflowpaper_outputInputsplot_file\n\n\n\n\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040Inputsrun\n\nrun\n\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040OutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040Inputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040OutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040OutputsWithInjectiongetitem\n\ngetitem\n\n\n\nclustermy_workflowmacros_tex_fileInputsndofs\n\nndofs: int\n\n\n\nclustermy_workflowinjected_GetItem_5383279001933364040OutputsWithInjectiongetitem->clustermy_workflowmacros_tex_fileInputsndofs\n\n\n\n\n\n\nclustermy_workflowmacros_tex_fileInputsrun\n\nrun\n\n\n\nclustermy_workflowmacros_tex_fileOutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowmacros_tex_fileInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowmacros_tex_fileOutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowmacros_tex_fileOutputsWithInjectionsubstitute_macros\n\nsubstitute_macros: str\n\n\n\nclustermy_workflowpaper_outputInputsmacros_tex\n\nmacros_tex: str\n\n\n\nclustermy_workflowmacros_tex_fileOutputsWithInjectionsubstitute_macros->clustermy_workflowpaper_outputInputsmacros_tex\n\n\n\n\n\n\nclustermy_workflowpaper_outputInputsrun\n\nrun\n\n\n\nclustermy_workflowpaper_outputOutputsWithInjectionran\n\nran\n\n\n\n\nclustermy_workflowpaper_outputInputsaccumulate_and_run\n\naccumulate_and_run\n\n\n\nclustermy_workflowpaper_outputOutputsWithInjectionfailed\n\nfailed\n\n\n\nclustermy_workflowpaper_outputOutputsWithInjectioncompile_paper\n\ncompile_paper: str\n\n\n\nclustermy_workflowpaper_outputOutputsWithInjectioncompile_paper->clustermy_workflowOutputsWithInjectionpaper_output__compile_paper\n\n\n\n\n\n\n","text/plain":""},"metadata":{}}],"execution_count":14},{"id":"9617f088-03e0-4863-9005-ffc9fbc13a6f","cell_type":"code","source":"pf = PyironFlow([wf])\npf.gui","metadata":{"trusted":true},"outputs":[{"execution_count":15,"output_type":"execute_result","data":{"text/plain":"HBox(children=(Accordion(children=(VBox(children=(Button(button_style='info', description='Refresh', style=But…","application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"331c6d4a7345440f85f550dc7a6d3843"}},"metadata":{}}],"execution_count":15},{"id":"63f29646-3846-4a97-a033-20e9df0ac214","cell_type":"code","source":"workflow_json_filename = \"pyiron_workflow_nfdi.json\"","metadata":{"trusted":true},"outputs":[],"execution_count":16},{"id":"f62111ba-9271-4987-9c7e-3b1c9f9eae7a","cell_type":"code","source":"write_workflow_json(graph_as_dict=wf.graph_as_dict, file_name=workflow_json_filename)","metadata":{"trusted":true},"outputs":[],"execution_count":17},{"id":"ebd3248b-ff75-40bf-a488-b5e338342671","cell_type":"markdown","source":"## Load Workflow with pyiron_base","metadata":{}},{"id":"c7e1047f-0d42-4777-911d-ab405396401a","cell_type":"code","source":"from python_workflow_definition.pyiron_base import load_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":18},{"id":"6aeba274-10d3-4e79-8ee4-4d870f163939","cell_type":"code","source":"delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\ndelayed_object_lst[-1].draw()","metadata":{"trusted":true},"outputs":[{"output_type":"display_data","data":{"text/plain":"","image/svg+xml":"\n\n\n\n\ncreate_function_job_cbcc77ccff8408ba53cfd28fb24dcae5\n\ncreate_function_job=<pyiron_base.project.delayed.DelayedObject object at 0x7affb1136e10>\n\n\n\nplot_file_872f3cd4b7e1cc7683b0a4d3a4e371e2\n\nplot_file=<pyiron_base.project.delayed.DelayedObject object at 0x7affb1136870>\n\n\n\nplot_file_872f3cd4b7e1cc7683b0a4d3a4e371e2->create_function_job_cbcc77ccff8408ba53cfd28fb24dcae5\n\n\n\n\n\npoisson_output_vtu_file_f94d0e7074e76599a2585f415f0964a3\n\npoisson_output_vtu_file=<pyiron_base.project.delayed.DelayedObject object at 0x7affb1136510>\n\n\n\npoisson_output_vtu_file_f94d0e7074e76599a2585f415f0964a3->plot_file_872f3cd4b7e1cc7683b0a4d3a4e371e2\n\n\n\n\n\npvbatch_output_file_872f3cd4b7e1cc7683b0a4d3a4e371e2\n\npvbatch_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7affb1136870>\n\n\n\npoisson_output_vtu_file_f94d0e7074e76599a2585f415f0964a3->pvbatch_output_file_872f3cd4b7e1cc7683b0a4d3a4e371e2\n\n\n\n\n\nmacros_tex_cad5f1da754f8a8a55e792e63bdb608e\n\nmacros_tex=<pyiron_base.project.delayed.DelayedObject object at 0x7affb1136ba0>\n\n\n\npvbatch_output_file_872f3cd4b7e1cc7683b0a4d3a4e371e2->macros_tex_cad5f1da754f8a8a55e792e63bdb608e\n\n\n\n\n\nmeshio_output_h5_820b8c33c2bdb393be8926e10336e78f\n\nmeshio_output_h5=<pyiron_base.project.delayed.DelayedObject object at 0x7affb1136120>\n\n\n\nmeshio_output_h5_820b8c33c2bdb393be8926e10336e78f->poisson_output_vtu_file_f94d0e7074e76599a2585f415f0964a3\n\n\n\n\n\npoisson_output_pvd_file_238ba0bb49c7fe684ae299141dca75ba\n\npoisson_output_pvd_file=<pyiron_base.project.delayed.DelayedObject object at 0x7affb11364e0>\n\n\n\nmeshio_output_h5_820b8c33c2bdb393be8926e10336e78f->poisson_output_pvd_file_238ba0bb49c7fe684ae299141dca75ba\n\n\n\n\n\nndofs_266dd83841e8e1d8727ebf86ce21a1bf\n\nndofs=<pyiron_base.project.delayed.DelayedObject object at 0x7affb1136900>\n\n\n\nmeshio_output_h5_820b8c33c2bdb393be8926e10336e78f->ndofs_266dd83841e8e1d8727ebf86ce21a1bf\n\n\n\n\n\npoisson_output_pvd_file_238ba0bb49c7fe684ae299141dca75ba->plot_file_872f3cd4b7e1cc7683b0a4d3a4e371e2\n\n\n\n\n\npoisson_output_pvd_file_238ba0bb49c7fe684ae299141dca75ba->pvbatch_output_file_872f3cd4b7e1cc7683b0a4d3a4e371e2\n\n\n\n\n\nndofs_266dd83841e8e1d8727ebf86ce21a1bf->macros_tex_cad5f1da754f8a8a55e792e63bdb608e\n\n\n\n\n\ngmsh_output_file_21abd7ff37f366bcfe0671894212a28b\n\ngmsh_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7affb1135e80>\n\n\n\ngmsh_output_file_21abd7ff37f366bcfe0671894212a28b->meshio_output_h5_820b8c33c2bdb393be8926e10336e78f\n\n\n\n\n\nmeshio_output_xdmf_4024dc91800ed6288ff24bfef538b355\n\nmeshio_output_xdmf=<pyiron_base.project.delayed.DelayedObject object at 0x7affb11360f0>\n\n\n\ngmsh_output_file_21abd7ff37f366bcfe0671894212a28b->meshio_output_xdmf_4024dc91800ed6288ff24bfef538b355\n\n\n\n\n\nmeshio_output_xdmf_4024dc91800ed6288ff24bfef538b355->poisson_output_vtu_file_f94d0e7074e76599a2585f415f0964a3\n\n\n\n\n\nmeshio_output_xdmf_4024dc91800ed6288ff24bfef538b355->poisson_output_pvd_file_238ba0bb49c7fe684ae299141dca75ba\n\n\n\n\n\nmeshio_output_xdmf_4024dc91800ed6288ff24bfef538b355->ndofs_266dd83841e8e1d8727ebf86ce21a1bf\n\n\n\n\n\ndomain_size_f12a7f1986b9dd058dfc666dbe230b20\n\ndomain_size=2.0\n\n\n\ndomain_size_f12a7f1986b9dd058dfc666dbe230b20->gmsh_output_file_21abd7ff37f366bcfe0671894212a28b\n\n\n\n\n\ndomain_size_f12a7f1986b9dd058dfc666dbe230b20->macros_tex_cad5f1da754f8a8a55e792e63bdb608e\n\n\n\n\n\nmacros_tex_cad5f1da754f8a8a55e792e63bdb608e->create_function_job_cbcc77ccff8408ba53cfd28fb24dcae5\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3\n\nsource_directory=/home/jovyan/source\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->create_function_job_cbcc77ccff8408ba53cfd28fb24dcae5\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->plot_file_872f3cd4b7e1cc7683b0a4d3a4e371e2\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->poisson_output_vtu_file_f94d0e7074e76599a2585f415f0964a3\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->pvbatch_output_file_872f3cd4b7e1cc7683b0a4d3a4e371e2\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->poisson_output_pvd_file_238ba0bb49c7fe684ae299141dca75ba\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->ndofs_266dd83841e8e1d8727ebf86ce21a1bf\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->gmsh_output_file_21abd7ff37f366bcfe0671894212a28b\n\n\n\n\n\nsource_directory_8c1956470a985919d1bf6df6988792b3->macros_tex_cad5f1da754f8a8a55e792e63bdb608e\n\n\n\n\n"},"metadata":{}}],"execution_count":19},{"id":"ea92c7ad-afef-423c-b8fa-9d24c1267c73","cell_type":"code","source":"delayed_object_lst[-1].pull()","metadata":{"trusted":true},"outputs":[{"name":"stdout","output_type":"stream","text":"The job generate_mesh_125ce05ece0fc0d66618512ba1d77668 was saved and received the ID: 1\nThe job convert_to_xdmf_3f3f6eedbec11ddbadd12a29bba73645 was saved and received the ID: 2\nThe job poisson_4ac637289ca3e887f9c9d5c8930988b7 was saved and received the ID: 3\nThe job plot_over_line_fd8a60d7c4699d5c6b315f7aa2676e18 was saved and received the ID: 4\nThe job substitute_macros_f5b8e73356e1fa2caf0e44eaaad30177 was saved and received the ID: 5\nThe job compile_paper_1f9a009abf2ecd1cd23f9d8669659b16 was saved and received the ID: 6\n"},{"execution_count":20,"output_type":"execute_result","data":{"text/plain":"'/home/jovyan/postprocessing/paper.pdf'"},"metadata":{}}],"execution_count":20},{"id":"32287743-e59a-467c-92fe-8586f199e36e","cell_type":"markdown","source":"## Load Workflow with executorlib","metadata":{}},{"id":"78dab9bf","cell_type":"code","source":"from executorlib import SingleNodeExecutor","metadata":{"trusted":true},"outputs":[],"execution_count":21},{"id":"a9460760","cell_type":"code","source":"from python_workflow_definition.executorlib import load_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":22},{"id":"2cf9d10e","cell_type":"code","source":"with SingleNodeExecutor(max_workers=1) as exe:\n result = load_workflow_json(file_name=workflow_json_filename, exe=exe).result()","metadata":{"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":"/srv/conda/envs/notebook/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n import pkg_resources\n"}],"execution_count":23},{"id":"7780e36f","cell_type":"code","source":"result","metadata":{"trusted":true},"outputs":[{"execution_count":24,"output_type":"execute_result","data":{"text/plain":"'/home/jovyan/postprocessing/paper.pdf'"},"metadata":{}}],"execution_count":24}]} \ No newline at end of file +{ + "cells": [ + { + "cell_type": "markdown", + "id": "106ded66-d202-46ac-82b0-2755ca309bdd", + "metadata": {}, + "source": [ + "# pyiron_workflow\n", + "\n", + "https://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements" + ] + }, + { + "cell_type": "markdown", + "id": "91dd48ea-aa7e-4937-a68e-59fc5017eb1e", + "metadata": {}, + "source": [ + "## Define workflow with pyiron_workflow" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "2c9622f5-ab7e-460e-b8e4-8d21413eda77", + "metadata": {}, + "outputs": [], + "source": [ + "import os" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "d265bb5aa6af79d6", + "metadata": {}, + "outputs": [], + "source": [ + "from workflow import (\n", + " generate_mesh as _generate_mesh, \n", + " convert_to_xdmf as _convert_to_xdmf,\n", + " poisson as _poisson,\n", + " plot_over_line as _plot_over_line,\n", + " substitute_macros as _substitute_macros,\n", + " compile_paper as _compile_paper,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "2dced28725813fc1", + "metadata": {}, + "outputs": [], + "source": [ + "from pyiron_workflow import Workflow, to_function_node\n", + "from pyironflow import PyironFlow\n", + "\n", + "from python_workflow_definition.pyiron_workflow import write_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "549ecf27-88ef-4e77-8bd4-b616cfdda2e4", + "metadata": {}, + "outputs": [], + "source": [ + "generate_mesh = to_function_node(\"generate_mesh\", _generate_mesh, \"generate_mesh\")\n", + "convert_to_xdmf = to_function_node(\"convert_to_xdmf\", _convert_to_xdmf, \"convert_to_xdmf\")\n", + "poisson = to_function_node(\"poisson\", _poisson, \"poisson\")\n", + "plot_over_line = to_function_node(\"plot_over_line\", _plot_over_line, \"plot_over_line\")\n", + "substitute_macros = to_function_node(\"substitute_macros\", _substitute_macros, \"substitute_macros\")\n", + "compile_paper = to_function_node(\"compile_paper\", _compile_paper, \"compile_paper\")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "3a75428e-18c7-49cf-8256-23cff58b9d6e", + "metadata": {}, + "outputs": [], + "source": [ + "wf = Workflow(\"my_workflow\")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "8d911f98-3b80-457f-a0f4-3cb37ebf1691", + "metadata": {}, + "outputs": [], + "source": [ + "wf.domain_size = 2.0" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "c6ea980b-6761-4191-8407-7b1f78a4c3ea", + "metadata": {}, + "outputs": [], + "source": [ + "wf.source_directory = os.path.abspath(os.path.join(os.curdir, \"source\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "71d411b6-cbec-489e-99e3-ba71680bcb5b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "wf.gmsh_output_file = generate_mesh(\n", + " domain_size=wf.domain_size,\n", + " source_directory=wf.source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "1d0d9804-f250-48b3-a5d0-a546d520f79b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "wf.meshio_output_dict = convert_to_xdmf(\n", + " gmsh_output_file=wf.gmsh_output_file,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "7b69bcff-e2b1-4d4a-b62c-6a1c86eeb590", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "wf.poisson_dict = poisson(\n", + " meshio_output_xdmf=wf.meshio_output_dict[\"xdmf_file\"], \n", + " meshio_output_h5=wf.meshio_output_dict[\"h5_file\"],\n", + " source_directory=wf.source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "3c4a29b0-eb1e-490a-8be0-e03cfff15e0a", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "wf.pvbatch_output_file = plot_over_line(\n", + " poisson_output_pvd_file=wf.poisson_dict[\"pvd_file\"], \n", + " poisson_output_vtu_file=wf.poisson_dict[\"vtu_file\"],\n", + " source_directory=wf.source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "a0a4c233-322d-4723-9627-62ca2487bfa9", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "wf.macros_tex_file = substitute_macros( \n", + " pvbatch_output_file=wf.pvbatch_output_file, \n", + " ndofs=wf.poisson_dict[\"numdofs\"], \n", + " domain_size=wf.domain_size,\n", + " source_directory=wf.source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "c281408f-e63d-4380-a7e6-c595d49fbb8f", + "metadata": {}, + "outputs": [], + "source": [ + "wf.paper_output = compile_paper(\n", + " macros_tex=wf.macros_tex_file, \n", + " plot_file=wf.pvbatch_output_file,\n", + " source_directory=wf.source_directory,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "db4f1e15-3710-4e24-abc2-0fef417043e8", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflow\n", + "\n", + "my_workflow: Workflow\n", + "\n", + "clustermy_workflowInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "gmsh_output_file: generate_mesh\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dict\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_dict: convert_to_xdmf\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_2821762346018240905: GetItem\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_m5678132184210446257: GetItem\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowpoisson_dict\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_dict: poisson\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_7859669629580352783: GetItem\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_1789171570415636576: GetItem\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "pvbatch_output_file: plot_over_line\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "injected_GetItem_7699502559509920012: GetItem\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012Inputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012OutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "macros_tex_file: substitute_macros\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "clustermy_workflowpaper_output\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "paper_output: compile_paper\n", + "\n", + "\n", + "clustermy_workflowpaper_outputInputs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Inputs\n", + "\n", + "\n", + "clustermy_workflowpaper_outputOutputsWithInjection\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "OutputsWithInjection\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsgmsh_output_file__domain_size\n", + "\n", + "gmsh_output_file__domain_size: float\n", + "\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileInputsdomain_size\n", + "\n", + "domain_size: float\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsgmsh_output_file__domain_size->clustermy_workflowgmsh_output_fileInputsdomain_size\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsgmsh_output_file__source_directory\n", + "\n", + "gmsh_output_file__source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsgmsh_output_file__source_directory->clustermy_workflowgmsh_output_fileInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_2821762346018240905__item\n", + "\n", + "injected_GetItem_2821762346018240905__item\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_2821762346018240905__item->clustermy_workflowinjected_GetItem_2821762346018240905Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_m5678132184210446257__item\n", + "\n", + "injected_GetItem_m5678132184210446257__item\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_m5678132184210446257__item->clustermy_workflowinjected_GetItem_m5678132184210446257Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputspoisson_dict__source_directory\n", + "\n", + "poisson_dict__source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputspoisson_dict__source_directory->clustermy_workflowpoisson_dictInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_7859669629580352783__item\n", + "\n", + "injected_GetItem_7859669629580352783__item\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_7859669629580352783__item->clustermy_workflowinjected_GetItem_7859669629580352783Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_1789171570415636576__item\n", + "\n", + "injected_GetItem_1789171570415636576__item\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_1789171570415636576__item->clustermy_workflowinjected_GetItem_1789171570415636576Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputspvbatch_output_file__source_directory\n", + "\n", + "pvbatch_output_file__source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputspvbatch_output_file__source_directory->clustermy_workflowpvbatch_output_fileInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_7699502559509920012__item\n", + "\n", + "injected_GetItem_7699502559509920012__item\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012Inputsitem\n", + "\n", + "item\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsinjected_GetItem_7699502559509920012__item->clustermy_workflowinjected_GetItem_7699502559509920012Inputsitem\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsmacros_tex_file__domain_size\n", + "\n", + "macros_tex_file__domain_size: float\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileInputsdomain_size\n", + "\n", + "domain_size: float\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsmacros_tex_file__domain_size->clustermy_workflowmacros_tex_fileInputsdomain_size\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsmacros_tex_file__source_directory\n", + "\n", + "macros_tex_file__source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputsmacros_tex_file__source_directory->clustermy_workflowmacros_tex_fileInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputspaper_output__source_directory\n", + "\n", + "paper_output__source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputInputssource_directory\n", + "\n", + "source_directory: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowInputspaper_output__source_directory->clustermy_workflowpaper_outputInputssource_directory\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowOutputsWithInjectionpaper_output__compile_paper\n", + "\n", + "paper_output__compile_paper: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileOutputsWithInjectiongenerate_mesh\n", + "\n", + "generate_mesh: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictInputsgmsh_output_file\n", + "\n", + "gmsh_output_file: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowgmsh_output_fileOutputsWithInjectiongenerate_mesh->clustermy_workflowmeshio_output_dictInputsgmsh_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictOutputsWithInjectionconvert_to_xdmf\n", + "\n", + "convert_to_xdmf: dict\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictOutputsWithInjectionconvert_to_xdmf->clustermy_workflowinjected_GetItem_2821762346018240905Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clustermy_workflowmeshio_output_dictOutputsWithInjectionconvert_to_xdmf->clustermy_workflowinjected_GetItem_m5678132184210446257Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictInputsmeshio_output_xdmf\n", + "\n", + "meshio_output_xdmf: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_2821762346018240905OutputsWithInjectiongetitem->clustermy_workflowpoisson_dictInputsmeshio_output_xdmf\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictInputsmeshio_output_h5\n", + "\n", + "meshio_output_h5: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_m5678132184210446257OutputsWithInjectiongetitem->clustermy_workflowpoisson_dictInputsmeshio_output_h5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictOutputsWithInjectionpoisson\n", + "\n", + "poisson: dict\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictOutputsWithInjectionpoisson->clustermy_workflowinjected_GetItem_7859669629580352783Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictOutputsWithInjectionpoisson->clustermy_workflowinjected_GetItem_1789171570415636576Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012Inputsobj\n", + "\n", + "obj\n", + "\n", + "\n", + "\n", + "clustermy_workflowpoisson_dictOutputsWithInjectionpoisson->clustermy_workflowinjected_GetItem_7699502559509920012Inputsobj\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileInputspoisson_output_pvd_file\n", + "\n", + "poisson_output_pvd_file: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7859669629580352783OutputsWithInjectiongetitem->clustermy_workflowpvbatch_output_fileInputspoisson_output_pvd_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileInputspoisson_output_vtu_file\n", + "\n", + "poisson_output_vtu_file: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_1789171570415636576OutputsWithInjectiongetitem->clustermy_workflowpvbatch_output_fileInputspoisson_output_vtu_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileOutputsWithInjectionplot_over_line\n", + "\n", + "plot_over_line: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileInputspvbatch_output_file\n", + "\n", + "pvbatch_output_file: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileOutputsWithInjectionplot_over_line->clustermy_workflowmacros_tex_fileInputspvbatch_output_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputInputsplot_file\n", + "\n", + "plot_file: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowpvbatch_output_fileOutputsWithInjectionplot_over_line->clustermy_workflowpaper_outputInputsplot_file\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012Inputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012OutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012Inputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012OutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012OutputsWithInjectiongetitem\n", + "\n", + "getitem\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileInputsndofs\n", + "\n", + "ndofs: int\n", + "\n", + "\n", + "\n", + "clustermy_workflowinjected_GetItem_7699502559509920012OutputsWithInjectiongetitem->clustermy_workflowmacros_tex_fileInputsndofs\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileOutputsWithInjectionsubstitute_macros\n", + "\n", + "substitute_macros: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputInputsmacros_tex\n", + "\n", + "macros_tex: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowmacros_tex_fileOutputsWithInjectionsubstitute_macros->clustermy_workflowpaper_outputInputsmacros_tex\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputInputsrun\n", + "\n", + "run\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputOutputsWithInjectionran\n", + "\n", + "ran\n", + "\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputInputsaccumulate_and_run\n", + "\n", + "accumulate_and_run\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputOutputsWithInjectionfailed\n", + "\n", + "failed\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputOutputsWithInjectioncompile_paper\n", + "\n", + "compile_paper: str\n", + "\n", + "\n", + "\n", + "clustermy_workflowpaper_outputOutputsWithInjectioncompile_paper->clustermy_workflowOutputsWithInjectionpaper_output__compile_paper\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf.draw(size=(10,10))" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "9617f088-03e0-4863-9005-ffc9fbc13a6f", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "be9deb7355b34e449a32949ff2a4aa4c", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(Accordion(children=(VBox(children=(Button(button_style='info', description='Refresh', style=But…" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pf = PyironFlow([wf])\n", + "pf.gui" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "63f29646-3846-4a97-a033-20e9df0ac214", + "metadata": {}, + "outputs": [], + "source": [ + "workflow_json_filename = \"pyiron_workflow_nfdi.json\"" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "f62111ba-9271-4987-9c7e-3b1c9f9eae7a", + "metadata": {}, + "outputs": [], + "source": [ + "write_workflow_json(graph_as_dict=wf.graph_as_dict, file_name=workflow_json_filename)" + ] + }, + { + "cell_type": "markdown", + "id": "32287743-e59a-467c-92fe-8586f199e36e", + "metadata": {}, + "source": [ + "## Load Workflow with executorlib" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "78dab9bf", + "metadata": {}, + "outputs": [], + "source": [ + "from executorlib import SingleNodeExecutor" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "a9460760", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.executorlib import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "2cf9d10e", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" + ] + } + ], + "source": [ + "with SingleNodeExecutor(max_workers=1) as exe:\n", + " result = load_workflow_json(file_name=workflow_json_filename, exe=exe).result()" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "7780e36f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result" + ] + }, + { + "cell_type": "markdown", + "id": "ebd3248b-ff75-40bf-a488-b5e338342671", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_base" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "c7e1047f-0d42-4777-911d-ab405396401a", + "metadata": {}, + "outputs": [], + "source": [ + "from python_workflow_definition.pyiron_base import load_workflow_json" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "6aeba274-10d3-4e79-8ee4-4d870f163939", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "create_function_job_f83f7263af929644f7f13ddeedc3033d\n", + "\n", + "create_function_job=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a3320>\n", + "\n", + "\n", + "\n", + "plot_file_32456496378d4bee635a2b5cbb305bf0\n", + "\n", + "plot_file=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a2e10>\n", + "\n", + "\n", + "\n", + "plot_file_32456496378d4bee635a2b5cbb305bf0->create_function_job_f83f7263af929644f7f13ddeedc3033d\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_9e2b6e366d7dd4049180c7a9baaca852\n", + "\n", + "poisson_output_vtu_file=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a2b40>\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_9e2b6e366d7dd4049180c7a9baaca852->plot_file_32456496378d4bee635a2b5cbb305bf0\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "pvbatch_output_file_32456496378d4bee635a2b5cbb305bf0\n", + "\n", + "pvbatch_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a2e10>\n", + "\n", + "\n", + "\n", + "poisson_output_vtu_file_9e2b6e366d7dd4049180c7a9baaca852->pvbatch_output_file_32456496378d4bee635a2b5cbb305bf0\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "macros_tex_d25c936428532bbfc7cd2861132319a7\n", + "\n", + "macros_tex=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a3170>\n", + "\n", + "\n", + "\n", + "pvbatch_output_file_32456496378d4bee635a2b5cbb305bf0->macros_tex_d25c936428532bbfc7cd2861132319a7\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_h5_53e81832d9ff7ffedcb8a75d22bcfc74\n", + "\n", + "meshio_output_h5=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a2690>\n", + "\n", + "\n", + "\n", + "meshio_output_h5_53e81832d9ff7ffedcb8a75d22bcfc74->poisson_output_vtu_file_9e2b6e366d7dd4049180c7a9baaca852\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_dde111665013bef44ff90f23cbc546bc\n", + "\n", + "poisson_output_pvd_file=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a29f0>\n", + "\n", + "\n", + "\n", + "meshio_output_h5_53e81832d9ff7ffedcb8a75d22bcfc74->poisson_output_pvd_file_dde111665013bef44ff90f23cbc546bc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "ndofs_bc6595188f482b15aab8e445c64aabf2\n", + "\n", + "ndofs=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a2ea0>\n", + "\n", + "\n", + "\n", + "meshio_output_h5_53e81832d9ff7ffedcb8a75d22bcfc74->ndofs_bc6595188f482b15aab8e445c64aabf2\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_dde111665013bef44ff90f23cbc546bc->plot_file_32456496378d4bee635a2b5cbb305bf0\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "poisson_output_pvd_file_dde111665013bef44ff90f23cbc546bc->pvbatch_output_file_32456496378d4bee635a2b5cbb305bf0\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "ndofs_bc6595188f482b15aab8e445c64aabf2->macros_tex_d25c936428532bbfc7cd2861132319a7\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "gmsh_output_file=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a23f0>\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5->meshio_output_h5_53e81832d9ff7ffedcb8a75d22bcfc74\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_8cbaedfc08790e97e71132b00870126f\n", + "\n", + "meshio_output_xdmf=<pyiron_base.project.delayed.DelayedObject object at 0x7f63913a2030>\n", + "\n", + "\n", + "\n", + "gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5->meshio_output_xdmf_8cbaedfc08790e97e71132b00870126f\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_8cbaedfc08790e97e71132b00870126f->poisson_output_vtu_file_9e2b6e366d7dd4049180c7a9baaca852\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_8cbaedfc08790e97e71132b00870126f->poisson_output_pvd_file_dde111665013bef44ff90f23cbc546bc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "meshio_output_xdmf_8cbaedfc08790e97e71132b00870126f->ndofs_bc6595188f482b15aab8e445c64aabf2\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20\n", + "\n", + "domain_size=2.0\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20->gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "domain_size_f12a7f1986b9dd058dfc666dbe230b20->macros_tex_d25c936428532bbfc7cd2861132319a7\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "macros_tex_d25c936428532bbfc7cd2861132319a7->create_function_job_f83f7263af929644f7f13ddeedc3033d\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba\n", + "\n", + "source_directory=/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/source\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->create_function_job_f83f7263af929644f7f13ddeedc3033d\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->plot_file_32456496378d4bee635a2b5cbb305bf0\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->poisson_output_vtu_file_9e2b6e366d7dd4049180c7a9baaca852\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->pvbatch_output_file_32456496378d4bee635a2b5cbb305bf0\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->poisson_output_pvd_file_dde111665013bef44ff90f23cbc546bc\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->ndofs_bc6595188f482b15aab8e445c64aabf2\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->gmsh_output_file_3f80823c9434076ba4e0c1e8949addd5\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "source_directory_2e89d42dca76804a747771e521309fba->macros_tex_d25c936428532bbfc7cd2861132319a7\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\n", + "delayed_object_lst[-1].draw()" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "ea92c7ad-afef-423c-b8fa-9d24c1267c73", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job generate_mesh_efefecc1e0b6f0c722299e0e3006ac35 was saved and received the ID: 57\n", + "The job convert_to_xdmf_0ad4672b75fea34088b0c70a550b4240 was saved and received the ID: 58\n", + "The job poisson_20cb224cd32355381872a81936a7d8f0 was saved and received the ID: 59\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The job plot_over_line_3dce48c8db062af151a2bef63dc24e36 was saved and received the ID: 60\n", + "The job substitute_macros_cdc660861030d9ca17195b5db4616d5c was saved and received the ID: 61\n", + "The job compile_paper_de1b620df0f0da260aa27ab0316988ba was saved and received the ID: 62\n" + ] + }, + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "delayed_object_lst[-1].pull()" + ] + }, + { + "cell_type": "markdown", + "id": "754818f0-1141-4bf8-a4a7-7669d2458312", + "metadata": {}, + "source": [ + "## Load Workflow with pyiron_core" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "415e33b3-5cee-43c5-bd15-f964a8a26802", + "metadata": {}, + "outputs": [], + "source": [ + "from importlib import import_module\n", + "import json" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "b6566acc-c258-403a-8d95-eabb0437c702", + "metadata": {}, + "outputs": [], + "source": [ + "from pyiron_core import Workflow, as_function_node\n", + "from pyiron_core.pyiron_nodes.utilities import GetItem\n", + "import pyiron_core.pyironflow.api as pyironflow\n", + "from pyiron_core.pyiron_workflow.simple_workflow import Node\n", + "from pyiron_core.pyiron_workflow.wf_graph_tools import _different_indices, _edges_from_dict, _nodes_from_dict, _filter_and_flatten_nested_dict_keys, _rename_keys, _get_node_labels, _find_input_nodes, get_nodes_from_wf, topological_sort, WorkflowGraph" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "d90b9362-43bf-4890-a17d-5f5a8f12cd87", + "metadata": {}, + "outputs": [], + "source": [ + "def get_graph_from_wf(wf: \"Workflow\") -> WorkflowGraph:\n", + " # get edges between nodes\n", + " keys_to_keep = [\"target\", \"targetHandle\", \"source\", \"sourceHandle\"]\n", + " edges = _filter_and_flatten_nested_dict_keys(pyironflow.get_edges(wf), keys_to_keep)\n", + "\n", + " # add edges for non-default inputs\n", + " nodes = get_nodes_from_wf(\n", + " wf,\n", + " keys_to_keep=[\n", + " \"data/label\",\n", + " \"data/import_path\",\n", + " \"data/target_values\",\n", + " \"data/target_labels\",\n", + " \"data/source_values\",\n", + " \"data/source_labels\",\n", + " ],\n", + " )\n", + " nodes_non_default_inp_param = []\n", + " for node in nodes:\n", + " label = node[\"label\"]\n", + " import_path = node[\"import_path\"]\n", + " try:\n", + " node_obj = pyironflow.get_node_from_path(import_path)()\n", + " except TypeError:\n", + " node_obj = as_function_node(pyironflow.get_node_from_path(import_path), labels=node[\"data__source_labels\"])()\n", + " changed_args = _different_indices(\n", + " node_obj.inputs.data[\"default\"], node[\"data__target_values\"]\n", + " )\n", + " for i in changed_args:\n", + " value = node[\"data__target_values\"][i]\n", + " handle = node[\"data__target_labels\"][i]\n", + " if value not in (\"NonPrimitive\", \"NotData\"):\n", + " inp_node_label = f\"var_{label}__{handle}\"\n", + " edge = {\n", + " \"target\": label,\n", + " \"targetHandle\": handle,\n", + " \"source\": inp_node_label,\n", + " \"sourceHandle\": value,\n", + " }\n", + "\n", + " edges.append(edge)\n", + " inp_node = {\"label\": inp_node_label, \"data__import_path\": value}\n", + " nodes_non_default_inp_param.append(inp_node)\n", + "\n", + " nodes = get_nodes_from_wf(\n", + " wf,\n", + " keys_to_keep=[\"data/label\", \"data/import_path\"],\n", + " )\n", + "\n", + " key_mapping = {\"data__label\": \"label\", \"data__import_path\": \"import_path\"}\n", + " nodes = _rename_keys(nodes_non_default_inp_param + nodes, key_mapping=key_mapping)\n", + "\n", + " graph = WorkflowGraph(\n", + " nodes=_nodes_from_dict(nodes), edges=_edges_from_dict(edges), label=wf.label\n", + " )\n", + " sorted_graph = topological_sort(graph)\n", + "\n", + " return sorted_graph" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "a524c932-0adf-4cd8-bffc-0334f8f3e3c2", + "metadata": {}, + "outputs": [], + "source": [ + "def pull_node(wf: \"Workflow\", node_label: str):\n", + " \"\"\"\n", + " Pull a node from the workflow graph and run it. Execute only nodes that\n", + " are required as input to run the node.\n", + "\n", + " Args:\n", + " wf (Workflow): The workflow containing the node.\n", + " node_label (str): The label of the node to pull.\n", + " \"\"\"\n", + " graph = get_graph_from_wf(wf)\n", + " node_labels = _get_node_labels(graph)\n", + " if node_label not in node_labels:\n", + " raise ValueError(f\"Node label '{node_label}' not found in the workflow graph.\")\n", + " node_index = node_labels.index(node_label)\n", + " input_nodes = _find_input_nodes(graph, node_index)\n", + " input_nodes_labels = [node_labels[i] for i in input_nodes]\n", + "\n", + " for input_node_label in input_nodes_labels:\n", + " out = wf._nodes[input_node_label].run()\n", + " return out\n" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "32f8df0b-73d3-46ed-b044-629bf8e562f2", + "metadata": {}, + "outputs": [], + "source": [ + "def get_input_parameter_dict(content):\n", + " input_parameter_dict = {}\n", + " for node in content[\"nodes\"]:\n", + " if node[\"type\"] == \"input\":\n", + " input_parameter_dict[node[\"id\"]] = node[\"value\"]\n", + " \n", + " return input_parameter_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "fc219241-e207-4ccf-8b26-559b59792261", + "metadata": {}, + "outputs": [], + "source": [ + "def set_workflow(workflow, content):\n", + " node_lst = []\n", + " input_parameter_dict = get_input_parameter_dict(content=content)\n", + " for node in content[\"nodes\"]:\n", + " \n", + " if node['type'] == 'function':\n", + " p, m = node['value'].rsplit('.', 1)\n", + " mod = import_module(p)\n", + " met = as_function_node(getattr(mod, m), labels=[\"result\"])\n", + " \n", + " input_dict = {}\n", + " for edge in content['edges']:\n", + " if edge[\"target\"] == node[\"id\"]:\n", + " if edge[\"source\"] in input_parameter_dict:\n", + " input_dict[edge['targetPort']] = input_parameter_dict[edge[\"source\"]]\n", + " elif edge[\"source\"] in node_lst and edge[\"sourcePort\"] is None:\n", + " input_dict[edge['targetPort']] = getattr(workflow, \"node_\" + str(edge[\"source\"]))\n", + " elif edge[\"source\"] in node_lst and edge[\"sourcePort\"] is not None:\n", + " label = \"node_\" + str(edge[\"source\"]) + \"_\" + edge[\"sourcePort\"]\n", + " setattr(workflow, label, GetItem(getattr(workflow, \"node_\" + str(edge[\"source\"])), edge[\"sourcePort\"])) \n", + " input_dict[edge['targetPort']] = getattr(workflow, label)\n", + " else:\n", + " raise TypeError()\n", + " \n", + " label = \"node_\" + str(node[\"id\"])\n", + " setattr(workflow, label, met(**input_dict))\n", + " node_lst.append(node[\"id\"])\n", + "\n", + " return workflow" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "9a91ce10-acf4-4235-bcf7-cd3d188dc53d", + "metadata": {}, + "outputs": [], + "source": [ + "with open(workflow_json_filename, \"r\") as f:\n", + " content = json.load(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "df6a77c8-e2be-4b14-8c16-069a388dbff1", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/jan/miniforge3/envs/processing/lib/python3.9/site-packages/ufl/__init__.py:250: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n" + ] + }, + { + "data": { + "text/plain": [ + "'/home/jan/notebooks/2026/2026-02-04-pyiron-core-pwd/postprocessing/paper.pdf'" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wf = Workflow(\"test\")\n", + "wf = set_workflow(workflow=wf, content=content)\n", + "pull_node(wf, list(wf.child_labels)[-1])" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 0638ba6fdd63d80d01446a3e9c66161b48ca95d4 Mon Sep 17 00:00:00 2001 From: jan-janssen Date: Sun, 8 Feb 2026 16:33:28 +0100 Subject: [PATCH 2/5] add hatch as build dependencies --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index c1006bf..dc82946 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -21,7 +21,7 @@ jobs: - name: Installation and setup shell: bash -l {0} run: | - conda install -c conda-forge jupyter papermill + conda install -c conda-forge jupyter papermill hatchling hatch-vcs hatch-jupyter-builder sudo apt-get install -y $(cat binder/apt.txt) pip install git+https://github.com/pyiron/pyiron_core.git --no-deps --no-build-isolation - name: Create Additional Conda Environments From 85452efb7f2481658771edcc461fd8202f1c2db4 Mon Sep 17 00:00:00 2001 From: jan-janssen Date: Sun, 8 Feb 2026 16:45:55 +0100 Subject: [PATCH 3/5] remove pyiron_nodes --- .github/workflows/pipeline.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index dc82946..fd0e4c0 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -23,7 +23,12 @@ jobs: run: | conda install -c conda-forge jupyter papermill hatchling hatch-vcs hatch-jupyter-builder sudo apt-get install -y $(cat binder/apt.txt) - pip install git+https://github.com/pyiron/pyiron_core.git --no-deps --no-build-isolation + git clone https://github.com/pyiron/pyiron_core.git + cd pyiron_core + rm -rf pyiron_core/pyiron_nodes + mkdir pyiron_core/pyiron_nodes + touch pyiron_core/pyiron_nodes/__init__.py + pip install . --no-deps --no-build-isolation - name: Create Additional Conda Environments shell: bash -l {0} run: | From f3fd5c0bead990082683f8aa9f332248a526b476 Mon Sep 17 00:00:00 2001 From: jan-janssen Date: Sun, 8 Feb 2026 16:52:36 +0100 Subject: [PATCH 4/5] copy utils --- .github/workflows/pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index fd0e4c0..b59acd4 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -25,9 +25,11 @@ jobs: sudo apt-get install -y $(cat binder/apt.txt) git clone https://github.com/pyiron/pyiron_core.git cd pyiron_core + cp pyiron_core/pyiron_nodes/utilities.py . rm -rf pyiron_core/pyiron_nodes mkdir pyiron_core/pyiron_nodes touch pyiron_core/pyiron_nodes/__init__.py + mv utilities.py pyiron_core/pyiron_nodes/utilities.py pip install . --no-deps --no-build-isolation - name: Create Additional Conda Environments shell: bash -l {0} From 54c52f3f0436d23fc980fa7df1929ff40be0d989 Mon Sep 17 00:00:00 2001 From: jan-janssen Date: Sun, 8 Feb 2026 16:57:41 +0100 Subject: [PATCH 5/5] fix mybinder --- binder/postBuild | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/binder/postBuild b/binder/postBuild index efa5c58..3a55d1b 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -2,4 +2,13 @@ conda env create -n preprocessing -f source/envs/preprocessing.yaml -y conda env create -n processing -f source/envs/processing.yaml -y conda env create -n postprocessing -f source/envs/postprocessing.yaml -y -pip install git+https://github.com/pyiron/pyiron_core.git --no-deps --no-build-isolation +conda install -c conda-forge hatchling hatch-vcs hatch-jupyter-builder + +git clone https://github.com/pyiron/pyiron_core.git +cd pyiron_core +cp pyiron_core/pyiron_nodes/utilities.py . +rm -rf pyiron_core/pyiron_nodes +mkdir pyiron_core/pyiron_nodes +touch pyiron_core/pyiron_nodes/__init__.py +mv utilities.py pyiron_core/pyiron_nodes/utilities.py +pip install . --no-deps --no-build-isolation