Commit 0f8a9152 authored by gbalduzz's avatar gbalduzz
Browse files

Write configuration stamps.

parent ce7cf572
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -118,6 +118,18 @@ public:
  }
};

template <>
class HDF5_TYPE<std::int8_t> {
public:
  static hid_t get() {
    return H5T_NATIVE_INT8;
  }

  static H5::PredType get_PredType() {
    return H5::PredType::NATIVE_INT8;
  }
};

template <>
class HDF5_TYPE<float> {
public:
@@ -178,7 +190,7 @@ public:
  }
};

}  // io
}  // dca
}  // namespace io
}  // namespace dca

#endif  // DCA_IO_HDF5_HDF5_TYPES_HPP
+126 −91
Original line number Diff line number Diff line
@@ -60,54 +60,56 @@ public:
  template <typename arbitrary_struct_t>
  static void to_file(const arbitrary_struct_t& arbitrary_struct, const std::string& file_name);

  template <typename scalar_type>
  void execute(const std::string& name, scalar_type value);
  template <typename Scalar>
  void execute(const std::string& name, Scalar value);

  template <typename scalar_type>
  void execute(const std::string& name, const std::pair<scalar_type, scalar_type>& value);
  template <typename Scalar>
  void execute(const std::string& name, const std::pair<Scalar, Scalar>& value);

  template <typename scalar_type>
  void execute(const std::string& name, const std::vector<scalar_type>& value);
  template <typename Scalar>
  void execute(const std::string& name, const std::vector<Scalar>& value);

  template <typename scalar_type>
  void execute(const std::string& name, const std::vector<std::complex<scalar_type>>& value);
  template <typename Scalar>
  void execute(const std::string& name, const std::vector<std::complex<Scalar>>& value);

  void execute(const std::string& name, const std::string& value);

  void execute(const std::string& name, const std::vector<std::string>& value);

  template <typename scalar_type>
  void execute(const std::string& name, const std::vector<std::vector<scalar_type>>& value);
  template <typename Scalar, std::size_t n>
  void execute(const std::string& name, const std::vector<std::array<Scalar, n>>& value);

  template <typename Scalar>
  void execute(const std::string& name, const std::vector<std::vector<Scalar>>& value);

  template <typename domain_type>
  void execute(const std::string& name, const func::dmn_0<domain_type>& dmn);

  template <typename scalar_type, typename domain_type>
  void execute(const func::function<scalar_type, domain_type>& f);
  template <typename Scalar, typename domain_type>
  void execute(const func::function<Scalar, domain_type>& f);

  template <typename scalar_type, typename domain_type>
  void execute(const func::function<std::complex<scalar_type>, domain_type>& f);
  template <typename Scalar, typename domain_type>
  void execute(const func::function<std::complex<Scalar>, domain_type>& f);

  template <typename scalar_type, typename domain_type>
  void execute(const std::string& name, const func::function<scalar_type, domain_type>& f);
  template <typename Scalar, typename domain_type>
  void execute(const std::string& name, const func::function<Scalar, domain_type>& f);

  template <typename scalar_type, typename domain_type>
  void execute(const std::string& name,
               const func::function<std::complex<scalar_type>, domain_type>& f);
  template <typename Scalar, typename domain_type>
  void execute(const std::string& name, const func::function<std::complex<Scalar>, domain_type>& f);

  template <typename scalar_type>
  void execute(const std::string& name, const dca::linalg::Vector<scalar_type, dca::linalg::CPU>& A);
  template <typename Scalar>
  void execute(const std::string& name, const dca::linalg::Vector<Scalar, dca::linalg::CPU>& A);

  template <typename scalar_type>
  template <typename Scalar>
  void execute(const std::string& name,
               const dca::linalg::Vector<std::complex<scalar_type>, dca::linalg::CPU>& A);
               const dca::linalg::Vector<std::complex<Scalar>, dca::linalg::CPU>& A);

  template <typename scalar_type>
  void execute(const std::string& name, const dca::linalg::Matrix<scalar_type, dca::linalg::CPU>& A);
  template <typename Scalar>
  void execute(const std::string& name, const dca::linalg::Matrix<Scalar, dca::linalg::CPU>& A);

  template <typename scalar_type>
  template <typename Scalar>
  void execute(const std::string& name,
               const dca::linalg::Matrix<std::complex<scalar_type>, dca::linalg::CPU>& A);
               const dca::linalg::Matrix<std::complex<Scalar>, dca::linalg::CPU>& A);

  template <class T>
  void execute(const std::string& name, const std::unique_ptr<T>& obj);
