From a653799919565ef3943b968af389fd7efa8e8831 Mon Sep 17 00:00:00 2001 From: cosdis Date: Mon, 29 Jun 2026 14:23:20 -0400 Subject: [PATCH 1/2] Add Vpd and Vpp to three-band Hubbard model --- .../threeband_hubbard.hpp | 142 +++++++--- .../model_parameters_threeband_hubbard.inc | 32 +++ .../analytic_hamiltonians/CMakeLists.txt | 5 + .../threeband_hubbard_input.json | 12 + .../threeband_hubbard_test.cpp | 243 ++++++++++++++++++ 5 files changed, 394 insertions(+), 40 deletions(-) create mode 100644 test/unit/phys/models/analytic_hamiltonians/threeband_hubbard_input.json create mode 100644 test/unit/phys/models/analytic_hamiltonians/threeband_hubbard_test.cpp diff --git a/include/dca/phys/models/analytic_hamiltonians/threeband_hubbard.hpp b/include/dca/phys/models/analytic_hamiltonians/threeband_hubbard.hpp index e4a5ab094..94901889e 100644 --- a/include/dca/phys/models/analytic_hamiltonians/threeband_hubbard.hpp +++ b/include/dca/phys/models/analytic_hamiltonians/threeband_hubbard.hpp @@ -14,6 +14,7 @@ #ifndef DCA_PHYS_MODELS_ANALYTIC_HAMILTONIANS_THREEBAND_LATTICE_HPP #define DCA_PHYS_MODELS_ANALYTIC_HAMILTONIANS_THREEBAND_LATTICE_HPP +#include #include #include #include @@ -21,6 +22,7 @@ #include "dca/function/domains.hpp" #include "dca/function/function.hpp" +#include "dca/phys/domains/cluster/cluster_operations.hpp" #include "dca/phys/domains/cluster/symmetries/point_groups/2d/2d_square.hpp" #include "dca/phys/domains/cluster/symmetries/point_groups/no_symmetry.hpp" #include "dca/phys/models/analytic_hamiltonians/cluster_shape_type.hpp" @@ -31,7 +33,6 @@ namespace phys { namespace models { // dca::phys::models:: -// TODO: the symmetry of this system must be checked. template class ThreebandHubbard { public: @@ -40,7 +41,6 @@ class ThreebandHubbard { using LDA_point_group = domains::no_symmetry<2>; using DCA_point_group = SymmetryGroup; - // typedef PointGroupType DCA_point_group; const static ClusterShapeType DCA_cluster_shape = BETT_CLUSTER; const static ClusterShapeType LDA_cluster_shape = PARALLELEPIPED; @@ -59,11 +59,9 @@ class ThreebandHubbard { static std::vector, std::pair>> orbitalPermutations(); - // Rotations of pi/2 are an anti-symmetry on the band off-diagonal. static int transformationSignOfR(int b1, int b2, int s); static int transformationSignOfK(int b1, int b2, int s); - // Initializes the interaction Hamiltonian in real space. template static void initializeHInteraction( func::function, @@ -72,9 +70,7 @@ class ThreebandHubbard { template static void initializeHSymmetry(func::function& H_symmetry); - - // Initializes the tight-binding (non-interacting) part of the momentum space Hamiltonian. - // Preconditions: The elements of KDmn are two-dimensional (access through index 0 and 1). + template static void initializeH0( const ParametersType& parameters, @@ -110,7 +106,7 @@ int ThreebandHubbard::transformationSignOfR(int b1, int b2, int return 0; } - return s == 0; // Only identity by default. + return s == 0; } template @@ -120,12 +116,8 @@ int ThreebandHubbard::transformationSignOfK(int b1, int b2, int if ((b1 == b2) || (b1 != 0 && b2 != 0)) return 1; - else // if ((b1 != b2 && b1 == 0)||(b1 != b2 && b2 == 0)) + else return (s == 0 || s == 2 || s == 5 || s == 7) ? 1 : -1; - // if (s == 0 || s == 2 || s == 5 || s == 7) - // return 1; - // else // if (s == 1 || s == 3 || s == 4 || s == 6) - // return -1; } template @@ -133,6 +125,7 @@ const double* ThreebandHubbard::initializeRDCABasis() { static std::array basis{1, 0, 0, 1}; return basis.data(); } + template const double* ThreebandHubbard::initializeKDCABasis() { static std::array basis{2 * M_PI, 0, 0, 2 * M_PI}; @@ -162,8 +155,8 @@ std::vector> ThreebandHubbard::aVectors() { } template -std::vector, std::pair>> ThreebandHubbard< - PointGroupType>::orbitalPermutations() { +std::vector, std::pair>> +ThreebandHubbard::orbitalPermutations() { return {}; } @@ -180,11 +173,65 @@ void ThreebandHubbard::initializeHInteraction( const int origin = RDmn::parameter_type::origin_index(); - const double U_dd = parameters.get_U_dd(); // interaction in d band - const double U_pp = parameters.get_U_pp(); // interaction in p bands + const double U_dd = parameters.get_U_dd(); + const double U_pp = parameters.get_U_pp(); + const double V_pd = parameters.get_V_pd(); + const double V_pp = parameters.get_V_pp(); H_interaction = 0.; + const auto& basis = RDmn::parameter_type::get_basis_vectors(); + const auto& super_basis = RDmn::parameter_type::get_super_basis_vectors(); + const auto& elements = RDmn::parameter_type::get_elements(); + + if (basis.size() != DIMENSION) + throw std::logic_error("Unexpected lattice basis dimension for three-band Hubbard model."); + + auto index_of = [&](std::vector displacement) { + displacement = domains::cluster_operations::translate_inside_cluster(displacement, super_basis); + return domains::cluster_operations::index(displacement, elements, domains::BRILLOUIN_ZONE); + }; + + auto push_unique = [](std::vector& indices, int index) { + if (std::find(indices.begin(), indices.end(), index) == indices.end()) + indices.push_back(index); + }; + + const int plus_x = index_of(basis[0]); + const int plus_y = index_of(basis[1]); + const int minus_x = RDmn::parameter_type::subtract(plus_x, origin); + const int minus_y = RDmn::parameter_type::subtract(plus_y, origin); + + std::vector plus_x_minus_y(DIMENSION, 0.); + std::vector minus_x_plus_y(DIMENSION, 0.); + for (int d = 0; d < DIMENSION; ++d) { + plus_x_minus_y[d] = basis[0][d] - basis[1][d]; + minus_x_plus_y[d] = basis[1][d] - basis[0][d]; + } + + const int delta_plus_x_minus_y = index_of(plus_x_minus_y); + const int delta_minus_x_plus_y = index_of(minus_x_plus_y); + + std::vector d_to_px{origin}; + std::vector px_to_d{origin}; + std::vector d_to_py{origin}; + std::vector py_to_d{origin}; + std::vector px_to_py{origin}; + std::vector py_to_px{origin}; + + push_unique(d_to_px, plus_x); + push_unique(px_to_d, minus_x); + push_unique(d_to_py, plus_y); + push_unique(py_to_d, minus_y); + + push_unique(px_to_py, minus_x); + push_unique(px_to_py, plus_y); + push_unique(px_to_py, delta_minus_x_plus_y); + + push_unique(py_to_px, plus_x); + push_unique(py_to_px, minus_y); + push_unique(py_to_px, delta_plus_x_minus_y); + for (int i = 0; i < BANDS; i++) { for (int s1 = 0; s1 < 2; s1++) { for (int j = 0; j < BANDS; j++) { @@ -198,22 +245,37 @@ void ThreebandHubbard::initializeHInteraction( } } } + + for (int s1 = 0; s1 < 2; s1++) { + for (int s2 = 0; s2 < 2; s2++) { + for (const int delta_r : d_to_px) + H_interaction(0, s1, 1, s2, delta_r) = V_pd; + for (const int delta_r : d_to_py) + H_interaction(0, s1, 2, s2, delta_r) = V_pd; + for (const int delta_r : px_to_d) + H_interaction(1, s1, 0, s2, delta_r) = V_pd; + for (const int delta_r : py_to_d) + H_interaction(2, s1, 0, s2, delta_r) = V_pd; + } + } + + for (int s1 = 0; s1 < 2; s1++) { + for (int s2 = 0; s2 < 2; s2++) { + for (const int delta_r : px_to_py) + H_interaction(1, s1, 2, s2, delta_r) = V_pp; + for (const int delta_r : py_to_px) + H_interaction(2, s1, 1, s2, delta_r) = V_pp; + } + } } template template -void ThreebandHubbard::initializeHSymmetry(func::function& H_symmetries) { +void ThreebandHubbard::initializeHSymmetry( + func::function& H_symmetries) { H_symmetries = -1; - - // H_symmetry(i, s1, j, s2) - // H_symmetries(0, 0, 0, 0) = 0; // at b0, G of spin 0 or 1 has the same values. - // H_symmetries(0, 1, 0, 1) = 0; - - // H_symmetries(1, 0, 1, 0) = 1; - // H_symmetries(1, 1, 1, 1) = 1; // at i, G of spin 0 or 1 has the same values. } - template template void ThreebandHubbard::initializeH0( @@ -221,14 +283,9 @@ void ThreebandHubbard::initializeH0( func::function, func::dmn_variadic, KDmn>>& H_0) { typename KDmn::element_type default_q(ParametersType::lattice_dimension); - // would rather get it like this -> KDmn::parameter_type::DIMENSION); - // but KDmn are inconsistent about whether they known their kspace dimension! initializeH0WithQ(parameters, H_0, default_q); } -/** generate the actual H0 with q-shift - * assumption that the origin of KDmn is the default initialization of KDmn::element_type - */ template template void ThreebandHubbard::initializeH0WithQ( @@ -242,13 +299,18 @@ void ThreebandHubbard::initializeH0WithQ( std::vector k_vecs(KDmn::get_elements()); - for( auto & k_elem : k_vecs) - std::transform(k_elem.cbegin(), k_elem.cend(), q.begin(), k_elem.begin(), [](auto& k, auto q_elem) { return k + q_elem; }); - + for (auto& k_elem : k_vecs) + std::transform(k_elem.cbegin(), k_elem.cend(), q.begin(), k_elem.begin(), + [](auto& k, auto q_elem) { return k + q_elem; }); + const auto t_pd = parameters.get_t_pd(); const auto t_pp = parameters.get_t_pp(); const auto ep_d = parameters.get_ep_d(); const auto ep_p = parameters.get_ep_p(); + const auto U_dd = parameters.get_U_dd(); + const auto U_pp = parameters.get_U_pp(); + const auto V_pd = parameters.get_V_pd(); + const auto V_pp = parameters.get_V_pp(); H_0 = ScalarType(0); @@ -256,15 +318,15 @@ void ThreebandHubbard::initializeH0WithQ( for (int k_ind = 0; k_ind < KDmn::dmn_size(); ++k_ind) { const auto& k = k_vecs[k_ind]; - - const auto valdpx = 2. * I * t_pd * std::sin(k[0] / 2.); - const auto valdpy = -2. * I * t_pd * std::sin(k[1] / 2.); + + const auto valdpx = -2. * I * t_pd * std::sin(k[0] / 2.); + const auto valdpy = 2. * I * t_pd * std::sin(k[1] / 2.); const auto valpxpy = 4. * t_pp * std::sin(k[0] / 2.) * std::sin(k[1] / 2.); for (int s = 0; s < 2; s++) { - H_0(0, s, 0, s, k_ind) = ep_d; - H_0(1, s, 1, s, k_ind) = ep_p; - H_0(2, s, 2, s, k_ind) = ep_p; + H_0(0, s, 0, s, k_ind) = ep_d + U_dd / 2.0 + 4.0 * V_pd; + H_0(1, s, 1, s, k_ind) = ep_p + U_pp / 2.0 + 4.0 * V_pp + 2.0 * V_pd; + H_0(2, s, 2, s, k_ind) = ep_p + U_pp / 2.0 + 4.0 * V_pp + 2.0 * V_pd; H_0(0, s, 1, s, k_ind) = valdpx; H_0(1, s, 0, s, k_ind) = -valdpx; diff --git a/include/dca/phys/parameters/model_parameters_threeband_hubbard.inc b/include/dca/phys/parameters/model_parameters_threeband_hubbard.inc index 166b58023..141a54b0f 100644 --- a/include/dca/phys/parameters/model_parameters_threeband_hubbard.inc +++ b/include/dca/phys/parameters/model_parameters_threeband_hubbard.inc @@ -67,6 +67,20 @@ public: U_pp_ = U_pp; } + double get_V_pd() const { + return V_pd_; + } + void set_V_pd(const double V_pd) { + V_pd_ = V_pd; + } + + double get_V_pp() const { + return V_pp_; + } + void set_V_pp(const double V_pp) { + V_pp_ = V_pp; + } + private: double t_pd_ = 0; double t_pp_ = 0; @@ -74,6 +88,8 @@ private: double ep_d_ = 0; double U_dd_ = 0; double U_pp_ = 0; + double V_pd_ = 0; + double V_pp_ = 0; }; template @@ -88,6 +104,8 @@ int ModelParameters @@ -114,6 +134,8 @@ void ModelParameters @@ -153,6 +175,16 @@ void ModelParameters +#include +#include +#include +#include +#include + +#include "dca/function/domains.hpp" +#include "dca/function/function.hpp" +#include "dca/io/json/json_reader.hpp" +#include "dca/phys/domains/cluster/cluster_domain_aliases.hpp" +#include "dca/phys/domains/cluster/cluster_domain_initializer.hpp" +#include "dca/phys/domains/cluster/cluster_operations.hpp" +#include "dca/phys/domains/cluster/symmetries/point_groups/2d/2d_square.hpp" +#include "dca/phys/models/tight_binding_model.hpp" +#include "dca/phys/parameters/model_parameters.hpp" +#include "dca/testing/gtest_h_w_warning_blocking.h" + +namespace { + +using PointGroup = dca::phys::domains::D4; +using Lattice = dca::phys::models::ThreebandHubbard; +using Model = dca::phys::models::TightBindingModel; +using ModelParameters = dca::phys::params::ModelParameters; + +using BandDmn = dca::func::dmn_0>; +using SpinDmn = dca::func::dmn_0>; +using BandSpinDmn = dca::func::dmn_variadic; +using CDA = dca::phys::ClusterDomainAliases; +using RClusterDmn = typename CDA::RClusterDmn; + +class PackingStub { +public: + template + int get_buffer_size(const T&) const { + return sizeof(T); + } + + template + void pack(char* buffer, const int buffer_size, int& position, const T& value) const { + if (position + static_cast(sizeof(T)) > buffer_size) + throw std::runtime_error("PackingStub buffer overflow."); + std::memcpy(buffer + position, &value, sizeof(T)); + position += sizeof(T); + } + + template + void unpack(char* buffer, const int buffer_size, int& position, T& value) const { + if (position + static_cast(sizeof(T)) > buffer_size) + throw std::runtime_error("PackingStub buffer overflow."); + std::memcpy(&value, buffer + position, sizeof(T)); + position += sizeof(T); + } +}; + +void initializeRealCluster() { + static bool initialized = false; + if (!initialized) { + const std::vector> cluster{{2, 0}, {0, 2}}; + dca::phys::domains::cluster_domain_initializer::execute( + Lattice::initializeRDCABasis(), cluster); + initialized = true; + } +} + +template +bool contains(const Container& container, const int value) { + return std::find(container.begin(), container.end(), value) != container.end(); +} + +std::vector uniqueIndices(std::initializer_list indices) { + std::vector result; + for (const int index : indices) + if (!contains(result, index)) + result.push_back(index); + return result; +} + +int indexOfDisplacement(std::vector displacement) { + const auto& super_basis = RClusterDmn::parameter_type::get_super_basis_vectors(); + const auto& elements = RClusterDmn::parameter_type::get_elements(); + displacement = dca::phys::domains::cluster_operations::translate_inside_cluster(displacement, + super_basis); + return dca::phys::domains::cluster_operations::index(displacement, elements, + dca::phys::domains::BRILLOUIN_ZONE); +} + +} // namespace + +TEST(ThreebandHubbardTest, ModelParametersSetReadAndPackVpdVpp) { + ModelParameters pars; + EXPECT_DOUBLE_EQ(0., pars.get_V_pd()); + EXPECT_DOUBLE_EQ(0., pars.get_V_pp()); + + pars.set_t_pd(1.); + pars.set_t_pp(2.); + pars.set_ep_d(3.); + pars.set_ep_p(4.); + pars.set_U_dd(5.); + pars.set_U_pp(6.); + pars.set_V_pd(7.); + pars.set_V_pp(8.); + EXPECT_DOUBLE_EQ(7., pars.get_V_pd()); + EXPECT_DOUBLE_EQ(8., pars.get_V_pp()); + + PackingStub packing; + const int buffer_size = pars.getBufferSize(packing); + std::vector buffer(buffer_size); + int position = 0; + pars.pack(packing, buffer.data(), buffer_size, position); + EXPECT_EQ(buffer_size, position); + + ModelParameters unpacked; + position = 0; + unpacked.unpack(packing, buffer.data(), buffer_size, position); + EXPECT_EQ(buffer_size, position); + EXPECT_DOUBLE_EQ(1., unpacked.get_t_pd()); + EXPECT_DOUBLE_EQ(2., unpacked.get_t_pp()); + EXPECT_DOUBLE_EQ(3., unpacked.get_ep_d()); + EXPECT_DOUBLE_EQ(4., unpacked.get_ep_p()); + EXPECT_DOUBLE_EQ(5., unpacked.get_U_dd()); + EXPECT_DOUBLE_EQ(6., unpacked.get_U_pp()); + EXPECT_DOUBLE_EQ(7., unpacked.get_V_pd()); + EXPECT_DOUBLE_EQ(8., unpacked.get_V_pp()); + + dca::io::JSONReader reader; + ModelParameters read; + reader.open_file(DCA_SOURCE_DIR + "/test/unit/phys/models/analytic_hamiltonians/threeband_hubbard_input.json"); + read.readWrite(reader); + reader.close_file(); + EXPECT_DOUBLE_EQ(1.5, read.get_t_pd()); + EXPECT_DOUBLE_EQ(0.25, read.get_t_pp()); + EXPECT_DOUBLE_EQ(-1., read.get_ep_d()); + EXPECT_DOUBLE_EQ(2., read.get_ep_p()); + EXPECT_DOUBLE_EQ(8., read.get_U_dd()); + EXPECT_DOUBLE_EQ(4., read.get_U_pp()); + EXPECT_DOUBLE_EQ(0.75, read.get_V_pd()); + EXPECT_DOUBLE_EQ(0.5, read.get_V_pp()); +} + +TEST(ThreebandHubbardTest, InitializeH0IncludesHartreeShifts) { + using KDmn = dca::func::dmn_0>>; + KDmn::parameter_type::set_elements({{0., 0.}, {M_PI, M_PI}}); + + dca::func::function, + dca::func::dmn_variadic> + H_0; + + ModelParameters pars; + pars.set_t_pd(1.5); + pars.set_t_pp(0.25); + pars.set_ep_d(-1.); + pars.set_ep_p(2.); + pars.set_U_dd(8.); + pars.set_U_pp(4.); + pars.set_V_pd(0.75); + pars.set_V_pp(0.5); + + Lattice::initializeH0WithQ(pars, H_0, std::vector{0., 0.}); + + const double d_diagonal = -1. + 8. / 2. + 4. * 0.75; + const double p_diagonal = 2. + 4. / 2. + 4. * 0.5 + 2. * 0.75; + for (int s = 0; s < SpinDmn::dmn_size(); ++s) { + for (int k = 0; k < KDmn::dmn_size(); ++k) { + EXPECT_DOUBLE_EQ(d_diagonal, H_0(0, s, 0, s, k).real()); + EXPECT_DOUBLE_EQ(p_diagonal, H_0(1, s, 1, s, k).real()); + EXPECT_DOUBLE_EQ(p_diagonal, H_0(2, s, 2, s, k).real()); + } + + EXPECT_NEAR(-2. * 1.5, H_0(0, s, 1, s, 1).imag(), 1e-14); + EXPECT_NEAR(2. * 1.5, H_0(1, s, 0, s, 1).imag(), 1e-14); + EXPECT_NEAR(2. * 1.5, H_0(0, s, 2, s, 1).imag(), 1e-14); + EXPECT_NEAR(-2. * 1.5, H_0(2, s, 0, s, 1).imag(), 1e-14); + EXPECT_NEAR(4. * 0.25, H_0(1, s, 2, s, 1).real(), 1e-14); + EXPECT_NEAR(4. * 0.25, H_0(2, s, 1, s, 1).real(), 1e-14); + } +} + +TEST(ThreebandHubbardTest, InitializeHInteractionIncludesVpdVpp) { + initializeRealCluster(); + + dca::func::function> + H_interaction; + + ModelParameters pars; + pars.set_U_dd(8.); + pars.set_U_pp(4.); + pars.set_V_pd(0.75); + pars.set_V_pp(0.5); + + Lattice::initializeHInteraction(H_interaction, pars); + + const int origin = RClusterDmn::parameter_type::origin_index(); + const auto& basis = RClusterDmn::parameter_type::get_basis_vectors(); + const int plus_x = indexOfDisplacement(basis[0]); + const int plus_y = indexOfDisplacement(basis[1]); + const int minus_x = RClusterDmn::parameter_type::subtract(plus_x, origin); + const int minus_y = RClusterDmn::parameter_type::subtract(plus_y, origin); + + std::vector plus_x_minus_y(Lattice::DIMENSION, 0.); + std::vector minus_x_plus_y(Lattice::DIMENSION, 0.); + for (int d = 0; d < Lattice::DIMENSION; ++d) { + plus_x_minus_y[d] = basis[0][d] - basis[1][d]; + minus_x_plus_y[d] = basis[1][d] - basis[0][d]; + } + + const auto d_to_px = uniqueIndices({origin, plus_x}); + const auto px_to_d = uniqueIndices({origin, minus_x}); + const auto d_to_py = uniqueIndices({origin, plus_y}); + const auto py_to_d = uniqueIndices({origin, minus_y}); + const auto px_to_py = uniqueIndices({origin, minus_x, plus_y, indexOfDisplacement(minus_x_plus_y)}); + const auto py_to_px = uniqueIndices({origin, plus_x, minus_y, indexOfDisplacement(plus_x_minus_y)}); + + for (int r = 0; r < RClusterDmn::dmn_size(); ++r) { + for (int s1 = 0; s1 < SpinDmn::dmn_size(); ++s1) { + for (int s2 = 0; s2 < SpinDmn::dmn_size(); ++s2) { + EXPECT_DOUBLE_EQ(r == origin && s1 != s2 ? 8. : 0., H_interaction(0, s1, 0, s2, r)); + EXPECT_DOUBLE_EQ(r == origin && s1 != s2 ? 4. : 0., H_interaction(1, s1, 1, s2, r)); + EXPECT_DOUBLE_EQ(r == origin && s1 != s2 ? 4. : 0., H_interaction(2, s1, 2, s2, r)); + + EXPECT_DOUBLE_EQ(contains(d_to_px, r) ? 0.75 : 0., H_interaction(0, s1, 1, s2, r)); + EXPECT_DOUBLE_EQ(contains(px_to_d, r) ? 0.75 : 0., H_interaction(1, s1, 0, s2, r)); + EXPECT_DOUBLE_EQ(contains(d_to_py, r) ? 0.75 : 0., H_interaction(0, s1, 2, s2, r)); + EXPECT_DOUBLE_EQ(contains(py_to_d, r) ? 0.75 : 0., H_interaction(2, s1, 0, s2, r)); + + EXPECT_DOUBLE_EQ(contains(px_to_py, r) ? 0.5 : 0., H_interaction(1, s1, 2, s2, r)); + EXPECT_DOUBLE_EQ(contains(py_to_px, r) ? 0.5 : 0., H_interaction(2, s1, 1, s2, r)); + } + } + } +} From 091035a089655414fdc653107ab194b6531a47a2 Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Fri, 7 Aug 2026 14:06:46 -0400 Subject: [PATCH 2/2] fixing header issue caused by merge --- .../threeband_hubbard_test.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/unit/phys/models/analytic_hamiltonians/threeband_hubbard_test.cpp b/test/unit/phys/models/analytic_hamiltonians/threeband_hubbard_test.cpp index cd32074e5..a6b7e9a86 100644 --- a/test/unit/phys/models/analytic_hamiltonians/threeband_hubbard_test.cpp +++ b/test/unit/phys/models/analytic_hamiltonians/threeband_hubbard_test.cpp @@ -22,7 +22,7 @@ #include "dca/phys/domains/cluster/cluster_domain_aliases.hpp" #include "dca/phys/domains/cluster/cluster_domain_initializer.hpp" #include "dca/phys/domains/cluster/cluster_operations.hpp" -#include "dca/phys/domains/cluster/symmetries/point_groups/2d/2d_square.hpp" +#include "dca/phys/domains/cluster/symmetries/point_groups/2d/holohedries_2d.hpp" #include "dca/phys/models/tight_binding_model.hpp" #include "dca/phys/parameters/model_parameters.hpp" #include "dca/testing/gtest_h_w_warning_blocking.h" @@ -90,8 +90,8 @@ std::vector uniqueIndices(std::initializer_list indices) { int indexOfDisplacement(std::vector displacement) { const auto& super_basis = RClusterDmn::parameter_type::get_super_basis_vectors(); const auto& elements = RClusterDmn::parameter_type::get_elements(); - displacement = dca::phys::domains::cluster_operations::translate_inside_cluster(displacement, - super_basis); + displacement = + dca::phys::domains::cluster_operations::translate_inside_cluster(displacement, super_basis); return dca::phys::domains::cluster_operations::index(displacement, elements, dca::phys::domains::BRILLOUIN_ZONE); } @@ -154,9 +154,7 @@ TEST(ThreebandHubbardTest, InitializeH0IncludesHartreeShifts) { using KDmn = dca::func::dmn_0>>; KDmn::parameter_type::set_elements({{0., 0.}, {M_PI, M_PI}}); - dca::func::function, - dca::func::dmn_variadic> - H_0; + dca::func::function, dca::func::dmn_variadic> H_0; ModelParameters pars; pars.set_t_pd(1.5); @@ -191,8 +189,7 @@ TEST(ThreebandHubbardTest, InitializeH0IncludesHartreeShifts) { TEST(ThreebandHubbardTest, InitializeHInteractionIncludesVpdVpp) { initializeRealCluster(); - dca::func::function> - H_interaction; + dca::func::function> H_interaction; ModelParameters pars; pars.set_U_dd(8.);