diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-02-25 16:23:13 +0100 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-02-25 16:23:13 +0100 |
commit | 6482fcaf4e5d8ede27d9492ed08e6bc81b28b418 (patch) | |
tree | 9653bcb04ca148e85d5f494664f276a9ac828713 /stokes.hpp | |
parent | 3276bdd1e9796fec71e169e6c41d77da72b3a4fb (diff) | |
download | code-6482fcaf4e5d8ede27d9492ed08e6bc81b28b418.tar.gz code-6482fcaf4e5d8ede27d9492ed08e6bc81b28b418.tar.bz2 code-6482fcaf4e5d8ede27d9492ed08e6bc81b28b418.zip |
More changes.
Diffstat (limited to 'stokes.hpp')
-rw-r--r-- | stokes.hpp | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1,7 +1,8 @@ +#pragma once + #include "p-spin.hpp" #include "complex_normal.hpp" #include "dynamics.hpp" -#include <iostream> class ropeRelaxationStallException: public std::exception { virtual const char* what() const throw() { @@ -189,20 +190,11 @@ class Rope { δz[i] = dC; } + Real size = 0; for (unsigned i = 1; i < z.size() - 1; i++) { δz[i] = δz[i].conjugate() - (δz[i].dot(z[i]) / z[i].squaredNorm()) * z[i].conjugate(); } - // We return a δz with average norm of one. - Real mag = 0; - for (unsigned i = 1; i < z.size() - 1; i++) { - mag += δz[i].norm(); - } - - for (unsigned i = 1; i < z.size() - 1; i++) { - δz[i] /= mag / n(); - } - return δz; } |