@@ -140,8 +142,8 @@ void HDF5Writer::to_file(const arbitrary_struct_t& arbitrary_struct, const std::
  wr_obj.close_file();
}

template <typename scalar_type>
void HDF5Writer::execute(const std::string& name, scalar_type value) {
template <typename Scalar>
void HDF5Writer::execute(const std::string& name, Scalar value) {
  H5::H5File& file = (*my_file);
  std::string path = get_path();

@@ -156,18 +158,18 @@ void HDF5Writer::execute(const std::string& name, scalar_type value) {

    std::string full_name = path + "/" + name;
    dataset = new H5::DataSet(
        file.createDataSet(full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

    H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
             H5P_DEFAULT, &value);
    H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
             &value);
  }

  delete dataset;
  delete dataspace;
}

template <typename scalar_type>
void HDF5Writer::execute(const std::string& name, const std::pair<scalar_type, scalar_type>& value) {
template <typename Scalar>
void HDF5Writer::execute(const std::string& name, const std::pair<Scalar, Scalar>& value) {
  H5::H5File& file = (*my_file);
  std::string path = get_path();

@@ -182,19 +184,19 @@ void HDF5Writer::execute(const std::string& name, const std::pair<scalar_type, s

    std::string full_name = path + "/" + name;
    dataset = new H5::DataSet(
        file.createDataSet(full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

    H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
             H5P_DEFAULT, &(value.first));
    H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
             &(value.first));
  }

  delete dataset;
  delete dataspace;
}

template <typename scalar_type>
template <typename Scalar>
void HDF5Writer::execute(const std::string& name,
                         const std::vector<scalar_type>& value)  //, H5File& file, std::string path)
                         const std::vector<Scalar>& value)  //, H5File& file, std::string path)
{
  if (value.size() > 0) {
    H5::H5File& file = (*my_file);
@@ -211,10 +213,10 @@ void HDF5Writer::execute(const std::string& name,

      std::string full_name = path + "/" + name;
      dataset = new H5::DataSet(
          file.createDataSet(full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
          file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

      H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
               H5P_DEFAULT, &value[0]);
      H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
               &value[0]);
    }

    delete dataset;
@@ -222,9 +224,8 @@ void HDF5Writer::execute(const std::string& name,
  }
}

template <typename scalar_type>
void HDF5Writer::execute(const std::string& name,
                         const std::vector<std::complex<scalar_type>>& value) {
template <typename Scalar>
void HDF5Writer::execute(const std::string& name, const std::vector<std::complex<Scalar>>& value) {
  H5::H5File& file = (*my_file);
  std::string path = get_path();

@@ -240,18 +241,18 @@ void HDF5Writer::execute(const std::string& name,

    std::string full_name = path + "/" + name;
    dataset = new H5::DataSet(
        file.createDataSet(full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

    H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
             H5P_DEFAULT, &value[0]);
    H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
             &value[0]);
  }

  delete dataset;
  delete dataspace;
}

template <typename scalar_type>
void HDF5Writer::execute(const std::string& name, const std::vector<std::vector<scalar_type>>& value) {
template <typename Scalar>
void HDF5Writer::execute(const std::string& name, const std::vector<std::vector<Scalar>>& value) {
  if (value.size() > 0) {
    H5::H5File& file = (*my_file);

@@ -286,10 +287,10 @@ void HDF5Writer::execute(const std::string& name, const std::vector<std::vector<
        dataspace = new H5::DataSpace(2, dims);

        std::string full_name = get_path() + "/data";
        dataset = new H5::DataSet(file.createDataSet(
            full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        dataset = new H5::DataSet(
            file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

        scalar_type* tmp = new scalar_type[dims[0] * dims[1]];
        Scalar* tmp = new Scalar[dims[0] * dims[1]];

        /*
          for(int i=0; i<dims[0]; i++)
@@ -302,7 +303,7 @@ void HDF5Writer::execute(const std::string& name, const std::vector<std::vector<
          for (hsize_t j = 0; j < dims[1]; j++)
            tmp[i * dims[1] + j] = value[i][j];

        H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
        H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL,
                 H5P_DEFAULT, tmp);

        delete[] tmp;
@@ -327,10 +328,10 @@ void HDF5Writer::execute(const std::string& name, const std::vector<std::vector<
        std::stringstream ss;
        ss << get_path() << "/" << l;

        dataset = new H5::DataSet(file.createDataSet(
            ss.str().c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        dataset = new H5::DataSet(
            file.createDataSet(ss.str().c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

        H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
        H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL,
                 H5P_DEFAULT, &value[l]);
      }
      close_group();
@@ -343,6 +344,40 @@ void HDF5Writer::execute(const std::string& name, const std::vector<std::vector<
  }
}

template <typename Scalar, std::size_t n>
void HDF5Writer::execute(const std::string& name, const std::vector<std::array<Scalar, n>>& value) {
  if (value.size() == 0)
    return;

  H5::H5File& file = (*my_file);

  std::array<hsize_t, 2> dims{value.size(), n};

  H5::DataSet* dataset = nullptr;
  H5::DataSpace* dataspace = nullptr;

  std::string full_name = get_path() + "/" + name;

  dataspace = new H5::DataSpace(2, dims.data());

  dataset = new H5::DataSet(
      file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

  Scalar* tmp = new Scalar[dims[0] * dims[1]];

  // hdf5 has row-major ordering!
  //  for (hsize_t i = 0; i < dims[0]; i++)
  //    for (hsize_t j = 0; j < dims[1]; j++)
  //      tmp[i * dims[1] + j] = value[i][j];

  H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
           value[0].data());

  delete[] tmp;
  delete dataset;
  delete dataspace;
}

template <typename domain_type>
void HDF5Writer::execute(const std::string& name, const func::dmn_0<domain_type>& dmn) {
  open_group(name);
@@ -353,8 +388,8 @@ void HDF5Writer::execute(const std::string& name, const func::dmn_0<domain_type>
  close_group();
}

template <typename scalar_type, typename domain_type>
void HDF5Writer::execute(const func::function<scalar_type, domain_type>& f) {
template <typename Scalar, typename domain_type>
void HDF5Writer::execute(const func::function<Scalar, domain_type>& f) {
  if (f.size() == 0)
    return;

@@ -364,8 +399,8 @@ void HDF5Writer::execute(const func::function<scalar_type, domain_type>& f) {
  execute(f.get_name(), f);
}

template <typename scalar_type, typename domain_type>
void HDF5Writer::execute(const func::function<std::complex<scalar_type>, domain_type>& f) {
template <typename Scalar, typename domain_type>
void HDF5Writer::execute(const func::function<std::complex<Scalar>, domain_type>& f) {
  if (f.size() == 0)
    return;

@@ -375,8 +410,8 @@ void HDF5Writer::execute(const func::function<std::complex<scalar_type>, domain_
  execute(f.get_name(), f);
}

template <typename scalar_type, typename domain_type>
void HDF5Writer::execute(const std::string& name, const func::function<scalar_type, domain_type>& f) {
template <typename Scalar, typename domain_type>
void HDF5Writer::execute(const std::string& name, const func::function<Scalar, domain_type>& f) {
  if (f.size() == 0)
    return;

@@ -417,10 +452,10 @@ void HDF5Writer::execute(const std::string& name, const func::function<scalar_ty
        dataspace = new H5::DataSpace(N_dmns, &dims[0]);

        std::string full_name = new_path + "/data";
        dataset = new H5::DataSet(file.createDataSet(
            full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        dataset = new H5::DataSet(
            file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

        H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
        H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL,
                 H5P_DEFAULT, &f(0));
      }

@@ -432,9 +467,9 @@ void HDF5Writer::execute(const std::string& name, const func::function<scalar_ty
  close_group();
}

template <typename scalar_type, typename domain_type>
template <typename Scalar, typename domain_type>
void HDF5Writer::execute(const std::string& name,
                         const func::function<std::complex<scalar_type>, domain_type>& f) {
                         const func::function<std::complex<Scalar>, domain_type>& f) {
  if (f.size() == 0)
    return;

@@ -471,10 +506,10 @@ void HDF5Writer::execute(const std::string& name,
        dataspace = new H5::DataSpace(N_dmns + 1, &dims[0]);

        std::string full_name = get_path() + "/data";
        dataset = new H5::DataSet(file.createDataSet(
            full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        dataset = new H5::DataSet(
            file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

        H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
        H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL,
                 H5P_DEFAULT, &f(0));
      }

@@ -486,9 +521,9 @@ void HDF5Writer::execute(const std::string& name,
  close_group();
}

template <typename scalar_type>
template <typename Scalar>
void HDF5Writer::execute(const std::string& name,
                         const dca::linalg::Vector<scalar_type, dca::linalg::CPU>& V) {
                         const dca::linalg::Vector<Scalar, dca::linalg::CPU>& V) {
  H5::H5File& file = (*my_file);

  open_group(name);
@@ -508,10 +543,10 @@ void HDF5Writer::execute(const std::string& name,

    std::string full_name = get_path() + "/data";
    dataset = new H5::DataSet(
        file.createDataSet(full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

    H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
             H5P_DEFAULT, &V[0]);
    H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
             &V[0]);
  }

  delete dataset;
@@ -520,9 +555,9 @@ void HDF5Writer::execute(const std::string& name,
  close_group();
}

template <typename scalar_type>
template <typename Scalar>
void HDF5Writer::execute(const std::string& name,
                         const dca::linalg::Vector<std::complex<scalar_type>, dca::linalg::CPU>& V) {
                         const dca::linalg::Vector<std::complex<Scalar>, dca::linalg::CPU>& V) {
  H5::H5File& file = (*my_file);

  open_group(name);
@@ -543,10 +578,10 @@ void HDF5Writer::execute(const std::string& name,

    std::string full_name = get_path() + "/data";
    dataset = new H5::DataSet(
        file.createDataSet(full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

    H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
             H5P_DEFAULT, &V[0]);
    H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
             &V[0]);
  }

  delete dataset;
@@ -555,9 +590,9 @@ void HDF5Writer::execute(const std::string& name,
  close_group();
}

template <typename scalar_type>
template <typename Scalar>
void HDF5Writer::execute(const std::string& name,
                         const dca::linalg::Matrix<scalar_type, dca::linalg::CPU>& A) {
                         const dca::linalg::Matrix<Scalar, dca::linalg::CPU>& A) {
  H5::H5File& file = (*my_file);

  open_group(name);
@@ -582,10 +617,10 @@ void HDF5Writer::execute(const std::string& name,

    std::string full_name = get_path() + "/data";
    dataset = new H5::DataSet(
        file.createDataSet(full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

    H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
             H5P_DEFAULT, &A(0, 0));
    H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
             &A(0, 0));
  }

  delete dataset;
@@ -594,9 +629,9 @@ void HDF5Writer::execute(const std::string& name,
  close_group();
}

template <typename scalar_type>
template <typename Scalar>
void HDF5Writer::execute(const std::string& name,
                         const dca::linalg::Matrix<std::complex<scalar_type>, dca::linalg::CPU>& A) {
                         const dca::linalg::Matrix<std::complex<Scalar>, dca::linalg::CPU>& A) {
  H5::H5File& file = (*my_file);

  open_group(name);
@@ -629,10 +664,10 @@ void HDF5Writer::execute(const std::string& name,

    std::string full_name = get_path() + "/data";
    dataset = new H5::DataSet(
        file.createDataSet(full_name.c_str(), HDF5_TYPE<scalar_type>::get_PredType(), *dataspace));
        file.createDataSet(full_name.c_str(), HDF5_TYPE<Scalar>::get_PredType(), *dataspace));

    H5Dwrite(dataset->getId(), HDF5_TYPE<scalar_type>::get(), dataspace->getId(), H5S_ALL,
             H5P_DEFAULT, &A(0, 0));
    H5Dwrite(dataset->getId(), HDF5_TYPE<Scalar>::get(), dataspace->getId(), H5S_ALL, H5P_DEFAULT,
             &A(0, 0));
  }

  delete dataset;
+14 −0
Original line number Diff line number Diff line
@@ -284,6 +284,9 @@ private:
  std::array<linalg::util::CudaEvent, 2> m_computed_events_;

  bool config_initialized_;

  std::size_t meas_id_ = 0;
  io::HDF5Writer config_file_;
};

template <dca::linalg::DeviceType device_t, class parameters_type, class MOMS_type>
@@ -341,6 +344,10 @@ CtauxWalker<device_t, parameters_type, MOMS_type>::CtauxWalker(parameters_type&
      num_delayed_spins_(),

      config_initialized_(false) {
  if (parameters.stamping_period()) {
    config_file_.open_file(parameters.get_configuration_stamps());
  }

  if (concurrency.id() == 0 and thread_id == 0) {
    std::cout << "\n\n"
              << "\t\t"
@@ -486,6 +493,13 @@ void CtauxWalker<device_t, parameters_type, MOMS_type>::doSweep() {

  if (!thermalized)
    ++warm_up_sweeps_done_;

  ++meas_id_;
  if (parameters.stamping_period()) {
    if ((meas_id_ % parameters.stamping_period()) == 0) {
      configuration.write(config_file_, std::to_string(meas_id_));
    }
  }
}

template <dca::linalg::DeviceType device_t, class parameters_type, class MOMS_type>
+40 −4
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <iostream>
#include <stdexcept>
#include <vector>
#include <dca/io/hdf5/hdf5_writer.hpp>

#include "dca/io/buffer.hpp"
#include "dca/phys/dca_step/cluster_solver/ctaux/domains/hs_field_sign_domain.hpp"
@@ -107,6 +108,8 @@ public:

  bool operator==(const CT_AUX_HS_configuration<parameters_type>& rhs) const;

  void write(io::HDF5Writer& file, const std::string& stamp) const;

  template <class Pars>
  friend io::Buffer& operator<<(io::Buffer& buff, const CT_AUX_HS_configuration<Pars>& config);
  template <class Pars>
@@ -875,9 +878,42 @@ bool CT_AUX_HS_configuration<parameters_type>::operator==(
         current_Nb_of_creatable_spins == rhs.current_Nb_of_creatable_spins;
}

}  // ctaux
}  // solver
}  // phys
}  // dca
template <class parameters_type>
void CT_AUX_HS_configuration<parameters_type>::write(io::HDF5Writer& file,
                                                     const std::string& stamp) const {
  file.open_group(stamp);

  const auto n = configuration.size();
  std::vector<double> times(n);
  std::vector<std::array<int, 2>> bands(n);
  std::vector<std::array<int, 2>> e_spins(n);
  std::vector<std::array<int, 2>> sites(n);
  std::vector<std::int8_t> hs_spin(n);

  auto to_array = [](const std::pair<int, int>& pair) {
    return std::array<int, 2>{pair.first, pair.second};
  };

  for (int i = 0; i < configuration.size(); ++i) {
    times[i] = configuration[i].get_tau();
    bands[i] = to_array(configuration[i].get_bands());
    e_spins[i] = to_array(configuration[i].get_e_spins());
    sites[i] = to_array(configuration[i].get_r_sites());
    hs_spin[i] = configuration[i].get_HS_spin();
  }

  file.execute("times", times);
  file.execute("bands", bands);
  file.execute("e_spinds", e_spins);
  file.execute("sites", sites);
  file.execute("hs_spin", hs_spin);

  file.close_group();
}

}  // namespace ctaux
}  // namespace solver
}  // namespace phys
}  // namespace dca

#endif  // DCA_PHYS_DCA_STEP_CLUSTER_SOLVER_CTAUX_STRUCTS_CT_AUX_HS_CONFIGURATION_HPP
+17 −4
Original line number Diff line number Diff line
@@ -63,14 +63,27 @@ public:

  // physics-information
  std::pair<int, int>& get_bands();
  const std::pair<int, int>& get_bands() const{
      return bands;
  }
  std::pair<e_spin_states_type, e_spin_states_type>& get_e_spins();
  const std::pair<e_spin_states_type, e_spin_states_type>& get_e_spins() const {
    return e_spins;
  }
  std::pair<int, int>& get_r_sites();
  const std::pair<int, int>& get_r_sites() const {
    return r_sites;
  }
  std::pair<int, int>& get_spin_orbitals();
  const std::pair<int, int>& get_spin_orbitals() const;

  HS_spin_states_type& get_HS_spin();
  HS_spin_states_type get_HS_spin() const;
  int& get_delta_r();
  double& get_tau();
  const double& get_tau() const {
    return tau;
  }

  // algorithm-information

@@ -335,9 +348,9 @@ bool vertex_pair<parameters_type>::operator==(
         shuffled == rhs.shuffled;
}

}  // ctaux
}  // solver
}  // phys
}  // dca
}  // namespace ctaux
}  // namespace solver
}  // namespace phys
}  // namespace dca

#endif  // DCA_PHYS_DCA_STEP_CLUSTER_SOLVER_CTAUX_STRUCTS_VERTEX_PAIR_HPP
Loading