Skip to content

Commit 32aea76

Browse files
committed
Merge pull request ComputationalRadiationPhysics#866 from PrometheusPi/add-boostBoolFlagsToRadiation
Add boost bool_switch to radiation plugin
2 parents ef69bde + 2a27886 commit 32aea76

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

doc/TBG_macros.cfg

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,18 @@ TBG_movingWindow="-m"
9696
# For a full description, see the plugins section in the online wiki.
9797
#--<species>_radiation.period Radiation is calculated every .period steps. Currently 0 or 1
9898
#--<species>_radiation.dump Period, after which the calculated radiation data should be dumped to the file system
99-
#--<species>_radiation.lastRadiation If set to 1, the spectra summed between the last and the current dump-time-step are stored
99+
#--<species>_radiation.lastRadiation If flag is set, the spectra summed between the last and the current dump-time-step are stored
100100
#--<species>_radiation.folderLastRad Folder in which the summed spectra are stored
101-
#--<species>_radiation.totalRadiation Set to 1 to store spectra summed from simulation start till current time step
101+
#--<species>_radiation.totalRadiation If flag is set, store spectra summed from simulation start till current time step
102102
#--<species>_radiation.folderTotalRad Folder in which total radiation spectra are stored
103103
#--<species>_radiation.start Time step to start calculating the radition
104104
#--<species>_radiation.end Time step to stop calculating the radiation
105105
#--<species>_radiation.omegaList If spectrum frequencies are taken from a file, this gives the path to this list
106-
#--<species>_radiation.radPerGPU If set to 1, each GPU stores its own spectra without summing the entire simulation area
106+
#--<species>_radiation.radPerGPU If flag is set, each GPU stores its own spectra without summing the entire simulation area
107107
#--<species>_radiation.folderRadPerGPU Folder where the GPU specific spectras are stored
108-
TBG_radiation="--<species>_radiation.period 1 --<species>_radiation.dump 2 --<species>_radiation.totalRadiation 1 \
109-
--<species>_radiation.lastRadiation 0 --<species>_radiation.start 2800 --<species>_radiation.end 3000"
108+
#--e_<species>_radiation.compression If flag is set, the hdf5 output will be compressed.
109+
TBG_radiation="--<species>_radiation.period 1 --<species>_radiation.dump 2 --<species>_radiation.totalRadiation \
110+
--<species>_radiation.lastRadiation --<species>_radiation.start 2800 --<species>_radiation.end 3000"
110111

111112

112113
# Create 2D images in PNG format every .period steps.

examples/Bunch/submit/bunch_0032.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ TBG_periodic="--periodic 1 0 1"
4747
## Section: Optional Variables ##
4848
#################################s
4949

50-
TBG_radiation="--e_radiation.period 1 --e_radiation.dump 2 --e_radiation.totalRadiation 1 \
51-
--e_radiation.lastRadiation 0 --e_radiation.start 2800 --e_radiation.end 3000"
50+
TBG_radiation="--e_radiation.period 1 --e_radiation.dump 2 --e_radiation.totalRadiation \
51+
--e_radiation.start 2800 --e_radiation.end 3000"
5252

5353
TBG_pngYX="--e_png.period 100 --e_png.axis yx --e_png.slicePoint 0.5 --e_png.folder pngElectronsYX"
5454

examples/SingleParticleRadiationWithLaser/submit/0008gpus.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ TBG_periodic="--periodic 1 0 1"
4949
TBG_pngYZ="--e_png.period 10 --e_png.axis yz --e_png.slicePoint 0.5 --e_png.folder pngElectronsYZ"
5050
TBG_pngYX="--e_png.period 10 --e_png.axis yx --e_png.slicePoint 0.5 --e_png.folder pngElectronsYX"
5151

52-
TBG_radiation="--e_radiation.period 1 --e_radiation.dump 40 --e_radiation.totalRadiation 1 --e_radiation.lastRadiation 0"
52+
TBG_radiation="--e_radiation.period 1 --e_radiation.dump 40 --e_radiation.totalRadiation"
5353

5454
TBG_plugins="!TBG_pngYX \
5555
!TBG_pngYZ \

src/picongpu/include/plugins/radiation/Radiation.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,16 @@ class Radiation : public ISimulationPlugin
195195
desc.add_options()
196196
((analyzerPrefix + ".period").c_str(), po::value<uint32_t > (&notifyFrequency), "enable analyser [for each n-th step]")
197197
((analyzerPrefix + ".dump").c_str(), po::value<uint32_t > (&dumpPeriod)->default_value(0), "dump integrated radiation from last dumped step [for each n-th step] (0 = only print data at end of simulation)")
198-
((analyzerPrefix + ".lastRadiation").c_str(), po::value<bool > (&lastRad)->default_value(false), "enable(1)/disable(0) calculation integrated radiation from last dumped step")
198+
((analyzerPrefix + ".lastRadiation").c_str(), po::bool_switch(&lastRad), "enable calculation of integrated radiation from last dumped step")
199199
((analyzerPrefix + ".folderLastRad").c_str(), po::value<std::string > (&folderLastRad)->default_value("lastRad"), "folder in which the integrated radiation from last dumped step is written")
200-
((analyzerPrefix + ".totalRadiation").c_str(), po::value<bool > (&totalRad)->default_value(false), "enable(1)/disable(0) calculation integrated radiation from start of simulation")
200+
((analyzerPrefix + ".totalRadiation").c_str(), po::bool_switch(&totalRad), "enable calculation of integrated radiation from start of simulation")
201201
((analyzerPrefix + ".folderTotalRad").c_str(), po::value<std::string > (&folderTotalRad)->default_value("totalRad"), "folder in which the integrated radiation from start of simulation is written")
202202
((analyzerPrefix + ".start").c_str(), po::value<uint32_t > (&radStart)->default_value(2), "time index when radiation should start with calculation")
203203
((analyzerPrefix + ".end").c_str(), po::value<uint32_t > (&radEnd)->default_value(0), "time index when radiation should end with calculation")
204204
((analyzerPrefix + ".omegaList").c_str(), po::value<std::string > (&pathOmegaList)->default_value("_noPath_"), "path to file containing all frequencies to calculate")
205-
((analyzerPrefix + ".radPerGPU").c_str(), po::value<bool > (&radPerGPU)->default_value(false), "enable(1)/disable(0) radiation output from each GPU individually")
205+
((analyzerPrefix + ".radPerGPU").c_str(), po::bool_switch(&radPerGPU), "enable radiation output from each GPU individually")
206206
((analyzerPrefix + ".folderRadPerGPU").c_str(), po::value<std::string > (&folderRadPerGPU)->default_value("radPerGPU"), "folder in which the radiation of each GPU is written")
207-
((analyzerPrefix + ".compression").c_str(), po::value<bool > (&compressionOn)->default_value(false), "enable(1)/disable(0) compression of hdf5 output");
207+
((analyzerPrefix + ".compression").c_str(), po::bool_switch(&compressionOn), "enable compression of hdf5 output");
208208
}
209209

210210

0 commit comments

Comments
 (0)