Loading include/dca/phys/dca_step/cluster_mapping/coarsegraining/coarsegraining_tp.hpp +4 −0 Original line number Diff line number Diff line Loading @@ -704,6 +704,10 @@ double coarsegraining_tp<parameters_type, K_dmn>::get_integration_factor() { return 1; break; case PARTICLE_PARTICLE_SINGLET: return 1; break; default: throw std::logic_error(__FUNCTION__); } Loading include/dca/phys/dca_step/cluster_solver/ctaux/accumulator/tp/accumulator_nonlocal_chi_atomic.hpp +10 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ class accumulator_nonlocal_chi_atomic<model_type, PARTICLE_HOLE_CHARGE> { }; // // Specialization for particle-hole-superconducting channel. // Specialization for particle-particle-up-down channel. // template <class model_type> class accumulator_nonlocal_chi_atomic<model_type, PARTICLE_PARTICLE_UP_DOWN> { Loading @@ -167,6 +167,15 @@ class accumulator_nonlocal_chi_atomic<model_type, PARTICLE_PARTICLE_UP_DOWN> { } }; // // Specialization for particle-particle-singlet channel. // template <class model_type> class accumulator_nonlocal_chi_atomic<model_type, PARTICLE_PARTICLE_SINGLET> { inline void execute() { throw std::logic_error(__FUNCTION__); } }; } // ctaux } // solver } // phys Loading include/dca/phys/dca_step/cluster_solver/shared_tools/accumulation/tp/tp_accumulator.hpp +29 −0 Original line number Diff line number Diff line Loading @@ -493,6 +493,35 @@ double TpAccumulator<Parameters, linalg::CPU>::updateG4() { flops += n_loops * 2 * flops_update_atomic; break; case PARTICLE_PARTICLE_SINGLET: // G4 = 1/2 sum_s<(c(k1,s)c(q-k1,-s)-c(k1,-s)c(q-k1,s))(c+(q-k2,-s)c+(k2,s)-c+(q-k2,s)c+(k2,-s))> // = 1/2 sum_s(G(k1,k2,s)G(q-k1,q-k2,-s)+G(k1,q-k2,s)G(q-k1,k2,-s)). for (int w_ex_idx = 0; w_ex_idx < exchange_frq.size(); ++w_ex_idx) { const int w_ex = exchange_frq[w_ex_idx]; for (int w2 = 0; w2 < WTpDmn::dmn_size(); ++w2) for (int w1 = 0; w1 < WTpDmn::dmn_size(); ++w1) for (int k_ex_idx = 0; k_ex_idx < exchange_mom.size(); ++k_ex_idx) { const int k_ex = exchange_mom[k_ex_idx]; for (int k2 = 0; k2 < KDmn::dmn_size(); ++k2) for (int k1 = 0; k1 < KDmn::dmn_size(); ++k1) { Complex* const G4_ptr = &(*G4_)(0, 0, 0, 0, k1, k2, k_ex_idx, w1, w2, w_ex_idx); for (int s = 0; s < 2; ++s) { updateG4Atomic(G4_ptr, s, k1, k2, w1, w2, !s, q_minus_k(k1, k_ex), q_minus_k(k2, k_ex), w_ex_minus_w(w1, w_ex), w_ex_minus_w(w2, w_ex), sign_over_2, false); updateG4Atomic(G4_ptr, s, k1, q_minus_k(k2, k_ex), w1, w_ex_minus_w(w2, w_ex), !s, q_minus_k(k1, k_ex), k2, w_ex_minus_w(w1, w_ex), w2, sign_over_2, false); } } } } flops += n_loops * 2 * flops_update_atomic; break; default: throw(std::logic_error("Non supported tp mode.")); } Loading include/dca/phys/dca_step/cluster_solver/shared_tools/accumulation/tp/tp_accumulator_gpu.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -381,6 +381,12 @@ void TpAccumulator<Parameters, linalg::GPU>::updateG4() { G_[1].leadingDimension(), n_bands_, KDmn::dmn_size(), WTpPosDmn::dmn_size(), nw_exchange, nk_exchange, sign_, streams_[0]); break; case PARTICLE_PARTICLE_SINGLET: details::updateG4<Real, PARTICLE_PARTICLE_SINGLET>( get_G4().ptr(), G_[0].ptr(), G_[0].leadingDimension(), G_[1].ptr(), G_[1].leadingDimension(), n_bands_, KDmn::dmn_size(), WTpPosDmn::dmn_size(), nw_exchange, nk_exchange, sign_, streams_[0]); break; default: throw(std::logic_error("Mode non supported.")); } Loading include/dca/phys/dca_step/symmetrization/diagrammatic_symmetries.hpp +10 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,11 @@ void diagrammatic_symmetries<parameters_type>::execute( symmetrize_over_pi_rotations_pp(G); break; case PARTICLE_PARTICLE_SINGLET: set_real(G); symmetrize_over_pi_rotations_pp(G); break; default: throw std::logic_error(__FUNCTION__); } Loading Loading @@ -301,6 +306,11 @@ void diagrammatic_symmetries<parameters_type>::execute( symmetrize_over_pi_rotations_pp(G); break; case PARTICLE_PARTICLE_SINGLET: // set_real(G); symmetrize_over_pi_rotations_pp(G); break; default: throw std::logic_error(__FUNCTION__); } Loading Loading
include/dca/phys/dca_step/cluster_mapping/coarsegraining/coarsegraining_tp.hpp +4 −0 Original line number Diff line number Diff line Loading @@ -704,6 +704,10 @@ double coarsegraining_tp<parameters_type, K_dmn>::get_integration_factor() { return 1; break; case PARTICLE_PARTICLE_SINGLET: return 1; break; default: throw std::logic_error(__FUNCTION__); } Loading
include/dca/phys/dca_step/cluster_solver/ctaux/accumulator/tp/accumulator_nonlocal_chi_atomic.hpp +10 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ class accumulator_nonlocal_chi_atomic<model_type, PARTICLE_HOLE_CHARGE> { }; // // Specialization for particle-hole-superconducting channel. // Specialization for particle-particle-up-down channel. // template <class model_type> class accumulator_nonlocal_chi_atomic<model_type, PARTICLE_PARTICLE_UP_DOWN> { Loading @@ -167,6 +167,15 @@ class accumulator_nonlocal_chi_atomic<model_type, PARTICLE_PARTICLE_UP_DOWN> { } }; // // Specialization for particle-particle-singlet channel. // template <class model_type> class accumulator_nonlocal_chi_atomic<model_type, PARTICLE_PARTICLE_SINGLET> { inline void execute() { throw std::logic_error(__FUNCTION__); } }; } // ctaux } // solver } // phys Loading
include/dca/phys/dca_step/cluster_solver/shared_tools/accumulation/tp/tp_accumulator.hpp +29 −0 Original line number Diff line number Diff line Loading @@ -493,6 +493,35 @@ double TpAccumulator<Parameters, linalg::CPU>::updateG4() { flops += n_loops * 2 * flops_update_atomic; break; case PARTICLE_PARTICLE_SINGLET: // G4 = 1/2 sum_s<(c(k1,s)c(q-k1,-s)-c(k1,-s)c(q-k1,s))(c+(q-k2,-s)c+(k2,s)-c+(q-k2,s)c+(k2,-s))> // = 1/2 sum_s(G(k1,k2,s)G(q-k1,q-k2,-s)+G(k1,q-k2,s)G(q-k1,k2,-s)). for (int w_ex_idx = 0; w_ex_idx < exchange_frq.size(); ++w_ex_idx) { const int w_ex = exchange_frq[w_ex_idx]; for (int w2 = 0; w2 < WTpDmn::dmn_size(); ++w2) for (int w1 = 0; w1 < WTpDmn::dmn_size(); ++w1) for (int k_ex_idx = 0; k_ex_idx < exchange_mom.size(); ++k_ex_idx) { const int k_ex = exchange_mom[k_ex_idx]; for (int k2 = 0; k2 < KDmn::dmn_size(); ++k2) for (int k1 = 0; k1 < KDmn::dmn_size(); ++k1) { Complex* const G4_ptr = &(*G4_)(0, 0, 0, 0, k1, k2, k_ex_idx, w1, w2, w_ex_idx); for (int s = 0; s < 2; ++s) { updateG4Atomic(G4_ptr, s, k1, k2, w1, w2, !s, q_minus_k(k1, k_ex), q_minus_k(k2, k_ex), w_ex_minus_w(w1, w_ex), w_ex_minus_w(w2, w_ex), sign_over_2, false); updateG4Atomic(G4_ptr, s, k1, q_minus_k(k2, k_ex), w1, w_ex_minus_w(w2, w_ex), !s, q_minus_k(k1, k_ex), k2, w_ex_minus_w(w1, w_ex), w2, sign_over_2, false); } } } } flops += n_loops * 2 * flops_update_atomic; break; default: throw(std::logic_error("Non supported tp mode.")); } Loading
include/dca/phys/dca_step/cluster_solver/shared_tools/accumulation/tp/tp_accumulator_gpu.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -381,6 +381,12 @@ void TpAccumulator<Parameters, linalg::GPU>::updateG4() { G_[1].leadingDimension(), n_bands_, KDmn::dmn_size(), WTpPosDmn::dmn_size(), nw_exchange, nk_exchange, sign_, streams_[0]); break; case PARTICLE_PARTICLE_SINGLET: details::updateG4<Real, PARTICLE_PARTICLE_SINGLET>( get_G4().ptr(), G_[0].ptr(), G_[0].leadingDimension(), G_[1].ptr(), G_[1].leadingDimension(), n_bands_, KDmn::dmn_size(), WTpPosDmn::dmn_size(), nw_exchange, nk_exchange, sign_, streams_[0]); break; default: throw(std::logic_error("Mode non supported.")); } Loading
include/dca/phys/dca_step/symmetrization/diagrammatic_symmetries.hpp +10 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,11 @@ void diagrammatic_symmetries<parameters_type>::execute( symmetrize_over_pi_rotations_pp(G); break; case PARTICLE_PARTICLE_SINGLET: set_real(G); symmetrize_over_pi_rotations_pp(G); break; default: throw std::logic_error(__FUNCTION__); } Loading Loading @@ -301,6 +306,11 @@ void diagrammatic_symmetries<parameters_type>::execute( symmetrize_over_pi_rotations_pp(G); break; case PARTICLE_PARTICLE_SINGLET: // set_real(G); symmetrize_over_pi_rotations_pp(G); break; default: throw std::logic_error(__FUNCTION__); } Loading