ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
Writer::H5md Namespace Reference

Classes

class  File
 Class for writing H5MD files. More...
 
struct  H5MD_Specification
 Layout information for H5MD files. More...
 
struct  incompatible_h5mdfile
 
struct  left_backupfile
 

Typedefs

using MultiArray3i = boost::multi_array< int, 3 >
 
using Vector1hs = Utils::Vector< hsize_t, 1 >
 
using Vector2hs = Utils::Vector< hsize_t, 2 >
 
using Vector3hs = Utils::Vector< hsize_t, 3 >
 

Enumerations

enum  H5MDOutputFields : unsigned int {
  H5MD_OUT_NONE = 0u , H5MD_OUT_TYPE = 1u , H5MD_OUT_POS = 2u , H5MD_OUT_IMG = 4u ,
  H5MD_OUT_VEL = 8u , H5MD_OUT_FORCE = 16u , H5MD_OUT_MASS = 32u , H5MD_OUT_CHARGE = 16u ,
  H5MD_OUT_BONDS = 128u , H5MD_OUT_BOX_L = 256u , H5MD_OUT_LE_OFF = 512u , H5MD_OUT_LE_DIR = 1024u ,
  H5MD_OUT_LE_NORMAL = 2048u , H5MD_OUT_ALL = 0b1111111111111111u
}
 Constants which indicate what to output. More...
 

Functions

static void backup_file (const std::string &from, const std::string &to)
 
template<typename extent_type >
static void extend_dataset (h5xx::dataset &dataset, extent_type const &change_extent)
 
template<typename value_type , typename extent_type >
static void write_dataset (value_type const &data, h5xx::dataset &dataset, extent_type const &change_extent, extent_type const &offset, extent_type const &count)
 
static void write_script (std::string const &target, boost::filesystem::path const &script_path)
 
static std::vector< hsize_t > create_dims (hsize_t rank, hsize_t data_dim)
 
static std::vector< hsize_t > create_chunk_dims (hsize_t rank, hsize_t data_dim)
 
static void write_attributes (h5xx::file &h5md_file)
 
template<std::size_t dim, typename Op >
void write_td_particle_property (hsize_t prefix, hsize_t n_part_global, ParticleRange const &particles, h5xx::dataset &dataset, Op op)
 
static void write_box (BoxGeometry const &box_geo, h5xx::dataset &dataset)
 
static void write_le_off (LeesEdwardsBC const &lebc, h5xx::dataset &dataset)
 
static void write_le_dir (LeesEdwardsBC const &lebc, h5xx::dataset &dataset)
 
static void write_le_normal (LeesEdwardsBC const &lebc, h5xx::dataset &dataset)
 
auto fields_list_to_bitfield (std::vector< std::string > const &fields)
 

Variables

static std::unordered_map< std::string, H5MDOutputFields > const fields_map
 

Typedef Documentation

◆ MultiArray3i

using Writer::H5md::MultiArray3i = typedef boost::multi_array<int, 3>

Definition at line 49 of file h5md_core.cpp.

◆ Vector1hs

using Writer::H5md::Vector1hs = typedef Utils::Vector<hsize_t, 1>

Definition at line 50 of file h5md_core.cpp.

◆ Vector2hs

using Writer::H5md::Vector2hs = typedef Utils::Vector<hsize_t, 2>

Definition at line 51 of file h5md_core.cpp.

◆ Vector3hs

using Writer::H5md::Vector3hs = typedef Utils::Vector<hsize_t, 3>

Definition at line 52 of file h5md_core.cpp.

Enumeration Type Documentation

◆ H5MDOutputFields

enum Writer::H5md::H5MDOutputFields : unsigned int

Constants which indicate what to output.

To indicate the output of multiple fields, OR the corresponding values.

Enumerator
H5MD_OUT_NONE 
H5MD_OUT_TYPE 
H5MD_OUT_POS 
H5MD_OUT_IMG 
H5MD_OUT_VEL 
H5MD_OUT_FORCE 
H5MD_OUT_MASS 
H5MD_OUT_CHARGE 
H5MD_OUT_BONDS 
H5MD_OUT_BOX_L 
H5MD_OUT_LE_OFF 
H5MD_OUT_LE_DIR 
H5MD_OUT_LE_NORMAL 
H5MD_OUT_ALL 

Definition at line 56 of file h5md_core.hpp.

Function Documentation

◆ backup_file()

