|
18 | 18 | "mesh.msh",
|
19 | 19 | ],
|
20 | 20 | nodes={"geometry": "../source/unit_square.geo"},
|
| 21 | + filenames={"geometry": "unit_square.geo"}, |
21 | 22 | outputs=["mesh.msh"],
|
22 | 23 | )
|
23 | 24 |
|
24 | 25 | # ### convert mesh from msh to xdmf format
|
25 | 26 | meshio_results, meshio_node = launch_shell_job(
|
26 | 27 | "meshio",
|
27 |
| - arguments=["convert", "{mesh}", "mesh.xdmf"], |
| 28 | + arguments=["convert", |
| 29 | + "{mesh}", |
| 30 | + "mesh.xdmf"], |
28 | 31 | nodes={"mesh": gmsh_results["mesh_msh"]},
|
29 | 32 | filenames={"mesh": "mesh.msh"},
|
30 | 33 | outputs=["*.xdmf", "*.h5"],
|
|
40 | 43 | # Build the environment if it doesn't exist, then activate and run
|
41 | 44 | # this is due to an incompatibility between dolfinx and aiida2.7, the latter
|
42 | 45 | # requiring to downgrade packages (such as numpy) which makes the fenics job fail
|
| 46 | + # and aiida runs the shell job in the global environment |
43 | 47 | "mamba env create -n processing -f processing.yaml && "
|
44 | 48 | "source activate processing && "
|
45 | 49 | "python poisson.py --mesh {mesh_xdmf} --degree 2 --outputfile poisson.xdmf"
|
|
51 | 55 | "mesh_xdmf": meshio_results["mesh_xdmf"],
|
52 | 56 | "mesh_h5": meshio_results["mesh_h5"]
|
53 | 57 | },
|
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"}, |
55 | 62 | outputs=["poisson.xdmf", "poisson.h5", "poisson.vtu", "poisson_p0_000000.vtu"]
|
56 | 63 | )
|
57 | 64 | except Exception as e:
|
|
87 | 94 | "vtu_file": fenics_results["poisson_vtu"],
|
88 | 95 | "vtu0_file": fenics_results["poisson_p0_000000_vtu"],
|
89 | 96 | },
|
90 |
| - filenames={"script": "postprocessing.py", |
| 97 | + filenames={ |
| 98 | + "script": "postprocessing.py", |
91 | 99 | "xdmf_file": "poisson.xdmf",
|
92 | 100 | "h5_file": "poisson.h5",
|
93 | 101 | "vtu_file": "poisson.vtu",
|
|
0 commit comments