From a5d758c2228c2a7da14f78e3dda42cd9c4624dad Mon Sep 17 00:00:00 2001 From: SatoshiTerasaki Date: Thu, 26 Dec 2024 20:08:27 +0900 Subject: [PATCH 1/2] implement tau method --- include/sparseir/sampling.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/sparseir/sampling.hpp b/include/sparseir/sampling.hpp index a493c52..53c73d4 100644 --- a/include/sparseir/sampling.hpp +++ b/include/sparseir/sampling.hpp @@ -85,6 +85,10 @@ class TauSampling : public AbstractSampling { return sampling_points_; } + const Eigen::VectorXd& tau() const { + return sampling_points_; + } + const Eigen::Matrix& matrix() const override { return matrix_; } From a006d205855d68cbdce3b9a5d02a5af803c68daa Mon Sep 17 00:00:00 2001 From: SatoshiTerasaki Date: Thu, 26 Dec 2024 20:08:43 +0900 Subject: [PATCH 2/2] Pass tests about "Augmented bosonic basis" --- test/augment.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/augment.cxx b/test/augment.cxx index ce2b6a1..9309178 100644 --- a/test/augment.cxx +++ b/test/augment.cxx @@ -141,8 +141,8 @@ TEST_CASE("Augmented bosonic basis") { // Create tau sampling points auto tau_sampling = TauSampling(basis_aug); - /* auto tau = tau_sampling.tau; + REQUIRE().size() == basis_aug.size()); Eigen::VectorX gtau(tau.size()); for (size_t i = 0; i < tau.size(); ++i) { gtau(i) = c - exp(-tau(i) * pole) / (1 - exp(-beta * pole)); @@ -165,7 +165,6 @@ TEST_CASE("Augmented bosonic basis") { Eigen::VectorX gtau_reconst = tau_matrix * gl_fit; REQUIRE(gtau_reconst.isApprox(gtau, 1e-14 * magn)); - */ }