NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ write_to_hdf5() [1/3]

template<typename T >
void cntr::herm_matrix< T >::write_to_hdf5 ( hid_t  group_id)

Stores herm_matrix to a given group in HDF5 format.

Purpose

Stores the herm_matrix, including the matrix size, number of points on real and imaginary axis and fermionic/bosonic character, to a given HDF5 group.

Parameters
group_id

The HDF5 group handle under which the herm_matrix is stored.

Definition at line 1571 of file cntr_herm_matrix_impl.hpp.

1571  {
1572  store_int_attribute_to_hid(group_id, std::string("ntau"), ntau_);
1573  store_int_attribute_to_hid(group_id, std::string("nt"), nt_);
1574  store_int_attribute_to_hid(group_id, std::string("sig"), sig_);
1575  store_int_attribute_to_hid(group_id, std::string("size1"), size1_);
1576  store_int_attribute_to_hid(group_id, std::string("size2"), size2_);
1577  store_int_attribute_to_hid(group_id, std::string("element_size"),
1578  element_size_);
1579  hsize_t len_shape = 3, shape[3];
1580  shape[1] = size1_;
1581  shape[2] = size2_;
1582  if (nt_ > -2) {
1583  shape[0] = ntau_ + 1;
1584  store_cplx_array_to_hid(group_id, std::string("mat"), matptr(0),
1585  shape, len_shape);
1586  }
1587  if (nt_ > -1) {
1588  shape[0] = ((nt_ + 1) * (nt_ + 2)) / 2;
1589  // CHECK: implement store_cplx_array_to_hid with template typename T
1590  store_cplx_array_to_hid(group_id, std::string("ret"), retptr(0, 0),
1591  shape, len_shape);
1592  store_cplx_array_to_hid(group_id, std::string("les"), lesptr(0, 0),
1593  shape, len_shape);
1594  shape[0] = (nt_ + 1) * (ntau_ + 1);
1595  store_cplx_array_to_hid(group_id, std::string("tv"), tvptr(0, 0),
1596  shape, len_shape);
1597  }
1598 }