Chombo + EB + MF  3.2
Macros | Functions
ParticleIO.H File Reference
#include <list>
#include "REAL.H"
#include "Vector.H"
#include "LayoutIterator.H"
#include "CH_HDF5.H"
#include "SPMD.H"
#include "ListBox.H"
#include "ParticleData.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
#include "ParticleIOI.H"
Include dependency graph for ParticleIO.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _PARTICLEIO_H_
 

Functions

void writeDataChunk (size_t &offset, const hid_t &dataspace, const hid_t &dataset, const hid_t &H5T_type, const unsigned long dataLength, const void *const data)
 Write chunk of data and upgrade offset. Not meant to be a user-facing function. More...
 
void readDataChunk (size_t &offset, const hid_t &dataspace, const hid_t &dataset, const hid_t &H5T_type, const unsigned long dataLength, void *const data, const size_t stride=1, const size_t block=1)
 Read chunk of data and upgrade offset. Not meant to be a user-facing function. More...
 
void write_hdf_part_header (HDF5Handle &a_handle, const BoxLayout &a_grids, const vector< unsigned long long > &a_partPerBox, const std::string &a_dataType)
 Write the particle header to the HDF5 file. Not meant to be a user-facing function. More...
 
void read_hdf_part_header (HDF5Handle &a_handle, Vector< Box > &a_grids, vector< unsigned long long > &a_particlesPerBox, const std::string &a_dataType, const std::string &a_path)
 Read the particle header from the HDF5 file. Not meant to be a user-facing function. More...
 
template<class T >
void write_vect_to_header (HDF5Handle &a_handle, const vector< T > &a_vect, const hid_t &H5T_type, const std::string &a_dataname)
 A helper function that writes a vector of 'T's to the HDF5 file under a_dataname. More...
 
template<class T >
void read_vect_from_header (HDF5Handle &a_handle, vector< T > &a_vect, const hid_t &H5T_type, const std::string &a_dataname)
 A helper function that reads a vector of 'T's to the HDF5 file under a_dataname. More...
 
template<class P >
void writeParticlesToHDF (HDF5Handle &a_handle, const ParticleData< P > &a_particles, const std::string &a_dataType)
 
template<class P >
void readParticlesFromHDF (HDF5Handle &a_handle, ParticleData< P > &a_particles, const std::string &a_dataType)
 
template<class P >
void writeParticlesToHDF (HDF5Handle &a_handle, const ParticleData< P > &a_particles, const Box &a_domain, const std::string &a_dataType)
 Like the above, but takes a Vector. More...
 

Macro Definition Documentation

#define _PARTICLEIO_H_

Function Documentation

void writeDataChunk ( size_t &  offset,
const hid_t &  dataspace,
const hid_t &  dataset,
const hid_t &  H5T_type,
const unsigned long  dataLength,
const void *const  data 
)

Write chunk of data and upgrade offset. Not meant to be a user-facing function.

Referenced by writeParticlesToHDF().

void readDataChunk ( size_t &  offset,
const hid_t &  dataspace,
const hid_t &  dataset,
const hid_t &  H5T_type,
const unsigned long  dataLength,
void *const  data,
const size_t  stride = 1,
const size_t  block = 1 
)

Read chunk of data and upgrade offset. Not meant to be a user-facing function.

Referenced by readParticlesFromHDF().

void write_hdf_part_header ( HDF5Handle a_handle,
const BoxLayout a_grids,
const vector< unsigned long long > &  a_partPerBox,
const std::string &  a_dataType 
)

Write the particle header to the HDF5 file. Not meant to be a user-facing function.

Referenced by writeParticlesToHDF().

void read_hdf_part_header ( HDF5Handle a_handle,
Vector< Box > &  a_grids,
vector< unsigned long long > &  a_particlesPerBox,
const std::string &  a_dataType,
const std::string &  a_path 
)

Read the particle header from the HDF5 file. Not meant to be a user-facing function.

Referenced by readParticlesFromHDF().

template<class T >
void write_vect_to_header ( HDF5Handle a_handle,
const vector< T > &  a_vect,
const hid_t &  H5T_type,
const std::string &  a_dataname 
)

A helper function that writes a vector of 'T's to the HDF5 file under a_dataname.

References CH_assert, HDF5Handle::groupID(), and procID().

template<class T >
void read_vect_from_header ( HDF5Handle a_handle,
vector< T > &  a_vect,
const hid_t &  H5T_type,
const std::string &  a_dataname 
)

A helper function that reads a vector of 'T's to the HDF5 file under a_dataname.

References CH_assert, and HDF5Handle::groupID().

template<class P >
void writeParticlesToHDF ( HDF5Handle a_handle,
const ParticleData< P > &  a_particles,
const std::string &  a_dataType 
)

Write the particle data contained in a_particles to the HDF5 file described by a_handle. This is the function that users should actually call. The string a_dataType gives a way to label the particles, in case multiple particle types are present.

References _CHUNK, CH_START, CH_STOP, CH_TIMER, CH_TIMERS, dataSize(), MayDay::Error(), ParticleData< P >::getBoxes(), HDF5Handle::groupID(), BoxLayout::index(), List< T >::length(), LayoutIterator::ok(), ListIterator< T >::ok(), BoxLayout::size(), write_hdf_part_header(), and writeDataChunk().

template<class P >
void readParticlesFromHDF ( HDF5Handle a_handle,
ParticleData< P > &  a_particles,
const std::string &  a_dataType 
)

Read the particle data contained in the HDF5 file described by a_handle into a_particles. This is the function that users should actually call. The string a_dataType gives a way to label the particles, in case multiple particle types are present.

References _CHUNK, List< T >::add(), CH_START, CH_STOP, CH_TIMER, CH_TIMERS, ParticleData< P >::getBoxes(), HDF5Handle::getGroup(), HDF5Handle::groupID(), LayoutIterator::ok(), read_hdf_part_header(), readDataChunk(), Vector< T >::size(), and BoxLayout::size().

template<class P >
void writeParticlesToHDF ( HDF5Handle a_handle,
const ParticleData< P > &  a_particles,
const Box a_domain,
const std::string &  a_dataType 
)

Like the above, but takes a Vector.

instead of a ParticleData.