Picongpu: Density profile from HDF5

Created on 8 Feb 2021  路  5Comments  路  Source: ComputationalRadiationPhysics/picongpu

Hi,

There is a few lines in density.param to load the profile from HDF5 file. This is in https://github.com/ComputationalRadiationPhysics/picongpu/pull/261.

I have questions regarding this issue:

  1. Where do we load the hdf5 file from? or how do we set the path for it?
  2. Does it also load other value in the hdf5? like E or B.
  3. Do we need to use the same grid number as in the hdf5? If the hdf5 from previous simulation has different grid size but we want to restart with a different one.

Thanks.

core documentation question

Most helpful comment

@StevE-Ong Did @sbastrakov suggestions helped you? If yes, would you please close this issue.

All 5 comments

@StevE-Ong Thanks for posting this question. You are definitely right that the HDF5 input lacks (any) documentation. I am not familiar with this myself but will have a look at it. Perhaps @psychocoderHPC has time to answer your question. If I remember correctly he developed that density input method.

@StevE-Ong you can find here an example of how to set up loading from HDF5

https://github.com/ComputationalRadiationPhysics/picongpu/blob/454a28efe6a6eb0fa1e0e97031ef2569a1ad313b/include/picongpu/param/density.param#L229-L245

In this example you need a HDF5 file with a dataset data/0/fields/e_chargeDensity, the prefix data/0 is coming from the libsplash where zero is the timestep. If the size of the dataset is smaller than the global simulation size all other values will be set to defaultDensity, in this case zero. A value 1.0 within the dataset means BASE_DENSITY * 1.0. One data point within the HDF5 dataset corresponds to one cell in PIConGPU.

note0: PIConGPU has its origin in the top-left-front.
note1: HDF5 dataset coordinations are (z,y,x), if you create a density file e.g with python and the native HDF5 writer take this into account.
note2: we are currently refactoring the development branch and replace libsplash with openPMD #3357

Thanks, @psychocoderHPC. I am aware of these lines in density.param. But it gave HDF not found. Where should I put my hdf5 input or how should I set the path? I am not sure what is libsplash but if there is a similar plugin like

--checkpoint.restart.directory 

it would be great.

Having never used this feature, from the code I would assume it's relative to your simOutput output directory, and probably the safer way is to provide a full path as filename.

@StevE-Ong Did @sbastrakov suggestions helped you? If yes, would you please close this issue.

Was this page helpful?
0 / 5 - 0 ratings