From 28250512742d73fa08eb6eb2a05fd1c5d29617ae Mon Sep 17 00:00:00 2001 From: mafshari Date: Wed, 3 Jul 2024 13:10:24 +0200 Subject: [PATCH] add moving window config option to PyPIConGPU --- .../schema/movingWindowVelocity.json | 21 +++++++++++++++++++ .../schema/simulation.Simulation.json | 11 ++++++++++ .../template/etc/picongpu/N.cfg.mustache | 12 ++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 share/picongpu/pypicongpu/schema/movingWindowVelocity.json diff --git a/share/picongpu/pypicongpu/schema/movingWindowVelocity.json b/share/picongpu/pypicongpu/schema/movingWindowVelocity.json new file mode 100644 index 0000000000..a2d55d9a74 --- /dev/null +++ b/share/picongpu/pypicongpu/schema/movingWindowVelocity.json @@ -0,0 +1,21 @@ +{ + "$id": "https://registry.hzdr.de/crp/picongpu/schema/picongpu.pypicongpu.movingWindowVelocity", + "type": "object", + "description": "Describes the velocity of the moving window in the simulation.", + "unevaluatedProperties": false, + "required": ["x", "y", "z"], + "properties": { + "x": { + "type": "number", + "exclusiveMinimum" : 0 + }, + "y": { + "type": "number", + "exclusiveMinimum" : 0 + }, + "z": { + "type": "number", + "exclusiveMinimum" : 0 + } + } +} diff --git a/share/picongpu/pypicongpu/schema/simulation.Simulation.json b/share/picongpu/pypicongpu/schema/simulation.Simulation.json index 1bf4dceac3..9950414aa5 100644 --- a/share/picongpu/pypicongpu/schema/simulation.Simulation.json +++ b/share/picongpu/pypicongpu/schema/simulation.Simulation.json @@ -33,6 +33,16 @@ } ] }, + "moving_window_velocity": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "https://registry.hzdr.de/crp/picongpu/schema/picongpu.pypicongpu.movingWindowVelocity" + } + ] + }, "species_initmanager": { "$ref": "https://registry.hzdr.de/crp/picongpu/schema/picongpu.pypicongpu.species.initmanager.InitManager" }, @@ -71,6 +81,7 @@ "solver", "grid", "laser", + "moving_window_velocity", "customuserinput" ], "unevaluatedProperties": false diff --git a/share/picongpu/pypicongpu/template/etc/picongpu/N.cfg.mustache b/share/picongpu/pypicongpu/template/etc/picongpu/N.cfg.mustache index bb44f709e2..724c5d7978 100644 --- a/share/picongpu/pypicongpu/template/etc/picongpu/N.cfg.mustache +++ b/share/picongpu/pypicongpu/template/etc/picongpu/N.cfg.mustache @@ -120,11 +120,17 @@ TBG_plugins="!TBG_pypicongpu_output" TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z" -TBG_programParams="-d !TBG_deviceDist \ +TBG_programParams=" +{{#moving_window_velocity}} + --moving_window_velocity_X = {{{x}}} \ + --moving_window_velocity_Y = {{{y}}} \ + --moving_window_velocity_Z = {{{z}}} \ +{{/moving_window_velocity}} + -d !TBG_deviceDist \ -g !TBG_gridSize \ -s !TBG_steps \ - !TBG_periodic \ - !TBG_plugins \ + !TBG_periodic \ + !TBG_plugins \ --versionOnce" # TOTAL number of devices