Loading include/dca/io/hdf5/hdf5_reader.hpp +4 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,9 @@ class HDF5Reader { public: typedef H5::H5File file_type; // In: verbose. If true, the reader outputs a short log whenever it is executed. HDF5Reader(bool verbose = true) : my_file(NULL), my_paths(0), verbose_(verbose) {} ~HDF5Reader(); bool is_reader() { Loading Loading @@ -278,7 +280,7 @@ void HDF5Reader::execute(std::string name, dca::linalg::Matrix<scalar_type, dca: } } } // io } // dca } // namespace io } // namespace dca #endif // DCA_IO_HDF5_HDF5_READER_HPP include/dca/io/hdf5/hdf5_writer.hpp +4 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,10 @@ public: typedef H5::H5File file_type; public: // In: verbose. If true, the writer outputs a short log whenever it is executed. HDF5Writer(bool verbose = true) : my_file(NULL), file_id(-1), my_group(0), my_paths(0), verbose_(verbose) {} ~HDF5Writer(); bool is_reader() { Loading Loading @@ -651,7 +653,7 @@ void HDF5Writer::execute(const std::unique_ptr<T>& obj) { execute(*obj); } } // io } // dca } // namespace io } // namespace dca #endif // DCA_IO_HDF5_HDF5_WRITER_HPP include/dca/linalg/matrixop.hpp +229 −229 File changed.Preview size limit exceeded, changes collapsed. Show changes include/dca/math/function_transform/special_transforms/space_transform_2D.hpp +8 −4 Original line number Diff line number Diff line Loading @@ -37,8 +37,11 @@ protected: using SDmn = func::dmn_0<phys::domains::electron_spin_domain>; public: // 2D Fourier transform and rearranging of the result. // In/Out: f_input // Apply the 2D Fourier transform defined as // f(k1, b1, k2, b2) = \sum_{r1, r2} Exp[i (k1 (r1 + a[b1]) - k2 (r2 + a[b2])] f(r1, b1, r2, b2) / Nc, // where a[b] is the displacement vector associated with each band, // and rearrange the output domains. // In/Out: f_input. The input is overwritten with a partial result. // Out: f_output template <class W1Dmn, class W2Dmn> static void execute( Loading Loading @@ -74,10 +77,11 @@ void SpaceTransform2D<RDmn, KDmn, Real>::execute( for (int b1 = 0; b1 < BDmn::dmn_size(); ++b1) { linalg::MatrixView<Complex, linalg::CPU> f_r_r(&f_input(0, 0, b1, b2, s, w1, w2), nc); // f(k1,k2) = \sum exp(i(k1 * r1 - k2 *r2)) f(r1, r2) / Nc // f(k1,k2) = \sum_{r1, r2} exp(i(k1 * r1 - k2 *r2)) f(r1, r2) / Nc linalg::matrixop::gemm(T, f_r_r, tmp); linalg::matrixop::gemm('N', 'C', norm, tmp, T, Complex(0), f_r_r); // f(k1, k2) *= Exp[i (k1 a[b1] - k2 a[b2])] for (int k2 = 0; k2 < nc; ++k2) for (int k1 = 0; k1 < nc; ++k1) f_output(b1, b2, s, k1, k2, w1, w2) = Loading Loading @@ -109,7 +113,7 @@ const auto& SpaceTransform2D<RDmn, KDmn, Real>::getPhaseFactors() { static func::function<Complex, func::dmn_variadic<BDmn, KDmn>> phase_factors("Phase factors."); static std::once_flag flag; // Initialize the phase factors. // Initialize the phase factors Exp[i k a[b]]. std::call_once(flag, [&]() { std::vector<std::vector<double>> a_vecs; for (const auto& elem : BDmn::get_elements()) Loading include/dca/math/function_transform/special_transforms/space_transform_2D_gpu.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public: // Performs the 2D fourier transform from real to momentum space in place and rearranges the // order of M's labels from (r, b, w) to (b, r, w). // The transform is equivalent to M(k1, k2) = \sum_{r1, r2} exp(i(k1 * r1 - k2 * r2)) M(r1, r2) // See space_transform_2D.hpp for a definition of the transform. // In/Out: M // Returns: number of flop. float execute(RMatrix& M); Loading Loading
include/dca/io/hdf5/hdf5_reader.hpp +4 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,9 @@ class HDF5Reader { public: typedef H5::H5File file_type; // In: verbose. If true, the reader outputs a short log whenever it is executed. HDF5Reader(bool verbose = true) : my_file(NULL), my_paths(0), verbose_(verbose) {} ~HDF5Reader(); bool is_reader() { Loading Loading @@ -278,7 +280,7 @@ void HDF5Reader::execute(std::string name, dca::linalg::Matrix<scalar_type, dca: } } } // io } // dca } // namespace io } // namespace dca #endif // DCA_IO_HDF5_HDF5_READER_HPP
include/dca/io/hdf5/hdf5_writer.hpp +4 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,10 @@ public: typedef H5::H5File file_type; public: // In: verbose. If true, the writer outputs a short log whenever it is executed. HDF5Writer(bool verbose = true) : my_file(NULL), file_id(-1), my_group(0), my_paths(0), verbose_(verbose) {} ~HDF5Writer(); bool is_reader() { Loading Loading @@ -651,7 +653,7 @@ void HDF5Writer::execute(const std::unique_ptr<T>& obj) { execute(*obj); } } // io } // dca } // namespace io } // namespace dca #endif // DCA_IO_HDF5_HDF5_WRITER_HPP
include/dca/linalg/matrixop.hpp +229 −229 File changed.Preview size limit exceeded, changes collapsed. Show changes
include/dca/math/function_transform/special_transforms/space_transform_2D.hpp +8 −4 Original line number Diff line number Diff line Loading @@ -37,8 +37,11 @@ protected: using SDmn = func::dmn_0<phys::domains::electron_spin_domain>; public: // 2D Fourier transform and rearranging of the result. // In/Out: f_input // Apply the 2D Fourier transform defined as // f(k1, b1, k2, b2) = \sum_{r1, r2} Exp[i (k1 (r1 + a[b1]) - k2 (r2 + a[b2])] f(r1, b1, r2, b2) / Nc, // where a[b] is the displacement vector associated with each band, // and rearrange the output domains. // In/Out: f_input. The input is overwritten with a partial result. // Out: f_output template <class W1Dmn, class W2Dmn> static void execute( Loading Loading @@ -74,10 +77,11 @@ void SpaceTransform2D<RDmn, KDmn, Real>::execute( for (int b1 = 0; b1 < BDmn::dmn_size(); ++b1) { linalg::MatrixView<Complex, linalg::CPU> f_r_r(&f_input(0, 0, b1, b2, s, w1, w2), nc); // f(k1,k2) = \sum exp(i(k1 * r1 - k2 *r2)) f(r1, r2) / Nc // f(k1,k2) = \sum_{r1, r2} exp(i(k1 * r1 - k2 *r2)) f(r1, r2) / Nc linalg::matrixop::gemm(T, f_r_r, tmp); linalg::matrixop::gemm('N', 'C', norm, tmp, T, Complex(0), f_r_r); // f(k1, k2) *= Exp[i (k1 a[b1] - k2 a[b2])] for (int k2 = 0; k2 < nc; ++k2) for (int k1 = 0; k1 < nc; ++k1) f_output(b1, b2, s, k1, k2, w1, w2) = Loading Loading @@ -109,7 +113,7 @@ const auto& SpaceTransform2D<RDmn, KDmn, Real>::getPhaseFactors() { static func::function<Complex, func::dmn_variadic<BDmn, KDmn>> phase_factors("Phase factors."); static std::once_flag flag; // Initialize the phase factors. // Initialize the phase factors Exp[i k a[b]]. std::call_once(flag, [&]() { std::vector<std::vector<double>> a_vecs; for (const auto& elem : BDmn::get_elements()) Loading
include/dca/math/function_transform/special_transforms/space_transform_2D_gpu.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public: // Performs the 2D fourier transform from real to momentum space in place and rearranges the // order of M's labels from (r, b, w) to (b, r, w). // The transform is equivalent to M(k1, k2) = \sum_{r1, r2} exp(i(k1 * r1 - k2 * r2)) M(r1, r2) // See space_transform_2D.hpp for a definition of the transform. // In/Out: M // Returns: number of flop. float execute(RMatrix& M); Loading