Commit f467759f authored by Manuel Schrauth's avatar Manuel Schrauth
Browse files

passing the lattice to the SSH hamitonian, does not compile

parent 1385e505
Pipeline #10020 failed with stage
in 5 minutes and 45 seconds
......@@ -51,6 +51,8 @@
auto& mp = p.first; // Monte Carlo params
auto& hp = p.second; // Hamiltonian params
auto hpnew = std::tuple_cat(p, std::forward_as_tuple(latt));
std::string str_repid = std::to_string(mp.repid);
std::string str_k = "k"+std::to_string(std::get<2>(hp));
std::string str_g = "g"+std::to_string(std::get<3>(hp));
......
......@@ -457,7 +457,7 @@ class SSH_Initializer
// ------------------------------ HAMILTONIAN ---------------------------
template <typename SpinType = double>
template <class Lattice, typename SpinType = double>
class SSH
{
public:
......@@ -468,11 +468,13 @@ class SSH
template <typename RNG>
using MetroInitializer = SSH_Initializer<StateVector, RNG>;
Lattice& grid;
static constexpr uint Nalpha = 1;
static constexpr uint Nbeta = 1;
static constexpr uint Ngamma = 1;
SSH(double m, double k, double g, double mu, double bQ, int Ltime, int L) : m(m), k(k), g(g), mu(mu), dtau(bQ/double(Ltime)), L(L), betaQM(bQ), name("SSH")
SSH(double m, double k, double g, double mu, double bQ, int Ltime, int L, Lattice& lattice) : m(m), k(k), g(g), mu(mu), dtau(bQ/double(Ltime)), L(L), betaQM(bQ), name("SSH"), grid(lattice)
{
interactions[0] = new SSH_interaction<StateVector>(m, dtau);
onsite[0] = new SSH_onsite<StateVector>(m, k, dtau);
......@@ -492,8 +494,8 @@ class SSH
// initialize state space
template <class StateSpace, class Lattice, class RNG>
void initstatespace(StateSpace& statespace, Lattice& grid, RNG& rng) const
template <class StateSpace, class Latt, class RNG>
void initstatespace(StateSpace& statespace, Latt& grid, RNG& rng) const
{
for (int i=0; i<grid.size(); i++)
{
......
......@@ -119,7 +119,7 @@ void selectsim(RegistryDB& registry, std::string outbasedir, std::string logbase
}
typedef decltype(finalize_parameter_pair(std::declval<MARQOV::Config>(), hp)) PPType;
typename GetSchedulerType<SSH<double>, SSHLattice, typename PPType::value_type>::MarqovScheduler sched(1);
typename GetSchedulerType<SSH<SSHLattice,double>, SSHLattice, typename PPType::value_type>::MarqovScheduler sched(1);
for (std::size_t j=0; j<nL.size(); j++)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment