diff options
| author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-11-12 16:53:19 +0100 | 
|---|---|---|
| committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-11-12 16:53:19 +0100 | 
| commit | 1683ef8768ba04bba77ac6330eff61ae4e6e7911 (patch) | |
| tree | 81991bd9a0fd5811c134424d33b64bc175c1bec0 | |
| parent | c9cb8dd499c2b2648a78e63f2a0810451a69f8fd (diff) | |
| download | code-1683ef8768ba04bba77ac6330eff61ae4e6e7911.tar.gz code-1683ef8768ba04bba77ac6330eff61ae4e6e7911.tar.bz2 code-1683ef8768ba04bba77ac6330eff61ae4e6e7911.zip  | |
Fixed a bug in parameter pack expansion.
| -rw-r--r-- | collectStokesData.hpp | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/collectStokesData.hpp b/collectStokesData.hpp index b32ccf0..eae81fd 100644 --- a/collectStokesData.hpp +++ b/collectStokesData.hpp @@ -6,7 +6,6 @@ using Complex = std::complex<Real>;  template<int ...ps, class Generator, typename... T>  void collectStokesData(std::string tag, unsigned N, Generator& r, double ε, double δz, bool minimum, T... μs) { -  std::ofstream file("stokes_info_" + tag + ".dat");    unsigned nGs = 8;    unsigned nTs = 32;    Real newSaddleThres = 1e-4; @@ -55,6 +54,11 @@ void collectStokesData(std::string tag, unsigned N, Generator& r, double ε, dou    M *= exp(Complex(0, φ)); +  Cord c(M, zMin, zSaddle, nGs); +  c.relaxNewton(nTs, 1, 1e-10, 1e3); + +  std::ofstream file("stokes_info_" + tag + ".dat"); +    file.precision(15);    file << N << std::endl; @@ -63,7 +67,7 @@ void collectStokesData(std::string tag, unsigned N, Generator& r, double ε, dou    std::ofstream tensorFile("stokes_tensor_" + tag + ".dat",  std::ios::out | std::ios::binary | std::ios::trunc);    std::apply([&tensorFile](const Tensor<Real, ps>&... Js) -> void { -      std::make_tuple(tensorFile.write(Js.data(), Js.size() * sizeof(Complex))...); +      (tensorFile.write((char*)Js.data(), Js.size() * sizeof(Real)), ...);        } , ReM.Js);    file << xMin.transpose() << std::endl; @@ -74,9 +78,6 @@ void collectStokesData(std::string tag, unsigned N, Generator& r, double ε, dou    file << eigenSz.eigenvalues().transpose() << std::endl;    file << φ << " " << (xMin - zSaddle).norm() << std::endl; -  Cord c(M, zMin, zSaddle, nGs); -  c.relaxNewton(nTs, 1, 1e-10, 1e3); -    Real reConstraintError = 0;    Real imConstraintError = 0;    Real imEnergyError = 0;  | 
