template<class HostProxy>
tk::ParticleWriter class

Charm++ group used to output particle data to file in parallel using H5Part and MPI-IO.

Constructors, destructors, conversion operators

ParticleWriter(const HostProxy& host, const std::string& filename) explicit

Public functions

void npar(std::size_t n)
void writeCoords(std::size_t nchare, uint64_t it, const std::vector<tk::real>& x, const std::vector<tk::real>& y, const std::vector<tk::real>& z)

Function documentation

template<class HostProxy>
tk::ParticleWriter<HostProxy>::ParticleWriter(const HostProxy& host, const std::string& filename) explicit

Parameters
host in Host proxy
filename in Filename of particle output file

Constructor It is okay to call this constructor with empty filename. In that case no IO will be performed. This is basically a punt to enable skipping H5Part I/O. Particles are a highly experimental feature at this point.

template<class HostProxy>
void tk::ParticleWriter<HostProxy>::npar(std::size_t n)

Parameters
in Number of particles will be contributed

Chares contribute their number of particles they will output on my PE

template<class HostProxy>
void tk::ParticleWriter<HostProxy>::writeCoords(std::size_t nchare, uint64_t it, const std::vector<tk::real>& x, const std::vector<tk::real>& y, const std::vector<tk::real>& z)

Parameters
nchare in Number of chares that contribute
it in Iteration count
in X coordinates of particles
in Y coordinates of particles
in Z coordinates of particles

Receive, buffer, and write particle coordinates to file