Skip to content

Commit

Permalink
Merge pull request #4399 from franzpoeschel/fix-radiation-bp5
Browse files Browse the repository at this point in the history
Radiation plugin: Workaround BP5 bug
  • Loading branch information
PrometheusPi committed Dec 21, 2022
2 parents 697e553 + 1570986 commit 18bbd30
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions include/picongpu/plugins/radiation/Radiation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,13 @@ namespace picongpu
::openPMD::Series& openPMDdataFile = series.value();
::openPMD::Iteration openPMDdataFileIteration = openPMDdataFile.writeIterations()[currentStep];

/* begin required openPMD global attributes */
openPMDdataFileIteration.setDt<float_X>(DELTA_T);
const float_X time = float_X(currentStep) * DELTA_T;
openPMDdataFileIteration.setTime(time);
openPMDdataFileIteration.setTimeUnitSI(UNIT_TIME);
/* end required openPMD global attributes */

// begin: write amplitude data
::openPMD::Mesh mesh_amp = openPMDdataFileIteration.meshes[dataLabels(-1)];

Expand Down Expand Up @@ -939,15 +946,6 @@ namespace picongpu
omega_mrc.storeChunk(detectorFrequencies, offset_omega, extent_omega);
// end: write frequencies

/* begin openPMD attributes */
/* begin required openPMD global attributes */

openPMDdataFileIteration.setDt<float_X>(DELTA_T);
const float_X time = float_X(currentStep) * DELTA_T;
openPMDdataFileIteration.setTime(time);
openPMDdataFileIteration.setTimeUnitSI(UNIT_TIME);
/* end required openPMD global attributes */

openPMDdataFileIteration.close();
openPMDdataFile.flush();
}
Expand Down

0 comments on commit 18bbd30

Please sign in to comment.