summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--collectStokesData.hpp11
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;