Commit c659839c authored by gbalduzz's avatar gbalduzz
Browse files

cleanup

parent eb39f5d3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ private:
  std::unique_ptr<SigmaInterpolatedType> Sigma_interpolated_;
  LatticeFreqFunction Sigma_old_;

  bool spin_simmetric_;
  bool spin_symmetric_;
};

template <typename Parameters>
@@ -134,7 +134,7 @@ CoarsegrainingSp<Parameters>::CoarsegrainingSp(Parameters& parameters_ref)

      w_q_("w_q_"),
      w_tot_(0.),
      spin_simmetric_(checkSpinSymmetry()) {
      spin_symmetric_(checkSpinSymmetry()) {
  interpolation_matrices<ScalarType, KClusterDmn, QDmn>::initialize(concurrency_);

  // Compute H0(k+q) for each value of k and q.
@@ -179,7 +179,7 @@ void CoarsegrainingSp<Parameters>::compute_G_K_w(const SigmaType& S_K_w, Cluster
  Threading().execute(n_threads, [&](int id, int n_threads) {
    const auto bounds = parallel::util::getBounds(id, n_threads, external_bounds);
    constexpr int n_bands = Parameters::bands;
    const int indep_spin_sectors = spin_simmetric_ ? 1 : 2;
    const int indep_spin_sectors = spin_symmetric_ ? 1 : 2;

    linalg::Matrix<Complex, linalg::CPU> G_inv("G_inv", n_bands);
    linalg::Vector<int, linalg::CPU> ipiv;
@@ -215,7 +215,7 @@ void CoarsegrainingSp<Parameters>::compute_G_K_w(const SigmaType& S_K_w, Cluster
            }
        }

      if (spin_simmetric_) {  // apply symmetry
      if (spin_symmetric_) {  // apply symmetry
        for (int j = 0; j < n_bands; ++j)
          for (int i = 0; i < n_bands; ++i)
            G_K_w(i, 1, j, 1, k, w) = G_K_w(i, 0, j, 0, k, w);
+1 −2
Original line number Diff line number Diff line
@@ -49,8 +49,7 @@ public:
  // defined as M(w1, w2) = \sum_{t1, t2} exp(i (w1 t1 - w2 t2)) M(t1, t2).
  // In case OutDmn contains the spin domain as a subdomain, 'spin' is used to rearrange the output.
  // Out: M_r_r_w_w.
  // Returns: the number of gigaflops performed by the method.
  // TODO: remove the gigaflops if they are not necessary.
  // Returns: the number of flops performed by the method.
  template <class Configuration, typename ScalarInp, class OutDmn>
  float execute(const Configuration& configuration, const linalg::Matrix<ScalarInp, linalg::CPU>& M,
                 func::function<std::complex<ScalarType>, OutDmn>& M_r_r_w_w, int spin = 0);
+3 −3
Original line number Diff line number Diff line
@@ -59,11 +59,11 @@ void initialize() {

// Perform the test in double and single precision.
template <typename T>
class SpaceTransform2DGpuTest : public ::testing::Test {};
class SpaceTransform2DTest : public ::testing::Test {};
using TestTypes = ::testing::Types<float, double>;
TYPED_TEST_CASE(SpaceTransform2DGpuTest, TestTypes);
TYPED_TEST_CASE(SpaceTransform2DTest, TestTypes);

TYPED_TEST(SpaceTransform2DGpuTest, Execute) {
TYPED_TEST(SpaceTransform2DTest, Execute) {
  using Real = TypeParam;
  initialize();