static void Writer::H5md::backup_file ( const std::string &  from,
const std::string &  to 
)
static

Definition at line 54 of file h5md_core.cpp.

◆ create_chunk_dims()

static std::vector< hsize_t > Writer::H5md::create_chunk_dims ( hsize_t  rank,
hsize_t  data_dim 
)
static

Definition at line 166 of file h5md_core.cpp.

◆ create_dims()

static std::vector< hsize_t > Writer::H5md::create_dims ( hsize_t  rank,
hsize_t  data_dim 
)
static

Definition at line 152 of file h5md_core.cpp.

◆ extend_dataset()

template<typename extent_type >
static void Writer::H5md::extend_dataset ( h5xx::dataset &  dataset,
extent_type const &  change_extent 
)
static

◆ fields_list_to_bitfield()

auto Writer::H5md::fields_list_to_bitfield ( std::vector< std::string > const &  fields)
inline

Definition at line 89 of file h5md_core.hpp.

References fields_map, and H5MD_OUT_NONE.

◆ write_attributes()

static void Writer::H5md::write_attributes ( h5xx::file &  h5md_file)
static

Definition at line 200 of file h5md_core.cpp.

◆ write_box()

static void Writer::H5md::write_box ( BoxGeometry const &  box_geo,
h5xx::dataset &  dataset 
)
static

Definition at line 326 of file h5md_core.cpp.

References extend_dataset(), and BoxGeometry::length().

Referenced by Writer::H5md::File::write().

◆ write_dataset()

template<typename value_type , typename extent_type >
static void Writer::H5md::write_dataset ( value_type const &  data,
h5xx::dataset &  dataset,
extent_type const &  change_extent,
extent_type const &  offset,
extent_type const &  count 
)
static

Definition at line 81 of file h5md_core.cpp.

References extend_dataset().

Referenced by Writer::H5md::File::write().

◆ write_le_dir()

static void Writer::H5md::write_le_dir ( LeesEdwardsBC const &  lebc,
h5xx::dataset &  dataset 
)
static

Definition at line 340 of file h5md_core.cpp.

References extend_dataset(), and LeesEdwardsBC::shear_direction.

Referenced by Writer::H5md::File::write().

◆ write_le_normal()

static void Writer::H5md::write_le_normal ( LeesEdwardsBC const &  lebc,
h5xx::dataset &  dataset 
)
static

Definition at line 348 of file h5md_core.cpp.

References extend_dataset(), and LeesEdwardsBC::shear_plane_normal.

Referenced by Writer::H5md::File::write().

◆ write_le_off()

static void Writer::H5md::write_le_off ( LeesEdwardsBC const &  lebc,
h5xx::dataset &  dataset 
)
static

Definition at line 333 of file h5md_core.cpp.

References extend_dataset(), and LeesEdwardsBC::pos_offset.

Referenced by Writer::H5md::File::write().

◆ write_script()

static void Writer::H5md::write_script ( std::string const &  target,
boost::filesystem::path const &  script_path 
)
static

Definition at line 89 of file h5md_core.cpp.

◆ write_td_particle_property()

template<std::size_t dim, typename Op >
void Writer::H5md::write_td_particle_property ( hsize_t  prefix,
hsize_t  n_part_global,
ParticleRange const &  particles,
h5xx::dataset &  dataset,
Op  op 
)

Definition at line 309 of file h5md_core.cpp.

References extend_dataset().

Variable Documentation

◆ fields_map

std::unordered_map<std::string, H5MDOutputFields> const Writer::H5md::fields_map
static
Initial value:
= {
{"all", H5MD_OUT_ALL},
{"particle.type", H5MD_OUT_TYPE},
{"particle.position", H5MD_OUT_POS},
{"particle.image", H5MD_OUT_IMG},
{"particle.velocity", H5MD_OUT_VEL},
{"particle.force", H5MD_OUT_FORCE},
{"particle.bonds", H5MD_OUT_BONDS},
{"particle.charge", H5MD_OUT_CHARGE},
{"particle.mass", H5MD_OUT_MASS},
{"box.length", H5MD_OUT_BOX_L},
{"lees_edwards.offset", H5MD_OUT_LE_OFF},
{"lees_edwards.direction", H5MD_OUT_LE_DIR},
{"lees_edwards.normal", H5MD_OUT_LE_NORMAL},
}

Definition at line 73 of file h5md_core.hpp.

Referenced by fields_list_to_bitfield(), and Writer::H5md::File::valid_fields().