diff options
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; } |