From 60e0f9b63c9825a265a93a278bf018d301063ea2 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Thu, 3 Apr 2025 13:26:02 -0300 Subject: Don't process empty files --- get_energy.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/get_energy.cpp b/get_energy.cpp index 857c1c4..6164a6d 100644 --- a/get_energy.cpp +++ b/get_energy.cpp @@ -135,6 +135,7 @@ int main(int argc, char* argv[]) { std::string file_end = std::to_string(p) + "_" + std::to_string(s) + "_" + std::to_string(λ) + "_" + std::to_string(τ₀) + "_" + std::to_string(y) + "_" + std::to_string(log2n) + "_" + std::to_string(τₘₐₓ) + ".dat"; std::ifstream cfile("C_"+file_end, std::ios::binary); + if (cfile.is_open()) { cfile.read((char*)(C.data()), C.size() * sizeof(Real)); cfile.close(); std::ifstream rfile("R_"+file_end, std::ios::binary); @@ -150,6 +151,7 @@ int main(int argc, char* argv[]) { std::vector Ct = fft.fourier(C); std::cout << y << " " << energy << " " << Ct[0].real() << std::endl; + } } return 0; -- cgit v1.2.3-70-g09d2