NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ write_to_hdf5_slices() [1/3]

template<typename T >
void cntr::herm_matrix< T >::write_to_hdf5_slices ( hid_t  group_id,
int  dt 
)

Stores time slices of herm_matrix with a given interval to a HDF5 group handle.

Purpose

Converts the herm_matrix every dt time steps to a time slice and stores them to the given HDF5 group handle.

Parameters
group_id

The HDF5 group handle.

dt

Store the slices every dt time steps.

Definition at line 1852 of file cntr_herm_matrix_impl.hpp.

1852  {
1853  assert(dt >= 1);
1854 
1855  char groupname[20];
1856  hid_t subgroup_id;
1857  for (int tstp = -1; tstp <= nt_; tstp++) {
1858  if (tstp == -1 || tstp % dt == 0) {
1859  herm_matrix_timestep_view<T> tmp(tstp, *this);
1860  std::sprintf(groupname, "t%d", tstp);
1861  subgroup_id = create_group(group_id, std::string(groupname));
1862  tmp.write_to_hdf5(subgroup_id);
1863  }
1864  }
1865 }