Skip to content

Commit 20c36c8

Browse files
committed
update aiida
1 parent fce53a3 commit 20c36c8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

exemplary_workflow/aiida/exemplary_workflow.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@
1818
"mesh.msh",
1919
],
2020
nodes={"geometry": "../source/unit_square.geo"},
21+
filenames={"geometry": "unit_square.geo"},
2122
outputs=["mesh.msh"],
2223
)
2324

2425
# ### convert mesh from msh to xdmf format
2526
meshio_results, meshio_node = launch_shell_job(
2627
"meshio",
27-
arguments=["convert", "{mesh}", "mesh.xdmf"],
28+
arguments=["convert",
29+
"{mesh}",
30+
"mesh.xdmf"],
2831
nodes={"mesh": gmsh_results["mesh_msh"]},
2932
filenames={"mesh": "mesh.msh"},
3033
outputs=["*.xdmf", "*.h5"],
@@ -40,6 +43,7 @@
4043
# Build the environment if it doesn't exist, then activate and run
4144
# this is due to an incompatibility between dolfinx and aiida2.7, the latter
4245
# requiring to downgrade packages (such as numpy) which makes the fenics job fail
46+
# and aiida runs the shell job in the global environment
4347
"mamba env create -n processing -f processing.yaml && "
4448
"source activate processing && "
4549
"python poisson.py --mesh {mesh_xdmf} --degree 2 --outputfile poisson.xdmf"
@@ -51,7 +55,10 @@
5155
"mesh_xdmf": meshio_results["mesh_xdmf"],
5256
"mesh_h5": meshio_results["mesh_h5"]
5357
},
54-
filenames={"mesh_xdmf": "mesh.xdmf", "mesh_h5": "mesh.h5", "conda": "processing.yaml"},
58+
filenames={"script": "poisson.py",
59+
"mesh_xdmf": "mesh.xdmf",
60+
"mesh_h5": "mesh.h5",
61+
"conda": "processing.yaml"},
5562
outputs=["poisson.xdmf", "poisson.h5", "poisson.vtu", "poisson_p0_000000.vtu"]
5663
)
5764
except Exception as e:
@@ -87,7 +94,8 @@
8794
"vtu_file": fenics_results["poisson_vtu"],
8895
"vtu0_file": fenics_results["poisson_p0_000000_vtu"],
8996
},
90-
filenames={"script": "postprocessing.py",
97+
filenames={
98+
"script": "postprocessing.py",
9199
"xdmf_file": "poisson.xdmf",
92100
"h5_file": "poisson.h5",
93101
"vtu_file": "poisson.vtu",

0 commit comments

Comments
 (0)