From 0e2508c58a0127962b419d8b4f198baf5d6db25c 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 00000000000..a2d55d9a748 --- /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 1bf4dceac35..9950414aa5b 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 bb44f709e28..724c5d79784 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